From: Peter Schlaile Date: Fri, 22 Aug 2008 17:44:21 +0000 (+0200) Subject: mISDN: Fix HDLC DSP transmit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4cce225f05c1daf89d10565c654f4c11907a049;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mISDN: Fix HDLC DSP transmit 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 Signed-off-by: Peter Schlaile Signed-off-by: Karsten Keil --- diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c index 1d504ba954f5..c16cb7ac3d2a 100644 --- a/drivers/isdn/mISDN/dsp_core.c +++ b/drivers/isdn/mISDN/dsp_core.c @@ -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; }