driver: Add definitions for MAC address randomization in scan
authorIlan Peer <ilan.peer@intel.com>
Mon, 29 Dec 2014 06:41:04 +0000 (01:41 -0500)
committerJouni Malinen <j@w1.fi>
Sun, 4 Jan 2015 19:46:38 +0000 (21:46 +0200)
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>
src/drivers/driver.h

index 2aa6141..eeaba66 100644 (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;