This is a note to let you know that I've just added the patch titled

    n_gsm.c: Implement 3GPP27.010 DLC start-up procedure in MUX

to my tty git tree which can be found at
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-next branch.

The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)

The patch will also be merged in the next major kernel release
during the merge window.

If you have any questions about this process, please let me know.


>From 7e8ac7b23b67416700dfb8b4136a4e81ce675b48 Mon Sep 17 00:00:00 2001
From: xiaojin <[email protected]>
Date: Mon, 13 Aug 2012 13:43:15 +0100
Subject: n_gsm.c: Implement 3GPP27.010 DLC start-up procedure in MUX

In 3GPP27.010 5.8.1, it defined:
The TE multiplexer initiates the establishment of the multiplexer control 
channel by sending a SABM frame on DLCI 0 using the procedures of clause 5.4.1.
Once the multiplexer channel is established other DLCs may be established using 
the procedures of clause 5.4.1.
This patch implement 5.8.1 in MUX level, it make sure DLC0 is the first channel 
to be setup.

[or for those not familiar with the specification: it was possible to try
 and open a data connection while the control channel was not yet fully
 open, which is a spec violation and confuses some modems]

Signed-off-by: xiaojin <[email protected]>
Tested-by: Yin, Fengwei <[email protected]>
[tweaked the order we check things and error code]
Signed-off-by: Alan Cox <[email protected]>
Cc: The Horsebox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/tty/n_gsm.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 3778687..0988aaa 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -2889,6 +2889,10 @@ static int gsmtty_install(struct tty_driver *driver, 
struct tty_struct *tty)
        gsm = gsm_mux[mux];
        if (gsm->dead)
                return -EL2HLT;
+       /* If DLCI 0 is not yet fully open return an error. This is ok from a 
locking
+          perspective as we don't have to worry about this if DLCI0 is lost */
+       if (gsm->dlci[0] && gsm->dlci[0]->state != DLCI_OPEN) 
+               return -EL2NSYNC;
        dlci = gsm->dlci[line];
        if (dlci == NULL) {
                alloc = true;
-- 
1.7.10.1.362.g242cab3


--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to