diff options
Diffstat (limited to 'drivers/tty/n_gsm.c')
-rw-r--r-- | drivers/tty/n_gsm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index f34461c5f14e..2ebe47b78a3e 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -1090,6 +1090,7 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen) | |||
1090 | { | 1090 | { |
1091 | unsigned int addr = 0; | 1091 | unsigned int addr = 0; |
1092 | unsigned int modem = 0; | 1092 | unsigned int modem = 0; |
1093 | unsigned int brk = 0; | ||
1093 | struct gsm_dlci *dlci; | 1094 | struct gsm_dlci *dlci; |
1094 | int len = clen; | 1095 | int len = clen; |
1095 | u8 *dp = data; | 1096 | u8 *dp = data; |
@@ -1116,6 +1117,16 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen) | |||
1116 | if (len == 0) | 1117 | if (len == 0) |
1117 | return; | 1118 | return; |
1118 | } | 1119 | } |
1120 | len--; | ||
1121 | if (len > 0) { | ||
1122 | while (gsm_read_ea(&brk, *dp++) == 0) { | ||
1123 | len--; | ||
1124 | if (len == 0) | ||
1125 | return; | ||
1126 | } | ||
1127 | modem <<= 7; | ||
1128 | modem |= (brk & 0x7f); | ||
1129 | } | ||
1119 | tty = tty_port_tty_get(&dlci->port); | 1130 | tty = tty_port_tty_get(&dlci->port); |
1120 | gsm_process_modem(tty, dlci, modem, clen); | 1131 | gsm_process_modem(tty, dlci, modem, clen); |
1121 | if (tty) { | 1132 | if (tty) { |