iwlwifi: avoid collecting firmware dump if not loaded
authorShaul Triebitz <shaul.triebitz@intel.com>
Thu, 11 Jan 2018 14:18:46 +0000 (16:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:10 +0000 (07:52 +0200)
commit3a0bbca21ca5e97029e5d08199eb114f3e4f427f
tree54ac064772a5cc2b6adb3f48f9fbadcbe8de30d0
parent233d806172489f9213b2a75eede2feda5fbf68ae
iwlwifi: avoid collecting firmware dump if not loaded

[ Upstream commit 8745f12a6600dd9d31122588621d4c8ddb332cd7 ]

Trying to collect firmware debug data while firmware
is not loaded causes various errors (e.g. failing NIC access).
This causes even a bigger issue if at that time the
HW radio is off.
In that case, when later turning the radio on, the Driver
fails to read the HW (registers contain garbage values).
(It may be that the CSR_GP_CNTRL_REG_FLAG_RFKILL_WAKE_L1A_EN
bit is cleared on faulty NIC access - since the same behavior
was seen in HW RFKILL toggling before setting that bit.)

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/fw/dbg.h
drivers/net/wireless/intel/iwlwifi/fw/runtime.h
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
drivers/net/wireless/intel/iwlwifi/mvm/ops.c