aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/mISDN/layer2.c
diff options
context:
space:
mode:
authorAndreas Eversberg <andreas@eversberg.eu>2009-05-22 07:04:51 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-25 03:55:29 -0400
commitd796509a57777bc0f8f336e360695fad665c59f5 (patch)
tree3408cc5d7ff44a72c4269a65da5b6192ae1daa82 /drivers/isdn/mISDN/layer2.c
parent3dc403939c73ac372f2c95b5099dfdf396fe4ecc (diff)
mISDN: Add "sapi" information to debug messages
Using sapi values other than 0 work now. The "OpenBSC" project does not require special kernel patch anymore. Signed-off-by: Andreas Eversberg <andreas@eversberg.eu> Signed-off-by: Karsten Keil <keil@b1-systems.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/mISDN/layer2.c')
-rw-r--r--drivers/isdn/mISDN/layer2.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
index 2d2f58195477..9c2589e986d6 100644
--- a/drivers/isdn/mISDN/layer2.c
+++ b/drivers/isdn/mISDN/layer2.c
@@ -99,7 +99,7 @@ l2m_debug(struct FsmInst *fi, char *fmt, ...)
99 if (!(*debug & DEBUG_L2_FSM)) 99 if (!(*debug & DEBUG_L2_FSM))
100 return; 100 return;
101 va_start(va, fmt); 101 va_start(va, fmt);
102 printk(KERN_DEBUG "l2 (tei %d): ", l2->tei); 102 printk(KERN_DEBUG "l2 (sapi %d tei %d): ", l2->sapi, l2->tei);
103 vprintk(fmt, va); 103 vprintk(fmt, va);
104 printk("\n"); 104 printk("\n");
105 va_end(va); 105 va_end(va);
@@ -1859,20 +1859,18 @@ ph_data_indication(struct layer2 *l2, struct mISDNhead *hh, struct sk_buff *skb)
1859 psapi >>= 2; 1859 psapi >>= 2;
1860 ptei >>= 1; 1860 ptei >>= 1;
1861 if (psapi != l2->sapi) { 1861 if (psapi != l2->sapi) {
1862 /* not our bussiness 1862 /* not our bussiness */
1863 * printk(KERN_DEBUG "%s: sapi %d/%d sapi mismatch\n", 1863 if (*debug & DEBUG_L2)
1864 * __func__, 1864 printk(KERN_DEBUG "%s: sapi %d/%d mismatch\n",
1865 * psapi, l2->sapi); 1865 __func__, psapi, l2->sapi);
1866 */
1867 dev_kfree_skb(skb); 1866 dev_kfree_skb(skb);
1868 return 0; 1867 return 0;
1869 } 1868 }
1870 if ((ptei != l2->tei) && (ptei != GROUP_TEI)) { 1869 if ((ptei != l2->tei) && (ptei != GROUP_TEI)) {
1871 /* not our bussiness 1870 /* not our bussiness */
1872 * printk(KERN_DEBUG "%s: tei %d/%d sapi %d mismatch\n", 1871 if (*debug & DEBUG_L2)
1873 * __func__, 1872 printk(KERN_DEBUG "%s: tei %d/%d mismatch\n",
1874 * ptei, l2->tei, psapi); 1873 __func__, ptei, l2->tei);
1875 */
1876 dev_kfree_skb(skb); 1874 dev_kfree_skb(skb);
1877 return 0; 1875 return 0;
1878 } 1876 }
@@ -1927,8 +1925,8 @@ l2_send(struct mISDNchannel *ch, struct sk_buff *skb)
1927 int ret = -EINVAL; 1925 int ret = -EINVAL;
1928 1926
1929 if (*debug & DEBUG_L2_RECV) 1927 if (*debug & DEBUG_L2_RECV)
1930 printk(KERN_DEBUG "%s: prim(%x) id(%x) tei(%d)\n", 1928 printk(KERN_DEBUG "%s: prim(%x) id(%x) sapi(%d) tei(%d)\n",
1931 __func__, hh->prim, hh->id, l2->tei); 1929 __func__, hh->prim, hh->id, l2->sapi, l2->tei);
1932 switch (hh->prim) { 1930 switch (hh->prim) {
1933 case PH_DATA_IND: 1931 case PH_DATA_IND:
1934 ret = ph_data_indication(l2, hh, skb); 1932 ret = ph_data_indication(l2, hh, skb);