aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/debugfs.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2012-11-01 21:44:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-11-14 14:55:37 -0500
commit47411a06c0c44b3c9dc2feffb0d97785ec9aaa68 (patch)
tree4464ca983493e93fb688eb471d7c28ec0be78fa6 /drivers/net/wireless/mwifiex/debugfs.c
parentd31ab3577eca0f74126ceb1d406710e620a155a0 (diff)
mwifiex: add multi-queue support
This patch adds support for multiple TX queues inside mwifiex driver. Four different queues according to WMM access categories are defined for each virtual interface. When a packet is received from netdev for transmission, tx pending count for particular queue is incremented and if tx pending count has reached upper water-mark, this queue is stopped instead of stopping all queues. Similarly when a packet is successfully transmitted from device, tx pending count is decremented per queue and if pending count falls below lower water-mark, queue operations are again resumed. This ensures that not all tranmission is blocked if traffic with particular TOS value suddenly increases. Also wake all queues after association/IBSS_join/uAP_BSS_start to enable traffic on all queues. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/debugfs.c')
-rw-r--r--drivers/net/wireless/mwifiex/debugfs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c
index a870b5885c09..46e34aa65d1c 100644
--- a/drivers/net/wireless/mwifiex/debugfs.c
+++ b/drivers/net/wireless/mwifiex/debugfs.c
@@ -178,6 +178,7 @@ mwifiex_info_read(struct file *file, char __user *ubuf,
178 (struct mwifiex_private *) file->private_data; 178 (struct mwifiex_private *) file->private_data;
179 struct net_device *netdev = priv->netdev; 179 struct net_device *netdev = priv->netdev;
180 struct netdev_hw_addr *ha; 180 struct netdev_hw_addr *ha;
181 struct netdev_queue *txq;
181 unsigned long page = get_zeroed_page(GFP_KERNEL); 182 unsigned long page = get_zeroed_page(GFP_KERNEL);
182 char *p = (char *) page, fmt[64]; 183 char *p = (char *) page, fmt[64];
183 struct mwifiex_bss_info info; 184 struct mwifiex_bss_info info;
@@ -229,8 +230,13 @@ mwifiex_info_read(struct file *file, char __user *ubuf,
229 p += sprintf(p, "num_rx_pkts_err = %lu\n", priv->stats.rx_errors); 230 p += sprintf(p, "num_rx_pkts_err = %lu\n", priv->stats.rx_errors);
230 p += sprintf(p, "carrier %s\n", ((netif_carrier_ok(priv->netdev)) 231 p += sprintf(p, "carrier %s\n", ((netif_carrier_ok(priv->netdev))
231 ? "on" : "off")); 232 ? "on" : "off"));
232 p += sprintf(p, "tx queue %s\n", ((netif_queue_stopped(priv->netdev)) 233 p += sprintf(p, "tx queue");
233 ? "stopped" : "started")); 234 for (i = 0; i < netdev->num_tx_queues; i++) {
235 txq = netdev_get_tx_queue(netdev, i);
236 p += sprintf(p, " %d:%s", i, netif_tx_queue_stopped(txq) ?
237 "stopped" : "started");
238 }
239 p += sprintf(p, "\n");
234 240
235 ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page, 241 ret = simple_read_from_buffer(ubuf, count, ppos, (char *) page,
236 (unsigned long) p - page); 242 (unsigned long) p - page);