[RAMEN9610-13676][Common][9610][7885][7872][7570] wlbt : Mac Randomization will not...
authorMohit Ghuley <mohit.ghuley@samsung.com>
Thu, 21 Mar 2019 13:02:48 +0000 (18:32 +0530)
committerhskang <hs1218.kang@samsung.com>
Fri, 22 Mar 2019 08:52:00 +0000 (17:52 +0900)
Mac Randomization will not be performed during Scheduled Scan.

Change-Id: Ia65a2f2c10228d2ac78f3db6e73b00a93de53329
SCSC-Bug-Id: SSB-50850
Signed-off-by: Mohit Ghuley <mohit.ghuley@samsung.com>
drivers/net/wireless/scsc/cfg80211_ops.c

index 1704f7b99d9f9af07e8c3887fd787eb0c9a97b5d..bc4eab4a92394e9bc41edace557845f5e9614d29 100755 (executable)
@@ -637,6 +637,9 @@ int slsi_sched_scan_start(struct wiphy                       *wiphy,
        size_t            scan_ie_len;
        bool              strip_wsc = false;
        bool              strip_p2p = false;
+#ifdef CONFIG_SCSC_WLAN_ENABLE_MAC_RANDOMISATION
+       u8 mac_addr_mask[ETH_ALEN];
+#endif
 
        if (slsi_is_test_mode_enabled()) {
                SLSI_NET_INFO(dev, "Skip sending signal, WlanLite FW does not support MLME_ADD_SCAN.request\n");
@@ -699,6 +702,14 @@ int slsi_sched_scan_start(struct wiphy                       *wiphy,
        }
 
        slsi_purge_scan_results(ndev_vif, SLSI_SCAN_SCHED_ID);
+
+#ifdef CONFIG_SCSC_WLAN_ENABLE_MAC_RANDOMISATION
+       /* Mac Randomization is not currently advertised for scheduled scan, so do not randomise. */
+       sdev->scan_addr_set = 0;
+       memset(mac_addr_mask, 0xFF, ETH_ALEN);
+       slsi_set_mac_randomisation_mask(sdev, mac_addr_mask);
+#endif
+
        r = slsi_mlme_add_sched_scan(sdev, dev, request, scan_ie, scan_ie_len);
 
        if (strip_p2p || strip_wsc)