Skip to content

Commit

Permalink
mwifiex: update adapter->bss_prio_tbl[j].bss_prio_cur correctly
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Sep 11, 2012
1 parent a458c0a commit 16051b0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/net/wireless/mwifiex/wmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 16051b0

Please sign in to comment.