Lines Matching defs:tei

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