summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/wmm.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2012-09-11 05:30:44 +0400
committerJohn W. Linville <linville@tuxdriver.com>2012-09-11 23:31:53 +0400
commit16051b0e245219563ac8d145f29217ac7a6ce5ec (patch)
tree6314bb2afabdfcd7ce792fb7687a5a33f5bbd486 /drivers/net/wireless/mwifiex/wmm.c
parenta458c0ae6caa1bdb8256955b8cace84d578c9dad (diff)
downloadlinux-16051b0e245219563ac8d145f29217ac7a6ce5ec.tar.xz
mwifiex: update adapter->bss_prio_tbl[j].bss_prio_cur correctly
"adapter->bss_prio_tbl[j].bss_prio_head" points to linked list of interfaces with priority 'j'. "bss_prio_tbl[j].bss_prio_cur" is supposed to point to next interface every time the routine for dequeuing the packet is called. This ensures that each interface gets fair chance. Currently we have AP and station interfaces with priority '0'. Therefore "adapter->bss_prio_tbl[0].bss_prio_cur" should alternately point to AP and station nodes. Since "bss_prio_cur" is not correctly updated, for each packet picked for AP, two packets are picked for station interface. This patch fixes the problem by correctly updating "bss_prio_cur". Signed-off-by: Amitkumar Karwar <akarwar@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/wmm.c')
-rw-r--r--drivers/net/wireless/mwifiex/wmm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
index 8ccd6999fa9f..766d45294c86 100644
--- a/drivers/net/wireless/mwifiex/wmm.c
+++ b/drivers/net/wireless/mwifiex/wmm.c
@@ -907,17 +907,16 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
if (adapter->bss_prio_tbl[j].bss_prio_cur ==
(struct mwifiex_bss_prio_node *)
&adapter->bss_prio_tbl[j].bss_prio_head) {
- bssprio_node =
+ adapter->bss_prio_tbl[j].bss_prio_cur =
list_first_entry(&adapter->bss_prio_tbl[j]
.bss_prio_head,
struct mwifiex_bss_prio_node,
list);
- bssprio_head = bssprio_node;
- } else {
- bssprio_node = adapter->bss_prio_tbl[j].bss_prio_cur;
- bssprio_head = bssprio_node;
}
+ bssprio_node = adapter->bss_prio_tbl[j].bss_prio_cur;
+ bssprio_head = bssprio_node;
+
do {
priv_tmp = bssprio_node->priv;
hqp = &priv_tmp->wmm.highest_queued_prio;