OpenWrt – Blame information for rev 3
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --- a/event.c |
2 | +++ b/event.c |
||
3 | office | 3 | @@ -342,6 +342,7 @@ static int print_event(struct nl_msg *ms |
1 | office | 4 | } |
5 | |||
6 | switch (gnlh->cmd) { |
||
3 | office | 7 | +#if 0 |
1 | office | 8 | case NL80211_CMD_NEW_WIPHY: |
9 | printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); |
||
10 | break; |
||
3 | office | 11 | @@ -376,6 +377,7 @@ static int print_event(struct nl_msg *ms |
1 | office | 12 | case NL80211_CMD_SCHED_SCAN_RESULTS: |
13 | printf("got scheduled scan results\n"); |
||
14 | break; |
||
15 | +#endif |
||
16 | case NL80211_CMD_REG_CHANGE: |
||
17 | printf("regulatory domain change: "); |
||
18 | |||
3 | office | 19 | @@ -454,6 +456,7 @@ static int print_event(struct nl_msg *ms |
1 | office | 20 | mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); |
21 | printf("del station %s\n", macbuf); |
||
22 | break; |
||
3 | office | 23 | +#if 0 |
1 | office | 24 | case NL80211_CMD_JOIN_IBSS: |
25 | mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); |
||
26 | printf("IBSS %s joined\n", macbuf); |
||
3 | office | 27 | @@ -618,9 +621,9 @@ static int print_event(struct nl_msg *ms |
28 | case NL80211_CMD_DEL_WIPHY: |
||
29 | printf("delete wiphy\n"); |
||
1 | office | 30 | break; |
31 | +#endif |
||
32 | default: |
||
33 | - printf("unknown event %d (%s)\n", |
||
34 | - gnlh->cmd, command_name(gnlh->cmd)); |
||
35 | + printf("unknown event %d\n", gnlh->cmd); |
||
36 | break; |
||
37 | } |
||
38 | |||
39 | --- a/info.c |
||
40 | +++ b/info.c |
||
3 | office | 41 | @@ -197,6 +197,7 @@ next: |
1 | office | 42 | } |
43 | } |
||
44 | |||
3 | office | 45 | +#if 0 |
1 | office | 46 | if (tb_band[NL80211_BAND_ATTR_RATES]) { |
47 | printf("\t\tBitrates (non-HT):\n"); |
||
48 | nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) { |
||
3 | office | 49 | @@ -213,6 +214,7 @@ next: |
1 | office | 50 | printf("\n"); |
51 | } |
||
52 | } |
||
53 | +#endif |
||
54 | } |
||
55 | } |
||
56 | |||
3 | office | 57 | @@ -278,6 +280,7 @@ next: |
1 | office | 58 | printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage); |
59 | } |
||
60 | |||
3 | office | 61 | +#if 0 |
1 | office | 62 | if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) { |
63 | int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32); |
||
64 | int i; |
||
3 | office | 65 | @@ -289,6 +292,7 @@ next: |
1 | office | 66 | cipher_name(ciphers[i])); |
67 | } |
||
68 | } |
||
69 | +#endif |
||
70 | |||
71 | if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] && |
||
72 | tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX]) |
||
3 | office | 73 | @@ -308,11 +312,13 @@ next: |
1 | office | 74 | printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); |
75 | } |
||
76 | |||
3 | office | 77 | +#if 0 |
1 | office | 78 | if (tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]) { |
79 | printf("\tsoftware interface modes (can always be added):\n"); |
||
80 | nla_for_each_nested(nl_mode, tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES], rem_mode) |
||
81 | printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); |
||
82 | } |
||
83 | +#endif |
||
84 | |||
85 | if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) { |
||
86 | struct nlattr *nl_combi; |
||
3 | office | 87 | @@ -409,6 +415,7 @@ broken_combination: |
1 | office | 88 | printf("\tinterface combinations are not supported\n"); |
89 | } |
||
90 | |||
3 | office | 91 | +#if 0 |
1 | office | 92 | if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) { |
93 | printf("\tSupported commands:\n"); |
||
94 | nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd) |
||
3 | office | 95 | @@ -506,6 +513,7 @@ broken_combination: |
1 | office | 96 | printf("\t\t * wake up on TCP connection\n"); |
97 | } |
||
98 | } |
||
99 | +#endif |
||
100 | |||
101 | if (tb_msg[NL80211_ATTR_ROAM_SUPPORT]) |
||
102 | printf("\tDevice supports roaming.\n"); |
||
3 | office | 103 | @@ -544,6 +552,7 @@ broken_combination: |
1 | office | 104 | } |
105 | } |
||
106 | |||
3 | office | 107 | +#if 0 |
1 | office | 108 | if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) { |
109 | unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]); |
||
110 | |||
3 | office | 111 | @@ -602,6 +611,7 @@ broken_combination: |
112 | if (features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH) |
||
113 | printf("\tDevice supports TDLS channel switching\n"); |
||
1 | office | 114 | } |
115 | +#endif |
||
116 | |||
3 | office | 117 | if (tb_msg[NL80211_ATTR_EXT_FEATURES]) { |
118 | struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES]; |
||
119 | @@ -658,6 +668,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP |
||
1 | office | 120 | "List all wireless devices and their capabilities."); |
121 | TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL); |
||
122 | |||
3 | office | 123 | +#if 0 |
1 | office | 124 | static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, |
125 | int argc, char **argv, enum id_input id) |
||
126 | { |
||
3 | office | 127 | @@ -669,6 +680,7 @@ static int handle_commands(struct nl8021 |
1 | office | 128 | } |
129 | TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands, |
||
130 | "list all known commands and their decimal & hex value"); |
||
131 | +#endif |
||
132 | |||
133 | static int print_feature_handler(struct nl_msg *msg, void *arg) |
||
134 | { |
||
135 | --- a/scan.c |
||
136 | +++ b/scan.c |
||
3 | office | 137 | @@ -1170,6 +1170,7 @@ static void print_ht_op(const uint8_t ty |
1 | office | 138 | printf("\t\t * secondary channel offset: %s\n", |
139 | ht_secondary_offset[data[1] & 0x3]); |
||
140 | printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]); |
||
141 | + return; |
||
142 | printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3); |
||
143 | printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]); |
||
144 | printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2); |
||
3 | office | 145 | @@ -1497,6 +1498,14 @@ static void print_ie(const struct ie_pri |
1 | office | 146 | |
147 | static const struct ie_print ieprinters[] = { |
||
148 | [0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, |
||
149 | + [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), }, |
||
150 | + [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), }, |
||
151 | + [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), }, |
||
152 | + [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), }, |
||
153 | + [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, |
||
154 | + [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), }, |
||
155 | + [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), }, |
||
3 | office | 156 | +#if 0 |
1 | office | 157 | [1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), }, |
158 | [3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), }, |
||
159 | [5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), }, |
||
3 | office | 160 | @@ -1506,21 +1515,15 @@ static const struct ie_print ieprinters[ |
1 | office | 161 | [32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), }, |
162 | [35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), }, |
||
163 | [42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), }, |
||
164 | - [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), }, |
||
165 | [47] = { "ERP D4.0", print_erp, 1, 255, BIT(PRINT_SCAN), }, |
||
166 | [74] = { "Overlapping BSS scan params", print_obss_scan_params, 14, 255, BIT(PRINT_SCAN), }, |
||
167 | - [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), }, |
||
168 | - [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), }, |
||
169 | - [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), }, |
||
170 | - [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), }, |
||
171 | - [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), }, |
||
172 | [50] = { "Extended supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), }, |
||
173 | [113] = { "MESH Configuration", print_mesh_conf, 7, 7, BIT(PRINT_SCAN), }, |
||
174 | - [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, |
||
175 | [127] = { "Extended capabilities", print_capabilities, 0, 255, BIT(PRINT_SCAN), }, |
||
176 | [107] = { "802.11u Interworking", print_interworking, 0, 255, BIT(PRINT_SCAN), }, |
||
177 | [108] = { "802.11u Advertisement", print_11u_advert, 0, 255, BIT(PRINT_SCAN), }, |
||
178 | [111] = { "802.11u Roaming Consortium", print_11u_rcon, 0, 255, BIT(PRINT_SCAN), }, |
||
179 | +#endif |
||
180 | }; |
||
181 | |||
182 | static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data, |
||
3 | office | 183 | @@ -1968,6 +1971,7 @@ void print_ies(unsigned char *ie, int ie |
1 | office | 184 | ieprinters[ie[0]].flags & BIT(ptype)) { |
185 | print_ie(&ieprinters[ie[0]], |
||
186 | ie[0], ie[1], ie + 2, &ie_buffer); |
||
3 | office | 187 | +#if 0 |
1 | office | 188 | } else if (ie[0] == 221 /* vendor */) { |
189 | print_vendor(ie[1], ie + 2, unknown, ptype); |
||
190 | } else if (unknown) { |
||
3 | office | 191 | @@ -1977,6 +1981,7 @@ void print_ies(unsigned char *ie, int ie |
1 | office | 192 | for (i=0; i<ie[1]; i++) |
193 | printf(" %.2x", ie[2+i]); |
||
194 | printf("\n"); |
||
195 | +#endif |
||
196 | } |
||
197 | ielen -= ie[1] + 2; |
||
198 | ie += ie[1] + 2; |
||
3 | office | 199 | @@ -2017,6 +2022,7 @@ static void print_capa_non_dmg(__u16 cap |
1 | office | 200 | printf(" ESS"); |
201 | if (capa & WLAN_CAPABILITY_IBSS) |
||
202 | printf(" IBSS"); |
||
3 | office | 203 | +#if 0 |
1 | office | 204 | if (capa & WLAN_CAPABILITY_CF_POLLABLE) |
205 | printf(" CfPollable"); |
||
206 | if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST) |
||
3 | office | 207 | @@ -2045,6 +2051,7 @@ static void print_capa_non_dmg(__u16 cap |
1 | office | 208 | printf(" DelayedBACK"); |
209 | if (capa & WLAN_CAPABILITY_IMM_BACK) |
||
210 | printf(" ImmediateBACK"); |
||
211 | +#endif |
||
212 | } |
||
213 | |||
214 | static int print_bss_handler(struct nl_msg *msg, void *arg) |
||
3 | office | 215 | @@ -2129,8 +2136,10 @@ static int print_bss_handler(struct nl_m |
1 | office | 216 | if (bss[NL80211_BSS_FREQUENCY]) { |
217 | int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]); |
||
218 | printf("\tfreq: %d\n", freq); |
||
3 | office | 219 | +#if 0 |
1 | office | 220 | if (freq > 45000) |
221 | is_dmg = true; |
||
222 | +#endif |
||
223 | } |
||
224 | if (bss[NL80211_BSS_BEACON_INTERVAL]) |
||
225 | printf("\tbeacon interval: %d TUs\n", |
||
3 | office | 226 | @@ -2319,6 +2328,7 @@ static int handle_stop_sched_scan(struct |
1 | office | 227 | return 0; |
228 | } |
||
229 | |||
3 | office | 230 | +#if 0 |
1 | office | 231 | COMMAND(scan, sched_start, |
232 | SCHED_SCAN_OPTIONS, |
||
233 | NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan, |
||
3 | office | 234 | @@ -2329,3 +2339,4 @@ COMMAND(scan, sched_start, |
1 | office | 235 | COMMAND(scan, sched_stop, "", |
236 | NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan, |
||
237 | "Stop an ongoing scheduled scan."); |
||
238 | +#endif |
||
239 | --- a/util.c |
||
240 | +++ b/util.c |
||
3 | office | 241 | @@ -281,6 +281,7 @@ static const char *commands[NL80211_CMD_ |
1 | office | 242 | |
243 | static char cmdbuf[100]; |
||
244 | |||
3 | office | 245 | +#if 0 |
1 | office | 246 | const char *command_name(enum nl80211_commands cmd) |
247 | { |
||
248 | if (cmd <= NL80211_CMD_MAX && commands[cmd]) |
||
3 | office | 249 | @@ -288,6 +289,7 @@ const char *command_name(enum nl80211_co |
1 | office | 250 | sprintf(cmdbuf, "Unknown command (%d)", cmd); |
251 | return cmdbuf; |
||
252 | } |
||
253 | +#endif |
||
254 | |||
255 | int ieee80211_channel_to_frequency(int chan, enum nl80211_band band) |
||
256 | { |
||
3 | office | 257 | @@ -426,6 +428,7 @@ int parse_keys(struct nl_msg *msg, char |
1 | office | 258 | char keybuf[13]; |
259 | int pos = 0; |
||
260 | |||
261 | + return 1; |
||
3 | office | 262 | if (!argc) |
1 | office | 263 | return 1; |
264 | |||
265 | --- a/Makefile |
||
266 | +++ b/Makefile |
||
3 | office | 267 | @@ -25,6 +25,8 @@ OBJS-$(HWSIM) += hwsim.o |
1 | office | 268 | |
269 | OBJS += $(OBJS-y) $(OBJS-Y) |
||
270 | |||
3 | office | 271 | +OBJS_DISABLED = ocb offch cqm wowlan coalesce roc p2p ap |
272 | +OBJS:=$(filter-out $(patsubst %,%.o,$(OBJS_DISABLED)),$(OBJS)) |
||
1 | office | 273 | ALL = iw |
274 | |||
275 | ifeq ($(NO_PKG_CONFIG),) |
||
276 | --- a/station.c |
||
277 | +++ b/station.c |
||
3 | office | 278 | @@ -629,10 +629,12 @@ static int handle_station_set_plink(stru |
1 | office | 279 | nla_put_failure: |
280 | return -ENOBUFS; |
||
281 | } |
||
3 | office | 282 | +#if 0 |
1 | office | 283 | COMMAND_ALIAS(station, set, "<MAC address> plink_action <open|block>", |
284 | NL80211_CMD_SET_STATION, 0, CIB_NETDEV, handle_station_set_plink, |
||
285 | "Set mesh peer link action for this station (peer).", |
||
286 | select_station_cmd, station_set_plink); |
||
287 | +#endif |
||
288 | |||
289 | static int handle_station_set_vlan(struct nl80211_state *state, |
||
290 | struct nl_msg *msg, |
||
3 | office | 291 | @@ -727,11 +729,13 @@ static int handle_station_set_mesh_power |
1 | office | 292 | nla_put_failure: |
293 | return -ENOBUFS; |
||
294 | } |
||
3 | office | 295 | +#if 0 |
1 | office | 296 | COMMAND_ALIAS(station, set, "<MAC address> mesh_power_mode " |
297 | "<active|light|deep>", NL80211_CMD_SET_STATION, 0, CIB_NETDEV, |
||
298 | handle_station_set_mesh_power_mode, |
||
299 | "Set link-specific mesh power mode for this station", |
||
300 | select_station_cmd, station_set_mesh_power_mode); |
||
301 | +#endif |
||
302 | |||
303 | static int handle_station_dump(struct nl80211_state *state, |
||
304 | struct nl_msg *msg, |