diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2016-03-11 02:20:37 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2016-03-30 09:24:48 -0400 |
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, | |||
728 | 728 | ||
729 | iwl_mvm_tof_init(mvm); | 729 | iwl_mvm_tof_init(mvm); |
730 | 730 | ||
731 | setup_timer(&mvm->scan_timer, iwl_mvm_scan_timeout, | ||
732 | (unsigned long)mvm); | ||
733 | |||
731 | return op_mode; | 734 | return op_mode; |
732 | 735 | ||
733 | out_unregister: | 736 | out_unregister: |
@@ -783,6 +786,8 @@ static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode) | |||
783 | 786 | ||
784 | iwl_mvm_tof_clean(mvm); | 787 | iwl_mvm_tof_clean(mvm); |
785 | 788 | ||
789 | del_timer_sync(&mvm->scan_timer); | ||
790 | |||
786 | mutex_destroy(&mvm->mutex); | 791 | mutex_destroy(&mvm->mutex); |
787 | mutex_destroy(&mvm->d0i3_suspend_mutex); | 792 | mutex_destroy(&mvm->d0i3_suspend_mutex); |
788 | 793 | ||