diff options
author | sam <sam@FreeBSD.org> | 2008-10-27 17:12:41 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-10-27 17:12:41 +0000 |
commit | 8c49088828c9d9ba2ff5348b9d54a436c0f95be9 (patch) | |
tree | fd739093ceb74dff9228b89f3f355ed095a84ae2 | |
parent | 3679a376599db46928e7e3a2dde1a1c3f1a4dbf9 (diff) | |
download | FreeBSD-src-8c49088828c9d9ba2ff5348b9d54a436c0f95be9.zip FreeBSD-src-8c49088828c9d9ba2ff5348b9d54a436c0f95be9.tar.gz |
intercept IEEE80211_IOC_TXPOWER and service tx power changes immediately
-rw-r--r-- | sys/dev/ath/if_ath.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 1640f2a..155a368 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -1566,7 +1566,23 @@ ath_reset(struct ifnet *ifp) static int ath_reset_vap(struct ieee80211vap *vap, u_long cmd) { - return ath_reset(vap->iv_ic->ic_ifp); + struct ieee80211com *ic = vap->iv_ic; + struct ifnet *ifp = ic->ic_ifp; + struct ath_softc *sc = ifp->if_softc; + struct ath_hal *ah = sc->sc_ah; + + switch (cmd) { + case IEEE80211_IOC_TXPOWER: + /* + * If per-packet TPC is enabled, then we have nothing + * to do; otherwise we need to force the global limit. + * All this can happen directly; no need to reset. + */ + if (!ath_hal_gettpc(ah)) + ath_hal_settxpowlimit(ah, ic->ic_txpowlimit); + return 0; + } + return ath_reset(ifp); } static int |