diff options
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index e0431a1d218b..444bb14c95e1 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -846,16 +846,9 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, | |||
846 | struct ieee80211_local *local = sdata->local; | 846 | struct ieee80211_local *local = sdata->local; |
847 | struct sk_buff *skb; | 847 | struct sk_buff *skb; |
848 | struct ieee80211_mgmt *mgmt; | 848 | struct ieee80211_mgmt *mgmt; |
849 | const u8 *ie_auth = NULL; | ||
850 | int ie_auth_len = 0; | ||
851 | |||
852 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | ||
853 | ie_auth_len = sdata->u.mgd.ie_auth_len; | ||
854 | ie_auth = sdata->u.mgd.ie_auth; | ||
855 | } | ||
856 | 849 | ||
857 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + | 850 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + |
858 | sizeof(*mgmt) + 6 + extra_len + ie_auth_len); | 851 | sizeof(*mgmt) + 6 + extra_len); |
859 | if (!skb) { | 852 | if (!skb) { |
860 | printk(KERN_DEBUG "%s: failed to allocate buffer for auth " | 853 | printk(KERN_DEBUG "%s: failed to allocate buffer for auth " |
861 | "frame\n", sdata->dev->name); | 854 | "frame\n", sdata->dev->name); |
@@ -877,8 +870,6 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, | |||
877 | mgmt->u.auth.status_code = cpu_to_le16(0); | 870 | mgmt->u.auth.status_code = cpu_to_le16(0); |
878 | if (extra) | 871 | if (extra) |
879 | memcpy(skb_put(skb, extra_len), extra, extra_len); | 872 | memcpy(skb_put(skb, extra_len), extra, extra_len); |
880 | if (ie_auth) | ||
881 | memcpy(skb_put(skb, ie_auth_len), ie_auth, ie_auth_len); | ||
882 | 873 | ||
883 | ieee80211_tx_skb(sdata, skb, encrypt); | 874 | ieee80211_tx_skb(sdata, skb, encrypt); |
884 | } | 875 | } |
@@ -891,20 +882,11 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | |||
891 | struct ieee80211_supported_band *sband; | 882 | struct ieee80211_supported_band *sband; |
892 | struct sk_buff *skb; | 883 | struct sk_buff *skb; |
893 | struct ieee80211_mgmt *mgmt; | 884 | struct ieee80211_mgmt *mgmt; |
894 | u8 *pos, *supp_rates, *esupp_rates = NULL, *extra_preq_ie = NULL; | 885 | u8 *pos, *supp_rates, *esupp_rates = NULL; |
895 | int i, extra_preq_ie_len = 0; | 886 | int i; |
896 | |||
897 | switch (sdata->vif.type) { | ||
898 | case NL80211_IFTYPE_STATION: | ||
899 | extra_preq_ie_len = sdata->u.mgd.ie_probereq_len; | ||
900 | extra_preq_ie = sdata->u.mgd.ie_probereq; | ||
901 | break; | ||
902 | default: | ||
903 | break; | ||
904 | } | ||
905 | 887 | ||
906 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt) + 200 + | 888 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt) + 200 + |
907 | ie_len + extra_preq_ie_len); | 889 | ie_len); |
908 | if (!skb) { | 890 | if (!skb) { |
909 | printk(KERN_DEBUG "%s: failed to allocate buffer for probe " | 891 | printk(KERN_DEBUG "%s: failed to allocate buffer for probe " |
910 | "request\n", sdata->dev->name); | 892 | "request\n", sdata->dev->name); |
@@ -953,9 +935,6 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | |||
953 | 935 | ||
954 | if (ie) | 936 | if (ie) |
955 | memcpy(skb_put(skb, ie_len), ie, ie_len); | 937 | memcpy(skb_put(skb, ie_len), ie, ie_len); |
956 | if (extra_preq_ie) | ||
957 | memcpy(skb_put(skb, extra_preq_ie_len), extra_preq_ie, | ||
958 | extra_preq_ie_len); | ||
959 | 938 | ||
960 | ieee80211_tx_skb(sdata, skb, 0); | 939 | ieee80211_tx_skb(sdata, skb, 0); |
961 | } | 940 | } |