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
此提交包含在:
Rajeev Kumar Sirasanagandla
2018-07-17 18:05:41 +05:30
提交者 nshrivas
父節點 caad7c70bc
當前提交 2759a00d80

查看文件

@@ -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;