iw: fix setting txpower (#10254)
authorFelix Fietkau <nbd@openwrt.org>
Tue, 1 Nov 2011 19:16:52 +0000 (19:16 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 1 Nov 2011 19:16:52 +0000 (19:16 +0000)
SVN-Revision: 28710

package/iw/patches/130-fix_txpower.patch [new file with mode: 0644]

diff --git a/package/iw/patches/130-fix_txpower.patch b/package/iw/patches/130-fix_txpower.patch
new file mode 100644 (file)
index 0000000..9e0c2df
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/phy.c
++++ b/phy.c
+@@ -277,7 +277,7 @@ static int handle_txpower(struct nl80211
+               }
+               mbm = strtol(argv[1], &endptr, 10);
+-              if (!*endptr)
++              if (*endptr)
+                       return 2;
+               NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_TX_POWER_LEVEL, mbm);
+       } else if (argc != 1)