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 | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch index 3ba4730a2f..dea24fb495 100644 --- a/package/network/utils/iw/patches/200-reduce_size.patch +++ b/package/network/utils/iw/patches/200-reduce_size.patch @@ -11,6 +11,44 @@ OBJS += sections.o OBJS-$(HWSIM) += hwsim.o +--- a/event.c ++++ b/event.c +@@ -342,6 +342,7 @@ static int print_event(struct nl_msg *ms + } + + switch (gnlh->cmd) { ++#if 0 + case NL80211_CMD_NEW_WIPHY: + printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); + break; +@@ -376,6 +377,7 @@ static int print_event(struct nl_msg *ms + case NL80211_CMD_SCHED_SCAN_RESULTS: + printf("got scheduled scan results\n"); + break; ++#endif + case NL80211_CMD_REG_CHANGE: + printf("regulatory domain change: "); + +@@ -454,6 +456,7 @@ static int print_event(struct nl_msg *ms + mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); + printf("del station %s\n", macbuf); + break; ++#if 0 + case NL80211_CMD_JOIN_IBSS: + mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); + printf("IBSS %s joined\n", macbuf); +@@ -610,9 +613,9 @@ static int print_event(struct nl_msg *ms + case NL80211_CMD_DEL_WIPHY: + printf("delete wiphy\n"); + break; ++#endif + default: +- printf("unknown event %d (%s)\n", +- gnlh->cmd, command_name(gnlh->cmd)); ++ printf("unknown event %d\n", gnlh->cmd); + break; + } + --- a/info.c +++ b/info.c @@ -219,6 +219,7 @@ next: @@ -91,15 +129,15 @@ if (tb_msg[NL80211_ATTR_EXT_FEATURES]) { struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES]; -@@ -669,6 +679,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP +@@ -668,6 +678,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); +#if 0 - static int handle_commands(struct nl80211_state *state, - struct nl_cb *cb, struct nl_msg *msg, + static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, int argc, char **argv, enum id_input id) -@@ -681,6 +692,7 @@ static int handle_commands(struct nl8021 + { +@@ -679,6 +690,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"); @@ -109,7 +147,7 @@ { --- a/scan.c +++ b/scan.c -@@ -1080,6 +1080,7 @@ static void print_ht_op(const uint8_t ty +@@ -1081,6 +1081,7 @@ static void print_ht_op(const uint8_t ty printf("\t\t * secondary channel offset: %s\n", ht_secondary_offset[data[1] & 0x3]); printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]); @@ -117,7 +155,7 @@ printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3); printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]); printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2); -@@ -1311,6 +1312,13 @@ static void print_ie(const struct ie_pri +@@ -1312,6 +1313,13 @@ static void print_ie(const struct ie_pri static const struct ie_print ieprinters[] = { [0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, @@ -131,7 +169,7 @@ [1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), }, [3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), }, [5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), }, -@@ -1320,14 +1328,8 @@ static const struct ie_print ieprinters[ +@@ -1321,14 +1329,8 @@ static const struct ie_print ieprinters[ [32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), }, [35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), }, [42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), }, @@ -146,7 +184,7 @@ [50] = { "Extended supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), }, [113] = { "MESH Configuration", print_mesh_conf, 7, 7, BIT(PRINT_SCAN), }, [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, -@@ -1335,6 +1337,7 @@ static const struct ie_print ieprinters[ +@@ -1336,6 +1338,7 @@ static const struct ie_print ieprinters[ [107] = { "802.11u Interworking", print_interworking, 0, 255, BIT(PRINT_SCAN), }, [108] = { "802.11u Advertisement", print_11u_advert, 0, 255, BIT(PRINT_SCAN), }, [111] = { "802.11u Roaming Consortium", print_11u_rcon, 0, 255, BIT(PRINT_SCAN), }, @@ -154,7 +192,7 @@ }; static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data) -@@ -1766,6 +1769,7 @@ void print_ies(unsigned char *ie, int ie +@@ -1767,6 +1770,7 @@ void print_ies(unsigned char *ie, int ie ieprinters[ie[0]].name && ieprinters[ie[0]].flags & BIT(ptype)) { print_ie(&ieprinters[ie[0]], ie[0], ie[1], ie + 2); @@ -162,7 +200,7 @@ } else if (ie[0] == 221 /* vendor */) { print_vendor(ie[1], ie + 2, unknown, ptype); } else if (unknown) { -@@ -1775,6 +1779,7 @@ void print_ies(unsigned char *ie, int ie +@@ -1776,6 +1780,7 @@ void print_ies(unsigned char *ie, int ie for (i=0; i<ie[1]; i++) printf(" %.2x", ie[2+i]); printf("\n"); @@ -170,7 +208,7 @@ } ielen -= ie[1] + 2; ie += ie[1] + 2; -@@ -1815,6 +1820,7 @@ static void print_capa_non_dmg(__u16 cap +@@ -1816,6 +1821,7 @@ static void print_capa_non_dmg(__u16 cap printf(" ESS"); if (capa & WLAN_CAPABILITY_IBSS) printf(" IBSS"); @@ -178,7 +216,7 @@ if (capa & WLAN_CAPABILITY_CF_POLLABLE) printf(" CfPollable"); if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST) -@@ -1843,6 +1849,7 @@ static void print_capa_non_dmg(__u16 cap +@@ -1844,6 +1850,7 @@ static void print_capa_non_dmg(__u16 cap printf(" DelayedBACK"); if (capa & WLAN_CAPABILITY_IMM_BACK) printf(" ImmediateBACK"); @@ -186,7 +224,7 @@ } static int print_bss_handler(struct nl_msg *msg, void *arg) -@@ -1921,8 +1928,10 @@ static int print_bss_handler(struct nl_m +@@ -1922,8 +1929,10 @@ static int print_bss_handler(struct nl_m if (bss[NL80211_BSS_FREQUENCY]) { int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]); printf("\tfreq: %d\n", freq); @@ -199,7 +237,7 @@ printf("\tbeacon interval: %d TUs\n", --- a/util.c +++ b/util.c -@@ -264,6 +264,7 @@ static const char *commands[NL80211_CMD_ +@@ -267,6 +267,7 @@ static const char *commands[NL80211_CMD_ static char cmdbuf[100]; @@ -207,7 +245,7 @@ const char *command_name(enum nl80211_commands cmd) { if (cmd <= NL80211_CMD_MAX && commands[cmd]) -@@ -271,6 +272,7 @@ const char *command_name(enum nl80211_co +@@ -274,6 +275,7 @@ const char *command_name(enum nl80211_co sprintf(cmdbuf, "Unknown command (%d)", cmd); return cmdbuf; } @@ -215,41 +253,3 @@ int ieee80211_channel_to_frequency(int chan, enum nl80211_band band) { ---- a/event.c -+++ b/event.c -@@ -334,6 +334,7 @@ static int print_event(struct nl_msg *ms - } - - switch (gnlh->cmd) { -+#if 0 - case NL80211_CMD_NEW_WIPHY: - printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); - break; -@@ -368,6 +369,7 @@ static int print_event(struct nl_msg *ms - case NL80211_CMD_SCHED_SCAN_RESULTS: - printf("got scheduled scan results\n"); - break; -+#endif - case NL80211_CMD_REG_CHANGE: - printf("regulatory domain change: "); - -@@ -446,6 +448,7 @@ static int print_event(struct nl_msg *ms - mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); - printf("del station %s\n", macbuf); - break; -+#if 0 - case NL80211_CMD_JOIN_IBSS: - mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); - printf("IBSS %s joined\n", macbuf); -@@ -599,9 +602,9 @@ static int print_event(struct nl_msg *ms - } - printf("\n"); - break; -+#endif - default: -- printf("unknown event %d (%s)\n", -- gnlh->cmd, command_name(gnlh->cmd)); -+ printf("unknown event %d\n", gnlh->cmd); - break; - } - |