From c27b46e7f1cbf3be95a4cf5840c76a7b7d54b26f Mon Sep 17 00:00:00 2001 From: Karsten Keil Date: Tue, 15 May 2012 23:51:08 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/isdn/hardware/mISDN/hfcpci.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/isdn/hardware/mISDN/hfcpci.c') diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 1bd8bc7eb5c7..81363ffa5357 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -572,6 +572,11 @@ hfcpci_empty_fifo_trans(struct bchannel *bch, struct bzfifo *rxbz, fcnt_tx = B_FIFO_SIZE - fcnt_tx; /* remaining bytes to send (bytes in tx-fifo) */ + if (test_bit(FLG_RX_OFF, &bch->Flags)) { + bch->dropcnt += fcnt_rx; + *z2r = cpu_to_le16(new_z2); + return; + } maxlen = bchannel_get_rxbuf(bch, fcnt_rx); if (maxlen < 0) { pr_warning("B%d: No bufferspace for %d bytes\n", -- cgit v1.2.1