Lines Matching refs:state
157 enum gsm_dlci_state state;
162 spinlock_t lock; /* Protects the internal state */
180 bool throttled; /* Private copy of throttle state */
262 * state. We need to sort out lifetimes and locking with respect
286 enum gsm_mux_state state;
1052 /* Send only messages for DLCIs with valid state */
1053 if (dlci->state != DLCI_OPEN) {
1379 /* skip channels with invalid state */
1380 if (dlci->state != DLCI_OPEN)
1500 * Used when a modem control message or line state inline in adaption
1501 * layer 2 is processed. Sort out the local modem state and throttles
1752 if ((!cr && dlci->state == DLCI_OPENING) || dlci->state == DLCI_OPEN) {
1774 } else if (dlci->state == DLCI_CONFIGURE) {
1776 dlci->state = DLCI_OPENING;
1781 pr_info("%s PN in invalid state\n", __func__);
1793 * it wishes to send us an error state from the virtual link. Stuff
1892 /* Modem wishes to enter power saving state */
2125 * Perform processing when moving a DLCI into closed state. If there
2134 dlci->state = DLCI_CLOSED;
2157 * Perform processing when moving a DLCI into open state.
2168 dlci->state = DLCI_OPEN;
2172 /* Send current modem state */
2219 * is simply put into closed state (any further frames from the other
2232 switch (dlci->state) {
2268 pr_debug("%s: unhandled state: %d\n", __func__, dlci->state);
2279 * we will move into open state. Opening is done asynchronously with retry
2301 switch (dlci->state) {
2307 dlci->state = DLCI_OPENING;
2311 dlci->state = DLCI_CONFIGURE;
2325 * gsm_dlci_set_opening - change state to opening
2328 * Change internal state to wait for DLCI open from initiator side.
2333 switch (dlci->state) {
2337 dlci->state = DLCI_OPENING;
2352 switch (dlci->state) {
2355 dlci->state = DLCI_WAITING_CONFIG;
2368 * will move into closed state. Closing is done asynchronously with retry
2376 if (dlci->state == DLCI_CLOSED || dlci->state == DLCI_CLOSING)
2379 dlci->state = DLCI_CLOSING;
2412 case 2: /* Asynchronous serial with line state in each frame */
2426 case 1: /* Line state will go via DLCI 0 controls only */
2574 if (dlci->state == DLCI_WAITING_CONFIG) {
2585 wait_event_interruptible(gsm->event, dlci->state == DLCI_CLOSED);
2664 dlci->state = DLCI_CLOSED;
2735 dlci->state = DLCI_CLOSED;
2798 if (dlci == NULL || dlci->state == DLCI_CLOSED) {
2809 switch (dlci->state) {
2817 pr_debug("%s: unhandled state: %d\n", __func__,
2818 dlci->state);
2834 if (dlci == NULL || dlci->state != DLCI_OPEN) {
2862 switch (gsm->state) {
2865 gsm->state = GSM_ADDRESS;
2874 gsm->state = GSM_CONTROL;
2879 gsm->state = GSM_LEN0;
2886 gsm->state = GSM_SEARCH;
2891 gsm->state = GSM_FCS;
2893 gsm->state = GSM_DATA;
2896 gsm->state = GSM_LEN1;
2904 gsm->state = GSM_SEARCH;
2909 gsm->state = GSM_FCS;
2911 gsm->state = GSM_DATA;
2921 gsm->state = GSM_FCS;
2926 gsm->state = GSM_SSOF;
2929 gsm->state = GSM_SEARCH;
2936 pr_debug("%s: unhandled state: %d\n", __func__, gsm->state);
2962 /* EOF is only valid in frame if we have got to the data state */
2963 if (gsm->state == GSM_DATA) {
2967 gsm->state = GSM_START;
2983 gsm->state = GSM_START;
2987 if (gsm->state != GSM_START) {
2988 if (gsm->state != GSM_SEARCH)
2990 gsm->state = GSM_START;
3003 if (gsm->state == GSM_SEARCH)
3010 switch (gsm->state) {
3013 gsm->state = GSM_ADDRESS;
3019 gsm->state = GSM_CONTROL;
3025 gsm->state = GSM_DATA;
3029 gsm->state = GSM_OVERRUN;
3037 pr_debug("%s: unhandled state: %d\n", __func__, gsm->state);
3054 gsm->state = GSM_SEARCH;
3079 if (disc && dlci->state != DLCI_CLOSED) {
3081 wait_event(gsm->event, dlci->state == DLCI_CLOSED);
4057 * Send an empty frame to signal mobile state changes and to transmit the
4066 if (dlci->state != DLCI_OPEN || dlci->adaption != 2)
4104 * gsm_modem_update - send modem status line state
4144 dlci->state != DLCI_OPEN ||
4148 if (dlci->state != DLCI_OPEN)
4159 if (dlci->state != DLCI_OPEN)
4221 if (gsm->dlci[0] && gsm->dlci[0]->state != DLCI_OPEN) {
4283 if (dlci->state == DLCI_CLOSED)
4301 if (dlci->state == DLCI_CLOSED)
4311 if (dlci->state == DLCI_CLOSED)
4323 if (dlci->state == DLCI_CLOSED)
4331 if (dlci->state == DLCI_CLOSED)
4341 if (dlci->state == DLCI_CLOSED)
4363 if (dlci->state == DLCI_CLOSED)
4374 if (dlci->state == DLCI_CLOSED)
4395 if (dlci->state == DLCI_CLOSED)
4444 if (dlci->state == DLCI_CLOSED)
4457 if (dlci->state == DLCI_CLOSED)
4469 if (dlci->state == DLCI_CLOSED)
4478 static int gsmtty_break_ctl(struct tty_struct *tty, int state)
4482 if (dlci->state == DLCI_CLOSED)
4485 if (state == -1) /* "On indefinitely" - we can't encode this
4488 else if (state > 0) {
4489 encode = state / 200; /* mS to encoding */