aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iw/patches/200-reduce_size.patch
diff options
context:
space:
mode:
authorDeng Qingfang <dengqf6@mail2.sysu.edu.cn>2019-02-09 14:18:41 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2019-02-17 17:33:18 +0100
commitf5db5742e4c6008b5bdb4e788cb4b44c6e420f43 (patch)
tree5f2bb5f98f6f349ed1dbbb4c436541e9507c9e97 /package/network/utils/iw/patches/200-reduce_size.patch
parentd48a8ed40d3d1b65eec9c848828c6c0e2928cf07 (diff)
downloadupstream-f5db5742e4c6008b5bdb4e788cb4b44c6e420f43.tar.gz
upstream-f5db5742e4c6008b5bdb4e788cb4b44c6e420f43.tar.bz2
upstream-f5db5742e4c6008b5bdb4e788cb4b44c6e420f43.zip
iw: update to 5.0.1
Refresh patches MIPS IPK size increases: iw-tiny: +3k iw-full: +10k Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn> [Remove sha256, nan, bloom, measurements and ftm from tiny version] [sync nl80211 between backports and iw] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/network/utils/iw/patches/200-reduce_size.patch')
-rw-r--r--package/network/utils/iw/patches/200-reduce_size.patch86
1 files changed, 44 insertions, 42 deletions
diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch
index 5f4bce6a8b..07ea7113e2 100644
--- a/package/network/utils/iw/patches/200-reduce_size.patch
+++ b/package/network/utils/iw/patches/200-reduce_size.patch
@@ -1,6 +1,6 @@
--- a/event.c
+++ b/event.c
-@@ -342,6 +342,7 @@ static int print_event(struct nl_msg *ms
+@@ -699,6 +699,7 @@ static int print_event(struct nl_msg *ms
}
switch (gnlh->cmd) {
@@ -8,7 +8,7 @@
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
+@@ -734,6 +735,7 @@ static int print_event(struct nl_msg *ms
case NL80211_CMD_SCHED_SCAN_RESULTS:
printf("got scheduled scan results\n");
break;
@@ -16,7 +16,7 @@
case NL80211_CMD_REG_CHANGE:
printf("regulatory domain change: ");
-@@ -454,6 +456,7 @@ static int print_event(struct nl_msg *ms
+@@ -812,6 +814,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;
@@ -24,10 +24,10 @@
case NL80211_CMD_JOIN_IBSS:
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
printf("IBSS %s joined\n", macbuf);
-@@ -618,9 +621,9 @@ static int print_event(struct nl_msg *ms
- case NL80211_CMD_DEL_WIPHY:
- printf("delete wiphy\n");
+@@ -989,9 +992,9 @@ static int print_event(struct nl_msg *ms
+ parse_nan_match(tb);
break;
+ }
+#endif
default:
- printf("unknown event %d (%s)\n",
@@ -38,7 +38,7 @@
--- a/info.c
+++ b/info.c
-@@ -197,6 +197,7 @@ next:
+@@ -205,6 +205,7 @@ next:
}
}
@@ -46,7 +46,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) {
-@@ -213,6 +214,7 @@ next:
+@@ -221,6 +222,7 @@ next:
printf("\n");
}
}
@@ -54,7 +54,7 @@
}
}
-@@ -278,6 +280,7 @@ next:
+@@ -286,6 +288,7 @@ next:
printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
}
@@ -62,7 +62,7 @@
if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) {
int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
int i;
-@@ -289,6 +292,7 @@ next:
+@@ -297,6 +300,7 @@ next:
cipher_name(ciphers[i]));
}
}
@@ -70,7 +70,7 @@
if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] &&
tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX])
-@@ -308,11 +312,13 @@ next:
+@@ -316,11 +320,13 @@ next:
printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
}
@@ -84,7 +84,7 @@
if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) {
struct nlattr *nl_combi;
-@@ -409,6 +415,7 @@ broken_combination:
+@@ -417,6 +423,7 @@ broken_combination:
printf("\tinterface combinations are not supported\n");
}
@@ -92,7 +92,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)
-@@ -506,6 +513,7 @@ broken_combination:
+@@ -514,6 +521,7 @@ broken_combination:
printf("\t\t * wake up on TCP connection\n");
}
}
@@ -100,7 +100,7 @@
if (tb_msg[NL80211_ATTR_ROAM_SUPPORT])
printf("\tDevice supports roaming.\n");
-@@ -544,6 +552,7 @@ broken_combination:
+@@ -552,6 +560,7 @@ broken_combination:
}
}
@@ -108,15 +108,15 @@
if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
-@@ -602,6 +611,7 @@ broken_combination:
- if (features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)
- printf("\tDevice supports TDLS channel switching\n");
+@@ -616,6 +625,7 @@ broken_combination:
+ if (features & NL80211_FEATURE_ND_RANDOM_MAC_ADDR)
+ printf("\tDevice supports randomizing MAC-addr in net-detect scans.\n");
}
+#endif
- if (tb_msg[NL80211_ATTR_EXT_FEATURES]) {
- struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES];
-@@ -658,6 +668,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
+ if (tb_msg[NL80211_ATTR_TDLS_SUPPORT])
+ printf("\tDevice supports T-DLS.\n");
+@@ -740,6 +750,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 +124,7 @@
static int handle_commands(struct nl80211_state *state, struct nl_msg *msg,
int argc, char **argv, enum id_input id)
{
-@@ -669,6 +680,7 @@ static int handle_commands(struct nl8021
+@@ -751,6 +762,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");
@@ -134,15 +134,17 @@
{
--- a/scan.c
+++ b/scan.c
-@@ -1170,6 +1170,7 @@ static void print_ht_op(const uint8_t ty
+@@ -1197,6 +1197,9 @@ 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]);
++#ifndef IW_FULL
+ return;
++#endif
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);
-@@ -1497,6 +1498,14 @@ static void print_ie(const struct ie_pri
+@@ -1524,6 +1527,14 @@ 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), },
@@ -157,7 +159,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), },
-@@ -1506,21 +1515,15 @@ static const struct ie_print ieprinters[
+@@ -1533,21 +1544,15 @@ 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), },
@@ -180,7 +182,7 @@
};
static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data,
-@@ -1968,6 +1971,7 @@ void print_ies(unsigned char *ie, int ie
+@@ -2026,6 +2031,7 @@ void print_ies(unsigned char *ie, int ie
ieprinters[ie[0]].flags & BIT(ptype)) {
print_ie(&ieprinters[ie[0]],
ie[0], ie[1], ie + 2, &ie_buffer);
@@ -188,7 +190,7 @@
} else if (ie[0] == 221 /* vendor */) {
print_vendor(ie[1], ie + 2, unknown, ptype);
} else if (unknown) {
-@@ -1977,6 +1981,7 @@ void print_ies(unsigned char *ie, int ie
+@@ -2035,6 +2041,7 @@ void print_ies(unsigned char *ie, int ie
for (i=0; i<ie[1]; i++)
printf(" %.2x", ie[2+i]);
printf("\n");
@@ -196,7 +198,7 @@
}
ielen -= ie[1] + 2;
ie += ie[1] + 2;
-@@ -2017,6 +2022,7 @@ static void print_capa_non_dmg(__u16 cap
+@@ -2075,6 +2082,7 @@ static void print_capa_non_dmg(__u16 cap
printf(" ESS");
if (capa & WLAN_CAPABILITY_IBSS)
printf(" IBSS");
@@ -204,7 +206,7 @@
if (capa & WLAN_CAPABILITY_CF_POLLABLE)
printf(" CfPollable");
if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
-@@ -2045,6 +2051,7 @@ static void print_capa_non_dmg(__u16 cap
+@@ -2103,6 +2111,7 @@ static void print_capa_non_dmg(__u16 cap
printf(" DelayedBACK");
if (capa & WLAN_CAPABILITY_IMM_BACK)
printf(" ImmediateBACK");
@@ -212,7 +214,7 @@
}
static int print_bss_handler(struct nl_msg *msg, void *arg)
-@@ -2129,8 +2136,10 @@ static int print_bss_handler(struct nl_m
+@@ -2187,8 +2196,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);
@@ -223,7 +225,7 @@
}
if (bss[NL80211_BSS_BEACON_INTERVAL])
printf("\tbeacon interval: %d TUs\n",
-@@ -2319,6 +2328,7 @@ static int handle_stop_sched_scan(struct
+@@ -2382,6 +2393,7 @@ static int handle_stop_sched_scan(struct
return 0;
}
@@ -231,14 +233,14 @@
COMMAND(scan, sched_start,
SCHED_SCAN_OPTIONS,
NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan,
-@@ -2329,3 +2339,4 @@ COMMAND(scan, sched_start,
+@@ -2392,3 +2404,4 @@ COMMAND(scan, sched_start,
COMMAND(scan, sched_stop, "",
NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan,
"Stop an ongoing scheduled scan.");
+#endif
--- a/util.c
+++ b/util.c
-@@ -281,6 +281,7 @@ static const char *commands[NL80211_CMD_
+@@ -289,6 +289,7 @@ static const char *commands[NL80211_CMD_
static char cmdbuf[100];
@@ -246,7 +248,7 @@
const char *command_name(enum nl80211_commands cmd)
{
if (cmd <= NL80211_CMD_MAX && commands[cmd])
-@@ -288,6 +289,7 @@ const char *command_name(enum nl80211_co
+@@ -296,6 +297,7 @@ const char *command_name(enum nl80211_co
sprintf(cmdbuf, "Unknown command (%d)", cmd);
return cmdbuf;
}
@@ -254,23 +256,23 @@
int ieee80211_channel_to_frequency(int chan, enum nl80211_band band)
{
-@@ -426,6 +428,9 @@ int parse_keys(struct nl_msg *msg, char
+@@ -434,6 +436,9 @@ int parse_keys(struct nl_msg *msg, char
char keybuf[13];
int pos = 0;
+#ifndef IW_FULL
+ return 1;
+#endif
- if (!argc)
+ if (!*argc)
return 1;
--- a/Makefile
+++ b/Makefile
-@@ -25,6 +25,12 @@ OBJS-$(HWSIM) += hwsim.o
+@@ -31,6 +31,12 @@ OBJS-$(HWSIM) += hwsim.o
OBJS += $(OBJS-y) $(OBJS-Y)
-+OBJS_FULL = ocb offch cqm wowlan coalesce roc p2p ap mgmt vendor
++OBJS_FULL = ocb offch cqm wowlan coalesce roc p2p vendor mgmt ap sha256 nan bloom measurements ftm
+ifdef IW_FULL
+ CFLAGS += -DIW_FULL
+else
@@ -281,7 +283,7 @@
ifeq ($(NO_PKG_CONFIG),)
--- a/station.c
+++ b/station.c
-@@ -629,10 +629,12 @@ static int handle_station_set_plink(stru
+@@ -709,10 +709,12 @@ static int handle_station_set_plink(stru
nla_put_failure:
return -ENOBUFS;
}
@@ -294,7 +296,7 @@
static int handle_station_set_vlan(struct nl80211_state *state,
struct nl_msg *msg,
-@@ -727,11 +729,13 @@ static int handle_station_set_mesh_power
+@@ -807,11 +809,13 @@ static int handle_station_set_mesh_power
nla_put_failure:
return -ENOBUFS;
}
@@ -310,7 +312,7 @@
struct nl_msg *msg,
--- a/interface.c
+++ b/interface.c
-@@ -615,9 +615,11 @@ static int handle_interface_wds_peer(str
+@@ -621,9 +621,11 @@ static int handle_interface_wds_peer(str
nla_put_failure:
return -ENOBUFS;
}
@@ -322,7 +324,7 @@
static int set_mcast_rate(struct nl80211_state *state,
struct nl_msg *msg,
-@@ -707,6 +709,7 @@ static int handle_chan(struct nl80211_st
+@@ -713,6 +715,7 @@ static int handle_chan(struct nl80211_st
return handle_chanfreq(state, msg, true, argc, argv, id);
}
@@ -330,7 +332,7 @@
SECTION(switch);
COMMAND(switch, freq,
"<freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]\n"
-@@ -715,3 +718,4 @@ COMMAND(switch, freq,
+@@ -721,3 +724,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);