From 2759a00d8007e62da1f75997114f5bd645ea2025 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Sirasanagandla Date: Tue, 17 Jul 2018 18:05:41 +0530 Subject: [PATCH] qcacld-3.0: Change random scan mac attributes to be optional Change random scan mac_addr and mac_addr_mask attributes to be optional similar to the standard NL80211 scan trigger interface. When these attributes are not present, configure default values in such a way that the random addresses generated are not multicast but locally administered. Change-Id: I81acfe05d7f08d1b8f77179816da9df05f2eb233 CRs-Fixed: 2280250 --- core/hdd/src/wlan_hdd_scan.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 5059581b0801..32b5c6d89604 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -865,6 +865,16 @@ static int wlan_hdd_vendor_scan_random_attr(struct wiphy *wiphy, return -EOPNOTSUPP; } + if (!tb[QCA_WLAN_VENDOR_ATTR_SCAN_MAC] && + !tb[QCA_WLAN_VENDOR_ATTR_SCAN_MAC_MASK]) { + qdf_mem_zero(request->mac_addr, len); + qdf_mem_zero(request->mac_addr_mask, len); + request->mac_addr[0] = 0x2; + request->mac_addr_mask[0] = 0x3; + + return 0; + } + if (!tb[QCA_WLAN_VENDOR_ATTR_SCAN_MAC] || !tb[QCA_WLAN_VENDOR_ATTR_SCAN_MAC_MASK]) return -EINVAL;