sta_scan: Support the RxMac parameter in the scan command
Add support to parse RxMac in the sta_scan command to configure the
driver to use scan request BSSID value in Probe Request frame RA(A1) for
scan. If this configuration is set, the driver uses the BSSID value from
the scan request to set the RA(A1) in the Probe Request frames during
the scan, else the broadcast address is set in the Probe Request frames
RA(A1).
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
diff --git a/sta.c b/sta.c
index b5442eb..f9c40e7 100644
--- a/sta.c
+++ b/sta.c
@@ -7231,6 +7231,22 @@
}
+static int sta_set_scan_unicast_probe(struct sigma_dut *dut,
+ const char *intf, int val)
+{
+#ifdef NL80211_SUPPORT
+ return wcn_wifi_test_config_set_u8(
+ dut, intf,
+ QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_USE_BSSID_IN_PROBE_REQ_RA,
+ val);
+#else /* NL80211_SUPPORT */
+ sigma_dut_print(dut, DUT_MSG_ERROR,
+ "Unicast RA in Probe Request frame cannot be set without NL80211_SUPPORT defined");
+ return -1;
+#endif /* NL80211_SUPPORT */
+}
+
+
static int sta_set_tx_beamformee(struct sigma_dut *dut, const char *intf,
int enable)
{
@@ -7567,6 +7583,8 @@
if (dut->sta_async_twt_supp == -1)
sta_get_twt_feature_async_supp(dut, intf);
+ sta_set_scan_unicast_probe(dut, intf, 0);
+
#ifdef NL80211_SUPPORT
/* Reset the device HE capabilities to its default supported
* configuration. */
@@ -14135,8 +14153,13 @@
wpa_command(intf, buf);
}
+ if (get_param(cmd, "RxMac"))
+ sta_set_scan_unicast_probe(dut, intf, 1);
+
bssid = get_param(cmd, "Bssid");
ssid = get_param(cmd, "Ssid");
+ if (!bssid)
+ bssid = get_param(cmd, "RxMac");
if (ssid && strcasecmp(ssid, "ZeroLength") == 0 &&
dut->device_type == STA_testbed) {