aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-02-26 15:12:48 -0500
committerJohannes Berg <johannes.berg@intel.com>2016-04-05 04:56:28 -0400
commite345f44f2b7c6a77c1c0677b7c8606a0bb1c5c5c (patch)
tree9dac46648eb6eba1e9924111b585a568395084a2
parent818965d3917774955fad52f87b59d690d8be9e8b (diff)
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 <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/scan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index a3fea1f35ef9..41aa728e5468 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -305,6 +305,7 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
305 ether_addr_copy(local->hw_scan_req->req.mac_addr, req->mac_addr); 305 ether_addr_copy(local->hw_scan_req->req.mac_addr, req->mac_addr);
306 ether_addr_copy(local->hw_scan_req->req.mac_addr_mask, 306 ether_addr_copy(local->hw_scan_req->req.mac_addr_mask,
307 req->mac_addr_mask); 307 req->mac_addr_mask);
308 ether_addr_copy(local->hw_scan_req->req.bssid, req->bssid);
308 309
309 return true; 310 return true;
310} 311}
@@ -499,7 +500,7 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
499 500
500 for (i = 0; i < scan_req->n_ssids; i++) 501 for (i = 0; i < scan_req->n_ssids; i++)
501 ieee80211_send_probe_req( 502 ieee80211_send_probe_req(
502 sdata, local->scan_addr, NULL, 503 sdata, local->scan_addr, scan_req->bssid,
503 scan_req->ssids[i].ssid, scan_req->ssids[i].ssid_len, 504 scan_req->ssids[i].ssid, scan_req->ssids[i].ssid_len,
504 scan_req->ie, scan_req->ie_len, 505 scan_req->ie, scan_req->ie_len,
505 scan_req->rates[band], false, 506 scan_req->rates[band], false,
@@ -564,6 +565,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
564 req->n_channels * sizeof(req->channels[0]); 565 req->n_channels * sizeof(req->channels[0]);
565 local->hw_scan_req->req.ie = ies; 566 local->hw_scan_req->req.ie = ies;
566 local->hw_scan_req->req.flags = req->flags; 567 local->hw_scan_req->req.flags = req->flags;
568 eth_broadcast_addr(local->hw_scan_req->req.bssid);
567 569
568 local->hw_scan_band = 0; 570 local->hw_scan_band = 0;
569 571