nl80211: Add support for multiple scan plans for scheduled scan
Add 'scan plans' to driver scan parameters for scheduled scan. Each 'scan plan' specifies the number of iterations to run the scan request and the interval between iterations. When a scan plan finishes (i.e., it was run for the specified number of iterations), the next scan plan is executed. The last scan plan will run infinitely. The maximum number of supported scan plans, the maximum number of iterations for a single scan plan and the maximum scan interval are advertised by the driver. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
This commit is contained in:
parent
f0154bf434
commit
09ea4309b6
7 changed files with 175 additions and 19 deletions
|
@ -499,6 +499,19 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
|
|||
capa->max_sched_scan_ssids =
|
||||
nla_get_u8(tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS]);
|
||||
|
||||
if (tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS] &&
|
||||
tb[NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL] &&
|
||||
tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]) {
|
||||
capa->max_sched_scan_plans =
|
||||
nla_get_u32(tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS]);
|
||||
|
||||
capa->max_sched_scan_plan_interval =
|
||||
nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL]);
|
||||
|
||||
capa->max_sched_scan_plan_iterations =
|
||||
nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]);
|
||||
}
|
||||
|
||||
if (tb[NL80211_ATTR_MAX_MATCH_SETS])
|
||||
capa->max_match_sets =
|
||||
nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]);
|
||||
|
@ -711,6 +724,12 @@ static int wpa_driver_nl80211_get_info(struct wpa_driver_nl80211_data *drv,
|
|||
drv->capa.max_csa_counters = 1;
|
||||
}
|
||||
|
||||
if (!drv->capa.max_sched_scan_plans) {
|
||||
drv->capa.max_sched_scan_plans = 1;
|
||||
drv->capa.max_sched_scan_plan_interval = UINT32_MAX;
|
||||
drv->capa.max_sched_scan_plan_iterations = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue