aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-05-31 14:45:04 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-05-31 14:45:04 +0000
commita5c1e60bcd5f1df0b1696cdcb255e4a661d351b4 (patch)
tree4d83ec28f6f4bc6ddd75dda7526b49cc02932d76 /package/madwifi
parent24a790156d92436a181183a8bb6c4563723a7c3e (diff)
downloadupstream-a5c1e60bcd5f1df0b1696cdcb255e4a661d351b4.tar.gz
upstream-a5c1e60bcd5f1df0b1696cdcb255e4a661d351b4.tar.bz2
upstream-a5c1e60bcd5f1df0b1696cdcb255e4a661d351b4.zip
madwifi: if a txpower value below the poweroffset is requested, set the internal txpower to 0db
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16234 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi')
-rw-r--r--package/madwifi/patches/438-poweroffset_sysctl.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/package/madwifi/patches/438-poweroffset_sysctl.patch b/package/madwifi/patches/438-poweroffset_sysctl.patch
index 2a6d27cc5d..662f2b09d2 100644
--- a/package/madwifi/patches/438-poweroffset_sysctl.patch
+++ b/package/madwifi/patches/438-poweroffset_sysctl.patch
@@ -1,5 +1,21 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
+@@ -10474,11 +10474,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);
+ }
+
@@ -11029,6 +11029,7 @@ enum {
ATH_DEBUG,
ATH_TXANTENNA,