mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
98b6218388
commit
1ed32e4fc8
25 changed files with 170 additions and 214 deletions
|
@ -3361,7 +3361,7 @@ err_kfree_lo_control:
|
|||
}
|
||||
|
||||
static int b43legacy_op_add_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_if_init_conf *conf)
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
|
||||
struct b43legacy_wldev *dev;
|
||||
|
@ -3370,23 +3370,23 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw,
|
|||
|
||||
/* TODO: allow WDS/AP devices to coexist */
|
||||
|
||||
if (conf->type != NL80211_IFTYPE_AP &&
|
||||
conf->type != NL80211_IFTYPE_STATION &&
|
||||
conf->type != NL80211_IFTYPE_WDS &&
|
||||
conf->type != NL80211_IFTYPE_ADHOC)
|
||||
if (vif->type != NL80211_IFTYPE_AP &&
|
||||
vif->type != NL80211_IFTYPE_STATION &&
|
||||
vif->type != NL80211_IFTYPE_WDS &&
|
||||
vif->type != NL80211_IFTYPE_ADHOC)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
if (wl->operating)
|
||||
goto out_mutex_unlock;
|
||||
|
||||
b43legacydbg(wl, "Adding Interface type %d\n", conf->type);
|
||||
b43legacydbg(wl, "Adding Interface type %d\n", vif->type);
|
||||
|
||||
dev = wl->current_dev;
|
||||
wl->operating = 1;
|
||||
wl->vif = conf->vif;
|
||||
wl->if_type = conf->type;
|
||||
memcpy(wl->mac_addr, conf->mac_addr, ETH_ALEN);
|
||||
wl->vif = vif;
|
||||
wl->if_type = vif->type;
|
||||
memcpy(wl->mac_addr, vif->addr, ETH_ALEN);
|
||||
|
||||
spin_lock_irqsave(&wl->irq_lock, flags);
|
||||
b43legacy_adjust_opmode(dev);
|
||||
|
@ -3403,18 +3403,18 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw,
|
|||
}
|
||||
|
||||
static void b43legacy_op_remove_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_if_init_conf *conf)
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
|
||||
struct b43legacy_wldev *dev = wl->current_dev;
|
||||
unsigned long flags;
|
||||
|
||||
b43legacydbg(wl, "Removing Interface type %d\n", conf->type);
|
||||
b43legacydbg(wl, "Removing Interface type %d\n", vif->type);
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
|
||||
B43legacy_WARN_ON(!wl->operating);
|
||||
B43legacy_WARN_ON(wl->vif != conf->vif);
|
||||
B43legacy_WARN_ON(wl->vif != vif);
|
||||
wl->vif = NULL;
|
||||
|
||||
wl->operating = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue