Commit 6d2344ec authored by Andreas Fenkart's avatar Andreas Fenkart Committed by John W. Linville

mwifiex: remove unused tid_tbl_lock from mwifiex_tid_tbl

ra_list_spinlock is used to protect struct mwifiex_wmm_desc and
embedded structures such as ra_list. tid_tbl_lock while more fine
grained, is not used but in one function. That function is not
called reentrantly. To protect ra_list from concurrent modification
ra_list_spinlock must be held.
Signed-off-by: default avatarAndreas Fenkart <andreas.fenkart@streamunlimited.com>
Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ca796a31
...@@ -533,10 +533,8 @@ int mwifiex_init_lock_list(struct mwifiex_adapter *adapter) ...@@ -533,10 +533,8 @@ int mwifiex_init_lock_list(struct mwifiex_adapter *adapter)
if (!adapter->priv[i]) if (!adapter->priv[i])
continue; continue;
priv = adapter->priv[i]; priv = adapter->priv[i];
for (j = 0; j < MAX_NUM_TID; ++j) { for (j = 0; j < MAX_NUM_TID; ++j)
INIT_LIST_HEAD(&priv->wmm.tid_tbl_ptr[j].ra_list); INIT_LIST_HEAD(&priv->wmm.tid_tbl_ptr[j].ra_list);
spin_lock_init(&priv->wmm.tid_tbl_ptr[j].tid_tbl_lock);
}
INIT_LIST_HEAD(&priv->tx_ba_stream_tbl_ptr); INIT_LIST_HEAD(&priv->tx_ba_stream_tbl_ptr);
INIT_LIST_HEAD(&priv->rx_reorder_tbl_ptr); INIT_LIST_HEAD(&priv->rx_reorder_tbl_ptr);
INIT_LIST_HEAD(&priv->sta_list); INIT_LIST_HEAD(&priv->sta_list);
......
...@@ -213,8 +213,6 @@ struct mwifiex_ra_list_tbl { ...@@ -213,8 +213,6 @@ struct mwifiex_ra_list_tbl {
struct mwifiex_tid_tbl { struct mwifiex_tid_tbl {
struct list_head ra_list; struct list_head ra_list;
/* spin lock for tid table */
spinlock_t tid_tbl_lock;
struct mwifiex_ra_list_tbl *ra_list_curr; struct mwifiex_ra_list_tbl *ra_list_curr;
}; };
......
...@@ -927,12 +927,12 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter, ...@@ -927,12 +927,12 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
if (!tid_ptr->ra_list_curr) if (!tid_ptr->ra_list_curr)
continue; continue;
spin_lock_irqsave(&tid_ptr->tid_tbl_lock, spin_lock_irqsave(&priv_tmp->wmm.
flags); ra_list_spinlock, flags);
is_list_empty = is_list_empty =
list_empty(&tid_ptr->ra_list); list_empty(&tid_ptr->ra_list);
spin_unlock_irqrestore(&tid_ptr->tid_tbl_lock, spin_unlock_irqrestore(&priv_tmp->wmm.
flags); ra_list_spinlock, flags);
if (is_list_empty) if (is_list_empty)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment