summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell/mwifiex/wmm.c
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2019-06-25 10:40:44 -0700
committerKalle Valo <kvalo@codeaurora.org>2019-06-27 19:50:57 +0300
commitce2e942e32e851acdae05f9772f3b7a99f6a47cb (patch)
treecb4acf4a27437cb1db36ef526742589178a83d02 /drivers/net/wireless/marvell/mwifiex/wmm.c
parent288aa4ee7acfabc3913f63aa5815a265ded945a6 (diff)
downloadblackbird-op-linux-ce2e942e32e851acdae05f9772f3b7a99f6a47cb.tar.gz
blackbird-op-linux-ce2e942e32e851acdae05f9772f3b7a99f6a47cb.zip
mwifiex: dispatch/rotate from reorder table atomically
mwifiex_11n_scan_and_dispatch() and mwifiex_11n_dispatch_pkt_until_start_win() share similar patterns, where they perform a few different actions on the same table, using the same lock, but non-atomically. There have been other attempts to clean up this sort of behavior, but they have had problems (incomplete; introducing new deadlocks). We can improve these functions' atomicity by queueing up our RX packets in a list, to dispatch at the end of the function. This avoids problems of another operation modifying the table in between our dispatch and rotation operations. This was inspired by investigations around this: http://lkml.kernel.org/linux-wireless/20181130175957.167031-1-briannorris@chromium.org Subject: [4.20 PATCH] Revert "mwifiex: restructure rx_reorder_tbl_lock usage" While the original (now-reverted) patch had good intentions in restructuring some of the locking patterns in this driver, it missed an important detail: we cannot defer to softirq contexts while already in an atomic context. We can help avoid this sort of problem by separating the two steps of: (1) iterating / clearing the mwifiex reordering table (2) dispatching received packets to upper layers This makes it much harder to make lock recursion mistakes, as these two steps no longer need to hold the same locks. Testing: I've played with a variety of stress tests, including download stress tests on the same APs which caught regressions with commit 5188d5453bc9 ("mwifiex: restructure rx_reorder_tbl_lock usage"). I've primarily tested on Marvell 8997 / PCIe, although I've given 8897 / SDIO a quick spin as well. Signed-off-by: Brian Norris <briannorris@chromium.org> Acked-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/wmm.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud