From patchwork Mon Dec 29 06:41:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peer, Ilan" X-Patchwork-Id: 424428 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) by ozlabs.org (Postfix) with ESMTP id 4DA8014007F for ; Mon, 29 Dec 2014 23:39:41 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 3B43317C005; Mon, 29 Dec 2014 07:39:34 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XVpOKjiWI7ws; Mon, 29 Dec 2014 07:39:33 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 078F517C025; Mon, 29 Dec 2014 07:39:05 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id C08369D391 for ; Mon, 29 Dec 2014 07:39:03 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8nNWwlxnrPJC for ; Mon, 29 Dec 2014 07:38:57 -0500 (EST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id F18389D3D5 for ; Mon, 29 Dec 2014 07:38:56 -0500 (EST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 29 Dec 2014 04:38:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,659,1413270000"; d="scan'208";a="661930697" Received: from unknown (HELO ipeer-e6430-3.jer.intel.com) ([10.12.217.164]) by orsmga002.jf.intel.com with ESMTP; 29 Dec 2014 04:38:54 -0800 From: Ilan Peer To: hostap@lists.shmoo.com Subject: [PATCH 1/5] driver: Add definitions for MAC address randomization in scan Date: Mon, 29 Dec 2014 01:41:04 -0500 Message-Id: <1419835268-23572-2-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1419835268-23572-1-git-send-email-ilan.peer@intel.com> References: <1419835268-23572-1-git-send-email-ilan.peer@intel.com> X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com 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 --- src/drivers/driver.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index b8ee825..d577d70 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -374,6 +374,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 @@ -1087,6 +1108,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; + int max_scan_ssids; int max_sched_scan_ssids; int sched_scan_supported;