From: Jouni Malinen Date: Fri, 26 Feb 2016 20:12:49 +0000 (+0200) Subject: mac80211_hwsim: Support a hw scan request for a specific BSSID X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=12880d169471fb14c46d6f323f31127702a6d5e6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index e85e0737771c..2b185feb1aa0 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -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, @@ -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);