Lines Matching defs:tei

242 	printk(KERN_DEBUG "sapi(%d) tei(%d): %pV\n",
243 tm->l2->sapi, tm->l2->tei, &vaf);
296 printk(KERN_WARNING "%s: more as 63 dynamic tei for one device\n",
423 findtei(struct manager *mgr, int tei)
430 if ((l2->sapi == 0) && (l2->tei > 0) &&
431 (l2->tei != GROUP_TEI) && (l2->tei == tei))
441 put_tei_msg(struct manager *mgr, u_char m_id, unsigned int ri, int tei)
455 bp[7] = ((tei << 1) & 0xff) | 1;
458 printk(KERN_WARNING "%s: no skb for tei msg\n", __func__);
469 if (tm->l2->tei != GROUP_TEI) {
471 "assign request for already assigned tei %d",
472 tm->l2->tei);
491 int ri, tei;
496 tei = *dp >> 1;
498 tm->tei_m.printdebug(fi, "identity assign ri %d tei %d",
499 ri, tei);
500 l2 = findtei(tm->mgr, tei);
501 if (l2) { /* same tei is in use */
504 "possible duplicate assignment tei %d", tei);
510 tei_l2(tm->l2, MDL_ASSIGN_REQ, tei);
520 int tei, ri;
525 tei = *dp >> 1;
527 tm->tei_m.printdebug(fi, "foreign identity assign ri %d tei %d",
528 ri, tei);
529 l2 = findtei(tm->mgr, tei);
530 if (l2) { /* same tei is in use */
533 "possible duplicate assignment tei %d", tei);
544 int ri, tei;
549 tei = *dp >> 1;
551 tm->tei_m.printdebug(fi, "identity denied ri %d tei %d",
552 ri, tei);
560 int tei;
562 tei = *(dp + 3) >> 1;
564 tm->tei_m.printdebug(fi, "identity check req tei %d", tei);
565 if ((tm->l2->tei != GROUP_TEI) && ((tei == GROUP_TEI) ||
566 (tei == tm->l2->tei))) {
569 put_tei_msg(tm->mgr, ID_CHK_RES, random_ri(), tm->l2->tei);
578 int tei;
580 tei = *(dp + 3) >> 1;
582 tm->tei_m.printdebug(fi, "identity remove tei %d", tei);
583 if ((tm->l2->tei != GROUP_TEI) &&
584 ((tei == GROUP_TEI) || (tei == tm->l2->tei))) {
597 tm->tei_m.printdebug(fi, "id verify request for tei %d",
598 tm->l2->tei);
599 put_tei_msg(tm->mgr, ID_VERIFY, 0, tm->l2->tei);
632 "id verify req(%d) for tei %d",
633 3 - tm->nval, tm->l2->tei);
634 put_tei_msg(tm->mgr, ID_VERIFY, 0, tm->l2->tei);
637 tm->tei_m.printdebug(fi, "verify req for tei %d failed",
638 tm->l2->tei);
662 put_tei_msg(l2->tm->mgr, ID_REMOVE, 0, l2->tei);
674 if (tm->l2->tei == GROUP_TEI) {
676 "net tei assign request without tei");
684 put_tei_msg(tm->mgr, ID_ASSIGNED, tm->ri, tm->l2->tei);
694 tm->tei_m.printdebug(fi, "id check request for tei %d",
695 tm->l2->tei);
697 put_tei_msg(tm->mgr, ID_CHK_REQ, 0, tm->l2->tei);
708 int tei;
710 tei = dp[3] >> 1;
712 tm->tei_m.printdebug(fi, "identity check resp tei %d", tei);
713 if (tei == tm->l2->tei)
722 int tei;
724 tei = dp[3] >> 1;
726 tm->tei_m.printdebug(fi, "identity verify req tei %d/%d",
727 tei, tm->l2->tei);
728 if (tei == tm->l2->tei)
740 "check req for tei %d successful\n", tm->l2->tei);
748 "id check req(%d) for tei %d",
749 3 - tm->nval, tm->l2->tei);
750 put_tei_msg(tm->mgr, ID_CHK_REQ, 0, tm->l2->tei);
753 tm->tei_m.printdebug(fi, "check req for tei %d failed",
754 tm->l2->tei);
775 tm->tei_m.printdebug(&tm->tei_m, "tei handler mt %x", mt);
791 create_new_tei(struct manager *mgr, int tei, int sapi)
800 if ((tei >= 0) && (tei < 64))
805 l2 = create_l2(mgr->up, ISDN_P_LAPD_NT, opt, tei, sapi);
846 int tei, ri;
856 tei = dp[3] >> 1; /* 3GPP TS 08.56 6.1.11.2 */
858 tei = get_free_tei(mgr);
859 if (tei < 0) {
860 printk(KERN_WARNING "%s:No free tei\n", __func__);
863 l2 = create_new_tei(mgr, tei, CTRL_SAPI);
897 if (skb->data[3] != TEI_ENTITY_ID) /* not tei entity */
944 mISDN_FsmEvent(&tm->tei_m, EV_CHKREQ, &l2->tei);
990 crq->adr.sapi, crq->adr.tei);
991 if (crq->adr.tei > GROUP_TEI)
993 if (crq->adr.tei < 64)
995 if (crq->adr.tei == 0)
1000 if ((crq->adr.tei != 0) && (crq->adr.tei != 127))
1011 if ((crq->adr.tei >= 64) && (crq->adr.tei < GROUP_TEI))
1012 return -EINVAL; /* dyn tei */
1022 if ((crq->protocol == ISDN_P_LAPD_NT) && (crq->adr.tei == 127)) {
1038 crq->adr.tei, crq->adr.sapi);
1123 /* not locked lock is taken in release tei */
1127 put_tei_msg(mgr, ID_REMOVE, 0, l2->tei);
1179 int ret, tei, sapi;
1196 tei = skb->data[1] >> 1;
1197 if (tei > 63) /* not a fixed tei */
1203 printk(KERN_DEBUG "%s: SABME sapi(%d) tei(%d)\n",
1204 __func__, sapi, tei);
1205 l2 = create_new_tei(mgr, tei, sapi);
1208 printk(KERN_DEBUG "%s: failed to create new tei\n",
1223 /* not locked lock is taken in release tei */