Lines Matching refs:state
130 enum gsm_dlci_state state;
135 spinlock_t lock; /* Protects the internal state */
147 bool throttled; /* Private copy of throttle state */
195 * state. We need to sort out lifetimes and locking with respect
216 enum gsm_mux_state state;
1140 * Used when a modem control message or line state inline in adaption
1141 * layer 2 is processed. Sort out the local modem state and throttles
1263 * it wishes to send us an error state from the virtual link. Stuff
1365 /* Modem wishes to enter power saving state */
1546 * Perform processing when moving a DLCI into closed state. If there
1557 dlci->state = DLCI_CLOSED;
1579 * Perform processing when moving a DLCI into open state.
1588 dlci->state = DLCI_OPEN;
1602 * is simply put into closed state (any further frames from the other
1615 switch (dlci->state) {
1641 pr_debug("%s: unhandled state: %d\n", __func__, dlci->state);
1652 * we will move into open state. Opening is done asynchronously with retry
1659 if (dlci->state == DLCI_OPEN || dlci->state == DLCI_OPENING)
1662 dlci->state = DLCI_OPENING;
1668 * gsm_dlci_set_opening - change state to opening
1671 * Change internal state to wait for DLCI open from initiator side.
1676 switch (dlci->state) {
1679 dlci->state = DLCI_OPENING;
1692 * will move into closed state. Closing is done asynchronously with retry
1700 if (dlci->state == DLCI_CLOSED || dlci->state == DLCI_CLOSING)
1703 dlci->state = DLCI_CLOSING;
1735 case 2: /* Asynchronous serial with line state in each frame */
1747 case 1: /* Line state will go via DLCI 0 controls only */
1823 dlci->state = DLCI_CLOSED;
1894 dlci->state = DLCI_CLOSED;
1964 if (dlci == NULL || dlci->state == DLCI_CLOSED) {
1975 switch (dlci->state) {
1983 pr_debug("%s: unhandled state: %d\n", __func__,
1984 dlci->state);
2004 if (dlci == NULL || dlci->state != DLCI_OPEN) {
2032 switch (gsm->state) {
2035 gsm->state = GSM_ADDRESS;
2044 gsm->state = GSM_CONTROL;
2049 gsm->state = GSM_LEN0;
2056 gsm->state = GSM_SEARCH;
2061 gsm->state = GSM_FCS;
2063 gsm->state = GSM_DATA;
2066 gsm->state = GSM_LEN1;
2074 gsm->state = GSM_SEARCH;
2079 gsm->state = GSM_FCS;
2081 gsm->state = GSM_DATA;
2086 gsm->state = GSM_FCS;
2091 gsm->state = GSM_SSOF;
2095 gsm->state = GSM_SEARCH;
2100 pr_debug("%s: unhandled state: %d\n", __func__, gsm->state);
2126 /* EOF is only valid in frame if we have got to the data state
2128 if (gsm->state == GSM_DATA && gsm->count) {
2134 gsm->state = GSM_START;
2138 if (gsm->state != GSM_START) {
2139 if (gsm->state != GSM_SEARCH)
2141 gsm->state = GSM_START;
2154 if (gsm->state == GSM_SEARCH)
2161 switch (gsm->state) {
2164 gsm->state = GSM_ADDRESS;
2170 gsm->state = GSM_CONTROL;
2176 gsm->state = GSM_DATA;
2180 gsm->state = GSM_OVERRUN;
2188 pr_debug("%s: unhandled state: %d\n", __func__, gsm->state);
2208 gsm->state = GSM_SEARCH;
2233 if (disc && dlci->state != DLCI_CLOSED) {
2235 wait_event(gsm->event, dlci->state == DLCI_CLOSED);
3077 if (dlci->state != DLCI_OPEN)
3139 if (gsm->dlci[0] && gsm->dlci[0]->state != DLCI_OPEN) {
3197 if (dlci->state == DLCI_CLOSED)
3215 if (dlci->state == DLCI_CLOSED)
3226 if (dlci->state == DLCI_CLOSED)
3238 if (dlci->state == DLCI_CLOSED)
3246 if (dlci->state == DLCI_CLOSED)
3256 if (dlci->state == DLCI_CLOSED)
3278 if (dlci->state == DLCI_CLOSED)
3289 if (dlci->state == DLCI_CLOSED)
3309 if (dlci->state == DLCI_CLOSED)
3338 if (dlci->state == DLCI_CLOSED)
3351 if (dlci->state == DLCI_CLOSED)
3363 if (dlci->state == DLCI_CLOSED)
3372 static int gsmtty_break_ctl(struct tty_struct *tty, int state)
3376 if (dlci->state == DLCI_CLOSED)
3379 if (state == -1) /* "On indefinitely" - we can't encode this
3382 else if (state > 0) {
3383 encode = state / 200; /* mS to encoding */