[PATCH 1/1] hostapd: Use attribute NL80211_ATTR_BSSID to trigger scan for specifc BSSID

Vinayak Yadawad vinayak.yadawad at broadcom.com
Fri Dec 8 08:20:23 PST 2023


With changes to optimize scan for specific BSSID, there arises a
scenario where in nl80211_trigger_scan is called with a scan
randomization enabled. A combination of NL80211_ATTR_MAC and
scan randomization results in invalid error for the scan request.
In order to fix the issue we use attribute NL80211_ATTR_BSSID
instead of NL80211_ATTR_MAC.

Signed-off-by: Vinayak Yadawad <vinayak.yadawad at broadcom.com>
---
 src/drivers/driver_nl80211_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c
index 736db6406..ebedb01c6 100644
--- a/src/drivers/driver_nl80211_scan.c
+++ b/src/drivers/driver_nl80211_scan.c
@@ -385,7 +385,7 @@ int wpa_driver_nl80211_scan(struct i802_bss *bss,
 	if (params->bssid) {
 		wpa_printf(MSG_DEBUG, "nl80211: Scan for a specific BSSID: "
 			   MACSTR, MAC2STR(params->bssid));
-		if (nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, params->bssid))
+		if (nla_put(msg, NL80211_ATTR_BSSID, ETH_ALEN, params->bssid))
 			goto fail;
 	}
 
-- 
2.32.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4218 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20231208/cbce9648/attachment.p7s>


More information about the Hostap mailing list