mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
wifi: iwlwifi: mvm: Refactor scan start
To support staring internal scan, refactor the scan code such that the body iwl_mvm_reg_scan_start() is now moved to a local function that can be used by other flows as well. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.e7833d4cfc53.I43c1c533c2a5243229002fde6360d423946c54fa@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
bbd6d0f8bc
commit
8176c83800
|
|
@ -2914,9 +2914,11 @@ static void iwl_mvm_fill_respect_p2p_go(struct iwl_mvm *mvm,
|
|||
}
|
||||
}
|
||||
|
||||
int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct cfg80211_scan_request *req,
|
||||
struct ieee80211_scan_ies *ies)
|
||||
static int _iwl_mvm_single_scan_start(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct cfg80211_scan_request *req,
|
||||
struct ieee80211_scan_ies *ies,
|
||||
int type)
|
||||
{
|
||||
struct iwl_host_cmd hcmd = {
|
||||
.len = { iwl_mvm_scan_size(mvm), },
|
||||
|
|
@ -2934,7 +2936,7 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|||
return -EBUSY;
|
||||
}
|
||||
|
||||
ret = iwl_mvm_check_running_scans(mvm, IWL_MVM_SCAN_REGULAR);
|
||||
ret = iwl_mvm_check_running_scans(mvm, type);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
@ -2983,8 +2985,7 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|||
|
||||
iwl_mvm_scan_6ghz_passive_scan(mvm, ¶ms, vif);
|
||||
|
||||
uid = iwl_mvm_build_scan_cmd(mvm, vif, &hcmd, ¶ms,
|
||||
IWL_MVM_SCAN_REGULAR);
|
||||
uid = iwl_mvm_build_scan_cmd(mvm, vif, &hcmd, ¶ms, type);
|
||||
|
||||
if (uid < 0)
|
||||
return uid;
|
||||
|
|
@ -3004,7 +3005,7 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|||
}
|
||||
|
||||
IWL_DEBUG_SCAN(mvm, "Scan request was sent successfully\n");
|
||||
mvm->scan_status |= IWL_MVM_SCAN_REGULAR;
|
||||
mvm->scan_status |= type;
|
||||
mvm->scan_vif = iwl_mvm_vif_from_mac80211(vif);
|
||||
|
||||
if (params.enable_6ghz_passive)
|
||||
|
|
@ -3016,6 +3017,14 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct cfg80211_scan_request *req,
|
||||
struct ieee80211_scan_ies *ies)
|
||||
{
|
||||
return _iwl_mvm_single_scan_start(mvm, vif, req, ies,
|
||||
IWL_MVM_SCAN_REGULAR);
|
||||
}
|
||||
|
||||
int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct cfg80211_sched_scan_request *req,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user