aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 610ed1d9893a..4a623b8e91fd 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -56,7 +56,7 @@ static void ieee80211_teardown_sdata(struct net_device *dev)
56 case IEEE80211_IF_TYPE_MESH_POINT: 56 case IEEE80211_IF_TYPE_MESH_POINT:
57 /* Allow compiler to elide mesh_rmc_free call. */ 57 /* Allow compiler to elide mesh_rmc_free call. */
58 if (ieee80211_vif_is_mesh(&sdata->vif)) 58 if (ieee80211_vif_is_mesh(&sdata->vif))
59 mesh_rmc_free(dev); 59 mesh_rmc_free(sdata);
60 /* fall through */ 60 /* fall through */
61 case IEEE80211_IF_TYPE_STA: 61 case IEEE80211_IF_TYPE_STA:
62 case IEEE80211_IF_TYPE_IBSS: 62 case IEEE80211_IF_TYPE_IBSS:
@@ -241,15 +241,13 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
241 return ret; 241 return ret;
242} 242}
243 243
244void ieee80211_if_remove(struct net_device *dev) 244void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata)
245{ 245{
246 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
247
248 ASSERT_RTNL(); 246 ASSERT_RTNL();
249 247
250 list_del_rcu(&sdata->list); 248 list_del_rcu(&sdata->list);
251 synchronize_rcu(); 249 synchronize_rcu();
252 unregister_netdevice(dev); 250 unregister_netdevice(sdata->dev);
253} 251}
254 252
255/* 253/*