aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware/mISDN/w6692.c
diff options
context:
space:
mode:
authorKarsten Keil <kkeil@linux-pingi.de>2012-05-15 19:51:06 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-16 15:23:46 -0400
commit034005a0119b9c2aabe0ac3953eb9a65ca937a69 (patch)
treea7ee0735f2a9f87eb0207c27930a3e3c748bc1fe /drivers/isdn/hardware/mISDN/w6692.c
parent7206e659f689558b41aa058c3040b081cb281d03 (diff)
mISDN: Allow to set a minimum length for transparent data
If the FIFO of the card is small, many short messages are queued up to the upper layers and the userspace. This change allows the applications to set a minimum datalen they want from the drivers. Create a common control function to avoid code duplication in each driver. 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/w6692.c')
-rw-r--r--drivers/isdn/hardware/mISDN/w6692.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index 8324b20c7f16..03fb4a34fd53 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -688,7 +688,7 @@ W6692B_interrupt(struct w6692_hw *card, int ch)
688 if (count == 0) 688 if (count == 0)
689 count = W_B_FIFO_THRESH; 689 count = W_B_FIFO_THRESH;
690 W6692_empty_Bfifo(wch, count); 690 W6692_empty_Bfifo(wch, count);
691 recv_Bchannel(&wch->bch, 0); 691 recv_Bchannel(&wch->bch, 0, false);
692 } 692 }
693 } 693 }
694 if (stat & W_B_EXI_RMR) { 694 if (stat & W_B_EXI_RMR) {
@@ -704,9 +704,8 @@ W6692B_interrupt(struct w6692_hw *card, int ch)
704 W_B_CMDR_RRST | W_B_CMDR_RACT); 704 W_B_CMDR_RRST | W_B_CMDR_RACT);
705 } else { 705 } else {
706 W6692_empty_Bfifo(wch, W_B_FIFO_THRESH); 706 W6692_empty_Bfifo(wch, W_B_FIFO_THRESH);
707 if (test_bit(FLG_TRANSPARENT, &wch->bch.Flags) && 707 if (test_bit(FLG_TRANSPARENT, &wch->bch.Flags))
708 wch->bch.rx_skb && (wch->bch.rx_skb->len > 0)) 708 recv_Bchannel(&wch->bch, 0, false);
709 recv_Bchannel(&wch->bch, 0);
710 } 709 }
711 } 710 }
712 if (stat & W_B_EXI_RDOV) { 711 if (stat & W_B_EXI_RDOV) {
@@ -979,20 +978,7 @@ w6692_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
979static int 978static int
980channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq) 979channel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)
981{ 980{
982 int ret = 0; 981 return mISDN_ctrl_bchannel(bch, cq);
983
984 switch (cq->op) {
985 case MISDN_CTRL_GETOP:
986 cq->op = 0;
987 break;
988 /* Nothing implemented yet */
989 case MISDN_CTRL_FILL_EMPTY:
990 default:
991 pr_info("%s: unknown Op %x\n", __func__, cq->op);
992 ret = -EINVAL;
993 break;
994 }
995 return ret;
996} 982}
997 983
998static int 984static int
@@ -1303,7 +1289,8 @@ setup_instance(struct w6692_hw *card)
1303 card->dch.hw = card; 1289 card->dch.hw = card;
1304 card->dch.dev.nrbchan = 2; 1290 card->dch.dev.nrbchan = 2;
1305 for (i = 0; i < 2; i++) { 1291 for (i = 0; i < 2; i++) {
1306 mISDN_initbchannel(&card->bc[i].bch, MAX_DATA_MEM); 1292 mISDN_initbchannel(&card->bc[i].bch, MAX_DATA_MEM,
1293 W_B_FIFO_THRESH);
1307 card->bc[i].bch.hw = card; 1294 card->bc[i].bch.hw = card;
1308 card->bc[i].bch.nr = i + 1; 1295 card->bc[i].bch.nr = i + 1;
1309 card->bc[i].bch.ch.nr = i + 1; 1296 card->bc[i].bch.ch.nr = i + 1;