ath9k: Lock config_interface() callback with a mutex
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
b238e90e99
commit
2554935b08
1 changed files with 7 additions and 1 deletions
|
@ -2318,6 +2318,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
|
||||||
u32 rfilt = 0;
|
u32 rfilt = 0;
|
||||||
int error, i;
|
int error, i;
|
||||||
|
|
||||||
|
mutex_lock(&sc->mutex);
|
||||||
|
|
||||||
/* TODO: Need to decide which hw opmode to use for multi-interface
|
/* TODO: Need to decide which hw opmode to use for multi-interface
|
||||||
* cases */
|
* cases */
|
||||||
if (vif->type == NL80211_IFTYPE_AP &&
|
if (vif->type == NL80211_IFTYPE_AP &&
|
||||||
|
@ -2373,8 +2375,10 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
|
||||||
ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
|
ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
|
||||||
|
|
||||||
error = ath_beacon_alloc(sc, 0);
|
error = ath_beacon_alloc(sc, 0);
|
||||||
if (error != 0)
|
if (error != 0) {
|
||||||
|
mutex_unlock(&sc->mutex);
|
||||||
return error;
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
ath_beacon_config(sc, 0);
|
ath_beacon_config(sc, 0);
|
||||||
}
|
}
|
||||||
|
@ -2393,6 +2397,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
|
||||||
if (vif->type == NL80211_IFTYPE_ADHOC)
|
if (vif->type == NL80211_IFTYPE_ADHOC)
|
||||||
ath_update_chainmask(sc, 0);
|
ath_update_chainmask(sc, 0);
|
||||||
|
|
||||||
|
mutex_unlock(&sc->mutex);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue