summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell/mwifiex/11n.c
diff options
context:
space:
mode:
authorGanapathi Bhat2018-06-27 08:13:39 +0200
committerKalle Valo2018-07-31 09:11:33 +0200
commit5188d5453bc9380ccd4ae1086138dd485d13aef2 (patch)
treeab18636de3c4998e2e226fc118b808aca2e675d0 /drivers/net/wireless/marvell/mwifiex/11n.c
parentmwifiex: replace rx_pkt_lock by rx_reorder_tbl_lock (diff)
downloadkernel-qcow2-linux-5188d5453bc9380ccd4ae1086138dd485d13aef2.tar.gz
kernel-qcow2-linux-5188d5453bc9380ccd4ae1086138dd485d13aef2.tar.xz
kernel-qcow2-linux-5188d5453bc9380ccd4ae1086138dd485d13aef2.zip
mwifiex: restructure rx_reorder_tbl_lock usage
Driver must ensure that whenever it holds a pointer to the list entry mwifiex_rx_reorder_tbl, it must protect the same with rx_reorder_tbl_lock. At present there are many places where driver does not ensure this. To cover all cases, spinlocks in below funcions are moved out and made sure that the caller will hold the spinlock: mwifiex_11n_dispatch_pkt_until_start_win() mwifiex_11n_scan_and_dispatch() mwifiex_del_rx_reorder_entry() mwifiex_11n_get_rx_reorder_tbl() mwifiex_11n_find_last_seq_num() Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/11n.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/11n.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/11n.c b/drivers/net/wireless/marvell/mwifiex/11n.c
index 5d75c971004b..e2addd8b878b 100644
--- a/drivers/net/wireless/marvell/mwifiex/11n.c
+++ b/drivers/net/wireless/marvell/mwifiex/11n.c
@@ -696,10 +696,11 @@ void mwifiex_11n_delba(struct mwifiex_private *priv, int tid)
"Send delba to tid=%d, %pM\n",
tid, rx_reor_tbl_ptr->ta);
mwifiex_send_delba(priv, tid, rx_reor_tbl_ptr->ta, 0);
- goto exit;
+ spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock,
+ flags);
+ return;
}
}
-exit:
spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock, flags);
}