aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi
diff options
context:
space:
mode:
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>2010-05-27 20:10:50 +0000
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>2010-05-27 20:10:50 +0000
commitc42a8611fcc1937d78849984af4e9f521b6831b3 (patch)
tree7aa92d77d2ba18515c239acccd75f1ac35050d05 /package/madwifi
parente74e289fa8a0858d73c48bf562a995fc3733c6bc (diff)
downloadupstream-c42a8611fcc1937d78849984af4e9f521b6831b3.tar.gz
upstream-c42a8611fcc1937d78849984af4e9f521b6831b3.tar.bz2
upstream-c42a8611fcc1937d78849984af4e9f521b6831b3.zip
madwifi: Fix 0dBm txpower setting display
SVN-Revision: 21584
Diffstat (limited to 'package/madwifi')
-rw-r--r--package/madwifi/patches/464-0dbm_txpower_fix.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/package/madwifi/patches/464-0dbm_txpower_fix.patch b/package/madwifi/patches/464-0dbm_txpower_fix.patch
new file mode 100644
index 0000000000..fbd1d7673c
--- /dev/null
+++ b/package/madwifi/patches/464-0dbm_txpower_fix.patch
@@ -0,0 +1,30 @@
+--- a/net80211/ieee80211_wireless.c
++++ b/net80211/ieee80211_wireless.c
+@@ -1370,15 +1370,9 @@ ieee80211_ioctl_siwtxpow(struct net_devi
+ int fixed, disabled;
+
+ fixed = (ic->ic_flags & IEEE80211_F_TXPOW_FIXED);
+- disabled = (fixed && ic->ic_txpowlimit == 0);
+- if (rrq->disabled) {
+- if (!disabled) {
+- ic->ic_flags |= IEEE80211_F_TXPOW_FIXED;
+- ic->ic_txpowlimit = 0;
+- goto done;
+- }
+- return 0;
+- }
++
++ if (rrq->disabled)
++ return -EINVAL;
+
+ if (rrq->fixed) {
+ if ((ic->ic_caps & IEEE80211_C_TXPMGT) == 0)
+@@ -1571,7 +1565,7 @@ ieee80211_ioctl_giwtxpow(struct net_devi
+ rrq->fixed = 0;
+ }
+ rrq->value = txp / 2;
+- rrq->disabled = (rrq->fixed && rrq->value == 0);
++ rrq->disabled = 0;
+ rrq->flags = IW_TXPOW_DBM;
+ return 0;
+ }