aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_iface.c')
-rw-r--r--net/mac80211/ieee80211_iface.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/mac80211/ieee80211_iface.c b/net/mac80211/ieee80211_iface.c
index b0f17a2b1a42..98b22736e883 100644
--- a/net/mac80211/ieee80211_iface.c
+++ b/net/mac80211/ieee80211_iface.c
@@ -240,16 +240,21 @@ void ieee80211_if_reinit(struct net_device *dev)
240 break; 240 break;
241 } 241 }
242 case IEEE80211_IF_TYPE_WDS: 242 case IEEE80211_IF_TYPE_WDS:
243 rcu_read_lock();
243 sta = sta_info_get(local, sdata->u.wds.remote_addr); 244 sta = sta_info_get(local, sdata->u.wds.remote_addr);
244 if (sta) { 245 if (sta) {
245 sta_info_free(sta); 246 sta_info_unlink(&sta);
246 sta_info_put(sta);
247 } else { 247 } else {
248#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 248#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
249 printk(KERN_DEBUG "%s: Someone had deleted my STA " 249 printk(KERN_DEBUG "%s: Someone had deleted my STA "
250 "entry for the WDS link\n", dev->name); 250 "entry for the WDS link\n", dev->name);
251#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 251#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
252 } 252 }
253 rcu_read_unlock();
254 if (sta) {
255 synchronize_rcu();
256 sta_info_destroy(sta);
257 }
253 break; 258 break;
254 case IEEE80211_IF_TYPE_MESH_POINT: 259 case IEEE80211_IF_TYPE_MESH_POINT:
255 case IEEE80211_IF_TYPE_STA: 260 case IEEE80211_IF_TYPE_STA:
@@ -275,7 +280,7 @@ void ieee80211_if_reinit(struct net_device *dev)
275 } 280 }
276 281
277 /* remove all STAs that are bound to this virtual interface */ 282 /* remove all STAs that are bound to this virtual interface */
278 sta_info_flush(local, dev); 283 sta_info_flush(local, sdata);
279 284
280 memset(&sdata->u, 0, sizeof(sdata->u)); 285 memset(&sdata->u, 0, sizeof(sdata->u));
281 ieee80211_if_sdata_init(sdata); 286 ieee80211_if_sdata_init(sdata);