mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 09:12:39 +00:00
9a4fb78e7c
Wifi HE (ieee80211ax) parsing is currently only activated in the full version because it increases the compressed size by 2.5KBytes. This also activates link time optimization (LTO) again, the problem was fixed upstream This increases the uncompressed binary size of iw-tiny by about 1.7% old: 34446 iw_5.0.1-1_mipsel_24kc.ipk new: 35064 iw_5.3-1_mipsel_24kc.ipk Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
34 lines
761 B
Diff
34 lines
761 B
Diff
--- a/phy.c
|
|
+++ b/phy.c
|
|
@@ -855,3 +855,30 @@ static int handle_get_txq(struct nl80211
|
|
COMMAND(get, txq, "",
|
|
NL80211_CMD_GET_WIPHY, 0, CIB_PHY, handle_get_txq,
|
|
"Get TXQ parameters.");
|
|
+
|
|
+static int handle_antenna_gain(struct nl80211_state *state,
|
|
+ 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.");
|