aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iw/patches/200-reduce_size.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/utils/iw/patches/200-reduce_size.patch')
-rw-r--r--package/network/utils/iw/patches/200-reduce_size.patch102
1 files changed, 75 insertions, 27 deletions
diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch
index 3f92982a4a..36fe0ff746 100644
--- a/package/network/utils/iw/patches/200-reduce_size.patch
+++ b/package/network/utils/iw/patches/200-reduce_size.patch
@@ -1,16 +1,3 @@
---- a/Makefile
-+++ b/Makefile
-@@ -16,8 +16,8 @@ CFLAGS += -Wall -Wundef -Wstrict-prototy
- OBJS = iw.o genl.o event.o info.o phy.o \
- interface.o ibss.o station.o survey.o util.o ocb.o \
- mesh.o mpath.o mpp.o scan.o reg.o version.o \
-- reason.o status.o connect.o link.o offch.o ps.o cqm.o \
-- bitrate.o wowlan.o coalesce.o roc.o p2p.o vendor.o
-+ reason.o status.o link.o offch.o ps.o cqm.o \
-+ bitrate.o vendor.o
- 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
@@ -37,7 +24,7 @@
case NL80211_CMD_JOIN_IBSS:
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
printf("IBSS %s joined\n", macbuf);
-@@ -612,9 +615,9 @@ static int print_event(struct nl_msg *ms
+@@ -618,9 +621,9 @@ static int print_event(struct nl_msg *ms
case NL80211_CMD_DEL_WIPHY:
printf("delete wiphy\n");
break;
@@ -147,7 +134,7 @@
{
--- a/scan.c
+++ b/scan.c
-@@ -1147,6 +1147,7 @@ static void print_ht_op(const uint8_t ty
+@@ -1170,6 +1170,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]);
@@ -155,7 +142,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);
-@@ -1380,6 +1381,14 @@ static void print_ie(const struct ie_pri
+@@ -1497,6 +1498,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), },
@@ -170,7 +157,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), },
-@@ -1389,21 +1398,15 @@ static const struct ie_print ieprinters[
+@@ -1506,21 +1515,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), },
@@ -192,16 +179,16 @@
+#endif
};
- static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data)
-@@ -1835,6 +1838,7 @@ void print_ies(unsigned char *ie, int ie
- ieprinters[ie[0]].name &&
+ 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
ieprinters[ie[0]].flags & BIT(ptype)) {
- print_ie(&ieprinters[ie[0]], ie[0], ie[1], ie + 2);
+ print_ie(&ieprinters[ie[0]],
+ ie[0], ie[1], ie + 2, &ie_buffer);
+#if 0
} else if (ie[0] == 221 /* vendor */) {
print_vendor(ie[1], ie + 2, unknown, ptype);
} else if (unknown) {
-@@ -1844,6 +1848,7 @@ void print_ies(unsigned char *ie, int ie
+@@ -1977,6 +1981,7 @@ void print_ies(unsigned char *ie, int ie
for (i=0; i<ie[1]; i++)
printf(" %.2x", ie[2+i]);
printf("\n");
@@ -209,7 +196,7 @@
}
ielen -= ie[1] + 2;
ie += ie[1] + 2;
-@@ -1884,6 +1889,7 @@ static void print_capa_non_dmg(__u16 cap
+@@ -2017,6 +2022,7 @@ static void print_capa_non_dmg(__u16 cap
printf(" ESS");
if (capa & WLAN_CAPABILITY_IBSS)
printf(" IBSS");
@@ -217,7 +204,7 @@
if (capa & WLAN_CAPABILITY_CF_POLLABLE)
printf(" CfPollable");
if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
-@@ -1912,6 +1918,7 @@ static void print_capa_non_dmg(__u16 cap
+@@ -2045,6 +2051,7 @@ static void print_capa_non_dmg(__u16 cap
printf(" DelayedBACK");
if (capa & WLAN_CAPABILITY_IMM_BACK)
printf(" ImmediateBACK");
@@ -225,7 +212,7 @@
}
static int print_bss_handler(struct nl_msg *msg, void *arg)
-@@ -1996,8 +2003,10 @@ static int print_bss_handler(struct nl_m
+@@ -2129,8 +2136,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);
@@ -236,9 +223,22 @@
}
if (bss[NL80211_BSS_BEACON_INTERVAL])
printf("\tbeacon interval: %d TUs\n",
+@@ -2319,6 +2328,7 @@ static int handle_stop_sched_scan(struct
+ return 0;
+ }
+
++#if 0
+ 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,
+ 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
-@@ -275,6 +275,7 @@ static const char *commands[NL80211_CMD_
+@@ -281,6 +281,7 @@ static const char *commands[NL80211_CMD_
static char cmdbuf[100];
@@ -246,7 +246,7 @@
const char *command_name(enum nl80211_commands cmd)
{
if (cmd <= NL80211_CMD_MAX && commands[cmd])
-@@ -282,6 +283,7 @@ const char *command_name(enum nl80211_co
+@@ -288,6 +289,7 @@ const char *command_name(enum nl80211_co
sprintf(cmdbuf, "Unknown command (%d)", cmd);
return cmdbuf;
}
@@ -254,3 +254,51 @@
int ieee80211_channel_to_frequency(int chan, enum nl80211_band band)
{
+@@ -426,6 +428,7 @@ int parse_keys(struct nl_msg *msg, char
+ char keybuf[13];
+ int pos = 0;
+
++ return 1;
+ if (!argc)
+ return 1;
+
+--- a/Makefile
++++ b/Makefile
+@@ -25,6 +25,8 @@ OBJS-$(HWSIM) += hwsim.o
+
+ OBJS += $(OBJS-y) $(OBJS-Y)
+
++OBJS_DISABLED = ocb offch cqm wowlan coalesce roc p2p ap
++OBJS:=$(filter-out $(patsubst %,%.o,$(OBJS_DISABLED)),$(OBJS))
+ ALL = iw
+
+ ifeq ($(NO_PKG_CONFIG),)
+--- a/station.c
++++ b/station.c
+@@ -629,10 +629,12 @@ static int handle_station_set_plink(stru
+ nla_put_failure:
+ return -ENOBUFS;
+ }
++#if 0
+ COMMAND_ALIAS(station, set, "<MAC address> plink_action <open|block>",
+ NL80211_CMD_SET_STATION, 0, CIB_NETDEV, handle_station_set_plink,
+ "Set mesh peer link action for this station (peer).",
+ select_station_cmd, station_set_plink);
++#endif
+
+ 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
+ nla_put_failure:
+ return -ENOBUFS;
+ }
++#if 0
+ COMMAND_ALIAS(station, set, "<MAC address> mesh_power_mode "
+ "<active|light|deep>", NL80211_CMD_SET_STATION, 0, CIB_NETDEV,
+ handle_station_set_mesh_power_mode,
+ "Set link-specific mesh power mode for this station",
+ select_station_cmd, station_set_mesh_power_mode);
++#endif
+
+ static int handle_station_dump(struct nl80211_state *state,
+ struct nl_msg *msg,