driver: Add definitions for MAC address randomization in scan

1. Add parameters to the scan command to allow MAC address
   randomization during scan and scheduled scan.
2. Add capability bits to publish MAC address randomization support
   in scan and scheduled scan.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
Ilan Peer 2014-12-29 01:41:04 -05:00 committed by Jouni Malinen
parent 5434f07c20
commit ff23ed221d

View file

@ -381,6 +381,27 @@ struct wpa_driver_scan_params {
*/
unsigned int low_priority:1;
/**
* mac_addr_rand - Requests driver to randomize MAC address
*/
unsigned int mac_addr_rand:1;
/**
* mac_addr - MAC address used with randomization. The address cannot be
* a multicast one, i.e., bit 0 of byte 0 should not be set.
*/
const u8 *mac_addr;
/**
* mac_addr_mask - MAC address mask used with randomization.
*
* Bits that are 0 in the mask should be randomized. Bits that are 1 in
* the mask should be taken as is from mac_addr. The mask should not
* allow the generation of a multicast address, i.e., bit 0 of byte 0
* must be set.
*/
const u8 *mac_addr_mask;
/*
* NOTE: Whenever adding new parameters here, please make sure
* wpa_scan_clone_params() and wpa_scan_free_params() get updated with
@ -1170,6 +1191,9 @@ struct wpa_driver_capa {
unsigned int wmm_ac_supported:1;
unsigned int mac_addr_rand_scan_supported:1;
unsigned int mac_addr_rand_sched_scan_supported:1;
/** Maximum number of supported active probe SSIDs */
int max_scan_ssids;