iw: strip a few more non-essential features from iw-tiny
authorFelix Fietkau <nbd@nbd.name>
Sun, 7 Oct 2018 08:48:31 +0000 (10:48 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sun, 7 Oct 2018 10:45:41 +0000 (12:45 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/utils/iw/patches/200-reduce_size.patch

index bf5d038609c3547598d5876fc47b312bc1b5a81c..5f4bce6a8bc1c598da2d21986281f489a88f02a9 100644 (file)
  
  OBJS += $(OBJS-y) $(OBJS-Y)
  
-+OBJS_FULL = ocb offch cqm wowlan coalesce roc p2p ap
++OBJS_FULL = ocb offch cqm wowlan coalesce roc p2p ap mgmt vendor
 +ifdef IW_FULL
 +  CFLAGS += -DIW_FULL
 +else
  
  static int handle_station_dump(struct nl80211_state *state,
                               struct nl_msg *msg,
+--- a/interface.c
++++ b/interface.c
+@@ -615,9 +615,11 @@ static int handle_interface_wds_peer(str
+  nla_put_failure:
+       return -ENOBUFS;
+ }
++#ifdef IW_FULL
+ COMMAND(set, peer, "<MAC address>",
+       NL80211_CMD_SET_WDS_PEER, 0, CIB_NETDEV, handle_interface_wds_peer,
+       "Set interface WDS peer.");
++#endif
+ static int set_mcast_rate(struct nl80211_state *state,
+                         struct nl_msg *msg,
+@@ -707,6 +709,7 @@ static int handle_chan(struct nl80211_st
+       return handle_chanfreq(state, msg, true, argc, argv, id);
+ }
++#ifdef IW_FULL
+ 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,
+       "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;
+ }
++#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,
+       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.");
++#endif
+ static int handle_fragmentation(struct nl80211_state *state,
+                               struct nl_msg *msg,