aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-12-23 07:15:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-28 16:55:07 -0500
commit1ed32e4fc8cfc9656cc1101e7f9617d485fcbe7b (patch)
tree81697637a36eb4776df39c81a77a9e09ec951a1a /net/mac80211/iface.c
parent98b6218388e345064c3f2d3c161383a18274c638 (diff)
mac80211: remove struct ieee80211_if_init_conf
All its members (vif, mac_addr, type) are now available in the vif struct directly, so we can pass that instead of the conf struct. I generated this patch (except the mac80211 and header file changes) with this semantic patch: @@ identifier conf, fn, hw; type tp; @@ tp fn(struct ieee80211_hw *hw, -struct ieee80211_if_init_conf *conf) +struct ieee80211_vif *vif) { <... ( -conf->type +vif->type | -conf->mac_addr +vif->addr | -conf->vif +vif ) ...> } Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 7d410f15281..00a1f4ccdaf 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;