1 diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linux-2.6.27.4-clean/drivers/isdn/mISDN/layer2.c linux-2.6.27.4/drivers/isdn/mISDN/layer2.c
2 --- linux-2.6.27.4-clean/drivers/isdn/mISDN/layer2.c 2008-10-26 00:05:07.000000000 +0200
3 +++ linux-2.6.27.4/drivers/isdn/mISDN/layer2.c 2008-12-23 16:16:29.000000000 +0100
5 struct layer2 *l2 = fi->userdata;
9 if (!(*debug & DEBUG_L2_FSM))
13 printk(KERN_DEBUG "l2 (tei %d): ", l2->tei);
19 + l2->sapi = skb->data[0] >> 2;
20 + set_channel_address(&l2->ch, l2->sapi, l2->tei);
22 send_uframe(l2, NULL, UA | get_PollFlag(l2, skb), RSP);
23 mISDN_FsmChangeState(fi, ST_L2_7);
25 struct layer2 *l2 = fi->userdata;
26 struct sk_buff *skb = arg;
28 + printk(KERN_DEBUG "l2_send_UA()\n");
29 send_uframe(l2, skb, UA | get_PollFlag(l2, skb), RSP);
36 + l2->sapi = skb->data[0] >> 2;
37 + set_channel_address(&l2->ch, l2->sapi, l2->tei);
38 mISDN_FsmChangeState(fi, ST_L2_7);
40 mISDN_FsmRestartTimer(&l2->t203, l2->T203, EV_L2_T203, NULL, 3);
42 } else if (l2->vs != l2->va) {
43 skb_queue_purge(&l2->i_queue);
44 pr = DL_ESTABLISH_IND;
45 + //l2->sapi = skb->data[0] >> 2;
46 + //set_channel_address(&l2->ch, l2->sapi, l2->tei);
50 @@ -1841,11 +1850,14 @@
54 + printk(KERN_DEBUG "ph_data_indication 0x%x 0x%x 0x%x\n", datap[0], datap[1], datap[2]);
58 mISDN_FsmEvent(&l2->l2m, EV_L2_FRAME_ERROR, (void *) 'N');
62 if (test_bit(FLG_LAPD, &l2->flag)) { /* Maybe not needed */
71 if (!(*datap & 1)) { /* I-Frame */
72 c = iframe_error(l2, skb);
74 ret = mISDN_FsmEvent(&l2->l2m, EV_L2_UI, skb);
75 } else if (IsSABME(datap, l2)) {
76 c = unnum_error(l2, skb, CMD);
77 + printk(KERN_DEBUG "IsSABME() returned true, unnum_error=%d\n", c);
79 ret = mISDN_FsmEvent(&l2->l2m, EV_L2_SABME, skb);
80 } else if (IsUA(datap)) {
82 test_and_set_bit(FLG_LAPD, &l2->flag);
83 test_and_set_bit(FLG_LAPD_NET, &l2->flag);
84 test_and_set_bit(FLG_MOD128, &l2->flag);
87 l2->maxlen = MAX_DFRAME_LEN;
88 if (test_bit(OPTION_L2_PMX, &options))
90 diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linux-2.6.27.4-clean/drivers/isdn/mISDN/tei.c linux-2.6.27.4/drivers/isdn/mISDN/tei.c
91 --- linux-2.6.27.4-clean/drivers/isdn/mISDN/tei.c 2008-10-26 00:05:07.000000000 +0200
92 +++ linux-2.6.27.4/drivers/isdn/mISDN/tei.c 2008-12-23 16:32:59.000000000 +0100
97 + printk(KERN_DEBUG "new tei request: tei=%d\n", dp[3] >> 1);
103 - tei = get_free_tei(mgr);
105 - printk(KERN_WARNING "%s:No free tei\n", __func__);
107 + printk(KERN_DEBUG "mgr->up == NULL\n");
110 + if (dp[3] != 0xff) {
111 + /* This is a TEI request according to 3GPP TS 08.56 6.1.11.2 */
114 + tei = get_free_tei(mgr);
116 + printk(KERN_WARNING "%s:No free tei\n", __func__);
120 l2 = create_new_tei(mgr, tei);
123 + printk(KERN_DEBUG "create_new_tei == NULL\n");
127 mISDN_FsmEvent(&l2->tm->tei_m, EV_ASSIGN_REQ, dp);
129 @@ -1159,12 +1170,14 @@
134 if (skb->data[0] != 0)
135 /* only SAPI 0 command */
138 if (!(skb->data[1] & 1)) /* invalid EA1 */
140 - tei = skb->data[1] >> 0;
141 + tei = skb->data[1] >> 1;
142 if (tei > 63) /* not a fixed tei */
144 if ((skb->data[2] & ~0x10) != SABME)