Lines Matching full:tei
115 /* have still activ TEI */ in da_deactivate()
121 /* All TEI are inactiv */ in da_deactivate()
153 /* have still activ TEI */ in da_timer()
160 /* All TEI are inactiv */ in da_timer()
233 printk(KERN_DEBUG "sapi(%d) tei(%d): %pV\n", in tei_debug()
234 tm->l2->sapi, tm->l2->tei, &vaf); in tei_debug()
287 printk(KERN_WARNING "%s: more as 63 dynamic tei for one device\n", in get_free_tei()
395 skb->data[1] = 0xff; /* TEI 127 */ in dl_unit_data()
414 findtei(struct manager *mgr, int tei) in findtei() argument
421 if ((l2->sapi == 0) && (l2->tei > 0) && in findtei()
422 (l2->tei != GROUP_TEI) && (l2->tei == tei)) in findtei()
432 put_tei_msg(struct manager *mgr, u_char m_id, unsigned int ri, int tei) in put_tei_msg() argument
446 bp[7] = ((tei << 1) & 0xff) | 1; in put_tei_msg()
449 printk(KERN_WARNING "%s: no skb for tei msg\n", __func__); in put_tei_msg()
460 if (tm->l2->tei != GROUP_TEI) { in tei_id_request()
462 "assign request for already assigned tei %d", in tei_id_request()
463 tm->l2->tei); in tei_id_request()
482 int ri, tei; in tei_id_assign() local
487 tei = *dp >> 1; in tei_id_assign()
489 tm->tei_m.printdebug(fi, "identity assign ri %d tei %d", in tei_id_assign()
490 ri, tei); in tei_id_assign()
491 l2 = findtei(tm->mgr, tei); in tei_id_assign()
492 if (l2) { /* same tei is in use */ in tei_id_assign()
495 "possible duplicate assignment tei %d", tei); in tei_id_assign()
501 tei_l2(tm->l2, MDL_ASSIGN_REQ, tei); in tei_id_assign()
511 int tei, ri; in tei_id_test_dup() local
516 tei = *dp >> 1; in tei_id_test_dup()
518 tm->tei_m.printdebug(fi, "foreign identity assign ri %d tei %d", in tei_id_test_dup()
519 ri, tei); in tei_id_test_dup()
520 l2 = findtei(tm->mgr, tei); in tei_id_test_dup()
521 if (l2) { /* same tei is in use */ in tei_id_test_dup()
524 "possible duplicate assignment tei %d", tei); in tei_id_test_dup()
535 int ri, tei; in tei_id_denied() local
540 tei = *dp >> 1; in tei_id_denied()
542 tm->tei_m.printdebug(fi, "identity denied ri %d tei %d", in tei_id_denied()
543 ri, tei); in tei_id_denied()
551 int tei; in tei_id_chk_req() local
553 tei = *(dp + 3) >> 1; in tei_id_chk_req()
555 tm->tei_m.printdebug(fi, "identity check req tei %d", tei); in tei_id_chk_req()
556 if ((tm->l2->tei != GROUP_TEI) && ((tei == GROUP_TEI) || in tei_id_chk_req()
557 (tei == tm->l2->tei))) { in tei_id_chk_req()
560 put_tei_msg(tm->mgr, ID_CHK_RES, random_ri(), tm->l2->tei); in tei_id_chk_req()
569 int tei; in tei_id_remove() local
571 tei = *(dp + 3) >> 1; in tei_id_remove()
573 tm->tei_m.printdebug(fi, "identity remove tei %d", tei); in tei_id_remove()
574 if ((tm->l2->tei != GROUP_TEI) && in tei_id_remove()
575 ((tei == GROUP_TEI) || (tei == tm->l2->tei))) { in tei_id_remove()
588 tm->tei_m.printdebug(fi, "id verify request for tei %d", in tei_id_verify()
589 tm->l2->tei); in tei_id_verify()
590 put_tei_msg(tm->mgr, ID_VERIFY, 0, tm->l2->tei); in tei_id_verify()
623 "id verify req(%d) for tei %d", in tei_id_ver_tout()
624 3 - tm->nval, tm->l2->tei); in tei_id_ver_tout()
625 put_tei_msg(tm->mgr, ID_VERIFY, 0, tm->l2->tei); in tei_id_ver_tout()
628 tm->tei_m.printdebug(fi, "verify req for tei %d failed", in tei_id_ver_tout()
629 tm->l2->tei); in tei_id_ver_tout()
653 put_tei_msg(l2->tm->mgr, ID_REMOVE, 0, l2->tei); in tei_l2remove()
665 if (tm->l2->tei == GROUP_TEI) { in tei_assign_req()
667 "net tei assign request without tei"); in tei_assign_req()
675 put_tei_msg(tm->mgr, ID_ASSIGNED, tm->ri, tm->l2->tei); in tei_assign_req()
685 tm->tei_m.printdebug(fi, "id check request for tei %d", in tei_id_chk_req_net()
686 tm->l2->tei); in tei_id_chk_req_net()
688 put_tei_msg(tm->mgr, ID_CHK_REQ, 0, tm->l2->tei); in tei_id_chk_req_net()
699 int tei; in tei_id_chk_resp() local
701 tei = dp[3] >> 1; in tei_id_chk_resp()
703 tm->tei_m.printdebug(fi, "identity check resp tei %d", tei); in tei_id_chk_resp()
704 if (tei == tm->l2->tei) in tei_id_chk_resp()
713 int tei; in tei_id_verify_net() local
715 tei = dp[3] >> 1; in tei_id_verify_net()
717 tm->tei_m.printdebug(fi, "identity verify req tei %d/%d", in tei_id_verify_net()
718 tei, tm->l2->tei); in tei_id_verify_net()
719 if (tei == tm->l2->tei) in tei_id_verify_net()
731 "check req for tei %d successful\n", tm->l2->tei); in tei_id_ver_tout_net()
739 "id check req(%d) for tei %d", in tei_id_ver_tout_net()
740 3 - tm->nval, tm->l2->tei); in tei_id_ver_tout_net()
741 put_tei_msg(tm->mgr, ID_CHK_REQ, 0, tm->l2->tei); in tei_id_ver_tout_net()
744 tm->tei_m.printdebug(fi, "check req for tei %d failed", in tei_id_ver_tout_net()
745 tm->l2->tei); in tei_id_ver_tout_net()
766 tm->tei_m.printdebug(&tm->tei_m, "tei handler mt %x", mt); in tei_ph_data_ind()
782 create_new_tei(struct manager *mgr, int tei, int sapi) in create_new_tei() argument
792 if ((tei >= 0) && (tei < 64)) in create_new_tei()
801 l2 = create_l2(mgr->up, ISDN_P_LAPD_NT, opt, tei, sapi); in create_new_tei()
850 int tei, ri; in new_tei_req() local
860 tei = dp[3] >> 1; /* 3GPP TS 08.56 6.1.11.2 */ in new_tei_req()
862 tei = get_free_tei(mgr); in new_tei_req()
863 if (tei < 0) { in new_tei_req()
864 printk(KERN_WARNING "%s:No free tei\n", __func__); in new_tei_req()
867 l2 = create_new_tei(mgr, tei, CTRL_SAPI); in new_tei_req()
901 if (skb->data[3] != TEI_ENTITY_ID) /* not tei entity */ in ph_data_ind()
948 mISDN_FsmEvent(&tm->tei_m, EV_CHKREQ, &l2->tei); in l2_tei()
995 crq->adr.sapi, crq->adr.tei); in create_teimgr()
996 if (crq->adr.tei > GROUP_TEI) in create_teimgr()
998 if (crq->adr.tei < 64) in create_teimgr()
1000 if (crq->adr.tei == 0) in create_teimgr()
1005 if ((crq->adr.tei != 0) && (crq->adr.tei != 127)) in create_teimgr()
1016 if ((crq->adr.tei >= 64) && (crq->adr.tei < GROUP_TEI)) in create_teimgr()
1017 return -EINVAL; /* dyn tei */ in create_teimgr()
1028 if ((crq->protocol == ISDN_P_LAPD_NT) && (crq->adr.tei == 127)) { in create_teimgr()
1046 crq->adr.tei, crq->adr.sapi); in create_teimgr()
1145 /* not locked lock is taken in release tei */ in free_teimanager()
1149 put_tei_msg(mgr, ID_REMOVE, 0, l2->tei); in free_teimanager()
1195 /* This function does create a L2 for fixed TEI in NT Mode */
1200 int ret, tei, sapi; in check_data() local
1217 tei = skb->data[1] >> 1; in check_data()
1218 if (tei > 63) /* not a fixed tei */ in check_data()
1222 /* We got a SABME for a fixed TEI */ in check_data()
1224 printk(KERN_DEBUG "%s: SABME sapi(%d) tei(%d)\n", in check_data()
1225 __func__, sapi, tei); in check_data()
1226 l2 = create_new_tei(mgr, tei, sapi); in check_data()
1229 printk(KERN_DEBUG "%s: failed to create new tei\n", in check_data()
1244 /* not locked lock is taken in release tei */ in delete_teimanager()