X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/fa902124b5875ef27fe31747e22774bbf90eeaa0..31a40f97ef54e10e2b3dc3cacb9cff436657c586:/package/madwifi/patches/438-poweroffset_sysctl.patch?ds=sidebyside diff --git a/package/madwifi/patches/438-poweroffset_sysctl.patch b/package/madwifi/patches/438-poweroffset_sysctl.patch index 2a6d27cc5..e82046ec6 100644 --- a/package/madwifi/patches/438-poweroffset_sysctl.patch +++ b/package/madwifi/patches/438-poweroffset_sysctl.patch @@ -1,6 +1,22 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -11029,6 +11029,7 @@ enum { +@@ -10476,11 +10476,11 @@ set_node_txpower(void *arg, struct ieee8 + * XXX: this function needs some locking to avoid being called + * twice/interrupted. Returns the value actually stored. */ + static u_int32_t +-ath_set_clamped_maxtxpower(struct ath_softc *sc, +- u_int32_t new_clamped_maxtxpower) ++ath_set_clamped_maxtxpower(struct ath_softc *sc, u_int32_t new_txpwr) + { +- new_clamped_maxtxpower -= sc->sc_poweroffset; +- (void)ath_hal_settxpowlimit(sc->sc_ah, new_clamped_maxtxpower); ++ new_txpwr = ((new_txpwr < sc->sc_poweroffset) ? 0 : ++ new_txpwr - sc->sc_poweroffset); ++ (void)ath_hal_settxpowlimit(sc->sc_ah, new_txpwr); + return ath_get_clamped_maxtxpower(sc); + } + +@@ -11031,6 +11031,7 @@ enum { ATH_DEBUG, ATH_TXANTENNA, ATH_RXANTENNA, @@ -8,7 +24,7 @@ ATH_DIVERSITY, ATH_TXINTRPERIOD, ATH_FFTXQMIN, -@@ -11309,6 +11310,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl +@@ -11311,6 +11312,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl ath_debug_global = (val & ATH_DEBUG_GLOBAL); #endif break; @@ -18,7 +34,7 @@ case ATH_TXANTENNA: /* * antenna can be: -@@ -11476,6 +11480,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl +@@ -11478,6 +11482,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl case ATH_DEBUG: val = sc->sc_debug | ath_debug_global; break; @@ -28,7 +44,7 @@ case ATH_TXANTENNA: val = sc->sc_txantenna; break; -@@ -11617,6 +11624,12 @@ static const ctl_table ath_sysctl_templa +@@ -11619,6 +11626,12 @@ static const ctl_table ath_sysctl_templa }, #endif { .ctl_name = CTL_AUTO,