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
|
@ -2835,7 +2835,7 @@ static void mwl8k_stop(struct ieee80211_hw *hw)
|
|||
}
|
||||
|
||||
static int mwl8k_add_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_if_init_conf *conf)
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mwl8k_priv *priv = hw->priv;
|
||||
struct mwl8k_vif *mwl8k_vif;
|
||||
|
@ -2849,7 +2849,7 @@ static int mwl8k_add_interface(struct ieee80211_hw *hw,
|
|||
/*
|
||||
* We only support managed interfaces for now.
|
||||
*/
|
||||
if (conf->type != NL80211_IFTYPE_STATION)
|
||||
if (vif->type != NL80211_IFTYPE_STATION)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
|
@ -2865,24 +2865,24 @@ static int mwl8k_add_interface(struct ieee80211_hw *hw,
|
|||
}
|
||||
|
||||
/* Clean out driver private area */
|
||||
mwl8k_vif = MWL8K_VIF(conf->vif);
|
||||
mwl8k_vif = MWL8K_VIF(vif);
|
||||
memset(mwl8k_vif, 0, sizeof(*mwl8k_vif));
|
||||
|
||||
/* Set and save the mac address */
|
||||
mwl8k_cmd_set_mac_addr(hw, conf->mac_addr);
|
||||
memcpy(mwl8k_vif->mac_addr, conf->mac_addr, ETH_ALEN);
|
||||
mwl8k_cmd_set_mac_addr(hw, vif->addr);
|
||||
memcpy(mwl8k_vif->mac_addr, vif->addr, ETH_ALEN);
|
||||
|
||||
/* Set Initial sequence number to zero */
|
||||
mwl8k_vif->seqno = 0;
|
||||
|
||||
priv->vif = conf->vif;
|
||||
priv->vif = vif;
|
||||
priv->current_channel = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mwl8k_remove_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_if_init_conf *conf)
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mwl8k_priv *priv = hw->priv;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue