#ifdef CONFIG_SCSC_WLAN_ENABLE_MAC_RANDOMISATION
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
if (request->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
- memcpy(sdev->scan_mac_addr, request->mac_addr, ETH_ALEN);
- r = slsi_set_mac_randomisation_mask(sdev, request->mac_addr_mask);
- if (!r)
- sdev->scan_addr_set = 1;
+ if (sdev->fw_mac_randomization_enabled) {
+ memcpy(sdev->scan_mac_addr, request->mac_addr, ETH_ALEN);
+ r = slsi_set_mac_randomisation_mask(sdev, request->mac_addr_mask);
+ if (!r)
+ sdev->scan_addr_set = 1;
+ } else {
+ SLSI_NET_INFO(dev, "Mac Randomization is not enabled in Firmware\n");
+ sdev->scan_addr_set = 0;
+ }
} else
#endif
if (sdev->scan_addr_set) {
u16 rtt_vif[8];
bool acs_channel_switched;
int recovery_timeout; /* ms autorecovery completion timeout */
+#ifdef CONFIG_SCSC_WLAN_ENABLE_MAC_RANDOMISATION
+ bool fw_mac_randomization_enabled;
+#endif
};
/* Compact representation of channels a ESS has been seen on
#endif
#ifdef CONFIG_SCSC_WLAN_AP_INFO_FILE
{ SLSI_PSID_UNIFI_DUAL_BAND_CONCURRENCY, {0, 0} },
- { SLSI_PSID_UNIFI_MAX_CLIENT, {0, 0} }
+ { SLSI_PSID_UNIFI_MAX_CLIENT, {0, 0} },
+#endif
+#ifdef CONFIG_SCSC_WLAN_ENABLE_MAC_RANDOMISATION
+ { SLSI_PSID_UNIFI_MAC_ADDRESS_RANDOMISATION_ACTIVATED, {0, 0} }
#endif
};/*Check the mibrsp.dataLength when a new mib is added*/
if (r != SLSI_MIB_STATUS_SUCCESS)
return -ENOMEM;
- mibrsp.dataLength = 154;
+ mibrsp.dataLength = 164;
mibrsp.data = kmalloc(mibrsp.dataLength, GFP_KERNEL);
if (!mibrsp.data) {
kfree(mibreq.data);
else
SLSI_WARN(sdev, "Error reading SoftAP max client\n");
#endif
-
+#ifdef CONFIG_SCSC_WLAN_ENABLE_MAC_RANDOMISATION
+ if (values[++mib_index].type != SLSI_MIB_TYPE_NONE) /* Mac Randomization enable? */
+ sdev->fw_mac_randomization_enabled = values[mib_index].u.boolValue;
+ else
+ SLSI_WARN(sdev, "Error reading Mac Randomization Support\n");
+#endif
kfree(values);
}
kfree(mibrsp.data);