X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=package%2Fkernel%2Fmac80211%2Fpatches%2F521-ath9k_cur_txpower.patch;h=ab59411db9d9c85283b39d20001a7f6522416a13;hb=0a6aed77e5fe9b30a915f3eebb86a3e2f49d5b2c;hp=9167903f1c2166e565e3b5e254c215e94cfd61dd;hpb=25b23d67d93da4fc739c3d44bcb33520d5f32351;p=openwrt.git diff --git a/package/kernel/mac80211/patches/521-ath9k_cur_txpower.patch b/package/kernel/mac80211/patches/521-ath9k_cur_txpower.patch index 9167903f1c..ab59411db9 100644 --- a/package/kernel/mac80211/patches/521-ath9k_cur_txpower.patch +++ b/package/kernel/mac80211/patches/521-ath9k_cur_txpower.patch @@ -1,15 +1,20 @@ --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -1269,6 +1269,8 @@ int ath9k_config(struct ieee80211_hw *hw - return -EINVAL; - } +@@ -313,8 +313,12 @@ static int ath_reset_internal(struct ath + (sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) + ath9k_mci_set_txpower(sc, true, false); -+ hw->cur_power_level = sc->curtxpow / 2; +- if (!ath_complete_reset(sc, true)) ++ if (!ath_complete_reset(sc, true)) { + r = -EIO; ++ goto out; ++ } + - /* - * The most recent snapshot of channel->noisefloor for the old - * channel is only available after the hardware reset. Copy it to -@@ -1305,6 +1307,7 @@ int ath9k_config(struct ieee80211_hw *hw ++ sc->hw->cur_power_level = sc->curtxpow / 2; + + out: + spin_unlock_bh(&sc->sc_pcu_lock); +@@ -1340,6 +1344,7 @@ static int ath9k_config(struct ieee80211 sc->config.txpowlimit = 2 * conf->power_level; ath9k_cmn_update_txpow(ah, sc->curtxpow, sc->config.txpowlimit, &sc->curtxpow);