diff options
author | Vasilis Tsiligiannis <acinonyx@openwrt.gr> | 2011-01-27 08:47:31 +0000 |
---|---|---|
committer | Vasilis Tsiligiannis <acinonyx@openwrt.gr> | 2011-01-27 08:47:31 +0000 |
commit | 57355faae118ec3bd4fcc6706d6fab8c4a5f887d (patch) | |
tree | a78b11b3479574a249e00ca6d5b84be239f67692 /package/iw/patches | |
parent | bed53c93d6ce1a01eaaa76799371fd60b173caed (diff) | |
download | mtk-20170518-57355faae118ec3bd4fcc6706d6fab8c4a5f887d.zip mtk-20170518-57355faae118ec3bd4fcc6706d6fab8c4a5f887d.tar.gz mtk-20170518-57355faae118ec3bd4fcc6706d6fab8c4a5f887d.tar.bz2 |
iw: Extend antenna setting 'all' to apply for either rx or tx antenna
SVN-Revision: 25134
Diffstat (limited to 'package/iw/patches')
-rw-r--r-- | package/iw/patches/401-antenna.patch | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/package/iw/patches/401-antenna.patch b/package/iw/patches/401-antenna.patch index 660f79f..fbac49e 100644 --- a/package/iw/patches/401-antenna.patch +++ b/package/iw/patches/401-antenna.patch @@ -37,7 +37,7 @@ diff --git a/phy.c b/phy.c index 7c6c7c8..e3bd4e8 100644 --- a/phy.c +++ b/phy.c -@@ -307,3 +307,42 @@ COMMAND(set, txpower, "<auto|fixed|limit> [<tx power in mBm>]", +@@ -307,3 +307,51 @@ COMMAND(set, txpower, "<auto|fixed|limit> [<tx power in mBm>]", COMMAND(set, txpower, "<auto|fixed|limit> [<tx power in mBm>]", NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_txpower, "Specify transmit power level and setting type."); @@ -50,21 +50,30 @@ index 7c6c7c8..e3bd4e8 100644 + char *end; + uint32_t tx_ant = 0, rx_ant = 0; + -+ if (argc == 1 && strcmp(argv[0], "all") == 0) { -+ tx_ant = 0xffffffff; -+ rx_ant = 0xffffffff; -+ } else if (argc == 1) { -+ tx_ant = rx_ant = strtoul(argv[0], &end, 0); -+ if (*end) -+ return 1; ++ if (argc == 1) { ++ if (strcmp(argv[0], "all") == 0) ++ tx_ant = rx_ant = 0xffffffff; ++ else { ++ tx_ant = rx_ant = strtoul(argv[0], &end, 0); ++ if (*end) ++ return 1; ++ } + } + else if (argc == 2) { -+ tx_ant = strtoul(argv[0], &end, 0); -+ if (*end) -+ return 1; -+ rx_ant = strtoul(argv[1], &end, 0); -+ if (*end) -+ return 1; ++ if (strcmp(argv[0], "all") == 0) ++ tx_ant = 0xffffffff; ++ else { ++ tx_ant = strtoul(argv[0], &end, 0); ++ if (*end) ++ return 1; ++ } ++ if (strcmp(argv[1], "all") == 0) ++ rx_ant = 0xffffffff; ++ else { ++ rx_ant = strtoul(argv[1], &end, 0); ++ if (*end) ++ return 1; ++ } + } else + return 1; + |