diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-12-23 07:15:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:55:07 -0500 |
commit | 1ed32e4fc8cfc9656cc1101e7f9617d485fcbe7b (patch) | |
tree | 81697637a36eb4776df39c81a77a9e09ec951a1a /drivers/net/wireless/b43/main.c | |
parent | 98b6218388e345064c3f2d3c161383a18274c638 (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 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index b0b5ce950008..6634a77fc766 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -4391,7 +4391,7 @@ err_busdown: | |||
4391 | } | 4391 | } |
4392 | 4392 | ||
4393 | static int b43_op_add_interface(struct ieee80211_hw *hw, | 4393 | static int b43_op_add_interface(struct ieee80211_hw *hw, |
4394 | struct ieee80211_if_init_conf *conf) | 4394 | struct ieee80211_vif *vif) |
4395 | { | 4395 | { |
4396 | struct b43_wl *wl = hw_to_b43_wl(hw); | 4396 | struct b43_wl *wl = hw_to_b43_wl(hw); |
4397 | struct b43_wldev *dev; | 4397 | struct b43_wldev *dev; |
@@ -4399,24 +4399,24 @@ static int b43_op_add_interface(struct ieee80211_hw *hw, | |||
4399 | 4399 | ||
4400 | /* TODO: allow WDS/AP devices to coexist */ | 4400 | /* TODO: allow WDS/AP devices to coexist */ |
4401 | 4401 | ||
4402 | if (conf->type != NL80211_IFTYPE_AP && | 4402 | if (vif->type != NL80211_IFTYPE_AP && |
4403 | conf->type != NL80211_IFTYPE_MESH_POINT && | 4403 | vif->type != NL80211_IFTYPE_MESH_POINT && |
4404 | conf->type != NL80211_IFTYPE_STATION && | 4404 | vif->type != NL80211_IFTYPE_STATION && |
4405 | conf->type != NL80211_IFTYPE_WDS && | 4405 | vif->type != NL80211_IFTYPE_WDS && |
4406 | conf->type != NL80211_IFTYPE_ADHOC) | 4406 | vif->type != NL80211_IFTYPE_ADHOC) |
4407 | return -EOPNOTSUPP; | 4407 | return -EOPNOTSUPP; |
4408 | 4408 | ||
4409 | mutex_lock(&wl->mutex); | 4409 | mutex_lock(&wl->mutex); |
4410 | if (wl->operating) | 4410 | if (wl->operating) |
4411 | goto out_mutex_unlock; | 4411 | goto out_mutex_unlock; |
4412 | 4412 | ||
4413 | b43dbg(wl, "Adding Interface type %d\n", conf->type); | 4413 | b43dbg(wl, "Adding Interface type %d\n", vif->type); |
4414 | 4414 | ||
4415 | dev = wl->current_dev; | 4415 | dev = wl->current_dev; |
4416 | wl->operating = 1; | 4416 | wl->operating = 1; |
4417 | wl->vif = conf->vif; | 4417 | wl->vif = vif; |
4418 | wl->if_type = conf->type; | 4418 | wl->if_type = vif->type; |
4419 | memcpy(wl->mac_addr, conf->mac_addr, ETH_ALEN); | 4419 | memcpy(wl->mac_addr, vif->addr, ETH_ALEN); |
4420 | 4420 | ||
4421 | b43_adjust_opmode(dev); | 4421 | b43_adjust_opmode(dev); |
4422 | b43_set_pretbtt(dev); | 4422 | b43_set_pretbtt(dev); |
@@ -4431,17 +4431,17 @@ static int b43_op_add_interface(struct ieee80211_hw *hw, | |||
4431 | } | 4431 | } |
4432 | 4432 | ||
4433 | static void b43_op_remove_interface(struct ieee80211_hw *hw, | 4433 | static void b43_op_remove_interface(struct ieee80211_hw *hw, |
4434 | struct ieee80211_if_init_conf *conf) | 4434 | struct ieee80211_vif *vif) |
4435 | { | 4435 | { |
4436 | struct b43_wl *wl = hw_to_b43_wl(hw); | 4436 | struct b43_wl *wl = hw_to_b43_wl(hw); |
4437 | struct b43_wldev *dev = wl->current_dev; | 4437 | struct b43_wldev *dev = wl->current_dev; |
4438 | 4438 | ||
4439 | b43dbg(wl, "Removing Interface type %d\n", conf->type); | 4439 | b43dbg(wl, "Removing Interface type %d\n", vif->type); |
4440 | 4440 | ||
4441 | mutex_lock(&wl->mutex); | 4441 | mutex_lock(&wl->mutex); |
4442 | 4442 | ||
4443 | B43_WARN_ON(!wl->operating); | 4443 | B43_WARN_ON(!wl->operating); |
4444 | B43_WARN_ON(wl->vif != conf->vif); | 4444 | B43_WARN_ON(wl->vif != vif); |
4445 | wl->vif = NULL; | 4445 | wl->vif = NULL; |
4446 | 4446 | ||
4447 | wl->operating = 0; | 4447 | wl->operating = 0; |