Skip to content

Commit e345f44

Browse files
jmalinenjmberg-intel
authored andcommitted
mac80211: Support a scan request for a specific BSSID
If the cfg80211 scan trigger operation 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 818965d commit e345f44

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/mac80211/scan.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
305305
ether_addr_copy(local->hw_scan_req->req.mac_addr, req->mac_addr);
306306
ether_addr_copy(local->hw_scan_req->req.mac_addr_mask,
307307
req->mac_addr_mask);
308+
ether_addr_copy(local->hw_scan_req->req.bssid, req->bssid);
308309

309310
return true;
310311
}
@@ -499,7 +500,7 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
499500

500501
for (i = 0; i < scan_req->n_ssids; i++)
501502
ieee80211_send_probe_req(
502-
sdata, local->scan_addr, NULL,
503+
sdata, local->scan_addr, scan_req->bssid,
503504
scan_req->ssids[i].ssid, scan_req->ssids[i].ssid_len,
504505
scan_req->ie, scan_req->ie_len,
505506
scan_req->rates[band], false,
@@ -564,6 +565,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
564565
req->n_channels * sizeof(req->channels[0]);
565566
local->hw_scan_req->req.ie = ies;
566567
local->hw_scan_req->req.flags = req->flags;
568+
eth_broadcast_addr(local->hw_scan_req->req.bssid);
567569

568570
local->hw_scan_band = 0;
569571

0 commit comments

Comments
 (0)