PERFORCE change 146208 for review
Sam Leffler
sam at FreeBSD.org
Tue Jul 29 15:59:14 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=146208
Change 146208 by sam at sam_ebb on 2008/07/29 15:58:58
connect IEEE80211_IOC_TXPOWER
Affected files ...
.. //depot/projects/vap/sys/dev/ath/if_ath.c#87 edit
Differences ...
==== //depot/projects/vap/sys/dev/ath/if_ath.c#87 (text+ko) ====
@@ -1560,7 +1560,23 @@
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
More information about the p4-projects
mailing list