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>
This commit is contained in:
parent
39df5e8233
commit
690e792cb9
|
@ -944,14 +944,11 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
|
||||||
struct mwifiex_ra_list_tbl *ptr;
|
struct mwifiex_ra_list_tbl *ptr;
|
||||||
struct mwifiex_tid_tbl *tid_ptr;
|
struct mwifiex_tid_tbl *tid_ptr;
|
||||||
atomic_t *hqp;
|
atomic_t *hqp;
|
||||||
unsigned long flags_bss, flags_ra;
|
unsigned long flags_ra;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
/* check the BSS with highest priority first */
|
/* check the BSS with highest priority first */
|
||||||
for (j = adapter->priv_num - 1; j >= 0; --j) {
|
for (j = adapter->priv_num - 1; j >= 0; --j) {
|
||||||
spin_lock_irqsave(&adapter->bss_prio_tbl[j].bss_prio_lock,
|
|
||||||
flags_bss);
|
|
||||||
|
|
||||||
/* iterate over BSS with the equal priority */
|
/* iterate over BSS with the equal priority */
|
||||||
list_for_each_entry(adapter->bss_prio_tbl[j].bss_prio_cur,
|
list_for_each_entry(adapter->bss_prio_tbl[j].bss_prio_cur,
|
||||||
&adapter->bss_prio_tbl[j].bss_prio_head,
|
&adapter->bss_prio_tbl[j].bss_prio_head,
|
||||||
|
@ -987,19 +984,15 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_irqrestore(&adapter->bss_prio_tbl[j].bss_prio_lock,
|
|
||||||
flags_bss);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
found:
|
found:
|
||||||
/* holds bss_prio_lock / ra_list_spinlock */
|
/* holds ra_list_spinlock */
|
||||||
if (atomic_read(hqp) > i)
|
if (atomic_read(hqp) > i)
|
||||||
atomic_set(hqp, i);
|
atomic_set(hqp, i);
|
||||||
spin_unlock_irqrestore(&priv_tmp->wmm.ra_list_spinlock, flags_ra);
|
spin_unlock_irqrestore(&priv_tmp->wmm.ra_list_spinlock, flags_ra);
|
||||||
spin_unlock_irqrestore(&adapter->bss_prio_tbl[j].bss_prio_lock,
|
|
||||||
flags_bss);
|
|
||||||
|
|
||||||
*priv = priv_tmp;
|
*priv = priv_tmp;
|
||||||
*tid = tos_to_tid[i];
|
*tid = tos_to_tid[i];
|
||||||
|
|
Loading…
Reference in New Issue