summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/main.h
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2017-07-25 04:13:21 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-07-28 17:47:47 +0300
commitce32d1d83702064e7746453622fc2d6bdcd8baa4 (patch)
tree05cecd8052b6d54363b91b69e693f58089c3befc /drivers/net/wireless/marvell/mwifiex/main.h
parent643acea6297f9aa7241cfb17d5b5606186f54137 (diff)
downloadlinux-ce32d1d83702064e7746453622fc2d6bdcd8baa4.tar.xz
mwifiex: unregister wiphy before freeing resources
It's possible for some control interfaces (e.g., scans, set freq) to be active after we've stopped our main work queue and the netif TX queues. These don't get completely shut out until we've unregistered the wdevs and wiphy. So let's only free command buffers and poison our lists after wiphy_unregister(). This resolves various use-after-free issues seen when resetting the device. Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/main.h')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/main.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
index f8cf3079ac7d..62ce4e81f695 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.h
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
@@ -1078,6 +1078,7 @@ int mwifiex_get_debug_info(struct mwifiex_private *,
int mwifiex_alloc_cmd_buffer(struct mwifiex_adapter *adapter);
int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter);
+void mwifiex_free_cmd_buffers(struct mwifiex_adapter *adapter);
void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter);
void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter);
void mwifiex_cancel_pending_scan_cmd(struct mwifiex_adapter *adapter);