diff options
Diffstat (limited to 'package/network/utils/iw/patches/200-reduce_size.patch')
-rw-r--r-- | package/network/utils/iw/patches/200-reduce_size.patch | 72 |
1 files changed, 44 insertions, 28 deletions
diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch index 07ea7113e2..a6d1855771 100644 --- a/package/network/utils/iw/patches/200-reduce_size.patch +++ b/package/network/utils/iw/patches/200-reduce_size.patch @@ -38,7 +38,23 @@ --- a/info.c +++ b/info.c -@@ -205,6 +205,7 @@ next: +@@ -164,6 +164,7 @@ static int print_phy_handler(struct nl_m + tb_band[NL80211_BAND_ATTR_VHT_MCS_SET]) + print_vht_info(nla_get_u32(tb_band[NL80211_BAND_ATTR_VHT_CAPA]), + nla_data(tb_band[NL80211_BAND_ATTR_VHT_MCS_SET])); ++#ifdef IW_FULL + if (tb_band[NL80211_BAND_ATTR_IFTYPE_DATA]) { + struct nlattr *nl_iftype; + int rem_band; +@@ -171,6 +172,7 @@ static int print_phy_handler(struct nl_m + nla_for_each_nested(nl_iftype, tb_band[NL80211_BAND_ATTR_IFTYPE_DATA], rem_band) + print_he_info(nl_iftype); + } ++#endif + if (tb_band[NL80211_BAND_ATTR_FREQS]) { + if (!band_had_freq) { + printf("\t\tFrequencies:\n"); +@@ -213,6 +215,7 @@ next: } } @@ -46,7 +62,7 @@ if (tb_band[NL80211_BAND_ATTR_RATES]) { printf("\t\tBitrates (non-HT):\n"); nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) { -@@ -221,6 +222,7 @@ next: +@@ -229,6 +232,7 @@ next: printf("\n"); } } @@ -54,7 +70,7 @@ } } -@@ -286,6 +288,7 @@ next: +@@ -294,6 +298,7 @@ next: printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage); } @@ -62,7 +78,7 @@ if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) { int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32); int i; -@@ -297,6 +300,7 @@ next: +@@ -305,6 +310,7 @@ next: cipher_name(ciphers[i])); } } @@ -70,7 +86,7 @@ if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] && tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX]) -@@ -316,11 +320,13 @@ next: +@@ -324,11 +330,13 @@ next: printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); } @@ -84,7 +100,7 @@ if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) { struct nlattr *nl_combi; -@@ -417,6 +423,7 @@ broken_combination: +@@ -425,6 +433,7 @@ broken_combination: printf("\tinterface combinations are not supported\n"); } @@ -92,7 +108,7 @@ if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) { printf("\tSupported commands:\n"); nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd) -@@ -514,6 +521,7 @@ broken_combination: +@@ -522,6 +531,7 @@ broken_combination: printf("\t\t * wake up on TCP connection\n"); } } @@ -100,7 +116,7 @@ if (tb_msg[NL80211_ATTR_ROAM_SUPPORT]) printf("\tDevice supports roaming.\n"); -@@ -552,6 +560,7 @@ broken_combination: +@@ -560,6 +570,7 @@ broken_combination: } } @@ -108,7 +124,7 @@ if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) { unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]); -@@ -616,6 +625,7 @@ broken_combination: +@@ -624,6 +635,7 @@ broken_combination: if (features & NL80211_FEATURE_ND_RANDOM_MAC_ADDR) printf("\tDevice supports randomizing MAC-addr in net-detect scans.\n"); } @@ -116,7 +132,7 @@ if (tb_msg[NL80211_ATTR_TDLS_SUPPORT]) printf("\tDevice supports T-DLS.\n"); -@@ -740,6 +750,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP +@@ -732,6 +744,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP "List all wireless devices and their capabilities."); TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL); @@ -124,7 +140,7 @@ static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, int argc, char **argv, enum id_input id) { -@@ -751,6 +762,7 @@ static int handle_commands(struct nl8021 +@@ -743,6 +756,7 @@ static int handle_commands(struct nl8021 } TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands, "list all known commands and their decimal & hex value"); @@ -240,7 +256,7 @@ +#endif --- a/util.c +++ b/util.c -@@ -289,6 +289,7 @@ static const char *commands[NL80211_CMD_ +@@ -291,6 +291,7 @@ static const char *commands[NL80211_CMD_ static char cmdbuf[100]; @@ -248,7 +264,7 @@ const char *command_name(enum nl80211_commands cmd) { if (cmd <= NL80211_CMD_MAX && commands[cmd]) -@@ -296,6 +297,7 @@ const char *command_name(enum nl80211_co +@@ -298,6 +299,7 @@ const char *command_name(enum nl80211_co sprintf(cmdbuf, "Unknown command (%d)", cmd); return cmdbuf; } @@ -256,7 +272,7 @@ int ieee80211_channel_to_frequency(int chan, enum nl80211_band band) { -@@ -434,6 +436,9 @@ int parse_keys(struct nl_msg *msg, char +@@ -436,6 +438,9 @@ int parse_keys(struct nl_msg *msg, char char keybuf[13]; int pos = 0; @@ -268,9 +284,9 @@ --- a/Makefile +++ b/Makefile -@@ -31,6 +31,12 @@ OBJS-$(HWSIM) += hwsim.o - - OBJS += $(OBJS-y) $(OBJS-Y) +@@ -22,6 +22,12 @@ _OBJS := $(sort $(patsubst %.c,%.o,$(wil + VERSION_OBJS := $(filter-out version.o, $(_OBJS)) + OBJS := $(VERSION_OBJS) version.o +OBJS_FULL = ocb offch cqm wowlan coalesce roc p2p vendor mgmt ap sha256 nan bloom measurements ftm +ifdef IW_FULL @@ -283,7 +299,7 @@ ifeq ($(NO_PKG_CONFIG),) --- a/station.c +++ b/station.c -@@ -709,10 +709,12 @@ static int handle_station_set_plink(stru +@@ -736,10 +736,12 @@ static int handle_station_set_plink(stru nla_put_failure: return -ENOBUFS; } @@ -296,7 +312,7 @@ static int handle_station_set_vlan(struct nl80211_state *state, struct nl_msg *msg, -@@ -807,11 +809,13 @@ static int handle_station_set_mesh_power +@@ -834,11 +836,13 @@ static int handle_station_set_mesh_power nla_put_failure: return -ENOBUFS; } @@ -308,11 +324,11 @@ select_station_cmd, station_set_mesh_power_mode); +#endif - static int handle_station_dump(struct nl80211_state *state, - struct nl_msg *msg, + static int handle_station_set_airtime_weight(struct nl80211_state *state, + struct nl_msg *msg, --- a/interface.c +++ b/interface.c -@@ -621,9 +621,11 @@ static int handle_interface_wds_peer(str +@@ -627,9 +627,11 @@ static int handle_interface_wds_peer(str nla_put_failure: return -ENOBUFS; } @@ -324,7 +340,7 @@ static int set_mcast_rate(struct nl80211_state *state, struct nl_msg *msg, -@@ -713,6 +715,7 @@ static int handle_chan(struct nl80211_st +@@ -719,6 +721,7 @@ static int handle_chan(struct nl80211_st return handle_chanfreq(state, msg, true, argc, argv, id); } @@ -332,22 +348,22 @@ SECTION(switch); COMMAND(switch, freq, "<freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]\n" -@@ -721,3 +724,4 @@ COMMAND(switch, freq, +@@ -727,3 +730,4 @@ COMMAND(switch, freq, "Switch the operating channel by sending a channel switch announcement (CSA)."); COMMAND(switch, channel, "<channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]", NL80211_CMD_CHANNEL_SWITCH, 0, CIB_NETDEV, handle_chan, NULL); +#endif --- a/phy.c +++ b/phy.c -@@ -359,6 +359,7 @@ static int handle_cac(struct nl80211_sta - - return 0; +@@ -369,6 +369,7 @@ err_out: + free(cac_trigger_argv); + return err; } +#ifdef IW_FULL TOPLEVEL(cac, "channel <channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n" "freq <freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n" "freq <control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]", -@@ -370,6 +371,7 @@ COMMAND(cac, trigger, +@@ -380,6 +381,7 @@ COMMAND(cac, trigger, NL80211_CMD_RADAR_DETECT, 0, CIB_NETDEV, handle_cac_trigger, "Start or trigger a channel availability check (CAC) looking to look for\n" "radars on the given channel."); |