Commit 4b817051 authored by Luciano Coelho's avatar Luciano Coelho Committed by Emmanuel Grumbach

iwlwifi: mvm: rename scan_calc_params to scan_calc_dwell

To make things clearer, rename the iwl_mvm_scan_calc_params() function
to iwl_mvm_calc_dwell() and make it calculate and fill in only
dwell-related parameters.
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent e2ec4f6d
...@@ -194,10 +194,9 @@ static void iwl_mvm_scan_condition_iterator(void *data, u8 *mac, ...@@ -194,10 +194,9 @@ static void iwl_mvm_scan_condition_iterator(void *data, u8 *mac,
*global_cnt += 1; *global_cnt += 1;
} }
static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm, static void iwl_mvm_scan_calc_dwell(struct iwl_mvm *mvm,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
int n_ssids, u32 flags, struct iwl_mvm_scan_params *params)
struct iwl_mvm_scan_params *params)
{ {
int global_cnt = 0; int global_cnt = 0;
enum ieee80211_band band; enum ieee80211_band band;
...@@ -207,9 +206,6 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm, ...@@ -207,9 +206,6 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm,
IEEE80211_IFACE_ITER_NORMAL, IEEE80211_IFACE_ITER_NORMAL,
iwl_mvm_scan_condition_iterator, iwl_mvm_scan_condition_iterator,
&global_cnt); &global_cnt);
params->n_ssids = n_ssids;
params->flags = flags;
if (!global_cnt) if (!global_cnt)
goto not_bound; goto not_bound;
...@@ -250,7 +246,7 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm, ...@@ -250,7 +246,7 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm,
} }
} }
if ((flags & NL80211_SCAN_FLAG_LOW_PRIORITY) && if ((params->flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
(params->max_out_time > 200)) (params->max_out_time > 200))
params->max_out_time = 200; params->max_out_time = 200;
...@@ -262,8 +258,8 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm, ...@@ -262,8 +258,8 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm,
params->dwell[band].passive = iwl_mvm_get_passive_dwell(mvm, params->dwell[band].passive = iwl_mvm_get_passive_dwell(mvm,
band); band);
params->dwell[band].active = iwl_mvm_get_active_dwell(mvm, band, params->dwell[band].active =
n_ssids); iwl_mvm_get_active_dwell(mvm, band, params->n_ssids);
} }
IWL_DEBUG_SCAN(mvm, IWL_DEBUG_SCAN(mvm,
...@@ -1452,8 +1448,8 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif, ...@@ -1452,8 +1448,8 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
if (!iwl_mvm_scan_fits(mvm, req->n_ssids, ies, req->n_channels)) if (!iwl_mvm_scan_fits(mvm, req->n_ssids, ies, req->n_channels))
return -ENOBUFS; return -ENOBUFS;
iwl_mvm_scan_calc_params(mvm, vif, req->n_ssids, req->flags, &params); params.n_ssids = req->n_ssids;
params.flags = req->flags;
params.n_channels = req->n_channels; params.n_channels = req->n_channels;
params.delay = 0; params.delay = 0;
params.interval = 0; params.interval = 0;
...@@ -1466,6 +1462,8 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif, ...@@ -1466,6 +1462,8 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
params.n_match_sets = 0; params.n_match_sets = 0;
params.match_sets = NULL; params.match_sets = NULL;
iwl_mvm_scan_calc_dwell(mvm, vif, &params);
if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN) { if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN) {
hcmd.id = SCAN_REQ_UMAC; hcmd.id = SCAN_REQ_UMAC;
ret = iwl_mvm_scan_umac(mvm, vif, ies, &params); ret = iwl_mvm_scan_umac(mvm, vif, ies, &params);
...@@ -1527,8 +1525,8 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm, ...@@ -1527,8 +1525,8 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
if (!iwl_mvm_scan_fits(mvm, req->n_ssids, ies, req->n_channels)) if (!iwl_mvm_scan_fits(mvm, req->n_ssids, ies, req->n_channels))
return -ENOBUFS; return -ENOBUFS;
iwl_mvm_scan_calc_params(mvm, vif, req->n_ssids, req->flags, &params); params.n_ssids = req->n_ssids;
params.flags = req->flags;
params.n_channels = req->n_channels; params.n_channels = req->n_channels;
params.delay = req->delay; params.delay = req->delay;
params.ssids = req->ssids; params.ssids = req->ssids;
...@@ -1548,6 +1546,8 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm, ...@@ -1548,6 +1546,8 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
params.interval = req->interval / MSEC_PER_SEC; params.interval = req->interval / MSEC_PER_SEC;
} }
iwl_mvm_scan_calc_dwell(mvm, vif, &params);
ret = iwl_mvm_config_sched_scan_profiles(mvm, req); ret = iwl_mvm_config_sched_scan_profiles(mvm, req);
if (ret) if (ret)
return ret; return ret;
......
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