summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2016-03-11 07:20:37 (GMT)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2016-03-30 13:24:48 (GMT)
commit728e825f81b1fe29eb177148fcabfa55a7f4c1bb (patch)
tree487b5ba41dd509dcbd0c3b7036086cf4bfa52bb6 /drivers/net/wireless/intel/iwlwifi/mvm/ops.c
parent097129c9e62540122b63cba79c1843a2602bec37 (diff)
downloadlinux-728e825f81b1fe29eb177148fcabfa55a7f4c1bb.tar.xz
iwlwifi: mvm: add a scan timeout for regular scans
If something goes wrong with the firmware and we never get a scan complete notification, we stay stuck forever. In order to avoid this situation, add a timeout and trigger an NMI if it expires before receiving the notification., so we can clean things up. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ops.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index cb00926..656541c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -728,6 +728,9 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
iwl_mvm_tof_init(mvm);
+ setup_timer(&mvm->scan_timer, iwl_mvm_scan_timeout,
+ (unsigned long)mvm);
+
return op_mode;
out_unregister:
@@ -783,6 +786,8 @@ static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode)
iwl_mvm_tof_clean(mvm);
+ del_timer_sync(&mvm->scan_timer);
+
mutex_destroy(&mvm->mutex);
mutex_destroy(&mvm->d0i3_suspend_mutex);