iw: update to version 4.7
[openwrt/staging/yousong.git] / package / network / utils / iw / patches / 200-reduce_size.patch
index dea24fb4956d7ff4289822a250464cbc38e45908..2e31cf2ae5c192a9c402246bc77d7631d5649e3c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -15,8 +15,8 @@ CFLAGS += -Wall -Wundef -Wstrict-prototy
+@@ -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 \
@@ -51,7 +51,7 @@
  
 --- a/info.c
 +++ b/info.c
-@@ -219,6 +219,7 @@ next:
+@@ -217,6 +217,7 @@ next:
                                }
                        }
  
@@ -59,7 +59,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) {
-@@ -235,6 +236,7 @@ next:
+@@ -233,6 +234,7 @@ next:
                                printf("\n");
                        }
                        }
@@ -67,7 +67,7 @@
                }
        }
  
-@@ -291,6 +293,7 @@ next:
+@@ -298,6 +300,7 @@ next:
                printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
        }
  
@@ -75,7 +75,7 @@
        if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) {
                int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
                int i;
-@@ -302,6 +305,7 @@ next:
+@@ -309,6 +312,7 @@ next:
                                        cipher_name(ciphers[i]));
                }
        }
@@ -83,7 +83,7 @@
  
        if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] &&
            tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX])
-@@ -321,11 +325,13 @@ next:
+@@ -328,11 +332,13 @@ next:
                        printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
        }
  
@@ -97,7 +97,7 @@
  
        if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) {
                struct nlattr *nl_combi;
-@@ -422,6 +428,7 @@ broken_combination:
+@@ -429,6 +435,7 @@ broken_combination:
                        printf("\tinterface combinations are not supported\n");
        }
  
        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)
-@@ -518,6 +525,7 @@ broken_combination:
+@@ -526,6 +533,7 @@ broken_combination:
                                printf("\t\t * wake up on TCP connection\n");
                }
        }
  
        if (tb_msg[NL80211_ATTR_ROAM_SUPPORT])
                printf("\tDevice supports roaming.\n");
-@@ -554,6 +562,7 @@ broken_combination:
+@@ -564,6 +572,7 @@ broken_combination:
                }
        }
  
        if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
                unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
  
-@@ -612,6 +621,7 @@ broken_combination:
+@@ -622,6 +631,7 @@ broken_combination:
                if (features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)
                        printf("\tDevice supports TDLS channel switching\n");
        }
  
        if (tb_msg[NL80211_ATTR_EXT_FEATURES]) {
                struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES];
-@@ -668,6 +678,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
+@@ -678,6 +688,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);
  
  static int handle_commands(struct nl80211_state *state, struct nl_msg *msg,
                           int argc, char **argv, enum id_input id)
  {
-@@ -679,6 +690,7 @@ static int handle_commands(struct nl8021
+@@ -689,6 +700,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");
  {
 --- a/scan.c
 +++ b/scan.c
-@@ -1081,6 +1081,7 @@ static void print_ht_op(const uint8_t ty
+@@ -1147,6 +1147,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]);
        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);
-@@ -1312,6 +1313,13 @@ static void print_ie(const struct ie_pri
+@@ -1380,6 +1381,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), },
        [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), },
-@@ -1321,14 +1329,8 @@ static const struct ie_print ieprinters[
+@@ -1389,14 +1397,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), },
        [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), },
-@@ -1336,6 +1338,7 @@ static const struct ie_print ieprinters[
+@@ -1404,6 +1406,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), },
  };
  
  static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data)
-@@ -1767,6 +1770,7 @@ void print_ies(unsigned char *ie, int ie
+@@ -1835,6 +1838,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);
                } else if (ie[0] == 221 /* vendor */) {
                        print_vendor(ie[1], ie + 2, unknown, ptype);
                } else if (unknown) {
-@@ -1776,6 +1780,7 @@ void print_ies(unsigned char *ie, int ie
+@@ -1844,6 +1848,7 @@ void print_ies(unsigned char *ie, int ie
                        for (i=0; i<ie[1]; i++)
                                printf(" %.2x", ie[2+i]);
                        printf("\n");
                }
                ielen -= ie[1] + 2;
                ie += ie[1] + 2;
-@@ -1816,6 +1821,7 @@ static void print_capa_non_dmg(__u16 cap
+@@ -1884,6 +1889,7 @@ static void print_capa_non_dmg(__u16 cap
                printf(" ESS");
        if (capa & WLAN_CAPABILITY_IBSS)
                printf(" IBSS");
        if (capa & WLAN_CAPABILITY_CF_POLLABLE)
                printf(" CfPollable");
        if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
-@@ -1844,6 +1850,7 @@ static void print_capa_non_dmg(__u16 cap
+@@ -1912,6 +1918,7 @@ static void print_capa_non_dmg(__u16 cap
                printf(" DelayedBACK");
        if (capa & WLAN_CAPABILITY_IMM_BACK)
                printf(" ImmediateBACK");
  }
  
  static int print_bss_handler(struct nl_msg *msg, void *arg)
-@@ -1922,8 +1929,10 @@ static int print_bss_handler(struct nl_m
+@@ -1996,8 +2003,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);
                printf("\tbeacon interval: %d TUs\n",
 --- a/util.c
 +++ b/util.c
-@@ -267,6 +267,7 @@ static const char *commands[NL80211_CMD_
+@@ -268,6 +268,7 @@ static const char *commands[NL80211_CMD_
  
  static char cmdbuf[100];
  
  const char *command_name(enum nl80211_commands cmd)
  {
        if (cmd <= NL80211_CMD_MAX && commands[cmd])
-@@ -274,6 +275,7 @@ const char *command_name(enum nl80211_co
+@@ -275,6 +276,7 @@ const char *command_name(enum nl80211_co
        sprintf(cmdbuf, "Unknown command (%d)", cmd);
        return cmdbuf;
  }