aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex
diff options
context:
space:
mode:
authorZhaoyang Liu <liuzy@marvell.com>2015-03-13 08:07:56 -0400
committerKalle Valo <kvalo@codeaurora.org>2015-03-16 12:12:30 -0400
commit690e792cb9d78c3bcaf4a6a8387dbbfbafad579f (patch)
tree0ae89b86e6244dc862de3e9af35ed8447ed84113 /drivers/net/wireless/mwifiex
parent39df5e8233bf34696204207c7594a0a6320fa044 (diff)
mwifiex: remove_bss_prio_lock
This patch does away with spinlock in mwifiex_wmm_get_highest_priolist_ptr in order to improve TP. Signed-off-by: Zhaoyang Liu <liuzy@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r--drivers/net/wireless/mwifiex/wmm.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
index 2d14dd5856c3..a6db12cae769 100644
--- a/drivers/net/wireless/mwifiex/wmm.c
+++ b/drivers/net/wireless/mwifiex/wmm.c
@@ -944,14 +944,11 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
944 struct mwifiex_ra_list_tbl *ptr; 944 struct mwifiex_ra_list_tbl *ptr;
945 struct mwifiex_tid_tbl *tid_ptr; 945 struct mwifiex_tid_tbl *tid_ptr;
946 atomic_t *hqp; 946 atomic_t *hqp;
947 unsigned long flags_bss, flags_ra; 947 unsigned long flags_ra;
948 int i, j; 948 int i, j;
949 949
950 /* check the BSS with highest priority first */ 950 /* check the BSS with highest priority first */
951 for (j = adapter->priv_num - 1; j >= 0; --j) { 951 for (j = adapter->priv_num - 1; j >= 0; --j) {
952 spin_lock_irqsave(&adapter->bss_prio_tbl[j].bss_prio_lock,
953 flags_bss);
954
955 /* iterate over BSS with the equal priority */ 952 /* iterate over BSS with the equal priority */
956 list_for_each_entry(adapter->bss_prio_tbl[j].bss_prio_cur, 953 list_for_each_entry(adapter->bss_prio_tbl[j].bss_prio_cur,
957 &adapter->bss_prio_tbl[j].bss_prio_head, 954 &adapter->bss_prio_tbl[j].bss_prio_head,
@@ -987,19 +984,15 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
987 } 984 }
988 } 985 }
989 986
990 spin_unlock_irqrestore(&adapter->bss_prio_tbl[j].bss_prio_lock,
991 flags_bss);
992 } 987 }
993 988
994 return NULL; 989 return NULL;
995 990
996found: 991found:
997 /* holds bss_prio_lock / ra_list_spinlock */ 992 /* holds ra_list_spinlock */
998 if (atomic_read(hqp) > i) 993 if (atomic_read(hqp) > i)
999 atomic_set(hqp, i); 994 atomic_set(hqp, i);
1000 spin_unlock_irqrestore(&priv_tmp->wmm.ra_list_spinlock, flags_ra); 995 spin_unlock_irqrestore(&priv_tmp->wmm.ra_list_spinlock, flags_ra);
1001 spin_unlock_irqrestore(&adapter->bss_prio_tbl[j].bss_prio_lock,
1002 flags_bss);
1003 996
1004 *priv = priv_tmp; 997 *priv = priv_tmp;
1005 *tid = tos_to_tid[i]; 998 *tid = tos_to_tid[i];