Commit 1ed32e4f authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 98b62183
...@@ -1400,15 +1400,15 @@ static void adm8211_configure_filter(struct ieee80211_hw *dev, ...@@ -1400,15 +1400,15 @@ static void adm8211_configure_filter(struct ieee80211_hw *dev,
} }
static int adm8211_add_interface(struct ieee80211_hw *dev, static int adm8211_add_interface(struct ieee80211_hw *dev,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct adm8211_priv *priv = dev->priv; struct adm8211_priv *priv = dev->priv;
if (priv->mode != NL80211_IFTYPE_MONITOR) if (priv->mode != NL80211_IFTYPE_MONITOR)
return -EOPNOTSUPP; return -EOPNOTSUPP;
switch (conf->type) { switch (vif->type) {
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
priv->mode = conf->type; priv->mode = vif->type;
break; break;
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -1416,8 +1416,8 @@ static int adm8211_add_interface(struct ieee80211_hw *dev, ...@@ -1416,8 +1416,8 @@ static int adm8211_add_interface(struct ieee80211_hw *dev,
ADM8211_IDLE(); ADM8211_IDLE();
ADM8211_CSR_WRITE(PAR0, le32_to_cpu(*(__le32 *)conf->mac_addr)); ADM8211_CSR_WRITE(PAR0, le32_to_cpu(*(__le32 *)vif->addr));
ADM8211_CSR_WRITE(PAR1, le16_to_cpu(*(__le16 *)(conf->mac_addr + 4))); ADM8211_CSR_WRITE(PAR1, le16_to_cpu(*(__le16 *)(vif->addr + 4)));
adm8211_update_mode(dev); adm8211_update_mode(dev);
...@@ -1427,7 +1427,7 @@ static int adm8211_add_interface(struct ieee80211_hw *dev, ...@@ -1427,7 +1427,7 @@ static int adm8211_add_interface(struct ieee80211_hw *dev,
} }
static void adm8211_remove_interface(struct ieee80211_hw *dev, static void adm8211_remove_interface(struct ieee80211_hw *dev,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct adm8211_priv *priv = dev->priv; struct adm8211_priv *priv = dev->priv;
priv->mode = NL80211_IFTYPE_MONITOR; priv->mode = NL80211_IFTYPE_MONITOR;
......
...@@ -1789,7 +1789,7 @@ static void at76_mac80211_stop(struct ieee80211_hw *hw) ...@@ -1789,7 +1789,7 @@ static void at76_mac80211_stop(struct ieee80211_hw *hw)
} }
static int at76_add_interface(struct ieee80211_hw *hw, static int at76_add_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct at76_priv *priv = hw->priv; struct at76_priv *priv = hw->priv;
int ret = 0; int ret = 0;
...@@ -1798,7 +1798,7 @@ static int at76_add_interface(struct ieee80211_hw *hw, ...@@ -1798,7 +1798,7 @@ static int at76_add_interface(struct ieee80211_hw *hw,
mutex_lock(&priv->mtx); mutex_lock(&priv->mtx);
switch (conf->type) { switch (vif->type) {
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
priv->iw_mode = IW_MODE_INFRA; priv->iw_mode = IW_MODE_INFRA;
break; break;
...@@ -1814,7 +1814,7 @@ exit: ...@@ -1814,7 +1814,7 @@ exit:
} }
static void at76_remove_interface(struct ieee80211_hw *hw, static void at76_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
at76_dbg(DBG_MAC80211, "%s()", __func__); at76_dbg(DBG_MAC80211, "%s()", __func__);
} }
......
...@@ -1939,7 +1939,7 @@ err_free: ...@@ -1939,7 +1939,7 @@ err_free:
} }
static int ar9170_op_add_interface(struct ieee80211_hw *hw, static int ar9170_op_add_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct ar9170 *ar = hw->priv; struct ar9170 *ar = hw->priv;
struct ath_common *common = &ar->common; struct ath_common *common = &ar->common;
...@@ -1952,8 +1952,8 @@ static int ar9170_op_add_interface(struct ieee80211_hw *hw, ...@@ -1952,8 +1952,8 @@ static int ar9170_op_add_interface(struct ieee80211_hw *hw,
goto unlock; goto unlock;
} }
ar->vif = conf->vif; ar->vif = vif;
memcpy(common->macaddr, conf->mac_addr, ETH_ALEN); memcpy(common->macaddr, vif->addr, ETH_ALEN);
if (modparam_nohwcrypt || (ar->vif->type != NL80211_IFTYPE_STATION)) { if (modparam_nohwcrypt || (ar->vif->type != NL80211_IFTYPE_STATION)) {
ar->rx_software_decryption = true; ar->rx_software_decryption = true;
...@@ -1973,7 +1973,7 @@ unlock: ...@@ -1973,7 +1973,7 @@ unlock:
} }
static void ar9170_op_remove_interface(struct ieee80211_hw *hw, static void ar9170_op_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct ar9170 *ar = hw->priv; struct ar9170 *ar = hw->priv;
......
...@@ -225,9 +225,9 @@ static int ath5k_reset_wake(struct ath5k_softc *sc); ...@@ -225,9 +225,9 @@ static int ath5k_reset_wake(struct ath5k_softc *sc);
static int ath5k_start(struct ieee80211_hw *hw); static int ath5k_start(struct ieee80211_hw *hw);
static void ath5k_stop(struct ieee80211_hw *hw); static void ath5k_stop(struct ieee80211_hw *hw);
static int ath5k_add_interface(struct ieee80211_hw *hw, static int ath5k_add_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf); struct ieee80211_vif *vif);
static void ath5k_remove_interface(struct ieee80211_hw *hw, static void ath5k_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf); struct ieee80211_vif *vif);
static int ath5k_config(struct ieee80211_hw *hw, u32 changed); static int ath5k_config(struct ieee80211_hw *hw, u32 changed);
static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
int mc_count, struct dev_addr_list *mc_list); int mc_count, struct dev_addr_list *mc_list);
...@@ -2785,7 +2785,7 @@ static void ath5k_stop(struct ieee80211_hw *hw) ...@@ -2785,7 +2785,7 @@ static void ath5k_stop(struct ieee80211_hw *hw)
} }
static int ath5k_add_interface(struct ieee80211_hw *hw, static int ath5k_add_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct ath5k_softc *sc = hw->priv; struct ath5k_softc *sc = hw->priv;
int ret; int ret;
...@@ -2796,22 +2796,22 @@ static int ath5k_add_interface(struct ieee80211_hw *hw, ...@@ -2796,22 +2796,22 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
goto end; goto end;
} }
sc->vif = conf->vif; sc->vif = vif;
switch (conf->type) { switch (vif->type) {
case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_ADHOC:
case NL80211_IFTYPE_MESH_POINT: case NL80211_IFTYPE_MESH_POINT:
case NL80211_IFTYPE_MONITOR: case NL80211_IFTYPE_MONITOR:
sc->opmode = conf->type; sc->opmode = vif->type;
break; break;
default: default:
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
goto end; goto end;
} }
ath5k_hw_set_lladdr(sc->ah, conf->mac_addr); ath5k_hw_set_lladdr(sc->ah, vif->addr);
ath5k_mode_setup(sc); ath5k_mode_setup(sc);
ret = 0; ret = 0;
...@@ -2822,13 +2822,13 @@ end: ...@@ -2822,13 +2822,13 @@ end:
static void static void
ath5k_remove_interface(struct ieee80211_hw *hw, ath5k_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct ath5k_softc *sc = hw->priv; struct ath5k_softc *sc = hw->priv;
u8 mac[ETH_ALEN] = {}; u8 mac[ETH_ALEN] = {};
mutex_lock(&sc->lock); mutex_lock(&sc->lock);
if (sc->vif != conf->vif) if (sc->vif != vif)
goto end; goto end;
ath5k_hw_set_lladdr(sc->ah, mac); ath5k_hw_set_lladdr(sc->ah, mac);
......
...@@ -2534,12 +2534,12 @@ static void ath9k_stop(struct ieee80211_hw *hw) ...@@ -2534,12 +2534,12 @@ static void ath9k_stop(struct ieee80211_hw *hw)
} }
static int ath9k_add_interface(struct ieee80211_hw *hw, static int ath9k_add_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct ath_wiphy *aphy = hw->priv; struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc; struct ath_softc *sc = aphy->sc;
struct ath_common *common = ath9k_hw_common(sc->sc_ah); struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_vif *avp = (void *)conf->vif->drv_priv; struct ath_vif *avp = (void *)vif->drv_priv;
enum nl80211_iftype ic_opmode = NL80211_IFTYPE_UNSPECIFIED; enum nl80211_iftype ic_opmode = NL80211_IFTYPE_UNSPECIFIED;
int ret = 0; int ret = 0;
...@@ -2551,7 +2551,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, ...@@ -2551,7 +2551,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
goto out; goto out;
} }
switch (conf->type) { switch (vif->type) {
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
ic_opmode = NL80211_IFTYPE_STATION; ic_opmode = NL80211_IFTYPE_STATION;
break; break;
...@@ -2562,11 +2562,11 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, ...@@ -2562,11 +2562,11 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
ret = -ENOBUFS; ret = -ENOBUFS;
goto out; goto out;
} }
ic_opmode = conf->type; ic_opmode = vif->type;
break; break;
default: default:
ath_print(common, ATH_DBG_FATAL, ath_print(common, ATH_DBG_FATAL,
"Interface type %d not yet supported\n", conf->type); "Interface type %d not yet supported\n", vif->type);
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
goto out; goto out;
} }
...@@ -2598,18 +2598,18 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, ...@@ -2598,18 +2598,18 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
* Enable MIB interrupts when there are hardware phy counters. * Enable MIB interrupts when there are hardware phy counters.
* Note we only do this (at the moment) for station mode. * Note we only do this (at the moment) for station mode.
*/ */
if ((conf->type == NL80211_IFTYPE_STATION) || if ((vif->type == NL80211_IFTYPE_STATION) ||
(conf->type == NL80211_IFTYPE_ADHOC) || (vif->type == NL80211_IFTYPE_ADHOC) ||
(conf->type == NL80211_IFTYPE_MESH_POINT)) { (vif->type == NL80211_IFTYPE_MESH_POINT)) {
sc->imask |= ATH9K_INT_MIB; sc->imask |= ATH9K_INT_MIB;
sc->imask |= ATH9K_INT_TSFOOR; sc->imask |= ATH9K_INT_TSFOOR;
} }
ath9k_hw_set_interrupts(sc->sc_ah, sc->imask); ath9k_hw_set_interrupts(sc->sc_ah, sc->imask);
if (conf->type == NL80211_IFTYPE_AP || if (vif->type == NL80211_IFTYPE_AP ||
conf->type == NL80211_IFTYPE_ADHOC || vif->type == NL80211_IFTYPE_ADHOC ||
conf->type == NL80211_IFTYPE_MONITOR) vif->type == NL80211_IFTYPE_MONITOR)
ath_start_ani(common); ath_start_ani(common);
out: out:
...@@ -2618,12 +2618,12 @@ out: ...@@ -2618,12 +2618,12 @@ out:
} }
static void ath9k_remove_interface(struct ieee80211_hw *hw, static void ath9k_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct ath_wiphy *aphy = hw->priv; struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc; struct ath_softc *sc = aphy->sc;
struct ath_common *common = ath9k_hw_common(sc->sc_ah); struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_vif *avp = (void *)conf->vif->drv_priv; struct ath_vif *avp = (void *)vif->drv_priv;
int i; int i;
ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n"); ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n");
...@@ -2644,7 +2644,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, ...@@ -2644,7 +2644,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
sc->sc_flags &= ~SC_OP_BEACONS; sc->sc_flags &= ~SC_OP_BEACONS;
for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) { for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) {
if (sc->beacon.bslot[i] == conf->vif) { if (sc->beacon.bslot[i] == vif) {
printk(KERN_DEBUG "%s: vif had allocated beacon " printk(KERN_DEBUG "%s: vif had allocated beacon "
"slot\n", __func__); "slot\n", __func__);
sc->beacon.bslot[i] = NULL; sc->beacon.bslot[i] = NULL;
......
...@@ -4391,7 +4391,7 @@ err_busdown: ...@@ -4391,7 +4391,7 @@ err_busdown:
} }
static int b43_op_add_interface(struct ieee80211_hw *hw, static int b43_op_add_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct b43_wl *wl = hw_to_b43_wl(hw); struct b43_wl *wl = hw_to_b43_wl(hw);
struct b43_wldev *dev; struct b43_wldev *dev;
...@@ -4399,24 +4399,24 @@ static int b43_op_add_interface(struct ieee80211_hw *hw, ...@@ -4399,24 +4399,24 @@ static int b43_op_add_interface(struct ieee80211_hw *hw,
/* TODO: allow WDS/AP devices to coexist */ /* TODO: allow WDS/AP devices to coexist */
if (conf->type != NL80211_IFTYPE_AP && if (vif->type != NL80211_IFTYPE_AP &&
conf->type != NL80211_IFTYPE_MESH_POINT && vif->type != NL80211_IFTYPE_MESH_POINT &&
conf->type != NL80211_IFTYPE_STATION && vif->type != NL80211_IFTYPE_STATION &&
conf->type != NL80211_IFTYPE_WDS && vif->type != NL80211_IFTYPE_WDS &&
conf->type != NL80211_IFTYPE_ADHOC) vif->type != NL80211_IFTYPE_ADHOC)
return -EOPNOTSUPP; return -EOPNOTSUPP;
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
if (wl->operating) if (wl->operating)
goto out_mutex_unlock; goto out_mutex_unlock;
b43dbg(wl, "Adding Interface type %d\n", conf->type); b43dbg(wl, "Adding Interface type %d\n", vif->type);
dev = wl->current_dev; dev = wl->current_dev;
wl->operating = 1; wl->operating = 1;
wl->vif = conf->vif; wl->vif = vif;
wl->if_type = conf->type; wl->if_type = vif->type;
memcpy(wl->mac_addr, conf->mac_addr, ETH_ALEN); memcpy(wl->mac_addr, vif->addr, ETH_ALEN);
b43_adjust_opmode(dev); b43_adjust_opmode(dev);
b43_set_pretbtt(dev); b43_set_pretbtt(dev);
...@@ -4431,17 +4431,17 @@ static int b43_op_add_interface(struct ieee80211_hw *hw, ...@@ -4431,17 +4431,17 @@ static int b43_op_add_interface(struct ieee80211_hw *hw,
} }
static void b43_op_remove_interface(struct ieee80211_hw *hw, static void b43_op_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct b43_wl *wl = hw_to_b43_wl(hw); struct b43_wl *wl = hw_to_b43_wl(hw);
struct b43_wldev *dev = wl->current_dev; struct b43_wldev *dev = wl->current_dev;
b43dbg(wl, "Removing Interface type %d\n", conf->type); b43dbg(wl, "Removing Interface type %d\n", vif->type);
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
B43_WARN_ON(!wl->operating); B43_WARN_ON(!wl->operating);
B43_WARN_ON(wl->vif != conf->vif); B43_WARN_ON(wl->vif != vif);
wl->vif = NULL; wl->vif = NULL;
wl->operating = 0; wl->operating = 0;
......
...@@ -3361,7 +3361,7 @@ err_kfree_lo_control: ...@@ -3361,7 +3361,7 @@ err_kfree_lo_control:
} }
static int b43legacy_op_add_interface(struct ieee80211_hw *hw, 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_wl *wl = hw_to_b43legacy_wl(hw);
struct b43legacy_wldev *dev; struct b43legacy_wldev *dev;
...@@ -3370,23 +3370,23 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw, ...@@ -3370,23 +3370,23 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw,
/* TODO: allow WDS/AP devices to coexist */ /* TODO: allow WDS/AP devices to coexist */
if (conf->type != NL80211_IFTYPE_AP && if (vif->type != NL80211_IFTYPE_AP &&
conf->type != NL80211_IFTYPE_STATION && vif->type != NL80211_IFTYPE_STATION &&
conf->type != NL80211_IFTYPE_WDS && vif->type != NL80211_IFTYPE_WDS &&
conf->type != NL80211_IFTYPE_ADHOC) vif->type != NL80211_IFTYPE_ADHOC)
return -EOPNOTSUPP; return -EOPNOTSUPP;
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
if (wl->operating) if (wl->operating)
goto out_mutex_unlock; 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; dev = wl->current_dev;
wl->operating = 1; wl->operating = 1;
wl->vif = conf->vif; wl->vif = vif;
wl->if_type = conf->type; wl->if_type = vif->type;
memcpy(wl->mac_addr, conf->mac_addr, ETH_ALEN); memcpy(wl->mac_addr, vif->addr, ETH_ALEN);
spin_lock_irqsave(&wl->irq_lock, flags); spin_lock_irqsave(&wl->irq_lock, flags);
b43legacy_adjust_opmode(dev); b43legacy_adjust_opmode(dev);
...@@ -3403,18 +3403,18 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw, ...@@ -3403,18 +3403,18 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw,
} }
static void b43legacy_op_remove_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_wl *wl = hw_to_b43legacy_wl(hw);
struct b43legacy_wldev *dev = wl->current_dev; struct b43legacy_wldev *dev = wl->current_dev;
unsigned long flags; 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); mutex_lock(&wl->mutex);
B43legacy_WARN_ON(!wl->operating); B43legacy_WARN_ON(!wl->operating);
B43legacy_WARN_ON(wl->vif != conf->vif); B43legacy_WARN_ON(wl->vif != vif);
wl->vif = NULL; wl->vif = NULL;
wl->operating = 0; wl->operating = 0;
......
...@@ -2584,12 +2584,12 @@ int iwl_set_mode(struct iwl_priv *priv, int mode) ...@@ -2584,12 +2584,12 @@ int iwl_set_mode(struct iwl_priv *priv, int mode)
EXPORT_SYMBOL(iwl_set_mode); EXPORT_SYMBOL(iwl_set_mode);
int iwl_mac_add_interface(struct ieee80211_hw *hw, int iwl_mac_add_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf) struct ieee80211_vif *vif)
{ {
struct iwl_priv *priv = hw->priv; struct iwl_priv *priv = hw->priv;
unsigned long flags; unsigned long flags;
IWL_DEBUG_MAC80211(priv, "enter: type %d\n", conf->type); IWL_DEBUG_MAC80211(priv, "enter: type %d\n", vif->type);
if (priv->vif) { if (priv->vif) {
IWL_DEBUG_MAC80211(priv, "leave - vif != NULL\n"); IWL_DEBUG_MAC80211(priv, "leave - vif != NULL\n");
...@@ -2597,19 +2597,19 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, ...@@ -2597,19 +2597,19 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw,
} }
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
priv->vif = conf->vif; priv->vif = vif;
priv->iw_mode = conf->type; priv->iw_mode = vif->type;
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
if (conf->mac_addr) { if (vif->addr) {
IWL_DEBUG_MAC80211(priv, "Set %pM\n", conf->mac_addr); IWL_DEBUG_MAC80211(priv, "Set %pM\n", vif->addr);