diff options
Diffstat (limited to 'net/mac80211/ieee80211_iface.c')
-rw-r--r-- | net/mac80211/ieee80211_iface.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_iface.c b/net/mac80211/ieee80211_iface.c index f66f1ddc3fda..0d6824bca92b 100644 --- a/net/mac80211/ieee80211_iface.c +++ b/net/mac80211/ieee80211_iface.c | |||
@@ -193,6 +193,7 @@ void ieee80211_if_reinit(struct net_device *dev) | |||
193 | /* Remove all virtual interfaces that use this BSS | 193 | /* Remove all virtual interfaces that use this BSS |
194 | * as their sdata->bss */ | 194 | * as their sdata->bss */ |
195 | struct ieee80211_sub_if_data *tsdata, *n; | 195 | struct ieee80211_sub_if_data *tsdata, *n; |
196 | struct beacon_data *beacon; | ||
196 | 197 | ||
197 | list_for_each_entry_safe(tsdata, n, &local->interfaces, list) { | 198 | list_for_each_entry_safe(tsdata, n, &local->interfaces, list) { |
198 | if (tsdata != sdata && tsdata->bss == &sdata->u.ap) { | 199 | if (tsdata != sdata && tsdata->bss == &sdata->u.ap) { |
@@ -210,7 +211,10 @@ void ieee80211_if_reinit(struct net_device *dev) | |||
210 | } | 211 | } |
211 | } | 212 | } |
212 | 213 | ||
213 | kfree(sdata->u.ap.beacon); | 214 | beacon = sdata->u.ap.beacon; |
215 | rcu_assign_pointer(sdata->u.ap.beacon, NULL); | ||
216 | synchronize_rcu(); | ||
217 | kfree(beacon); | ||
214 | 218 | ||
215 | while ((skb = skb_dequeue(&sdata->u.ap.ps_bc_buf))) { | 219 | while ((skb = skb_dequeue(&sdata->u.ap.ps_bc_buf))) { |
216 | local->total_ps_buffered--; | 220 | local->total_ps_buffered--; |