Lines Matching refs:st

145 	struct PStack *st = fi->userdata;  in l1m_debug()  local
146 struct IsdnCardState *cs = st->l1.hardware; in l1m_debug()
158 struct PStack *st; in L1activated() local
160 st = cs->stlist; in L1activated()
161 while (st) { in L1activated()
162 if (test_and_clear_bit(FLG_L1_ACTIVATING, &st->l1.Flags)) in L1activated()
163 st->l1.l1l2(st, PH_ACTIVATE | CONFIRM, NULL); in L1activated()
165 st->l1.l1l2(st, PH_ACTIVATE | INDICATION, NULL); in L1activated()
166 st = st->next; in L1activated()
173 struct PStack *st; in L1deactivated() local
175 st = cs->stlist; in L1deactivated()
176 while (st) { in L1deactivated()
178 st->l1.l1l2(st, PH_PAUSE | CONFIRM, NULL); in L1deactivated()
179 st->l1.l1l2(st, PH_DEACTIVATE | INDICATION, NULL); in L1deactivated()
180 st = st->next; in L1deactivated()
272 struct PStack *st = bcs->st; in BChannel_proc_xmt() local
279 if (test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags)) in BChannel_proc_xmt()
280 st->l1.l1l2(st, PH_PULL | CONFIRM, NULL); in BChannel_proc_xmt()
283 st->l2.l2l1(st, PH_DEACTIVATE | CONFIRM, NULL); in BChannel_proc_xmt()
293 if (bcs->st->l1.l1m.state == ST_L1_WAIT_ACT) { in BChannel_proc_rcv()
294 FsmDelTimer(&bcs->st->l1.timer, 4); in BChannel_proc_rcv()
295 FsmEvent(&bcs->st->l1.l1m, EV_TIMER_ACT, NULL); in BChannel_proc_rcv()
298 bcs->st->l1.l1l2(bcs->st, PH_DATA | INDICATION, skb); in BChannel_proc_rcv()
315 struct PStack *st) in HiSax_addlist() argument
317 st->next = cs->stlist; in HiSax_addlist()
318 cs->stlist = st; in HiSax_addlist()
323 struct PStack *st) in HiSax_rmlist() argument
327 FsmDelTimer(&st->l1.timer, 0); in HiSax_rmlist()
328 if (cs->stlist == st) in HiSax_rmlist()
329 cs->stlist = st->next; in HiSax_rmlist()
333 if (p->next == st) { in HiSax_rmlist()
334 p->next = st->next; in HiSax_rmlist()
448 struct PStack *st = fi->userdata; in l1_deact_cnf() local
451 if (test_bit(FLG_L1_ACTIVATING, &st->l1.Flags)) in l1_deact_cnf()
452 st->l1.l1hw(st, HW_ENABLE | REQUEST, NULL); in l1_deact_cnf()
458 struct PStack *st = fi->userdata; in l1_deact_req_s() local
461 FsmRestartTimer(&st->l1.timer, 550, EV_TIMER_DEACT, NULL, 2); in l1_deact_req_s()
462 test_and_set_bit(FLG_L1_DEACTTIMER, &st->l1.Flags); in l1_deact_req_s()
468 struct PStack *st = fi->userdata; in l1_power_up_s() local
470 if (test_bit(FLG_L1_ACTIVATING, &st->l1.Flags)) { in l1_power_up_s()
472 st->l1.l1hw(st, HW_INFO3 | REQUEST, NULL); in l1_power_up_s()
473 FsmRestartTimer(&st->l1.timer, TIMER3_VALUE, EV_TIMER3, NULL, 2); in l1_power_up_s()
474 test_and_set_bit(FLG_L1_T3RUN, &st->l1.Flags); in l1_power_up_s()
494 struct PStack *st = fi->userdata; in l1_info2_ind() local
497 if (test_bit(FLG_L1_UINT, &st->l1.Flags)) in l1_info2_ind()
502 st->l1.l1hw(st, HW_INFO3 | REQUEST, NULL); in l1_info2_ind()
508 struct PStack *st = fi->userdata; in l1_info4_ind() local
511 if (test_bit(FLG_L1_UINT, &st->l1.Flags)) in l1_info4_ind()
516 st->l1.l1hw(st, HW_INFO3 | REQUEST, NULL); in l1_info4_ind()
517 if (test_and_clear_bit(FLG_L1_DEACTTIMER, &st->l1.Flags)) in l1_info4_ind()
518 FsmDelTimer(&st->l1.timer, 4); in l1_info4_ind()
519 if (!test_bit(FLG_L1_ACTIVATED, &st->l1.Flags)) { in l1_info4_ind()
520 if (test_and_clear_bit(FLG_L1_T3RUN, &st->l1.Flags)) in l1_info4_ind()
521 FsmDelTimer(&st->l1.timer, 3); in l1_info4_ind()
522 FsmRestartTimer(&st->l1.timer, 110, EV_TIMER_ACT, NULL, 2); in l1_info4_ind()
523 test_and_set_bit(FLG_L1_ACTTIMER, &st->l1.Flags); in l1_info4_ind()
530 struct PStack *st = fi->userdata; in l1_timer3() local
532 test_and_clear_bit(FLG_L1_T3RUN, &st->l1.Flags); in l1_timer3()
533 if (test_and_clear_bit(FLG_L1_ACTIVATING, &st->l1.Flags)) in l1_timer3()
534 L1deactivated(st->l1.hardware); in l1_timer3()
537 if (!test_bit(FLG_L1_UINT, &st->l1.Flags)) in l1_timer3()
539 if (st->l1.l1m.state != ST_L1_F6) { in l1_timer3()
541 st->l1.l1hw(st, HW_ENABLE | REQUEST, NULL); in l1_timer3()
548 struct PStack *st = fi->userdata; in l1_timer_act() local
550 test_and_clear_bit(FLG_L1_ACTTIMER, &st->l1.Flags); in l1_timer_act()
551 test_and_set_bit(FLG_L1_ACTIVATED, &st->l1.Flags); in l1_timer_act()
552 L1activated(st->l1.hardware); in l1_timer_act()
558 struct PStack *st = fi->userdata; in l1_timer_deact() local
560 test_and_clear_bit(FLG_L1_DEACTTIMER, &st->l1.Flags); in l1_timer_deact()
561 test_and_clear_bit(FLG_L1_ACTIVATED, &st->l1.Flags); in l1_timer_deact()
562 L1deactivated(st->l1.hardware); in l1_timer_deact()
563 st->l1.l1hw(st, HW_DEACTIVATE | RESPONSE, NULL); in l1_timer_deact()
569 struct PStack *st = fi->userdata; in l1_activate_s() local
571 st->l1.l1hw(st, HW_RESET | REQUEST, NULL); in l1_activate_s()
577 struct PStack *st = fi->userdata; in l1_activate_no() local
579 if ((!test_bit(FLG_L1_DEACTTIMER, &st->l1.Flags)) && (!test_bit(FLG_L1_T3RUN, &st->l1.Flags))) { in l1_activate_no()
580 test_and_clear_bit(FLG_L1_ACTIVATING, &st->l1.Flags); in l1_activate_no()
581 L1deactivated(st->l1.hardware); in l1_activate_no()
639 struct PStack *st = fi->userdata; in l1_deact_req_u() local
642 FsmRestartTimer(&st->l1.timer, 550, EV_TIMER_DEACT, NULL, 2); in l1_deact_req_u()
643 test_and_set_bit(FLG_L1_DEACTTIMER, &st->l1.Flags); in l1_deact_req_u()
644 st->l1.l1hw(st, HW_ENABLE | REQUEST, NULL); in l1_deact_req_u()
650 struct PStack *st = fi->userdata; in l1_power_up_u() local
652 FsmRestartTimer(&st->l1.timer, TIMER3_VALUE, EV_TIMER3, NULL, 2); in l1_power_up_u()
653 test_and_set_bit(FLG_L1_T3RUN, &st->l1.Flags); in l1_power_up_u()
665 struct PStack *st = fi->userdata; in l1_activate_u() local
667 st->l1.l1hw(st, HW_INFO1 | REQUEST, NULL); in l1_activate_u()
699 struct PStack *st = fi->userdata; in l1b_activate() local
702 FsmRestartTimer(&st->l1.timer, st->l1.delay, EV_TIMER_ACT, NULL, 2); in l1b_activate()
708 struct PStack *st = fi->userdata; in l1b_deactivate() local
711 FsmRestartTimer(&st->l1.timer, 10, EV_TIMER_DEACT, NULL, 2); in l1b_deactivate()
717 struct PStack *st = fi->userdata; in l1b_timer_act() local
720 st->l1.l1l2(st, PH_ACTIVATE | CONFIRM, NULL); in l1b_timer_act()
726 struct PStack *st = fi->userdata; in l1b_timer_deact() local
729 st->l2.l2l1(st, PH_DEACTIVATE | CONFIRM, NULL); in l1b_timer_deact()
789 dch_l2l1(struct PStack *st, int pr, void *arg) in dch_l2l1() argument
791 struct IsdnCardState *cs = (struct IsdnCardState *) st->l1.hardware; in dch_l2l1()
797 st->l1.l1hw(st, pr, arg); in dch_l2l1()
802 st->l1.l1m.fsm->strState[st->l1.l1m.state]); in dch_l2l1()
803 if (test_bit(FLG_L1_ACTIVATED, &st->l1.Flags)) in dch_l2l1()
804 st->l1.l1l2(st, PH_ACTIVATE | CONFIRM, NULL); in dch_l2l1()
806 test_and_set_bit(FLG_L1_ACTIVATING, &st->l1.Flags); in dch_l2l1()
807 FsmEvent(&st->l1.l1m, EV_PH_ACTIVATE, arg); in dch_l2l1()
817 st->l1.l1hw(st, HW_TESTLOOP | REQUEST, arg); in dch_l2l1()
828 struct PStack *st; in l1_msg() local
830 st = cs->stlist; in l1_msg()
832 while (st) { in l1_msg()
835 FsmEvent(&st->l1.l1m, EV_RESET_IND, arg); in l1_msg()
838 FsmEvent(&st->l1.l1m, EV_DEACT_CNF, arg); in l1_msg()
841 FsmEvent(&st->l1.l1m, EV_DEACT_IND, arg); in l1_msg()
844 FsmEvent(&st->l1.l1m, EV_POWER_UP, arg); in l1_msg()
847 FsmEvent(&st->l1.l1m, EV_RSYNC_IND, arg); in l1_msg()
850 FsmEvent(&st->l1.l1m, EV_INFO2_IND, arg); in l1_msg()
854 FsmEvent(&st->l1.l1m, EV_INFO4_IND, arg); in l1_msg()
861 st = st->next; in l1_msg()
866 l1_msg_b(struct PStack *st, int pr, void *arg) { in l1_msg_b() argument
869 FsmEvent(&st->l1.l1m, EV_PH_ACTIVATE, NULL); in l1_msg_b()
872 FsmEvent(&st->l1.l1m, EV_PH_DEACTIVATE, NULL); in l1_msg_b()
878 setstack_HiSax(struct PStack *st, struct IsdnCardState *cs) in setstack_HiSax() argument
880 st->l1.hardware = cs; in setstack_HiSax()
881 st->protocol = cs->protocol; in setstack_HiSax()
882 st->l1.l1m.fsm = &l1fsm_s; in setstack_HiSax()
883 st->l1.l1m.state = ST_L1_F3; in setstack_HiSax()
884 st->l1.Flags = 0; in setstack_HiSax()
887 st->l1.l1m.fsm = &l1fsm_u; in setstack_HiSax()
888 st->l1.l1m.state = ST_L1_RESET; in setstack_HiSax()
889 st->l1.Flags = FLG_L1_UINT; in setstack_HiSax()
892 st->l1.l1m.debug = cs->debug; in setstack_HiSax()
893 st->l1.l1m.userdata = st; in setstack_HiSax()
894 st->l1.l1m.userint = 0; in setstack_HiSax()
895 st->l1.l1m.printdebug = l1m_debug; in setstack_HiSax()
896 FsmInitTimer(&st->l1.l1m, &st->l1.timer); in setstack_HiSax()
897 setstack_tei(st); in setstack_HiSax()
898 setstack_manager(st); in setstack_HiSax()
899 st->l1.stlistp = &(cs->stlist); in setstack_HiSax()
900 st->l2.l2l1 = dch_l2l1; in setstack_HiSax()
902 cs->setstack_d(st, cs); in setstack_HiSax()
906 setstack_l1_B(struct PStack *st) in setstack_l1_B() argument
908 struct IsdnCardState *cs = st->l1.hardware; in setstack_l1_B()
910 st->l1.l1m.fsm = &l1fsm_b; in setstack_l1_B()
911 st->l1.l1m.state = ST_L1_NULL; in setstack_l1_B()
912 st->l1.l1m.debug = cs->debug; in setstack_l1_B()
913 st->l1.l1m.userdata = st; in setstack_l1_B()
914 st->l1.l1m.userint = 0; in setstack_l1_B()
915 st->l1.l1m.printdebug = l1m_debug; in setstack_l1_B()
916 st->l1.Flags = 0; in setstack_l1_B()
917 FsmInitTimer(&st->l1.l1m, &st->l1.timer); in setstack_l1_B()