diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-03-20 15:21:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-27 20:13:04 -0400 |
commit | 65fc73ac4a310945dfeceac961726c2765ad2ec0 (patch) | |
tree | 5c1410524f3a82b653d6a08753fbe5bdd9a984fa /net/mac80211/mlme.c | |
parent | feeb44454996cf5b375fad21697bf6202fe30dd2 (diff) |
nl80211: Remove NL80211_CMD_SET_MGMT_EXTRA_IE
The functionality that NL80211_CMD_SET_MGMT_EXTRA_IE provided can now
be achieved with cleaner design by adding IE(s) into
NL80211_CMD_TRIGGER_SCAN, NL80211_CMD_AUTHENTICATE,
NL80211_CMD_ASSOCIATE, NL80211_CMD_DEAUTHENTICATE, and
NL80211_CMD_DISASSOCIATE.
Since this is a very recently added command and there are no known (or
known planned) applications using NL80211_CMD_SET_MGMT_EXTRA_IE and
taken into account how much extra complexity it adds to the IE
processing we have now (and need to add in the future to fix IE order
in couple of frames), it looks like the best option is to just remove
the implementation of this command for now. The enum values themselves
are left to avoid changing the nl80211 command or attribute numbers.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index d1bcc8438772..b0808efcedf6 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -82,38 +82,23 @@ static int ieee80211_compatible_rates(struct ieee80211_bss *bss, | |||
82 | 82 | ||
83 | /* frame sending functions */ | 83 | /* frame sending functions */ |
84 | 84 | ||
85 | static void add_extra_ies(struct sk_buff *skb, u8 *ies, size_t ies_len) | ||
86 | { | ||
87 | if (ies) | ||
88 | memcpy(skb_put(skb, ies_len), ies, ies_len); | ||
89 | } | ||
90 | |||
91 | static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | 85 | static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) |
92 | { | 86 | { |
93 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 87 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
94 | struct ieee80211_local *local = sdata->local; | 88 | struct ieee80211_local *local = sdata->local; |
95 | struct sk_buff *skb; | 89 | struct sk_buff *skb; |
96 | struct ieee80211_mgmt *mgmt; | 90 | struct ieee80211_mgmt *mgmt; |
97 | u8 *pos, *ies, *ht_ie, *e_ies; | 91 | u8 *pos, *ies, *ht_ie; |
98 | int i, len, count, rates_len, supp_rates_len; | 92 | int i, len, count, rates_len, supp_rates_len; |
99 | u16 capab; | 93 | u16 capab; |
100 | struct ieee80211_bss *bss; | 94 | struct ieee80211_bss *bss; |
101 | int wmm = 0; | 95 | int wmm = 0; |
102 | struct ieee80211_supported_band *sband; | 96 | struct ieee80211_supported_band *sband; |
103 | u32 rates = 0; | 97 | u32 rates = 0; |
104 | size_t e_ies_len; | ||
105 | |||
106 | if (ifmgd->flags & IEEE80211_STA_PREV_BSSID_SET) { | ||
107 | e_ies = sdata->u.mgd.ie_reassocreq; | ||
108 | e_ies_len = sdata->u.mgd.ie_reassocreq_len; | ||
109 | } else { | ||
110 | e_ies = sdata->u.mgd.ie_assocreq; | ||
111 | e_ies_len = sdata->u.mgd.ie_assocreq_len; | ||
112 | } | ||
113 | 98 | ||
114 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + | 99 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + |
115 | sizeof(*mgmt) + 200 + ifmgd->extra_ie_len + | 100 | sizeof(*mgmt) + 200 + ifmgd->extra_ie_len + |
116 | ifmgd->ssid_len + e_ies_len); | 101 | ifmgd->ssid_len); |
117 | if (!skb) { | 102 | if (!skb) { |
118 | printk(KERN_DEBUG "%s: failed to allocate buffer for assoc " | 103 | printk(KERN_DEBUG "%s: failed to allocate buffer for assoc " |
119 | "frame\n", sdata->dev->name); | 104 | "frame\n", sdata->dev->name); |
@@ -304,8 +289,6 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
304 | memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs)); | 289 | memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs)); |
305 | } | 290 | } |
306 | 291 | ||
307 | add_extra_ies(skb, e_ies, e_ies_len); | ||
308 | |||
309 | kfree(ifmgd->assocreq_ies); | 292 | kfree(ifmgd->assocreq_ies); |
310 | ifmgd->assocreq_ies_len = (skb->data + skb->len) - ies; | 293 | ifmgd->assocreq_ies_len = (skb->data + skb->len) - ies; |
311 | ifmgd->assocreq_ies = kmalloc(ifmgd->assocreq_ies_len, GFP_KERNEL); | 294 | ifmgd->assocreq_ies = kmalloc(ifmgd->assocreq_ies_len, GFP_KERNEL); |
@@ -323,19 +306,8 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | |||
323 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 306 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
324 | struct sk_buff *skb; | 307 | struct sk_buff *skb; |
325 | struct ieee80211_mgmt *mgmt; | 308 | struct ieee80211_mgmt *mgmt; |
326 | u8 *ies; | ||
327 | size_t ies_len; | ||
328 | 309 | ||
329 | if (stype == IEEE80211_STYPE_DEAUTH) { | 310 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt)); |
330 | ies = sdata->u.mgd.ie_deauth; | ||
331 | ies_len = sdata->u.mgd.ie_deauth_len; | ||
332 | } else { | ||
333 | ies = sdata->u.mgd.ie_disassoc; | ||
334 | ies_len = sdata->u.mgd.ie_disassoc_len; | ||
335 | } | ||
336 | |||
337 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt) + | ||
338 | ies_len); | ||
339 | if (!skb) { | 311 | if (!skb) { |
340 | printk(KERN_DEBUG "%s: failed to allocate buffer for " | 312 | printk(KERN_DEBUG "%s: failed to allocate buffer for " |
341 | "deauth/disassoc frame\n", sdata->dev->name); | 313 | "deauth/disassoc frame\n", sdata->dev->name); |
@@ -353,8 +325,6 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | |||
353 | /* u.deauth.reason_code == u.disassoc.reason_code */ | 325 | /* u.deauth.reason_code == u.disassoc.reason_code */ |
354 | mgmt->u.deauth.reason_code = cpu_to_le16(reason); | 326 | mgmt->u.deauth.reason_code = cpu_to_le16(reason); |
355 | 327 | ||
356 | add_extra_ies(skb, ies, ies_len); | ||
357 | |||
358 | ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED); | 328 | ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED); |
359 | } | 329 | } |
360 | 330 | ||