0002-openwrt-remove-iw-patch.patch 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. From: Karsten Böddeker <freifunk@kb-light.de>
  2. Date: Sun, 17 Apr 2016 23:06:09 +0200
  3. Subject: [PATCH] openwrt: remove iw patch
  4. ---
  5. .../openwrt/1001-iw-remove-200-reduce_size.patch | 265 +++++++++++++++++++++
  6. 1 file changed, 265 insertions(+)
  7. create mode 100644 patches/openwrt/1001-iw-remove-200-reduce_size.patch
  8. diff --git a/patches/openwrt/1001-iw-remove-200-reduce_size.patch b/patches/openwrt/1001-iw-remove-200-reduce_size.patch
  9. new file mode 100644
  10. index 0000000..6f59663
  11. --- /dev/null
  12. +++ b/patches/openwrt/1001-iw-remove-200-reduce_size.patch
  13. @@ -0,0 +1,265 @@
  14. +From: Karsten Böddeker <freifunk@kb-light.de>
  15. +Date: Sun, 17 Apr 2016 22:45:50 +0200
  16. +Subject: iw: remove 200-reduce_size.patch
  17. +
  18. +diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch
  19. +deleted file mode 100644
  20. +index dea24fb..0000000
  21. +--- a/package/network/utils/iw/patches/200-reduce_size.patch
  22. ++++ /dev/null
  23. +@@ -1,255 +0,0 @@
  24. +---- a/Makefile
  25. +-+++ b/Makefile
  26. +-@@ -15,8 +15,8 @@ CFLAGS += -Wall -Wundef -Wstrict-prototy
  27. +- OBJS = iw.o genl.o event.o info.o phy.o \
  28. +- interface.o ibss.o station.o survey.o util.o ocb.o \
  29. +- mesh.o mpath.o mpp.o scan.o reg.o version.o \
  30. +-- reason.o status.o connect.o link.o offch.o ps.o cqm.o \
  31. +-- bitrate.o wowlan.o coalesce.o roc.o p2p.o vendor.o
  32. +-+ reason.o status.o link.o offch.o ps.o cqm.o \
  33. +-+ bitrate.o vendor.o
  34. +- OBJS += sections.o
  35. +-
  36. +- OBJS-$(HWSIM) += hwsim.o
  37. +---- a/event.c
  38. +-+++ b/event.c
  39. +-@@ -342,6 +342,7 @@ static int print_event(struct nl_msg *ms
  40. +- }
  41. +-
  42. +- switch (gnlh->cmd) {
  43. +-+#if 0
  44. +- case NL80211_CMD_NEW_WIPHY:
  45. +- printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]));
  46. +- break;
  47. +-@@ -376,6 +377,7 @@ static int print_event(struct nl_msg *ms
  48. +- case NL80211_CMD_SCHED_SCAN_RESULTS:
  49. +- printf("got scheduled scan results\n");
  50. +- break;
  51. +-+#endif
  52. +- case NL80211_CMD_REG_CHANGE:
  53. +- printf("regulatory domain change: ");
  54. +-
  55. +-@@ -454,6 +456,7 @@ static int print_event(struct nl_msg *ms
  56. +- mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
  57. +- printf("del station %s\n", macbuf);
  58. +- break;
  59. +-+#if 0
  60. +- case NL80211_CMD_JOIN_IBSS:
  61. +- mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
  62. +- printf("IBSS %s joined\n", macbuf);
  63. +-@@ -610,9 +613,9 @@ static int print_event(struct nl_msg *ms
  64. +- case NL80211_CMD_DEL_WIPHY:
  65. +- printf("delete wiphy\n");
  66. +- break;
  67. +-+#endif
  68. +- default:
  69. +-- printf("unknown event %d (%s)\n",
  70. +-- gnlh->cmd, command_name(gnlh->cmd));
  71. +-+ printf("unknown event %d\n", gnlh->cmd);
  72. +- break;
  73. +- }
  74. +-
  75. +---- a/info.c
  76. +-+++ b/info.c
  77. +-@@ -219,6 +219,7 @@ next:
  78. +- }
  79. +- }
  80. +-
  81. +-+#if 0
  82. +- if (tb_band[NL80211_BAND_ATTR_RATES]) {
  83. +- printf("\t\tBitrates (non-HT):\n");
  84. +- nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) {
  85. +-@@ -235,6 +236,7 @@ next:
  86. +- printf("\n");
  87. +- }
  88. +- }
  89. +-+#endif
  90. +- }
  91. +- }
  92. +-
  93. +-@@ -291,6 +293,7 @@ next:
  94. +- printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
  95. +- }
  96. +-
  97. +-+#if 0
  98. +- if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) {
  99. +- int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
  100. +- int i;
  101. +-@@ -302,6 +305,7 @@ next:
  102. +- cipher_name(ciphers[i]));
  103. +- }
  104. +- }
  105. +-+#endif
  106. +-
  107. +- if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] &&
  108. +- tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX])
  109. +-@@ -321,11 +325,13 @@ next:
  110. +- printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
  111. +- }
  112. +-
  113. +-+#if 0
  114. +- if (tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]) {
  115. +- printf("\tsoftware interface modes (can always be added):\n");
  116. +- nla_for_each_nested(nl_mode, tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES], rem_mode)
  117. +- printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
  118. +- }
  119. +-+#endif
  120. +-
  121. +- if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) {
  122. +- struct nlattr *nl_combi;
  123. +-@@ -422,6 +428,7 @@ broken_combination:
  124. +- printf("\tinterface combinations are not supported\n");
  125. +- }
  126. +-
  127. +-+#if 0
  128. +- if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) {
  129. +- printf("\tSupported commands:\n");
  130. +- nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd)
  131. +-@@ -518,6 +525,7 @@ broken_combination:
  132. +- printf("\t\t * wake up on TCP connection\n");
  133. +- }
  134. +- }
  135. +-+#endif
  136. +-
  137. +- if (tb_msg[NL80211_ATTR_ROAM_SUPPORT])
  138. +- printf("\tDevice supports roaming.\n");
  139. +-@@ -554,6 +562,7 @@ broken_combination:
  140. +- }
  141. +- }
  142. +-
  143. +-+#if 0
  144. +- if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
  145. +- unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
  146. +-
  147. +-@@ -612,6 +621,7 @@ broken_combination:
  148. +- if (features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH)
  149. +- printf("\tDevice supports TDLS channel switching\n");
  150. +- }
  151. +-+#endif
  152. +-
  153. +- if (tb_msg[NL80211_ATTR_EXT_FEATURES]) {
  154. +- struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES];
  155. +-@@ -668,6 +678,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
  156. +- "List all wireless devices and their capabilities.");
  157. +- TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL);
  158. +-
  159. +-+#if 0
  160. +- static int handle_commands(struct nl80211_state *state, struct nl_msg *msg,
  161. +- int argc, char **argv, enum id_input id)
  162. +- {
  163. +-@@ -679,6 +690,7 @@ static int handle_commands(struct nl8021
  164. +- }
  165. +- TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands,
  166. +- "list all known commands and their decimal & hex value");
  167. +-+#endif
  168. +-
  169. +- static int print_feature_handler(struct nl_msg *msg, void *arg)
  170. +- {
  171. +---- a/scan.c
  172. +-+++ b/scan.c
  173. +-@@ -1081,6 +1081,7 @@ static void print_ht_op(const uint8_t ty
  174. +- printf("\t\t * secondary channel offset: %s\n",
  175. +- ht_secondary_offset[data[1] & 0x3]);
  176. +- printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]);
  177. +-+ return;
  178. +- printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3);
  179. +- printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]);
  180. +- printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2);
  181. +-@@ -1312,6 +1313,13 @@ static void print_ie(const struct ie_pri
  182. +-
  183. +- static const struct ie_print ieprinters[] = {
  184. +- [0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
  185. +-+ [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
  186. +-+ [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
  187. +-+ [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
  188. +-+ [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
  189. +-+ [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
  190. +-+ [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
  191. +-+#if 0
  192. +- [1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
  193. +- [3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), },
  194. +- [5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), },
  195. +-@@ -1321,14 +1329,8 @@ static const struct ie_print ieprinters[
  196. +- [32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), },
  197. +- [35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), },
  198. +- [42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), },
  199. +-- [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
  200. +- [47] = { "ERP D4.0", print_erp, 1, 255, BIT(PRINT_SCAN), },
  201. +- [74] = { "Overlapping BSS scan params", print_obss_scan_params, 14, 255, BIT(PRINT_SCAN), },
  202. +-- [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
  203. +-- [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
  204. +-- [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
  205. +-- [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
  206. +-- [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
  207. +- [50] = { "Extended supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
  208. +- [113] = { "MESH Configuration", print_mesh_conf, 7, 7, BIT(PRINT_SCAN), },
  209. +- [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
  210. +-@@ -1336,6 +1338,7 @@ static const struct ie_print ieprinters[
  211. +- [107] = { "802.11u Interworking", print_interworking, 0, 255, BIT(PRINT_SCAN), },
  212. +- [108] = { "802.11u Advertisement", print_11u_advert, 0, 255, BIT(PRINT_SCAN), },
  213. +- [111] = { "802.11u Roaming Consortium", print_11u_rcon, 0, 255, BIT(PRINT_SCAN), },
  214. +-+#endif
  215. +- };
  216. +-
  217. +- static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data)
  218. +-@@ -1767,6 +1770,7 @@ void print_ies(unsigned char *ie, int ie
  219. +- ieprinters[ie[0]].name &&
  220. +- ieprinters[ie[0]].flags & BIT(ptype)) {
  221. +- print_ie(&ieprinters[ie[0]], ie[0], ie[1], ie + 2);
  222. +-+#if 0
  223. +- } else if (ie[0] == 221 /* vendor */) {
  224. +- print_vendor(ie[1], ie + 2, unknown, ptype);
  225. +- } else if (unknown) {
  226. +-@@ -1776,6 +1780,7 @@ void print_ies(unsigned char *ie, int ie
  227. +- for (i=0; i<ie[1]; i++)
  228. +- printf(" %.2x", ie[2+i]);
  229. +- printf("\n");
  230. +-+#endif
  231. +- }
  232. +- ielen -= ie[1] + 2;
  233. +- ie += ie[1] + 2;
  234. +-@@ -1816,6 +1821,7 @@ static void print_capa_non_dmg(__u16 cap
  235. +- printf(" ESS");
  236. +- if (capa & WLAN_CAPABILITY_IBSS)
  237. +- printf(" IBSS");
  238. +-+#if 0
  239. +- if (capa & WLAN_CAPABILITY_CF_POLLABLE)
  240. +- printf(" CfPollable");
  241. +- if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
  242. +-@@ -1844,6 +1850,7 @@ static void print_capa_non_dmg(__u16 cap
  243. +- printf(" DelayedBACK");
  244. +- if (capa & WLAN_CAPABILITY_IMM_BACK)
  245. +- printf(" ImmediateBACK");
  246. +-+#endif
  247. +- }
  248. +-
  249. +- static int print_bss_handler(struct nl_msg *msg, void *arg)
  250. +-@@ -1922,8 +1929,10 @@ static int print_bss_handler(struct nl_m
  251. +- if (bss[NL80211_BSS_FREQUENCY]) {
  252. +- int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]);
  253. +- printf("\tfreq: %d\n", freq);
  254. +-+#if 0
  255. +- if (freq > 45000)
  256. +- is_dmg = true;
  257. +-+#endif
  258. +- }
  259. +- if (bss[NL80211_BSS_BEACON_INTERVAL])
  260. +- printf("\tbeacon interval: %d TUs\n",
  261. +---- a/util.c
  262. +-+++ b/util.c
  263. +-@@ -267,6 +267,7 @@ static const char *commands[NL80211_CMD_
  264. +-
  265. +- static char cmdbuf[100];
  266. +-
  267. +-+#if 0
  268. +- const char *command_name(enum nl80211_commands cmd)
  269. +- {
  270. +- if (cmd <= NL80211_CMD_MAX && commands[cmd])
  271. +-@@ -274,6 +275,7 @@ const char *command_name(enum nl80211_co
  272. +- sprintf(cmdbuf, "Unknown command (%d)", cmd);
  273. +- return cmdbuf;
  274. +- }
  275. +-+#endif
  276. +-
  277. +- int ieee80211_channel_to_frequency(int chan, enum nl80211_band band)
  278. +- {
  279. --
  280. 2.1.4