summaryrefslogtreecommitdiffstats
path: root/package/madwifi/patches/438-poweroffset_sysctl.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-31 02:25:32 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-31 02:25:32 +0000
commitfa902124b5875ef27fe31747e22774bbf90eeaa0 (patch)
treeec4969c4855da6d809d347d9276b67aa21b69db5 /package/madwifi/patches/438-poweroffset_sysctl.patch
parent79a885602f3b520f81555c9f3dae385304c05b3a (diff)
madwifi: add better hw detection, use a power offset for setting/getting tx power for cards that have a twisted eeprom
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16224 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi/patches/438-poweroffset_sysctl.patch')
-rw-r--r--package/madwifi/patches/438-poweroffset_sysctl.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/madwifi/patches/438-poweroffset_sysctl.patch b/package/madwifi/patches/438-poweroffset_sysctl.patch
new file mode 100644
index 000000000..2a6d27cc5
--- /dev/null
+++ b/package/madwifi/patches/438-poweroffset_sysctl.patch
@@ -0,0 +1,43 @@
+--- a/ath/if_ath.c
++++ b/ath/if_ath.c
+@@ -11029,6 +11029,7 @@ enum {
+ ATH_DEBUG,
+ ATH_TXANTENNA,
+ ATH_RXANTENNA,
++ ATH_POWEROFFSET,
+ ATH_DIVERSITY,
+ ATH_TXINTRPERIOD,
+ ATH_FFTXQMIN,
+@@ -11309,6 +11310,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+ ath_debug_global = (val & ATH_DEBUG_GLOBAL);
+ #endif
+ break;
++ case ATH_POWEROFFSET:
++ sc->sc_poweroffset = val;
++ break;
+ case ATH_TXANTENNA:
+ /*
+ * antenna can be:
+@@ -11476,6 +11480,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+ case ATH_DEBUG:
+ val = sc->sc_debug | ath_debug_global;
+ break;
++ case ATH_POWEROFFSET:
++ val = sc->sc_poweroffset;
++ break;
+ case ATH_TXANTENNA:
+ val = sc->sc_txantenna;
+ break;
+@@ -11617,6 +11624,12 @@ static const ctl_table ath_sysctl_templa
+ },
+ #endif
+ { .ctl_name = CTL_AUTO,
++ .procname = "poweroffset",
++ .mode = 0644,
++ .proc_handler = ath_sysctl_halparam,
++ .extra2 = (void *)ATH_POWEROFFSET,
++ },
++ { .ctl_name = CTL_AUTO,
+ .procname = "txantenna",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,