Commit 190f1029 authored by David Spinadel's avatar David Spinadel Committed by Emmanuel Grumbach

iwlwifi: mvm: don't override passive dwell in case of fragmented scan

Currently scan params structure has only active or passive dwell time
fields, passive one is used for fragmented scans too. FW needs the
passive dwell time even when performing fragmented scan for calculating
time between channels. Add a separate parameter for fragmented dwell time
and pass both fragmented and passive to FW.
Signed-off-by: default avatarDavid Spinadel <david.spinadel@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 3ec50b5e
...@@ -82,6 +82,7 @@ struct iwl_mvm_scan_params { ...@@ -82,6 +82,7 @@ struct iwl_mvm_scan_params {
struct _dwell { struct _dwell {
u16 passive; u16 passive;
u16 active; u16 active;
u16 fragmented;
} dwell[IEEE80211_NUM_BANDS]; } dwell[IEEE80211_NUM_BANDS];
}; };
...@@ -263,10 +264,10 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm, ...@@ -263,10 +264,10 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm,
for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) { for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) {
if (params->passive_fragmented) if (params->passive_fragmented)
params->dwell[band].passive = frag_passive_dwell; params->dwell[band].fragmented = frag_passive_dwell;
else
params->dwell[band].passive = params->dwell[band].passive = iwl_mvm_get_passive_dwell(mvm,
iwl_mvm_get_passive_dwell(mvm, band); band);
params->dwell[band].active = iwl_mvm_get_active_dwell(mvm, band, params->dwell[band].active = iwl_mvm_get_active_dwell(mvm, band,
n_ssids); n_ssids);
} }
...@@ -768,7 +769,7 @@ iwl_mvm_build_generic_unified_scan_cmd(struct iwl_mvm *mvm, ...@@ -768,7 +769,7 @@ iwl_mvm_build_generic_unified_scan_cmd(struct iwl_mvm *mvm,
cmd->passive_dwell = params->dwell[IEEE80211_BAND_2GHZ].passive; cmd->passive_dwell = params->dwell[IEEE80211_BAND_2GHZ].passive;
if (params->passive_fragmented) if (params->passive_fragmented)
cmd->fragmented_dwell = cmd->fragmented_dwell =
params->dwell[IEEE80211_BAND_2GHZ].passive; params->dwell[IEEE80211_BAND_2GHZ].fragmented;
cmd->rx_chain_select = iwl_mvm_scan_rx_chain(mvm); cmd->rx_chain_select = iwl_mvm_scan_rx_chain(mvm);
cmd->max_out_time = cpu_to_le32(params->max_out_time); cmd->max_out_time = cpu_to_le32(params->max_out_time);
cmd->suspend_time = cpu_to_le32(params->suspend_time); cmd->suspend_time = cpu_to_le32(params->suspend_time);
...@@ -1214,7 +1215,7 @@ iwl_mvm_build_generic_umac_scan_cmd(struct iwl_mvm *mvm, ...@@ -1214,7 +1215,7 @@ iwl_mvm_build_generic_umac_scan_cmd(struct iwl_mvm *mvm,
cmd->passive_dwell = params->dwell[IEEE80211_BAND_2GHZ].passive; cmd->passive_dwell = params->dwell[IEEE80211_BAND_2GHZ].passive;
if (params->passive_fragmented) if (params->passive_fragmented)
cmd->fragmented_dwell = cmd->fragmented_dwell =
params->dwell[IEEE80211_BAND_2GHZ].passive; params->dwell[IEEE80211_BAND_2GHZ].fragmented;
cmd->max_out_time = cpu_to_le32(params->max_out_time); cmd->max_out_time = cpu_to_le32(params->max_out_time);
cmd->suspend_time = cpu_to_le32(params->suspend_time); cmd->suspend_time = cpu_to_le32(params->suspend_time);
cmd->scan_priority = cpu_to_le32(IWL_SCAN_PRIORITY_HIGH); cmd->scan_priority = cpu_to_le32(IWL_SCAN_PRIORITY_HIGH);
......
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