aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware/mISDN/hfcmulti.c
diff options
context:
space:
mode:
authorKarsten Keil <kkeil@linux-pingi.de>2012-05-15 19:51:08 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-16 15:24:36 -0400
commitc27b46e7f1cbf3be95a4cf5840c76a7b7d54b26f (patch)
treedb406c5ceb174b3b41a0085929fe85c5e6951bb6 /drivers/isdn/hardware/mISDN/hfcmulti.c
parent6d1ee48fd0d8d2586aaeda24dacffc426c2be44a (diff)
mISDN: Implement MISDN_CTRL_RX_OFF for more drivers
MISDN_CTRL_RX_OFF is a meachanism to discard RX data in the driver if the data is not needed by the application. It can be used when playing mesages, but not recording or with unidirectional protocols. Signed-off-by: Karsten Keil <kkeil@linux-pingi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/hfcmulti.c')
-rw-r--r--drivers/isdn/hardware/mISDN/hfcmulti.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index db9b04519829..5e402cf2e795 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -2224,8 +2224,11 @@ next_frame:
2224 HFC_wait_nodebug(hc); 2224 HFC_wait_nodebug(hc);
2225 2225
2226 /* ignore if rx is off BUT change fifo (above) to start pending TX */ 2226 /* ignore if rx is off BUT change fifo (above) to start pending TX */
2227 if (hc->chan[ch].rx_off) 2227 if (hc->chan[ch].rx_off) {
2228 if (bch)
2229 bch->dropcnt += poll; /* not exact but fair enough */
2228 return; 2230 return;
2231 }
2229 2232
2230 if (dch || test_bit(FLG_HDLC, &bch->Flags)) { 2233 if (dch || test_bit(FLG_HDLC, &bch->Flags)) {
2231 f1 = HFC_inb_nodebug(hc, A_F1); 2234 f1 = HFC_inb_nodebug(hc, A_F1);
@@ -3575,10 +3578,10 @@ channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
3575 switch (cq->op) { 3578 switch (cq->op) {
3576 case MISDN_CTRL_GETOP: 3579 case MISDN_CTRL_GETOP:
3577 ret = mISDN_ctrl_bchannel(bch, cq); 3580 ret = mISDN_ctrl_bchannel(bch, cq);
3578 cq->op |= MISDN_CTRL_HFC_OP | MISDN_CTRL_HW_FEATURES_OP | 3581 cq->op |= MISDN_CTRL_HFC_OP | MISDN_CTRL_HW_FEATURES_OP;
3579 MISDN_CTRL_RX_OFF;
3580 break; 3582 break;
3581 case MISDN_CTRL_RX_OFF: /* turn off / on rx stream */ 3583 case MISDN_CTRL_RX_OFF: /* turn off / on rx stream */
3584 ret = mISDN_ctrl_bchannel(bch, cq);
3582 hc->chan[bch->slot].rx_off = !!cq->p1; 3585 hc->chan[bch->slot].rx_off = !!cq->p1;
3583 if (!hc->chan[bch->slot].rx_off) { 3586 if (!hc->chan[bch->slot].rx_off) {
3584 /* reset fifo on rx on */ 3587 /* reset fifo on rx on */