driver: Add scan support to beacon report
Add the following parameters to scan request: 1. Dwell time on each channel. 2. Whether the specified dwell time is mandatory. In addition, add to scan results info the time that the scan actually started, and to each scan result the time the beacon/probe was received, both in terms of TSF of the BSS that the interface that requested the scan is connected to (if available). Add flags to indicate whether the driver supports dwell time configuration and scan information reporting. This scan configuration and information is required to support beacon report radio measurement. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
This commit is contained in:
parent
3c716fdbd7
commit
c16b9f8d33
2 changed files with 37 additions and 0 deletions
|
@ -236,6 +236,9 @@ struct hostapd_hw_modes {
|
||||||
* @est_throughput: Estimated throughput in kbps (this is calculated during
|
* @est_throughput: Estimated throughput in kbps (this is calculated during
|
||||||
* scan result processing if left zero by the driver wrapper)
|
* scan result processing if left zero by the driver wrapper)
|
||||||
* @snr: Signal-to-noise ratio in dB (calculated during scan result processing)
|
* @snr: Signal-to-noise ratio in dB (calculated during scan result processing)
|
||||||
|
* @parent_tsf: Time when the Beacon/Probe Response frame was received in terms
|
||||||
|
* of TSF of the BSS specified by %tsf_bssid.
|
||||||
|
* @tsf_bssid: The BSS that %parent_tsf TSF time refers to.
|
||||||
* @ie_len: length of the following IE field in octets
|
* @ie_len: length of the following IE field in octets
|
||||||
* @beacon_ie_len: length of the following Beacon IE field in octets
|
* @beacon_ie_len: length of the following Beacon IE field in octets
|
||||||
*
|
*
|
||||||
|
@ -266,6 +269,8 @@ struct wpa_scan_res {
|
||||||
unsigned int age;
|
unsigned int age;
|
||||||
unsigned int est_throughput;
|
unsigned int est_throughput;
|
||||||
int snr;
|
int snr;
|
||||||
|
u64 parent_tsf;
|
||||||
|
u8 tsf_bssid[ETH_ALEN];
|
||||||
size_t ie_len;
|
size_t ie_len;
|
||||||
size_t beacon_ie_len;
|
size_t beacon_ie_len;
|
||||||
/* Followed by ie_len + beacon_ie_len octets of IE data */
|
/* Followed by ie_len + beacon_ie_len octets of IE data */
|
||||||
|
@ -472,6 +477,24 @@ struct wpa_driver_scan_params {
|
||||||
*/
|
*/
|
||||||
u64 scan_cookie;
|
u64 scan_cookie;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* duration - Dwell time on each channel
|
||||||
|
*
|
||||||
|
* This optional parameter can be used to set the dwell time on each
|
||||||
|
* channel. In TUs.
|
||||||
|
*/
|
||||||
|
u16 duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* duration_mandatory - Whether the specified duration is mandatory
|
||||||
|
*
|
||||||
|
* If this is set, the duration specified by the %duration field is
|
||||||
|
* mandatory (and the driver should reject the scan request if it is
|
||||||
|
* unable to comply with the specified duration), otherwise it is the
|
||||||
|
* maximum duration and the actual duration may be shorter.
|
||||||
|
*/
|
||||||
|
unsigned int duration_mandatory:1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: Whenever adding new parameters here, please make sure
|
* NOTE: Whenever adding new parameters here, please make sure
|
||||||
* wpa_scan_clone_params() and wpa_scan_free_params() get updated with
|
* wpa_scan_clone_params() and wpa_scan_free_params() get updated with
|
||||||
|
@ -1470,6 +1493,11 @@ struct wpa_driver_capa {
|
||||||
*/
|
*/
|
||||||
#define WPA_DRIVER_FLAGS_SUPPORT_RRM 0x00000010
|
#define WPA_DRIVER_FLAGS_SUPPORT_RRM 0x00000010
|
||||||
|
|
||||||
|
/** Driver supports setting the scan dwell time */
|
||||||
|
#define WPA_DRIVER_FLAGS_SUPPORT_SET_SCAN_DWELL 0x00000020
|
||||||
|
/** Driver supports Beacon Report Measurement */
|
||||||
|
#define WPA_DRIVER_FLAGS_SUPPORT_BEACON_REPORT 0x00000040
|
||||||
|
|
||||||
u32 rrm_flags;
|
u32 rrm_flags;
|
||||||
|
|
||||||
/* Driver concurrency capabilities */
|
/* Driver concurrency capabilities */
|
||||||
|
@ -4684,6 +4712,11 @@ union wpa_event_data {
|
||||||
* @external_scan: Whether the scan info is for an external scan
|
* @external_scan: Whether the scan info is for an external scan
|
||||||
* @nl_scan_event: 1 if the source of this scan event is a normal scan,
|
* @nl_scan_event: 1 if the source of this scan event is a normal scan,
|
||||||
* 0 if the source of the scan event is a vendor scan
|
* 0 if the source of the scan event is a vendor scan
|
||||||
|
* @scan_start_tsf: Time when the scan started in terms of TSF of the
|
||||||
|
* BSS that the interface that requested the scan is connected to
|
||||||
|
* (if available).
|
||||||
|
* @scan_start_tsf_bssid: The BSSID according to which %scan_start_tsf
|
||||||
|
* is set.
|
||||||
*/
|
*/
|
||||||
struct scan_info {
|
struct scan_info {
|
||||||
int aborted;
|
int aborted;
|
||||||
|
@ -4693,6 +4726,8 @@ union wpa_event_data {
|
||||||
size_t num_ssids;
|
size_t num_ssids;
|
||||||
int external_scan;
|
int external_scan;
|
||||||
int nl_scan_event;
|
int nl_scan_event;
|
||||||
|
u64 scan_start_tsf;
|
||||||
|
u8 scan_start_tsf_bssid[ETH_ALEN];
|
||||||
} scan_info;
|
} scan_info;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2348,6 +2348,8 @@ wpa_scan_clone_params(const struct wpa_driver_scan_params *src)
|
||||||
params->p2p_probe = src->p2p_probe;
|
params->p2p_probe = src->p2p_probe;
|
||||||
params->only_new_results = src->only_new_results;
|
params->only_new_results = src->only_new_results;
|
||||||
params->low_priority = src->low_priority;
|
params->low_priority = src->low_priority;
|
||||||
|
params->duration = src->duration;
|
||||||
|
params->duration_mandatory = src->duration_mandatory;
|
||||||
|
|
||||||
if (src->sched_scan_plans_num > 0) {
|
if (src->sched_scan_plans_num > 0) {
|
||||||
params->sched_scan_plans =
|
params->sched_scan_plans =
|
||||||
|
|
Loading…
Reference in a new issue