Lines Matching refs:at_state
140 static int test_timeout(struct at_state_t *at_state)
142 if (!at_state->timer_expires)
145 if (--at_state->timer_expires) {
147 at_state, at_state->timer_expires);
151 gigaset_add_event(at_state->cs, at_state, EV_TIMEOUT, NULL,
152 at_state->timer_index, NULL);
161 struct at_state_t *at_state;
167 if (test_timeout(&cs->bcs[channel].at_state))
170 if (test_timeout(&cs->at_state))
173 list_for_each_entry(at_state, &cs->temp_at_states, list)
174 if (test_timeout(at_state))
321 * @at_state: connection state structure.
333 struct at_state_t *at_state, int type,
351 event->at_state = at_state;
365 static void free_strings(struct at_state_t *at_state)
370 kfree(at_state->str_var[i]);
371 at_state->str_var[i] = NULL;
375 static void clear_at_state(struct at_state_t *at_state)
377 free_strings(at_state);
399 gig_dbg(DEBUG_INIT, "clearing bcs[%d]->at_state", bcs->channel);
400 clear_at_state(&bcs->at_state);
513 gig_dbg(DEBUG_INIT, "clearing at_state");
514 clear_at_state(&cs->at_state);
531 void gigaset_at_init(struct at_state_t *at_state, struct bc_state *bcs,
536 INIT_LIST_HEAD(&at_state->list);
537 at_state->waiting = 0;
538 at_state->getstring = 0;
539 at_state->pending_commands = 0;
540 at_state->timer_expires = 0;
541 at_state->timer_active = 0;
542 at_state->timer_index = 0;
543 at_state->seq_index = 0;
544 at_state->ConState = 0;
546 at_state->str_var[i] = NULL;
547 at_state->int_var[VAR_ZDLE] = 0;
548 at_state->int_var[VAR_ZCTP] = -1;
549 at_state->int_var[VAR_ZSAU] = ZSAU_NULL;
550 at_state->cs = cs;
551 at_state->bcs = bcs;
552 at_state->cid = cid;
554 at_state->replystruct = cs->tabnocid;
556 at_state->replystruct = cs->tabcid;
630 gig_dbg(DEBUG_INIT, "setting up bcs[%d]->at_state", channel);
631 gigaset_at_init(&bcs->at_state, bcs, cs, -1);
742 gig_dbg(DEBUG_INIT, "setting up at_state");
744 gigaset_at_init(&cs->at_state, NULL, cs, 0);
817 clear_at_state(&bcs->at_state);
818 bcs->at_state.ConState = 0;
819 bcs->at_state.timer_active = 0;
820 bcs->at_state.timer_expires = 0;
821 bcs->at_state.cid = -1; /* No CID defined */
851 clear_at_state(&cs->at_state);
853 free_strings(&cs->at_state);
854 gigaset_at_init(&cs->at_state, NULL, cs, 0);
922 if (!gigaset_add_event(cs, &cs->at_state, EV_START, NULL, 0, NULL)) {
960 if (!gigaset_add_event(cs, &cs->at_state, EV_SHUTDOWN, NULL, 0, NULL))
987 if (!gigaset_add_event(cs, &cs->at_state, EV_STOP, NULL, 0, NULL))