n_gsm.c (6f84981772535e670e4e2df051a672af229b6694) | n_gsm.c (515be7baeddb04d786e3a7f4072791087c25bb04) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * n_gsm.c GSM 0710 tty multiplexor 4 * Copyright (c) 2009/10 Intel Corporation 5 * 6 * * THIS IS A DEVELOPMENT SNAPSHOT IT IS NOT A FINAL RELEASE * 7 * 8 * Outgoing path: --- 2045 unchanged lines hidden (view full) --- 2054 pr_debug("DLCI %d goes closed.\n", dlci->addr); 2055 dlci->state = DLCI_CLOSED; 2056 /* Prevent us from sending data before the link is up again */ 2057 dlci->constipated = true; 2058 if (dlci->addr != 0) { 2059 tty_port_tty_hangup(&dlci->port, false); 2060 gsm_dlci_clear_queues(dlci->gsm, dlci); 2061 /* Ensure that gsmtty_open() can return. */ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * n_gsm.c GSM 0710 tty multiplexor 4 * Copyright (c) 2009/10 Intel Corporation 5 * 6 * * THIS IS A DEVELOPMENT SNAPSHOT IT IS NOT A FINAL RELEASE * 7 * 8 * Outgoing path: --- 2045 unchanged lines hidden (view full) --- 2054 pr_debug("DLCI %d goes closed.\n", dlci->addr); 2055 dlci->state = DLCI_CLOSED; 2056 /* Prevent us from sending data before the link is up again */ 2057 dlci->constipated = true; 2058 if (dlci->addr != 0) { 2059 tty_port_tty_hangup(&dlci->port, false); 2060 gsm_dlci_clear_queues(dlci->gsm, dlci); 2061 /* Ensure that gsmtty_open() can return. */ |
2062 tty_port_set_initialized(&dlci->port, 0); | 2062 tty_port_set_initialized(&dlci->port, false); |
2063 wake_up_interruptible(&dlci->port.open_wait); 2064 } else 2065 dlci->gsm->dead = true; 2066 /* A DLCI 0 close is a MUX termination so we need to kick that 2067 back to userspace somehow */ 2068 gsm_dlci_data_kick(dlci); 2069 wake_up(&dlci->gsm->event); 2070} --- 1804 unchanged lines hidden (view full) --- 3875 struct gsm_mux *gsm = dlci->gsm; 3876 3877 port->count++; 3878 tty_port_tty_set(port, tty); 3879 3880 dlci->modem_rx = 0; 3881 /* We could in theory open and close before we wait - eg if we get 3882 a DM straight back. This is ok as that will have caused a hangup */ | 2063 wake_up_interruptible(&dlci->port.open_wait); 2064 } else 2065 dlci->gsm->dead = true; 2066 /* A DLCI 0 close is a MUX termination so we need to kick that 2067 back to userspace somehow */ 2068 gsm_dlci_data_kick(dlci); 2069 wake_up(&dlci->gsm->event); 2070} --- 1804 unchanged lines hidden (view full) --- 3875 struct gsm_mux *gsm = dlci->gsm; 3876 3877 port->count++; 3878 tty_port_tty_set(port, tty); 3879 3880 dlci->modem_rx = 0; 3881 /* We could in theory open and close before we wait - eg if we get 3882 a DM straight back. This is ok as that will have caused a hangup */ |
3883 tty_port_set_initialized(port, 1); | 3883 tty_port_set_initialized(port, true); |
3884 /* Start sending off SABM messages */ 3885 if (gsm->initiator) 3886 gsm_dlci_begin_open(dlci); 3887 else 3888 gsm_dlci_set_opening(dlci); 3889 /* And wait for virtual carrier */ 3890 return tty_port_block_til_ready(port, tty, filp); 3891} --- 290 unchanged lines hidden --- | 3884 /* Start sending off SABM messages */ 3885 if (gsm->initiator) 3886 gsm_dlci_begin_open(dlci); 3887 else 3888 gsm_dlci_set_opening(dlci); 3889 /* And wait for virtual carrier */ 3890 return tty_port_block_til_ready(port, tty, filp); 3891} --- 290 unchanged lines hidden --- |