diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-12-19 21:20:58 +0100 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-12-31 18:03:46 +0100 |
commit | aaa4e74110cd6db4c5e91949d1af42cba44a377f (patch) | |
tree | b423df04788ea117891e0d85d780c7e7486ec3b4 /drivers/net/wireless/iwlwifi/mvm/ops.c | |
parent | iwlwifi: pcie: allow the op_mode to call stop_device whenever it wants (diff) | |
download | linux-aaa4e74110cd6db4c5e91949d1af42cba44a377f.tar.xz linux-aaa4e74110cd6db4c5e91949d1af42cba44a377f.zip |
iwlwifi: mvm: disable the device as soon as RFKILL fires
The firmware needs to be stopped quickly (100ms) after the
RFKILL interrupt fired. Failing to do so would allow the
firmware to access the radio registers which would lead to
a hardware error.
Before this change, we would kill the firmware only when
mac80211 stops the device which can take a fair amount of
time. Take a shortcut by stopping the device right away
in the interrupt.
This is not relevant if the current firmware is INIT
firmware since that firmware can run while in RFKILL.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/ops.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c index a362430477a0..d6b96cac2996 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c @@ -665,6 +665,8 @@ static void iwl_mvm_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) else clear_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); + if (state && mvm->cur_ucode != IWL_UCODE_INIT) + iwl_trans_stop_device(mvm->trans); wiphy_rfkill_set_hw_state(mvm->hw->wiphy, iwl_mvm_is_radio_killed(mvm)); } |