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/b43legacy/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/b43legacy/main.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index ab6a18c2e9d..494017e4fcc 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -3361,7 +3361,7 @@ err_kfree_lo_control: | |||
3361 | } | 3361 | } |
3362 | 3362 | ||
3363 | static int b43legacy_op_add_interface(struct ieee80211_hw *hw, | 3363 | static int b43legacy_op_add_interface(struct ieee80211_hw *hw, |
3364 | struct ieee80211_if_init_conf *conf) | 3364 | struct ieee80211_vif *vif) |
3365 | { | 3365 | { |
3366 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | 3366 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); |
3367 | struct b43legacy_wldev *dev; | 3367 | struct b43legacy_wldev *dev; |
@@ -3370,23 +3370,23 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw, | |||
3370 | 3370 | ||
3371 | /* TODO: allow WDS/AP devices to coexist */ | 3371 | /* TODO: allow WDS/AP devices to coexist */ |
3372 | 3372 | ||
3373 | if (conf->type != NL80211_IFTYPE_AP && | 3373 | if (vif->type != NL80211_IFTYPE_AP && |
3374 | conf->type != NL80211_IFTYPE_STATION && | 3374 | vif->type != NL80211_IFTYPE_STATION && |
3375 | conf->type != NL80211_IFTYPE_WDS && | 3375 | vif->type != NL80211_IFTYPE_WDS && |
3376 | conf->type != NL80211_IFTYPE_ADHOC) | 3376 | vif->type != NL80211_IFTYPE_ADHOC) |
3377 | return -EOPNOTSUPP; | 3377 | return -EOPNOTSUPP; |
3378 | 3378 | ||
3379 | mutex_lock(&wl->mutex); | 3379 | mutex_lock(&wl->mutex); |
3380 | if (wl->operating) | 3380 | if (wl->operating) |
3381 | goto out_mutex_unlock; | 3381 | goto out_mutex_unlock; |
3382 | 3382 | ||
3383 | b43legacydbg(wl, "Adding Interface type %d\n", conf->type); | 3383 | b43legacydbg(wl, "Adding Interface type %d\n", vif->type); |
3384 | 3384 | ||
3385 | dev = wl->current_dev; | 3385 | dev = wl->current_dev; |
3386 | wl->operating = 1; | 3386 | wl->operating = 1; |
3387 | wl->vif = conf->vif; | 3387 | wl->vif = vif; |
3388 | wl->if_type = conf->type; | 3388 | wl->if_type = vif->type; |
3389 | memcpy(wl->mac_addr, conf->mac_addr, ETH_ALEN); | 3389 | memcpy(wl->mac_addr, vif->addr, ETH_ALEN); |
3390 | 3390 | ||
3391 | spin_lock_irqsave(&wl->irq_lock, flags); | 3391 | spin_lock_irqsave(&wl->irq_lock, flags); |
3392 | b43legacy_adjust_opmode(dev); | 3392 | b43legacy_adjust_opmode(dev); |
@@ -3403,18 +3403,18 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw, | |||
3403 | } | 3403 | } |
3404 | 3404 | ||
3405 | static void b43legacy_op_remove_interface(struct ieee80211_hw *hw, | 3405 | static void b43legacy_op_remove_interface(struct ieee80211_hw *hw, |
3406 | struct ieee80211_if_init_conf *conf) | 3406 | struct ieee80211_vif *vif) |
3407 | { | 3407 | { |
3408 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | 3408 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); |
3409 | struct b43legacy_wldev *dev = wl->current_dev; | 3409 | struct b43legacy_wldev *dev = wl->current_dev; |
3410 | unsigned long flags; | 3410 | unsigned long flags; |
3411 | 3411 | ||
3412 | b43legacydbg(wl, "Removing Interface type %d\n", conf->type); | 3412 | b43legacydbg(wl, "Removing Interface type %d\n", vif->type); |
3413 | 3413 | ||
3414 | mutex_lock(&wl->mutex); | 3414 | mutex_lock(&wl->mutex); |
3415 | 3415 | ||
3416 | B43legacy_WARN_ON(!wl->operating); | 3416 | B43legacy_WARN_ON(!wl->operating); |
3417 | B43legacy_WARN_ON(wl->vif != conf->vif); | 3417 | B43legacy_WARN_ON(wl->vif != vif); |
3418 | wl->vif = NULL; | 3418 | wl->vif = NULL; |
3419 | 3419 | ||
3420 | wl->operating = 0; | 3420 | wl->operating = 0; |