diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2016-03-11 09:20:37 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2016-03-30 16:24:48 +0300 |
commit | 728e825f81b1fe29eb177148fcabfa55a7f4c1bb (patch) | |
tree | 487b5ba41dd509dcbd0c3b7036086cf4bfa52bb6 /drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |
parent | 097129c9e62540122b63cba79c1843a2602bec37 (diff) |
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.c | 5 |
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 cb0092609595..656541c5360a 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); |