aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-06-12 16:24:31 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-11-19 12:46:09 -0500
commita344d6778a98e4c19ac871f369e399e6356edcb3 (patch)
tree57680bfd10fc013c7a996fbea7212be900f089db /net/mac80211/tx.c
parent6ea0a69ca21bbddab5b3979c2190013b0263e749 (diff)
mac80211: allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDR
Allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDR with software based scanning and generate a random MAC address for them for every scan request with the flag. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 0cb41d1a1f20..66ddbbeccd20 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2961,19 +2961,16 @@ struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
2961EXPORT_SYMBOL(ieee80211_nullfunc_get); 2961EXPORT_SYMBOL(ieee80211_nullfunc_get);
2962 2962
2963struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw, 2963struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
2964 struct ieee80211_vif *vif, 2964 const u8 *src_addr,
2965 const u8 *ssid, size_t ssid_len, 2965 const u8 *ssid, size_t ssid_len,
2966 size_t tailroom) 2966 size_t tailroom)
2967{ 2967{
2968 struct ieee80211_sub_if_data *sdata; 2968 struct ieee80211_local *local = hw_to_local(hw);
2969 struct ieee80211_local *local;
2970 struct ieee80211_hdr_3addr *hdr; 2969 struct ieee80211_hdr_3addr *hdr;
2971 struct sk_buff *skb; 2970 struct sk_buff *skb;
2972 size_t ie_ssid_len; 2971 size_t ie_ssid_len;
2973 u8 *pos; 2972 u8 *pos;
2974 2973
2975 sdata = vif_to_sdata(vif);
2976 local = sdata->local;
2977 ie_ssid_len = 2 + ssid_len; 2974 ie_ssid_len = 2 + ssid_len;
2978 2975
2979 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*hdr) + 2976 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*hdr) +
@@ -2988,7 +2985,7 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
2988 hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | 2985 hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
2989 IEEE80211_STYPE_PROBE_REQ); 2986 IEEE80211_STYPE_PROBE_REQ);
2990 eth_broadcast_addr(hdr->addr1); 2987 eth_broadcast_addr(hdr->addr1);
2991 memcpy(hdr->addr2, vif->addr, ETH_ALEN); 2988 memcpy(hdr->addr2, src_addr, ETH_ALEN);
2992 eth_broadcast_addr(hdr->addr3); 2989 eth_broadcast_addr(hdr->addr3);
2993 2990
2994 pos = skb_put(skb, ie_ssid_len); 2991 pos = skb_put(skb, ie_ssid_len);