linux/drivers/net/wireless
Sara Sharon c67fa16945 iwlwifi: fix access to prph when transport is stopped
[ Upstream commit 0232d2cd7a ]

When getting HW rfkill we get stop_device being called from
two paths.
One path is the IRQ calling stop device, and updating op
mode and stack.
As a result, cfg80211 is running rfkill sync work that shuts
down all devices (second path).
In the second path, we eventually get to iwl_mvm_stop_device
which calls iwl_fw_dump_conf_clear->iwl_fw_dbg_stop_recording,
that access periphery registers.
The device may be stopped at this point from the first path,
which will result with a failure to access those registers.
Simply checking for the trans status is insufficient, since
the race will still exist, only minimized.
Instead, move the stop from iwl_fw_dump_conf_clear (which is
getting called only from stop path) to the transport stop
device function, where the access is always safe.
This has the added value, of actually stopping dbgc before
stopping device even when the stop is initiated from the
transport.

Fixes: 1efc3843a4 ("iwlwifi: stop dbgc recording before stopping DMA")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2018-02-03 17:39:16 +01:00
..
admtek License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ath mac80211: use QoS NDP for AP probing 2018-02-03 17:39:03 +01:00
atmel at76c50x: constify usb_device_id 2017-08-10 11:55:57 +03:00
broadcom brcmfmac: change driver unbind order of the sdio function devices 2017-12-14 09:52:58 +01:00
cisco License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel iwlwifi: fix access to prph when transport is stopped 2018-02-03 17:39:16 +01:00
intersil p54: don't unregister leds when they are not initialized 2017-11-30 08:40:52 +00:00
marvell License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mediatek mt7601u: check memory allocation failure 2017-08-24 12:54:33 +03:00
quantenna qtnfmac: modify full Tx queue error reporting 2017-12-20 10:10:30 +01:00
ralink rt2x00usb: mark device removed when get ENOENT usb error 2017-11-30 08:40:44 +00:00
realtek rtlwifi: fix uninitialized rtlhal->last_suspend_sec time 2017-11-30 08:40:46 +00:00
rsi rsi: fix memory leak on buf and usb_reg_buf 2017-12-14 09:53:07 +01:00
st mac80211: use QoS NDP for AP probing 2018-02-03 17:39:03 +01:00
ti mac80211: use QoS NDP for AP probing 2018-02-03 17:39:03 +01:00
zydas License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig qtnfmac: introduce new FullMAC driver for Quantenna chipsets 2017-05-24 17:04:13 +03:00
mac80211_hwsim.c mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl() 2017-12-14 09:53:07 +01:00
mac80211_hwsim.h mac80211_hwsim: fix command documentation indentation 2017-03-06 09:21:48 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ray_cs.c ray_cs: Avoid reading past end of buffer 2017-05-22 18:27:22 +03:00
ray_cs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rayctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rndis_wlan.c Another set of patches for -next: 2017-04-28 14:41:15 -04:00
wl3501.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wl3501_cs.c wl3501_cs: fix spelling mistake: "Insupported" -> "Unsupported" 2017-07-28 18:06:31 +03:00