Commit 636a2cdc authored by David Spinadel's avatar David Spinadel Committed by Emmanuel Grumbach

iwlwifi: mvm: notify sched scan complete from stop routine

Add an option to notify mac80211 about sched scan complete from
iwl_mvm_stop_sched_scan(), to enable this notification when the
stop was called from within the driver.
Signed-off-by: default avatarDavid Spinadel <david.spinadel@intel.com>
Reviewed-by: default avatarAlexander Bondar <alexander.bondar@intel.com>
Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 9b1c9a66
...@@ -1542,7 +1542,7 @@ static int iwl_mvm_mac_hw_scan(struct ieee80211_hw *hw, ...@@ -1542,7 +1542,7 @@ static int iwl_mvm_mac_hw_scan(struct ieee80211_hw *hw,
switch (mvm->scan_status) { switch (mvm->scan_status) {
case IWL_MVM_SCAN_SCHED: case IWL_MVM_SCAN_SCHED:
ret = iwl_mvm_sched_scan_stop(mvm); ret = iwl_mvm_sched_scan_stop(mvm, true);
if (ret) { if (ret) {
ret = -EBUSY; ret = -EBUSY;
goto out; goto out;
...@@ -1882,7 +1882,7 @@ static int iwl_mvm_mac_sched_scan_stop(struct ieee80211_hw *hw, ...@@ -1882,7 +1882,7 @@ static int iwl_mvm_mac_sched_scan_stop(struct ieee80211_hw *hw,
int ret; int ret;
mutex_lock(&mvm->mutex); mutex_lock(&mvm->mutex);
ret = iwl_mvm_sched_scan_stop(mvm); ret = iwl_mvm_sched_scan_stop(mvm, false);
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
iwl_mvm_wait_for_async_handlers(mvm); iwl_mvm_wait_for_async_handlers(mvm);
......
...@@ -857,7 +857,7 @@ int iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm, ...@@ -857,7 +857,7 @@ int iwl_mvm_config_sched_scan_profiles(struct iwl_mvm *mvm,
struct cfg80211_sched_scan_request *req); struct cfg80211_sched_scan_request *req);
int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm, int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
struct cfg80211_sched_scan_request *req); struct cfg80211_sched_scan_request *req);
int iwl_mvm_sched_scan_stop(struct iwl_mvm *mvm); int iwl_mvm_sched_scan_stop(struct iwl_mvm *mvm, bool notify);
int iwl_mvm_rx_sched_scan_results(struct iwl_mvm *mvm, int iwl_mvm_rx_sched_scan_results(struct iwl_mvm *mvm,
struct iwl_rx_cmd_buffer *rxb, struct iwl_rx_cmd_buffer *rxb,
struct iwl_device_cmd *cmd); struct iwl_device_cmd *cmd);
......
...@@ -936,7 +936,7 @@ static int iwl_mvm_send_sched_scan_abort(struct iwl_mvm *mvm) ...@@ -936,7 +936,7 @@ static int iwl_mvm_send_sched_scan_abort(struct iwl_mvm *mvm)
return ret; return ret;
} }
int iwl_mvm_sched_scan_stop(struct iwl_mvm *mvm) int iwl_mvm_sched_scan_stop(struct iwl_mvm *mvm, bool notify)
{ {
int ret; int ret;
struct iwl_notification_wait wait_scan_done; struct iwl_notification_wait wait_scan_done;
...@@ -974,5 +974,8 @@ int iwl_mvm_sched_scan_stop(struct iwl_mvm *mvm) ...@@ -974,5 +974,8 @@ int iwl_mvm_sched_scan_stop(struct iwl_mvm *mvm)
*/ */
mvm->scan_status = IWL_MVM_SCAN_NONE; mvm->scan_status = IWL_MVM_SCAN_NONE;
if (notify)
ieee80211_sched_scan_stopped(mvm->hw);
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment