*global_cnt += 1;
}
-static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm,
- struct ieee80211_vif *vif,
- int n_ssids, u32 flags,
- struct iwl_mvm_scan_params *params)
+static void iwl_mvm_scan_calc_dwell(struct iwl_mvm *mvm,
+ struct ieee80211_vif *vif,
+ struct iwl_mvm_scan_params *params)
{
int global_cnt = 0;
enum ieee80211_band band;
IEEE80211_IFACE_ITER_NORMAL,
iwl_mvm_scan_condition_iterator,
&global_cnt);
- params->n_ssids = n_ssids;
- params->flags = flags;
-
if (!global_cnt)
goto not_bound;
}
}
- 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->dwell[band].passive = iwl_mvm_get_passive_dwell(mvm,
band);
- params->dwell[band].active = iwl_mvm_get_active_dwell(mvm, band,
- n_ssids);
+ params->dwell[band].active =
+ iwl_mvm_get_active_dwell(mvm, band, params->n_ssids);
}
IWL_DEBUG_SCAN(mvm,
if (!iwl_mvm_scan_fits(mvm, req->n_ssids, ies, req->n_channels))
return -ENOBUFS;
- iwl_mvm_scan_calc_params(mvm, vif, req->n_ssids, req->flags, ¶ms);
-
+ params.n_ssids = req->n_ssids;
+ params.flags = req->flags;
params.n_channels = req->n_channels;
params.delay = 0;
params.interval = 0;
params.n_match_sets = 0;
params.match_sets = NULL;
+ iwl_mvm_scan_calc_dwell(mvm, vif, ¶ms);
+
if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN) {
hcmd.id = SCAN_REQ_UMAC;
ret = iwl_mvm_scan_umac(mvm, vif, ies, ¶ms);
if (!iwl_mvm_scan_fits(mvm, req->n_ssids, ies, req->n_channels))
return -ENOBUFS;
- iwl_mvm_scan_calc_params(mvm, vif, req->n_ssids, req->flags, ¶ms);
-
+ params.n_ssids = req->n_ssids;
+ params.flags = req->flags;
params.n_channels = req->n_channels;
params.delay = req->delay;
params.ssids = req->ssids;
params.interval = req->interval / MSEC_PER_SEC;
}
+ iwl_mvm_scan_calc_dwell(mvm, vif, ¶ms);
+
ret = iwl_mvm_config_sched_scan_profiles(mvm, req);
if (ret)
return ret;