]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mISDN: Fix HDLC DSP transmit
authorPeter Schlaile <root@asterisk.schlaile.de>
Fri, 22 Aug 2008 17:44:21 +0000 (19:44 +0200)
committerKarsten Keil <kkeil@suse.de>
Fri, 9 Jan 2009 21:44:24 +0000 (22:44 +0100)
Fix HDLC DSP transmit (DL_DATA frames were bounced back upwards instead of
being sent down as PH_DATA frames)

Thanks to Andreas Eversberg for the fix!

Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Peter Schlaile <root@asterisk.schlaile.de>
Signed-off-by: Karsten Keil <kkeil@suse.de>
drivers/isdn/mISDN/dsp_core.c

index 1d504ba954f59e756488782fa460caf728323ab6..c16cb7ac3d2a11d356d45b59cb3c76e200e3b0e4 100644 (file)
@@ -867,11 +867,14 @@ dsp_function(struct mISDNchannel *ch,  struct sk_buff *skb)
                }
                if (dsp->hdlc) {
                        /* hdlc */
-                       spin_lock_irqsave(&dsp_lock, flags);
-                       if (dsp->b_active) {
-                               skb_queue_tail(&dsp->sendq, skb);
-                               schedule_work(&dsp->workq);
+                       if (!dsp->b_active) {
+                               ret = -EIO;
+                               break;
                        }
+                       hh->prim = PH_DATA_REQ;
+                       spin_lock_irqsave(&dsp_lock, flags);
+                       skb_queue_tail(&dsp->sendq, skb);
+                       schedule_work(&dsp->workq);
                        spin_unlock_irqrestore(&dsp_lock, flags);
                        return 0;
                }