diff options
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index d3d37282f3dc..742616a03d5f 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -178,7 +178,8 @@ static void ath5k_remove_interface(struct ieee80211_hw *hw, | |||
178 | struct ieee80211_if_init_conf *conf); | 178 | struct ieee80211_if_init_conf *conf); |
179 | static int ath5k_config(struct ieee80211_hw *hw, | 179 | static int ath5k_config(struct ieee80211_hw *hw, |
180 | struct ieee80211_conf *conf); | 180 | struct ieee80211_conf *conf); |
181 | static int ath5k_config_interface(struct ieee80211_hw *hw, int if_id, | 181 | static int ath5k_config_interface(struct ieee80211_hw *hw, |
182 | struct ieee80211_vif *vif, | ||
182 | struct ieee80211_if_conf *conf); | 183 | struct ieee80211_if_conf *conf); |
183 | static void ath5k_configure_filter(struct ieee80211_hw *hw, | 184 | static void ath5k_configure_filter(struct ieee80211_hw *hw, |
184 | unsigned int changed_flags, | 185 | unsigned int changed_flags, |
@@ -2498,12 +2499,12 @@ static int ath5k_add_interface(struct ieee80211_hw *hw, | |||
2498 | int ret; | 2499 | int ret; |
2499 | 2500 | ||
2500 | mutex_lock(&sc->lock); | 2501 | mutex_lock(&sc->lock); |
2501 | if (sc->iface_id) { | 2502 | if (sc->vif) { |
2502 | ret = 0; | 2503 | ret = 0; |
2503 | goto end; | 2504 | goto end; |
2504 | } | 2505 | } |
2505 | 2506 | ||
2506 | sc->iface_id = conf->if_id; | 2507 | sc->vif = conf->vif; |
2507 | 2508 | ||
2508 | switch (conf->type) { | 2509 | switch (conf->type) { |
2509 | case IEEE80211_IF_TYPE_STA: | 2510 | case IEEE80211_IF_TYPE_STA: |
@@ -2528,10 +2529,10 @@ ath5k_remove_interface(struct ieee80211_hw *hw, | |||
2528 | struct ath5k_softc *sc = hw->priv; | 2529 | struct ath5k_softc *sc = hw->priv; |
2529 | 2530 | ||
2530 | mutex_lock(&sc->lock); | 2531 | mutex_lock(&sc->lock); |
2531 | if (sc->iface_id != conf->if_id) | 2532 | if (sc->vif != conf->vif) |
2532 | goto end; | 2533 | goto end; |
2533 | 2534 | ||
2534 | sc->iface_id = 0; | 2535 | sc->vif = NULL; |
2535 | end: | 2536 | end: |
2536 | mutex_unlock(&sc->lock); | 2537 | mutex_unlock(&sc->lock); |
2537 | } | 2538 | } |
@@ -2549,7 +2550,7 @@ ath5k_config(struct ieee80211_hw *hw, | |||
2549 | } | 2550 | } |
2550 | 2551 | ||
2551 | static int | 2552 | static int |
2552 | ath5k_config_interface(struct ieee80211_hw *hw, int if_id, | 2553 | ath5k_config_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
2553 | struct ieee80211_if_conf *conf) | 2554 | struct ieee80211_if_conf *conf) |
2554 | { | 2555 | { |
2555 | struct ath5k_softc *sc = hw->priv; | 2556 | struct ath5k_softc *sc = hw->priv; |
@@ -2560,7 +2561,7 @@ ath5k_config_interface(struct ieee80211_hw *hw, int if_id, | |||
2560 | * be set to mac80211's value at ath5k_config(). */ | 2561 | * be set to mac80211's value at ath5k_config(). */ |
2561 | sc->bintval = 1000 * 1000 / 1024; | 2562 | sc->bintval = 1000 * 1000 / 1024; |
2562 | mutex_lock(&sc->lock); | 2563 | mutex_lock(&sc->lock); |
2563 | if (sc->iface_id != if_id) { | 2564 | if (sc->vif != vif) { |
2564 | ret = -EIO; | 2565 | ret = -EIO; |
2565 | goto unlock; | 2566 | goto unlock; |
2566 | } | 2567 | } |