OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | --- a/event.c |
1 | --- a/event.c |
|
2 | +++ b/event.c |
2 | +++ b/event.c |
|
3 | @@ -699,6 +699,7 @@ static int print_event(struct nl_msg *ms |
3 | @@ -342,6 +342,7 @@ static int print_event(struct nl_msg *ms |
|
4 | } |
4 | } |
|
Line 5... | Line 5... | |||
5 | |
5 | |
|
6 | switch (gnlh->cmd) { |
6 | switch (gnlh->cmd) { |
|
7 | +#ifdef IW_FULL |
7 | +#if 0 |
|
8 | case NL80211_CMD_NEW_WIPHY: |
8 | case NL80211_CMD_NEW_WIPHY: |
|
9 | printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); |
9 | printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])); |
|
10 | break; |
10 | break; |
|
11 | @@ -734,6 +735,7 @@ static int print_event(struct nl_msg *ms |
11 | @@ -376,6 +377,7 @@ static int print_event(struct nl_msg *ms |
|
12 | case NL80211_CMD_SCHED_SCAN_RESULTS: |
12 | case NL80211_CMD_SCHED_SCAN_RESULTS: |
|
13 | printf("got scheduled scan results\n"); |
13 | printf("got scheduled scan results\n"); |
|
14 | break; |
14 | break; |
|
15 | +#endif |
15 | +#endif |
|
16 | case NL80211_CMD_REG_CHANGE: |
16 | case NL80211_CMD_REG_CHANGE: |
|
Line 17... | Line 17... | |||
17 | printf("regulatory domain change: "); |
17 | printf("regulatory domain change: "); |
|
18 | |
18 | |
|
19 | @@ -812,6 +814,7 @@ static int print_event(struct nl_msg *ms |
19 | @@ -454,6 +456,7 @@ static int print_event(struct nl_msg *ms |
|
20 | mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); |
20 | mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); |
|
21 | printf("del station %s\n", macbuf); |
21 | printf("del station %s\n", macbuf); |
|
22 | break; |
22 | break; |
|
23 | +#ifdef IW_FULL |
23 | +#if 0 |
|
24 | case NL80211_CMD_JOIN_IBSS: |
24 | case NL80211_CMD_JOIN_IBSS: |
|
25 | mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); |
25 | mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC])); |
|
- | 26 | printf("IBSS %s joined\n", macbuf); |
||
26 | printf("IBSS %s joined\n", macbuf); |
27 | @@ -618,9 +621,9 @@ static int print_event(struct nl_msg *ms |
|
27 | @@ -989,9 +992,9 @@ static int print_event(struct nl_msg *ms |
28 | case NL80211_CMD_DEL_WIPHY: |
|
28 | parse_nan_match(tb); |
- | ||
29 | break; |
29 | printf("delete wiphy\n"); |
|
30 | } |
30 | break; |
|
31 | +#endif |
31 | +#endif |
|
32 | default: |
32 | default: |
|
33 | - printf("unknown event %d (%s)\n", |
33 | - printf("unknown event %d (%s)\n", |
|
34 | - gnlh->cmd, command_name(gnlh->cmd)); |
34 | - gnlh->cmd, command_name(gnlh->cmd)); |
|
35 | + printf("unknown event %d\n", gnlh->cmd); |
35 | + printf("unknown event %d\n", gnlh->cmd); |
|
Line 36... | Line 36... | |||
36 | break; |
36 | break; |
|
37 | } |
37 | } |
|
38 | |
38 | |
|
39 | --- a/info.c |
39 | --- a/info.c |
|
40 | +++ b/info.c |
40 | +++ b/info.c |
|
Line 41... | Line 41... | |||
41 | @@ -205,6 +205,7 @@ next: |
41 | @@ -197,6 +197,7 @@ next: |
|
42 | } |
42 | } |
|
43 | } |
43 | } |
|
44 | |
44 | |
|
45 | +#ifdef IW_FULL |
45 | +#if 0 |
|
46 | if (tb_band[NL80211_BAND_ATTR_RATES]) { |
46 | if (tb_band[NL80211_BAND_ATTR_RATES]) { |
|
47 | printf("\t\tBitrates (non-HT):\n"); |
47 | printf("\t\tBitrates (non-HT):\n"); |
|
48 | nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) { |
48 | nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) { |
|
49 | @@ -221,6 +222,7 @@ next: |
49 | @@ -213,6 +214,7 @@ next: |
|
50 | printf("\n"); |
50 | printf("\n"); |
|
51 | } |
51 | } |
|
Line 52... | Line 52... | |||
52 | } |
52 | } |
|
53 | +#endif |
53 | +#endif |
|
54 | } |
54 | } |
|
Line 55... | Line 55... | |||
55 | } |
55 | } |
|
56 | |
56 | |
|
57 | @@ -286,6 +288,7 @@ next: |
57 | @@ -278,6 +280,7 @@ next: |
|
58 | printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage); |
58 | printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage); |
|
59 | } |
59 | } |
|
60 | |
60 | |
|
61 | +#ifdef IW_FULL |
61 | +#if 0 |
|
62 | if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) { |
62 | if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) { |
|
63 | int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32); |
63 | int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32); |
|
Line 64... | Line 64... | |||
64 | int i; |
64 | int i; |
|
65 | @@ -297,6 +300,7 @@ next: |
65 | @@ -289,6 +292,7 @@ next: |
|
66 | cipher_name(ciphers[i])); |
66 | cipher_name(ciphers[i])); |
|
67 | } |
67 | } |
|
68 | } |
68 | } |
|
Line 69... | Line 69... | |||
69 | +#endif |
69 | +#endif |
|
70 | |
70 | |
|
71 | if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] && |
71 | if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] && |
|
72 | tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX]) |
72 | tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX]) |
|
73 | @@ -316,11 +320,13 @@ next: |
73 | @@ -308,11 +312,13 @@ next: |
|
74 | printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); |
74 | printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); |
|
75 | } |
75 | } |
|
Line 76... | Line 76... | |||
76 | |
76 | |
|
77 | +#ifdef IW_FULL |
77 | +#if 0 |
|
78 | if (tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]) { |
78 | if (tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]) { |
|
79 | printf("\tsoftware interface modes (can always be added):\n"); |
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) |
80 | nla_for_each_nested(nl_mode, tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES], rem_mode) |
|
Line 81... | Line 81... | |||
81 | printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); |
81 | printf("\t\t * %s\n", iftype_name(nla_type(nl_mode))); |
|
82 | } |
82 | } |
|
83 | +#endif |
83 | +#endif |
|
84 | |
84 | |
|
85 | if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) { |
85 | if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) { |
|
86 | struct nlattr *nl_combi; |
86 | struct nlattr *nl_combi; |
|
87 | @@ -417,6 +423,7 @@ broken_combination: |
87 | @@ -409,6 +415,7 @@ broken_combination: |
|
88 | printf("\tinterface combinations are not supported\n"); |
88 | printf("\tinterface combinations are not supported\n"); |
|
89 | } |
89 | } |
|
Line 90... | Line 90... | |||
90 | |
90 | |
|
91 | +#ifdef IW_FULL |
91 | +#if 0 |
|
92 | if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) { |
92 | if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) { |
|
93 | printf("\tSupported commands:\n"); |
93 | printf("\tSupported commands:\n"); |
|
94 | nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd) |
94 | nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd) |
|
Line 95... | Line 95... | |||
95 | @@ -514,6 +521,7 @@ broken_combination: |
95 | @@ -506,6 +513,7 @@ broken_combination: |
|
96 | printf("\t\t * wake up on TCP connection\n"); |
96 | printf("\t\t * wake up on TCP connection\n"); |
|
97 | } |
97 | } |
|
Line 98... | Line 98... | |||
98 | } |
98 | } |
|
99 | +#endif |
99 | +#endif |
|
100 | |
100 | |
|
101 | if (tb_msg[NL80211_ATTR_ROAM_SUPPORT]) |
101 | if (tb_msg[NL80211_ATTR_ROAM_SUPPORT]) |
|
102 | printf("\tDevice supports roaming.\n"); |
102 | printf("\tDevice supports roaming.\n"); |
|
Line 103... | Line 103... | |||
103 | @@ -552,6 +560,7 @@ broken_combination: |
103 | @@ -544,6 +552,7 @@ broken_combination: |
|
104 | } |
104 | } |
|
105 | } |
105 | } |
|
106 | |
106 | |
|
107 | +#ifdef IW_FULL |
107 | +#if 0 |
|
Line 108... | Line 108... | |||
108 | if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) { |
108 | if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) { |
|
109 | unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]); |
109 | unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]); |
|
110 | |
110 | |
|
111 | @@ -616,6 +625,7 @@ broken_combination: |
111 | @@ -602,6 +611,7 @@ broken_combination: |
|
112 | if (features & NL80211_FEATURE_ND_RANDOM_MAC_ADDR) |
112 | if (features & NL80211_FEATURE_TDLS_CHANNEL_SWITCH) |
|
113 | printf("\tDevice supports randomizing MAC-addr in net-detect scans.\n"); |
113 | printf("\tDevice supports TDLS channel switching\n"); |
|
114 | } |
114 | } |
|
115 | +#endif |
115 | +#endif |
|
116 | |
116 | |
|
Line 117... | Line 117... | |||
117 | if (tb_msg[NL80211_ATTR_TDLS_SUPPORT]) |
117 | if (tb_msg[NL80211_ATTR_EXT_FEATURES]) { |
|
118 | printf("\tDevice supports T-DLS.\n"); |
118 | struct nlattr *tb = tb_msg[NL80211_ATTR_EXT_FEATURES]; |
|
119 | @@ -740,6 +750,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP |
119 | @@ -658,6 +668,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP |
|
120 | "List all wireless devices and their capabilities."); |
120 | "List all wireless devices and their capabilities."); |
|
121 | TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL); |
121 | TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL); |
|
122 | |
122 | |
|
123 | +#ifdef IW_FULL |
123 | +#if 0 |
|
124 | static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, |
124 | static int handle_commands(struct nl80211_state *state, struct nl_msg *msg, |
|
125 | int argc, char **argv, enum id_input id) |
- | ||
126 | { |
125 | int argc, char **argv, enum id_input id) |
|
127 | @@ -751,6 +762,7 @@ static int handle_commands(struct nl8021 |
- | ||
128 | } |
126 | { |
|
129 | TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands, |
127 | @@ -669,6 +680,7 @@ static int handle_commands(struct nl8021 |
|
130 | "list all known commands and their decimal & hex value"); |
128 | } |
|
131 | +#endif |
129 | TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands, |
|
Line 132... | Line 130... | |||
132 | |
130 | "list all known commands and their decimal & hex value"); |
|
133 | static int print_feature_handler(struct nl_msg *msg, void *arg) |
131 | +#endif |
|
134 | { |
132 | |
|
135 | --- a/scan.c |
133 | static int print_feature_handler(struct nl_msg *msg, void *arg) |
|
136 | +++ b/scan.c |
134 | { |
|
137 | @@ -1197,6 +1197,9 @@ static void print_ht_op(const uint8_t ty |
135 | --- a/scan.c |
|
138 | printf("\t\t * secondary channel offset: %s\n", |
136 | +++ b/scan.c |
|
139 | ht_secondary_offset[data[1] & 0x3]); |
137 | @@ -1170,6 +1170,7 @@ static void print_ht_op(const uint8_t ty |
|
140 | printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]); |
138 | printf("\t\t * secondary channel offset: %s\n", |
|
141 | +#ifndef IW_FULL |
139 | ht_secondary_offset[data[1] & 0x3]); |
|
142 | + return; |
140 | printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]); |
|
143 | +#endif |
141 | + return; |
|
144 | printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3); |
142 | printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3); |
|
145 | printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]); |
143 | printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]); |
|
146 | printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2); |
144 | printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2); |
|
147 | @@ -1524,6 +1527,14 @@ static void print_ie(const struct ie_pri |
145 | @@ -1497,6 +1498,14 @@ static void print_ie(const struct ie_pri |
|
148 | |
146 | |
|
149 | static const struct ie_print ieprinters[] = { |
147 | static const struct ie_print ieprinters[] = { |
|
150 | [0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, |
148 | [0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), }, |
|
Line 180... | Line 178... | |||
180 | [111] = { "802.11u Roaming Consortium", print_11u_rcon, 0, 255, BIT(PRINT_SCAN), }, |
178 | [111] = { "802.11u Roaming Consortium", print_11u_rcon, 0, 255, BIT(PRINT_SCAN), }, |
|
181 | +#endif |
179 | +#endif |
|
182 | }; |
180 | }; |
|
Line 183... | Line 181... | |||
183 | |
181 | |
|
184 | static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data, |
182 | static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data, |
|
185 | @@ -2026,6 +2031,7 @@ void print_ies(unsigned char *ie, int ie |
183 | @@ -1968,6 +1971,7 @@ void print_ies(unsigned char *ie, int ie |
|
186 | ieprinters[ie[0]].flags & BIT(ptype)) { |
184 | ieprinters[ie[0]].flags & BIT(ptype)) { |
|
187 | print_ie(&ieprinters[ie[0]], |
185 | print_ie(&ieprinters[ie[0]], |
|
188 | ie[0], ie[1], ie + 2, &ie_buffer); |
186 | ie[0], ie[1], ie + 2, &ie_buffer); |
|
189 | +#ifdef IW_FULL |
187 | +#if 0 |
|
190 | } else if (ie[0] == 221 /* vendor */) { |
188 | } else if (ie[0] == 221 /* vendor */) { |
|
191 | print_vendor(ie[1], ie + 2, unknown, ptype); |
189 | print_vendor(ie[1], ie + 2, unknown, ptype); |
|
192 | } else if (unknown) { |
190 | } else if (unknown) { |
|
193 | @@ -2035,6 +2041,7 @@ void print_ies(unsigned char *ie, int ie |
191 | @@ -1977,6 +1981,7 @@ void print_ies(unsigned char *ie, int ie |
|
194 | for (i=0; i<ie[1]; i++) |
192 | for (i=0; i<ie[1]; i++) |
|
195 | printf(" %.2x", ie[2+i]); |
193 | printf(" %.2x", ie[2+i]); |
|
196 | printf("\n"); |
194 | printf("\n"); |
|
197 | +#endif |
195 | +#endif |
|
198 | } |
196 | } |
|
199 | ielen -= ie[1] + 2; |
197 | ielen -= ie[1] + 2; |
|
200 | ie += ie[1] + 2; |
198 | ie += ie[1] + 2; |
|
201 | @@ -2075,6 +2082,7 @@ static void print_capa_non_dmg(__u16 cap |
199 | @@ -2017,6 +2022,7 @@ static void print_capa_non_dmg(__u16 cap |
|
202 | printf(" ESS"); |
200 | printf(" ESS"); |
|
203 | if (capa & WLAN_CAPABILITY_IBSS) |
201 | if (capa & WLAN_CAPABILITY_IBSS) |
|
204 | printf(" IBSS"); |
202 | printf(" IBSS"); |
|
205 | +#ifdef IW_FULL |
203 | +#if 0 |
|
206 | if (capa & WLAN_CAPABILITY_CF_POLLABLE) |
204 | if (capa & WLAN_CAPABILITY_CF_POLLABLE) |
|
207 | printf(" CfPollable"); |
205 | printf(" CfPollable"); |
|
208 | if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST) |
206 | if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST) |
|
209 | @@ -2103,6 +2111,7 @@ static void print_capa_non_dmg(__u16 cap |
207 | @@ -2045,6 +2051,7 @@ static void print_capa_non_dmg(__u16 cap |
|
210 | printf(" DelayedBACK"); |
208 | printf(" DelayedBACK"); |
|
211 | if (capa & WLAN_CAPABILITY_IMM_BACK) |
209 | if (capa & WLAN_CAPABILITY_IMM_BACK) |
|
212 | printf(" ImmediateBACK"); |
210 | printf(" ImmediateBACK"); |
|
213 | +#endif |
211 | +#endif |
|
Line 214... | Line 212... | |||
214 | } |
212 | } |
|
215 | |
213 | |
|
216 | static int print_bss_handler(struct nl_msg *msg, void *arg) |
214 | static int print_bss_handler(struct nl_msg *msg, void *arg) |
|
217 | @@ -2187,8 +2196,10 @@ static int print_bss_handler(struct nl_m |
215 | @@ -2129,8 +2136,10 @@ static int print_bss_handler(struct nl_m |
|
218 | if (bss[NL80211_BSS_FREQUENCY]) { |
216 | if (bss[NL80211_BSS_FREQUENCY]) { |
|
219 | int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]); |
217 | int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]); |
|
220 | printf("\tfreq: %d\n", freq); |
218 | printf("\tfreq: %d\n", freq); |
|
221 | +#ifdef IW_FULL |
219 | +#if 0 |
|
222 | if (freq > 45000) |
220 | if (freq > 45000) |
|
223 | is_dmg = true; |
221 | is_dmg = true; |
|
224 | +#endif |
222 | +#endif |
|
225 | } |
223 | } |
|
226 | if (bss[NL80211_BSS_BEACON_INTERVAL]) |
224 | if (bss[NL80211_BSS_BEACON_INTERVAL]) |
|
227 | printf("\tbeacon interval: %d TUs\n", |
225 | printf("\tbeacon interval: %d TUs\n", |
|
228 | @@ -2382,6 +2393,7 @@ static int handle_stop_sched_scan(struct |
226 | @@ -2319,6 +2328,7 @@ static int handle_stop_sched_scan(struct |
|
Line 229... | Line 227... | |||
229 | return 0; |
227 | return 0; |
|
230 | } |
228 | } |
|
231 | |
229 | |
|
232 | +#ifdef IW_FULL |
230 | +#if 0 |
|
233 | COMMAND(scan, sched_start, |
231 | COMMAND(scan, sched_start, |
|
234 | SCHED_SCAN_OPTIONS, |
232 | SCHED_SCAN_OPTIONS, |
|
235 | NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan, |
233 | NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan, |
|
236 | @@ -2392,3 +2404,4 @@ COMMAND(scan, sched_start, |
234 | @@ -2329,3 +2339,4 @@ COMMAND(scan, sched_start, |
|
237 | COMMAND(scan, sched_stop, "", |
235 | COMMAND(scan, sched_stop, "", |
|
238 | NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan, |
236 | NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan, |
|
239 | "Stop an ongoing scheduled scan."); |
237 | "Stop an ongoing scheduled scan."); |
|
240 | +#endif |
238 | +#endif |
|
Line 241... | Line 239... | |||
241 | --- a/util.c |
239 | --- a/util.c |
|
Line 242... | Line 240... | |||
242 | +++ b/util.c |
240 | +++ b/util.c |
|
243 | @@ -289,6 +289,7 @@ static const char *commands[NL80211_CMD_ |
241 | @@ -281,6 +281,7 @@ static const char *commands[NL80211_CMD_ |
|
244 | |
242 | |
|
245 | static char cmdbuf[100]; |
243 | static char cmdbuf[100]; |
|
246 | |
244 | |
|
247 | +#ifdef IW_FULL |
245 | +#if 0 |
|
248 | const char *command_name(enum nl80211_commands cmd) |
246 | const char *command_name(enum nl80211_commands cmd) |
|
249 | { |
247 | { |
|
250 | if (cmd <= NL80211_CMD_MAX && commands[cmd]) |
248 | if (cmd <= NL80211_CMD_MAX && commands[cmd]) |
|
Line 251... | Line 249... | |||
251 | @@ -296,6 +297,7 @@ const char *command_name(enum nl80211_co |
249 | @@ -288,6 +289,7 @@ const char *command_name(enum nl80211_co |
|
252 | sprintf(cmdbuf, "Unknown command (%d)", cmd); |
250 | sprintf(cmdbuf, "Unknown command (%d)", cmd); |
|
253 | return cmdbuf; |
251 | return cmdbuf; |
|
254 | } |
252 | } |
|
255 | +#endif |
253 | +#endif |
|
Line 256... | Line -... | |||
256 | |
- | ||
257 | int ieee80211_channel_to_frequency(int chan, enum nl80211_band band) |
254 | |
|
258 | { |
- | ||
259 | @@ -434,6 +436,9 @@ int parse_keys(struct nl_msg *msg, char |
255 | int ieee80211_channel_to_frequency(int chan, enum nl80211_band band) |
|
260 | char keybuf[13]; |
256 | { |
|
Line 261... | Line 257... | |||
261 | int pos = 0; |
257 | @@ -426,6 +428,7 @@ int parse_keys(struct nl_msg *msg, char |
|
262 | |
258 | char keybuf[13]; |
|
263 | +#ifndef IW_FULL |
259 | int pos = 0; |
|
Line 264... | Line 260... | |||
264 | + return 1; |
260 | |
|
Line 265... | Line 261... | |||
265 | +#endif |
261 | + return 1; |
|
266 | if (!*argc) |
- | ||
267 | return 1; |
- | ||
268 | |
- | ||
269 | --- a/Makefile |
262 | if (!argc) |
|
270 | +++ b/Makefile |
- | ||
271 | @@ -31,6 +31,12 @@ OBJS-$(HWSIM) += hwsim.o |
263 | return 1; |
|
Line 272... | Line 264... | |||
272 | |
264 | |
|
273 | OBJS += $(OBJS-y) $(OBJS-Y) |
265 | --- a/Makefile |
|
274 | |
266 | +++ b/Makefile |
|
275 | +OBJS_FULL = ocb offch cqm wowlan coalesce roc p2p vendor mgmt ap sha256 nan bloom measurements ftm |
267 | @@ -25,6 +25,8 @@ OBJS-$(HWSIM) += hwsim.o |
|
276 | +ifdef IW_FULL |
268 | |
|
277 | + CFLAGS += -DIW_FULL |
269 | OBJS += $(OBJS-y) $(OBJS-Y) |
|
278 | +else |
270 | |
|
279 | + OBJS:=$(filter-out $(patsubst %,%.o,$(OBJS_FULL)),$(OBJS)) |
271 | +OBJS_DISABLED = ocb offch cqm wowlan coalesce roc p2p ap |
|
280 | +endif |
272 | +OBJS:=$(filter-out $(patsubst %,%.o,$(OBJS_DISABLED)),$(OBJS)) |
|
281 | ALL = iw |
273 | ALL = iw |
|
282 | |
274 | |
|
283 | ifeq ($(NO_PKG_CONFIG),) |
275 | ifeq ($(NO_PKG_CONFIG),) |
|
284 | --- a/station.c |
276 | --- a/station.c |
|
Line 285... | Line 277... | |||
285 | +++ b/station.c |
277 | +++ b/station.c |
|
286 | @@ -709,10 +709,12 @@ static int handle_station_set_plink(stru |
278 | @@ -629,10 +629,12 @@ static int handle_station_set_plink(stru |
|
287 | nla_put_failure: |
279 | nla_put_failure: |
|
288 | return -ENOBUFS; |
280 | return -ENOBUFS; |
|
289 | } |
281 | } |
|
290 | +#ifdef IW_FULL |
282 | +#if 0 |
|
291 | COMMAND_ALIAS(station, set, "<MAC address> plink_action <open|block>", |
283 | COMMAND_ALIAS(station, set, "<MAC address> plink_action <open|block>", |
|
292 | NL80211_CMD_SET_STATION, 0, CIB_NETDEV, handle_station_set_plink, |
284 | NL80211_CMD_SET_STATION, 0, CIB_NETDEV, handle_station_set_plink, |
|
293 | "Set mesh peer link action for this station (peer).", |
285 | "Set mesh peer link action for this station (peer).", |
|
294 | select_station_cmd, station_set_plink); |
286 | select_station_cmd, station_set_plink); |
|
295 | +#endif |
287 | +#endif |
|
296 | |
288 | |
|
297 | static int handle_station_set_vlan(struct nl80211_state *state, |
289 | static int handle_station_set_vlan(struct nl80211_state *state, |
|
Line 298... | Line 290... | |||
298 | struct nl_msg *msg, |
290 | struct nl_msg *msg, |
|
299 | @@ -807,11 +809,13 @@ static int handle_station_set_mesh_power |
291 | @@ -727,11 +729,13 @@ static int handle_station_set_mesh_power |
|
300 | nla_put_failure: |
- | ||
301 | return -ENOBUFS; |
- | ||
302 | } |
- | ||
303 | +#ifdef IW_FULL |
- | ||
304 | COMMAND_ALIAS(station, set, "<MAC address> mesh_power_mode " |
- | ||
305 | "<active|light|deep>", NL80211_CMD_SET_STATION, 0, CIB_NETDEV, |
- | ||
306 | handle_station_set_mesh_power_mode, |
- | ||
307 | "Set link-specific mesh power mode for this station", |
- | ||
308 | select_station_cmd, station_set_mesh_power_mode); |
- | ||
309 | +#endif |
- | ||
310 | |
- | ||
311 | static int handle_station_dump(struct nl80211_state *state, |
- | ||
312 | struct nl_msg *msg, |
- | ||
313 | --- a/interface.c |
- | ||
314 | +++ b/interface.c |
- | ||
315 | @@ -621,9 +621,11 @@ static int handle_interface_wds_peer(str |
- | ||
316 | nla_put_failure: |
- | ||
317 | return -ENOBUFS; |
- | ||
318 | } |
- | ||
319 | +#ifdef IW_FULL |
- | ||
320 | COMMAND(set, peer, "<MAC address>", |
- | ||
321 | NL80211_CMD_SET_WDS_PEER, 0, CIB_NETDEV, handle_interface_wds_peer, |
- | ||
322 | "Set interface WDS peer."); |
- | ||
323 | +#endif |
- | ||
324 | |
- | ||
325 | static int set_mcast_rate(struct nl80211_state *state, |
- | ||
326 | struct nl_msg *msg, |
- | ||
327 | @@ -713,6 +715,7 @@ static int handle_chan(struct nl80211_st |
- | ||
328 | return handle_chanfreq(state, msg, true, argc, argv, id); |
- | ||
329 | } |
- | ||
330 | |
- | ||
331 | +#ifdef IW_FULL |
- | ||
332 | SECTION(switch); |
- | ||
333 | COMMAND(switch, freq, |
- | ||
334 | "<freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]\n" |
- | ||
335 | @@ -721,3 +724,4 @@ COMMAND(switch, freq, |
- | ||
336 | "Switch the operating channel by sending a channel switch announcement (CSA)."); |
- | ||
337 | COMMAND(switch, channel, "<channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]", |
- | ||
338 | NL80211_CMD_CHANNEL_SWITCH, 0, CIB_NETDEV, handle_chan, NULL); |
- | ||
339 | +#endif |
- | ||
340 | --- a/phy.c |
- | ||
341 | +++ b/phy.c |
- | ||
342 | @@ -359,6 +359,7 @@ static int handle_cac(struct nl80211_sta |
- | ||
343 | |
- | ||
344 | return 0; |
- |