aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarc Yang <yangyang@marvell.com>2011-05-16 22:17:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-19 13:53:57 -0400
commit17e8cec87586c26b953c6541c8a045e906ea046c (patch)
treeabdb7b38d69370d7a326ef6f6d0f0e5afaf8c7dc /drivers
parent93968147874508e6dd534af1e236a7353269da3f (diff)
mwifiex: CPU mips optimization with NO_PKT_PRIO_TID
If we go through the entire for loop in mwifiex_wmm_get_highest_priolist_ptr() and don't find any packets, set highest_queued_prio to NO_PKT_PRIO_TID (< LOW_PRIO_TID). Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/mwifiex/main.h1
-rw-r--r--drivers/net/wireless/mwifiex/wmm.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index ea3184d1567..3154b0a31ea 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -202,6 +202,7 @@ struct mwifiex_tid_tbl {
202#define WMM_HIGHEST_PRIORITY 7 202#define WMM_HIGHEST_PRIORITY 7
203#define HIGH_PRIO_TID 7 203#define HIGH_PRIO_TID 7
204#define LOW_PRIO_TID 0 204#define LOW_PRIO_TID 0
205#define NO_PKT_PRIO_TID (-1)
205 206
206struct mwifiex_wmm_desc { 207struct mwifiex_wmm_desc {
207 struct mwifiex_tid_tbl tid_tbl_ptr[MAX_NUM_TID]; 208 struct mwifiex_tid_tbl tid_tbl_ptr[MAX_NUM_TID];
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
index 784ad4c0099..91634daec30 100644
--- a/drivers/net/wireless/mwifiex/wmm.c
+++ b/drivers/net/wireless/mwifiex/wmm.c
@@ -946,6 +946,12 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
946 } while (ptr != head); 946 } while (ptr != head);
947 } 947 }
948 948
949 /* No packet at any TID for this priv. Mark as such
950 * to skip checking TIDs for this priv (until pkt is
951 * added).
952 */
953 atomic_set(hqp, NO_PKT_PRIO_TID);
954
949 /* Get next bss priority node */ 955 /* Get next bss priority node */
950 bssprio_node = list_first_entry(&bssprio_node->list, 956 bssprio_node = list_first_entry(&bssprio_node->list,
951 struct mwifiex_bss_prio_node, 957 struct mwifiex_bss_prio_node,