mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 09:39:00 +00:00
3f07af337c
- update iw to 3.14 - remove some patches that are obsolete - 200-reduce_size.patch has new coalesce removed from Makefile matching prev. ver - refresh patches This increases the size of the binary by 6.7%: 87801 4400 320 92521 16969 iw-3.10/iw 93995 4424 324 98743 181b7 iw-3.14/iw Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de> SVN-Revision: 39486
35 lines
871 B
Diff
35 lines
871 B
Diff
--- a/phy.c
|
|
+++ b/phy.c
|
|
@@ -424,3 +424,31 @@ COMMAND(set, antenna, "<bitmap> | all |
|
|
NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna,
|
|
"Set a bitmap of allowed antennas to use for TX and RX.\n"
|
|
"The driver may reject antenna configurations it cannot support.");
|
|
+
|
|
+static int handle_antenna_gain(struct nl80211_state *state,
|
|
+ struct nl_cb *cb,
|
|
+ struct nl_msg *msg,
|
|
+ int argc, char **argv,
|
|
+ enum id_input id)
|
|
+{
|
|
+ char *endptr;
|
|
+ int dbm;
|
|
+
|
|
+ /* get the required args */
|
|
+ if (argc != 1)
|
|
+ return 1;
|
|
+
|
|
+ dbm = strtol(argv[0], &endptr, 10);
|
|
+ if (*endptr)
|
|
+ return 2;
|
|
+
|
|
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_GAIN, dbm);
|
|
+
|
|
+ return 0;
|
|
+
|
|
+ nla_put_failure:
|
|
+ return -ENOBUFS;
|
|
+}
|
|
+COMMAND(set, antenna_gain, "<antenna gain in dBm>",
|
|
+ NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna_gain,
|
|
+ "Specify antenna gain.");
|