Date: Mon, 27 Oct 2008 17:12:41 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184349 - head/sys/dev/ath Message-ID: <200810271712.m9RHCfH5046328@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Mon Oct 27 17:12:41 2008 New Revision: 184349 URL: http://svn.freebsd.org/changeset/base/184349 Log: intercept IEEE80211_IOC_TXPOWER and service tx power changes immediately Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:10:21 2008 (r184348) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:12:41 2008 (r184349) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810271712.m9RHCfH5046328>