Skip to content

Commit 12880d1

Browse files
jmalinenjmberg-intel
authored andcommitted
mac80211_hwsim: Support a hw scan request for a specific BSSID
If the hw scan request specifies a single BSSID, use that value instead of the wildcard BSSID in the Probe Request frames. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent e345f44 commit 12880d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/wireless/mac80211_hwsim.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,6 +1909,7 @@ static void hw_scan_work(struct work_struct *work)
19091909
/* send probes */
19101910
for (i = 0; i < req->n_ssids; i++) {
19111911
struct sk_buff *probe;
1912+
struct ieee80211_mgmt *mgmt;
19121913

19131914
probe = ieee80211_probereq_get(hwsim->hw,
19141915
hwsim->scan_addr,
@@ -1918,6 +1919,10 @@ static void hw_scan_work(struct work_struct *work)
19181919
if (!probe)
19191920
continue;
19201921

1922+
mgmt = (struct ieee80211_mgmt *) probe->data;
1923+
memcpy(mgmt->da, req->bssid, ETH_ALEN);
1924+
memcpy(mgmt->bssid, req->bssid, ETH_ALEN);
1925+
19211926
if (req->ie_len)
19221927
memcpy(skb_put(probe, req->ie_len), req->ie,
19231928
req->ie_len);

0 commit comments

Comments
 (0)