• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/isdn/mISDN/

Lines Matching defs:l2

113 	struct layer2	*l2;
117 list_for_each_entry(l2, &mgr->layer2, list) {
118 if (l2->l2m.state > ST_L2_4) {
150 struct layer2 *l2;
155 list_for_each_entry(l2, &mgr->layer2, list) {
156 if (l2->l2m.state > ST_L2_4) {
231 printk(KERN_DEBUG "sapi(%d) tei(%d): ", tm->l2->sapi, tm->l2->tei);
244 struct layer2 *l2;
246 list_for_each_entry(l2, &mgr->layer2, list) {
247 if (l2->ch.nr > 63) {
253 test_and_set_bit(l2->ch.nr, (u_long *)&ids);
268 struct layer2 *l2;
270 list_for_each_entry(l2, &mgr->layer2, list) {
271 if (l2->ch.nr == 0)
273 if ((l2->ch.addr & 0xff) != 0)
275 i = l2->ch.addr >> 8;
414 struct layer2 *l2;
418 list_for_each_entry(l2, &mgr->layer2, list) {
419 if ((l2->sapi == 0) && (l2->tei > 0) &&
420 (l2->tei != GROUP_TEI) && (l2->tei == tei))
423 l2 = NULL;
426 return l2;
458 if (tm->l2->tei != GROUP_TEI) {
461 tm->l2->tei);
478 struct layer2 *l2;
489 l2 = findtei(tm->mgr, tei);
490 if (l2) { /* same tei is in use */
491 if (ri != l2->tm->ri) {
494 tei_l2(l2, MDL_ERROR_RSP, 0);
499 tei_l2(tm->l2, MDL_ASSIGN_REQ, tei);
507 struct layer2 *l2;
518 l2 = findtei(tm->mgr, tei);
519 if (l2) { /* same tei is in use */
520 if (ri != l2->tm->ri) { /* and it wasn't our request */
523 mISDN_FsmEvent(&l2->tm->tei_m, EV_VERIFY, NULL);
554 if ((tm->l2->tei != GROUP_TEI) && ((tei == GROUP_TEI) ||
555 (tei == tm->l2->tei))) {
558 put_tei_msg(tm->mgr, ID_CHK_RES, random_ri(), tm->l2->tei);
572 if ((tm->l2->tei != GROUP_TEI) &&
573 ((tei == GROUP_TEI) || (tei == tm->l2->tei))) {
576 tei_l2(tm->l2, MDL_REMOVE_REQ, 0);
587 tm->l2->tei);
588 put_tei_msg(tm->mgr, ID_VERIFY, 0, tm->l2->tei);
608 tei_l2(tm->l2, MDL_ERROR_RSP, 0);
622 3 - tm->nval, tm->l2->tei);
623 put_tei_msg(tm->mgr, ID_VERIFY, 0, tm->l2->tei);
627 tm->l2->tei);
628 tei_l2(tm->l2, MDL_REMOVE_REQ, 0);
649 tei_l2remove(struct layer2 *l2)
651 put_tei_msg(l2->tm->mgr, ID_REMOVE, 0, l2->tei);
652 tei_l2(l2, MDL_REMOVE_REQ, 0);
653 list_del(&l2->ch.list);
654 l2->ch.ctrl(&l2->ch, CLOSE_CHANNEL, NULL);
663 if (tm->l2->tei == GROUP_TEI) {
673 put_tei_msg(tm->mgr, ID_ASSIGNED, tm->ri, tm->l2->tei);
684 tm->l2->tei);
686 put_tei_msg(tm->mgr, ID_CHK_REQ, 0, tm->l2->tei);
702 if (tei == tm->l2->tei)
716 tei, tm->l2->tei);
717 if (tei == tm->l2->tei)
729 "check req for tei %d successful\n", tm->l2->tei);
733 tei_l2remove(tm->l2);
738 3 - tm->nval, tm->l2->tei);
739 put_tei_msg(tm->mgr, ID_CHK_REQ, 0, tm->l2->tei);
743 tm->l2->tei);
745 tei_l2remove(tm->l2);
761 if (test_bit(FLG_FIXED_TEI, &tm->l2->flag))
785 struct layer2 *l2;
794 l2 = create_l2(mgr->up, ISDN_P_LAPD_NT, opt, tei, sapi);
795 if (!l2) {
799 l2->tm = kzalloc(sizeof(struct teimgr), GFP_KERNEL);
800 if (!l2->tm) {
801 kfree(l2);
805 l2->tm->mgr = mgr;
806 l2->tm->l2 = l2;
807 l2->tm->tei_m.debug = *debug & DEBUG_L2_TEIFSM;
808 l2->tm->tei_m.userdata = l2->tm;
809 l2->tm->tei_m.printdebug = tei_debug;
810 l2->tm->tei_m.fsm = &teifsmn;
811 l2->tm->tei_m.state = ST_TEI_NOP;
812 l2->tm->tval = 2000; /* T202 2 sec */
813 mISDN_FsmInitTimer(&l2->tm->tei_m, &l2->tm->timer);
816 list_add_tail(&l2->list, &mgr->layer2);
819 l2->ch.ctrl(&l2->ch, CLOSE_CHANNEL, NULL);
823 l2->ch.nr = id;
824 __add_layer2(&l2->ch, mgr->ch.st);
825 l2->ch.recv = mgr->ch.recv;
826 l2->ch.peer = mgr->ch.peer;
827 l2->ch.ctrl(&l2->ch, OPEN_CHANNEL, NULL);
829 return l2;
836 struct layer2 *l2;
852 l2 = create_new_tei(mgr, tei, CTRL_SAPI);
853 if (!l2)
856 mISDN_FsmEvent(&l2->tm->tei_m, EV_ASSIGN_REQ, dp);
866 struct layer2 *l2, *nl2;
911 list_for_each_entry_safe(l2, nl2, &mgr->layer2, list) {
912 tei_ph_data_ind(l2->tm, mt, &skb->data[4], skb->len - 4);
919 l2_tei(struct layer2 *l2, u_int cmd, u_long arg)
921 struct teimgr *tm = l2->tm;
923 if (test_bit(FLG_FIXED_TEI, &l2->flag))
933 mISDN_FsmEvent(&tm->tei_m, EV_CHKREQ, &l2->tei);
954 TEIrelease(struct layer2 *l2)
956 struct teimgr *tm = l2->tm;
961 list_del(&l2->list);
963 l2->tm = NULL;
970 struct layer2 *l2;
1018 list_for_each_entry(l2, &mgr->layer2, list) {
1019 l2->up = mgr->up;
1020 l2->ch.ctrl(&l2->ch, OPEN_CHANNEL, NULL);
1026 l2 = create_l2(crq->ch, crq->protocol, opt,
1028 if (!l2)
1030 l2->tm = kzalloc(sizeof(struct teimgr), GFP_KERNEL);
1031 if (!l2->tm) {
1032 kfree(l2);
1036 l2->tm->mgr = mgr;
1037 l2->tm->l2 = l2;
1038 l2->tm->tei_m.debug = *debug & DEBUG_L2_TEIFSM;
1039 l2->tm->tei_m.userdata = l2->tm;
1040 l2->tm->tei_m.printdebug = tei_debug;
1042 l2->tm->tei_m.fsm = &teifsmu;
1043 l2->tm->tei_m.state = ST_TEI_NOP;
1044 l2->tm->tval = 1000; /* T201 1 sec */
1046 l2->tm->tei_m.fsm = &teifsmn;
1047 l2->tm->tei_m.state = ST_TEI_NOP;
1048 l2->tm->tval = 2000; /* T202 2 sec */
1050 mISDN_FsmInitTimer(&l2->tm->tei_m, &l2->tm->timer);
1053 list_add_tail(&l2->list, &mgr->layer2);
1056 l2->ch.ctrl(&l2->ch, CLOSE_CHANNEL, NULL);
1058 l2->ch.nr = id;
1059 l2->up->nr = id;
1060 crq->ch = &l2->ch;
1108 struct layer2 *l2, *nl2;
1115 list_for_each_entry_safe(l2, nl2, &mgr->layer2, list) {
1116 put_tei_msg(mgr, ID_REMOVE, 0, l2->tei);
1118 list_del(&l2->ch.list);
1120 l2->ch.ctrl(&l2->ch, CLOSE_CHANNEL, NULL);
1124 list_for_each_entry_safe(l2, nl2, &mgr->layer2, list) {
1125 l2->up = NULL;
1169 struct layer2 *l2;
1194 l2 = create_new_tei(mgr, tei, sapi);
1195 if (!l2) {
1201 ret = l2->ch.send(&l2->ch, skb);
1209 struct layer2 *l2, *nl2;
1213 list_for_each_entry_safe(l2, nl2, &mgr->layer2, list) {
1215 list_del(&l2->ch.list);
1217 l2->ch.ctrl(&l2->ch, CLOSE_CHANNEL, NULL);
1257 struct layer2 *l2;
1262 list_for_each_entry(l2, &mgr->layer2, list) {
1264 (l2->ch.addr & MISDN_ID_SAPI_MASK)) {
1265 if (list_is_last(&l2->list, &mgr->layer2)) {
1273 ret = l2->ch.send(&l2->ch, cskb);
1279 __func__, l2->ch.nr,
1280 hh->prim, l2->ch.addr, ret);