mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
scan: add duration scan_parameters
The kernel allows a scan duration and duration mandatory flag to be set in scan requests. RRM requests can contain these values so they have been added to scan_parameters. Scanning with drivers which do not support EXT_FEATURE_SET_SCAN_DWELL will not include these values in scan requests.
This commit is contained in:
parent
4cee10ec50
commit
dca90abdc5
13
src/scan.c
13
src/scan.c
@ -396,6 +396,19 @@ static struct l_genl_msg *scan_build_cmd(struct scan_context *sc,
|
||||
l_free(scan_rates);
|
||||
}
|
||||
|
||||
if (wiphy_has_ext_feature(sc->wiphy,
|
||||
NL80211_EXT_FEATURE_SET_SCAN_DWELL)) {
|
||||
if (params->duration)
|
||||
l_genl_msg_append_attr(msg,
|
||||
NL80211_ATTR_MEASUREMENT_DURATION,
|
||||
2, ¶ms->duration);
|
||||
|
||||
if (params->duration_mandatory)
|
||||
l_genl_msg_append_attr(msg,
|
||||
NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY,
|
||||
0, NULL);
|
||||
}
|
||||
|
||||
done:
|
||||
return msg;
|
||||
}
|
||||
|
@ -81,9 +81,11 @@ struct scan_parameters {
|
||||
const uint8_t *extra_ie;
|
||||
size_t extra_ie_size;
|
||||
struct scan_freq_set *freqs;
|
||||
uint16_t duration;
|
||||
bool flush : 1;
|
||||
bool randomize_mac_addr_hint : 1;
|
||||
bool no_cck_rates : 1;
|
||||
bool duration_mandatory : 1;
|
||||
const char *ssid; /* Used for direct probe request */
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user