diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index f336cc731df6..c53d77db3e4f 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -2102,18 +2102,18 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
2102 | } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { | 2102 | } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { |
2103 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; | 2103 | struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; |
2104 | struct ieee80211_hdr *hdr; | 2104 | struct ieee80211_hdr *hdr; |
2105 | struct sk_buff *presp = rcu_dereference(ifibss->presp); | ||
2105 | 2106 | ||
2106 | if (!ifibss->probe_resp) | 2107 | if (!presp) |
2107 | goto out; | 2108 | goto out; |
2108 | 2109 | ||
2109 | skb = skb_copy(ifibss->probe_resp, GFP_ATOMIC); | 2110 | skb = skb_copy(presp, GFP_ATOMIC); |
2110 | if (!skb) | 2111 | if (!skb) |
2111 | goto out; | 2112 | goto out; |
2112 | 2113 | ||
2113 | hdr = (struct ieee80211_hdr *) skb->data; | 2114 | hdr = (struct ieee80211_hdr *) skb->data; |
2114 | hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 2115 | hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
2115 | IEEE80211_STYPE_BEACON); | 2116 | IEEE80211_STYPE_BEACON); |
2116 | |||
2117 | } else if (ieee80211_vif_is_mesh(&sdata->vif)) { | 2117 | } else if (ieee80211_vif_is_mesh(&sdata->vif)) { |
2118 | struct ieee80211_mgmt *mgmt; | 2118 | struct ieee80211_mgmt *mgmt; |
2119 | u8 *pos; | 2119 | u8 *pos; |