diff options
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 7d410f15281a..00a1f4ccdaf1 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -96,7 +96,6 @@ static int ieee80211_open(struct net_device *dev) | |||
96 | struct ieee80211_sub_if_data *nsdata; | 96 | struct ieee80211_sub_if_data *nsdata; |
97 | struct ieee80211_local *local = sdata->local; | 97 | struct ieee80211_local *local = sdata->local; |
98 | struct sta_info *sta; | 98 | struct sta_info *sta; |
99 | struct ieee80211_if_init_conf conf; | ||
100 | u32 changed = 0; | 99 | u32 changed = 0; |
101 | int res; | 100 | int res; |
102 | u32 hw_reconf_flags = 0; | 101 | u32 hw_reconf_flags = 0; |
@@ -248,10 +247,7 @@ static int ieee80211_open(struct net_device *dev) | |||
248 | ieee80211_configure_filter(local); | 247 | ieee80211_configure_filter(local); |
249 | break; | 248 | break; |
250 | default: | 249 | default: |
251 | conf.vif = &sdata->vif; | 250 | res = drv_add_interface(local, &sdata->vif); |
252 | conf.type = sdata->vif.type; | ||
253 | conf.mac_addr = sdata->vif.addr; | ||
254 | res = drv_add_interface(local, &conf); | ||
255 | if (res) | 251 | if (res) |
256 | goto err_stop; | 252 | goto err_stop; |
257 | 253 | ||
@@ -334,7 +330,7 @@ static int ieee80211_open(struct net_device *dev) | |||
334 | 330 | ||
335 | return 0; | 331 | return 0; |
336 | err_del_interface: | 332 | err_del_interface: |
337 | drv_remove_interface(local, &conf); | 333 | drv_remove_interface(local, &sdata->vif); |
338 | err_stop: | 334 | err_stop: |
339 | if (!local->open_count) | 335 | if (!local->open_count) |
340 | drv_stop(local); | 336 | drv_stop(local); |
@@ -349,7 +345,6 @@ static int ieee80211_stop(struct net_device *dev) | |||
349 | { | 345 | { |
350 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 346 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
351 | struct ieee80211_local *local = sdata->local; | 347 | struct ieee80211_local *local = sdata->local; |
352 | struct ieee80211_if_init_conf conf; | ||
353 | struct sta_info *sta; | 348 | struct sta_info *sta; |
354 | unsigned long flags; | 349 | unsigned long flags; |
355 | struct sk_buff *skb, *tmp; | 350 | struct sk_buff *skb, *tmp; |
@@ -533,12 +528,9 @@ static int ieee80211_stop(struct net_device *dev) | |||
533 | BSS_CHANGED_BEACON_ENABLED); | 528 | BSS_CHANGED_BEACON_ENABLED); |
534 | } | 529 | } |
535 | 530 | ||
536 | conf.vif = &sdata->vif; | ||
537 | conf.type = sdata->vif.type; | ||
538 | conf.mac_addr = sdata->vif.addr; | ||
539 | /* disable all keys for as long as this netdev is down */ | 531 | /* disable all keys for as long as this netdev is down */ |
540 | ieee80211_disable_keys(sdata); | 532 | ieee80211_disable_keys(sdata); |
541 | drv_remove_interface(local, &conf); | 533 | drv_remove_interface(local, &sdata->vif); |
542 | } | 534 | } |
543 | 535 | ||
544 | sdata->bss = NULL; | 536 | sdata->bss = NULL; |