Skip to content

Commit

Permalink
mac80211_hwsim: Support a hw scan request for a specific BSSID
Browse files Browse the repository at this point in the history
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 <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
jmalinen authored and jmberg-intel committed Apr 5, 2016
1 parent e345f44 commit 12880d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,7 @@ static void hw_scan_work(struct work_struct *work)
/* send probes */
for (i = 0; i < req->n_ssids; i++) {
struct sk_buff *probe;
struct ieee80211_mgmt *mgmt;

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

mgmt = (struct ieee80211_mgmt *) probe->data;
memcpy(mgmt->da, req->bssid, ETH_ALEN);
memcpy(mgmt->bssid, req->bssid, ETH_ALEN);

if (req->ie_len)
memcpy(skb_put(probe, req->ie_len), req->ie,
req->ie_len);
Expand Down

0 comments on commit 12880d1

Please sign in to comment.