aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-02 08:48:09 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-11-03 08:29:17 -0500
commit31b8b343e019e0a0c57ca9c13520a87f9cab884b (patch)
treef8bb6b0e3894a4644318631ad857cb343c779902 /drivers/net/wireless/iwlwifi/pcie
parent7b358f0652dc09069ee19c4cda52fb20a1fa582a (diff)
iwlwifi: fix RFkill while calibrating
If the RFkill interrupt fires while we calibrate, it would make the firmware fail and the driver wasn't able to recover. Change the flow so that the driver will kill the firmware in that case. Since we have now two flows that are calling trans_stop_device (the RFkill interrupt and the op_mode_mvm_start function) - we need to better sync this. Use the STATUS_DEVICE_ENABLED in the pcie transport in an atomic way to achieve this. This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=86231 CC: <stable@vger.kernel.org> [3.10+] Reviewed-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index 3781b029e54a..160c3ebc48d0 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -915,7 +915,8 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
915 * restart. So don't process again if the device is 915 * restart. So don't process again if the device is
916 * already dead. 916 * already dead.
917 */ 917 */
918 if (test_bit(STATUS_DEVICE_ENABLED, &trans->status)) { 918 if (test_and_clear_bit(STATUS_DEVICE_ENABLED, &trans->status)) {
919 IWL_DEBUG_INFO(trans, "DEVICE_ENABLED bit was set and is now cleared\n");
919 iwl_pcie_tx_stop(trans); 920 iwl_pcie_tx_stop(trans);
920 iwl_pcie_rx_stop(trans); 921 iwl_pcie_rx_stop(trans);
921 922
@@ -945,7 +946,6 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
945 /* clear all status bits */ 946 /* clear all status bits */
946 clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status); 947 clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status);
947 clear_bit(STATUS_INT_ENABLED, &trans->status); 948 clear_bit(STATUS_INT_ENABLED, &trans->status);
948 clear_bit(STATUS_DEVICE_ENABLED, &trans->status);
949 clear_bit(STATUS_TPOWER_PMI, &trans->status); 949 clear_bit(STATUS_TPOWER_PMI, &trans->status);
950 clear_bit(STATUS_RFKILL, &trans->status); 950 clear_bit(STATUS_RFKILL, &trans->status);
951 951