diff options
author | Karsten Keil <kkeil@linux-pingi.de> | 2012-05-16 01:51:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-16 21:24:36 +0200 |
commit | c27b46e7f1cbf3be95a4cf5840c76a7b7d54b26f (patch) | |
tree | db406c5ceb174b3b41a0085929fe85c5e6951bb6 /drivers/isdn/hardware/mISDN/hfcsusb.c | |
parent | mISDN: Implement MISDN_CTRL_FILL_EMPTY for more drivers (diff) | |
download | linux-c27b46e7f1cbf3be95a4cf5840c76a7b7d54b26f.tar.xz linux-c27b46e7f1cbf3be95a4cf5840c76a7b7d54b26f.zip |
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/hfcsusb.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcsusb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c index b539b10d6f3e..83206e453d4e 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.c +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c @@ -842,6 +842,11 @@ hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len, hdlc = 1; } if (fifo->bch) { + if (test_bit(FLG_RX_OFF, &fifo->bch->Flags)) { + fifo->bch->dropcnt += len; + spin_unlock(&hw->lock); + return; + } maxlen = bchannel_get_rxbuf(fifo->bch, len); rx_skb = fifo->bch->rx_skb; if (maxlen < 0) { |