diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-02-16 12:39:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:52:38 -0500 |
commit | 70692ad2923a379e0a10f9ec2ad93fbbe084cc46 (patch) | |
tree | f67488c396ea6e61f71e0199eea189ea939a698b /net/mac80211/util.c | |
parent | 83befbde839b1deb0cd752a834ffd9fde8571ae2 (diff) |
nl80211: Optional IEs into scan request
This extends the NL80211_CMD_TRIGGER_SCAN command to allow applications
to specify a set of information element(s) to be added into Probe
Request frames with NL80211_ATTR_IE. This provides support for the
MLME-SCAN.request primitive parameter VendorSpecificInfo and can be
used, e.g., to implement WPS scanning.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index dee17e5cbb89..e0431a1d218b 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -884,7 +884,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, | |||
884 | } | 884 | } |
885 | 885 | ||
886 | void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | 886 | void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, |
887 | u8 *ssid, size_t ssid_len) | 887 | u8 *ssid, size_t ssid_len, |
888 | u8 *ie, size_t ie_len) | ||
888 | { | 889 | { |
889 | struct ieee80211_local *local = sdata->local; | 890 | struct ieee80211_local *local = sdata->local; |
890 | struct ieee80211_supported_band *sband; | 891 | struct ieee80211_supported_band *sband; |
@@ -903,7 +904,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | |||
903 | } | 904 | } |
904 | 905 | ||
905 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt) + 200 + | 906 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt) + 200 + |
906 | extra_preq_ie_len); | 907 | ie_len + extra_preq_ie_len); |
907 | if (!skb) { | 908 | if (!skb) { |
908 | printk(KERN_DEBUG "%s: failed to allocate buffer for probe " | 909 | printk(KERN_DEBUG "%s: failed to allocate buffer for probe " |
909 | "request\n", sdata->dev->name); | 910 | "request\n", sdata->dev->name); |
@@ -950,6 +951,8 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | |||
950 | *pos = rate->bitrate / 5; | 951 | *pos = rate->bitrate / 5; |
951 | } | 952 | } |
952 | 953 | ||
954 | if (ie) | ||
955 | memcpy(skb_put(skb, ie_len), ie, ie_len); | ||
953 | if (extra_preq_ie) | 956 | if (extra_preq_ie) |
954 | memcpy(skb_put(skb, extra_preq_ie_len), extra_preq_ie, | 957 | memcpy(skb_put(skb, extra_preq_ie_len), extra_preq_ie, |
955 | extra_preq_ie_len); | 958 | extra_preq_ie_len); |