3 @@ -699,6 +699,7 @@ static int print_event(struct nl_msg *ms
8 case NL80211_CMD_NEW_WIPHY:
9 printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]));
11 @@ -734,6 +735,7 @@ static int print_event(struct nl_msg *ms
12 case NL80211_CMD_SCHED_SCAN_RESULTS:
13 printf("got scheduled scan results\n");
16 case NL80211_CMD_REG_CHANGE:
17 printf("regulatory domain change: ");
19 @@ -812,6 +814,7 @@ static int print_event(struct nl_msg *ms
20 mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
21 printf("del station %s\n", macbuf);
24 case NL80211_CMD_JOIN_IBSS:
25 mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
26 printf("IBSS %s joined\n", macbuf);
27 @@ -989,9 +992,9 @@ static int print_event(struct nl_msg *ms
33 - printf("unknown event %d (%s)\n",
34 - gnlh->cmd, command_name(gnlh->cmd));
35 + printf("unknown event %d\n", gnlh->cmd);
41 @@ -164,6 +164,7 @@ static int print_phy_handler(struct nl_m
42 tb_band[NL80211_BAND_ATTR_VHT_MCS_SET])
43 print_vht_info(nla_get_u32(tb_band[NL80211_BAND_ATTR_VHT_CAPA]),
44 nla_data(tb_band[NL80211_BAND_ATTR_VHT_MCS_SET]));
46 if (tb_band[NL80211_BAND_ATTR_IFTYPE_DATA]) {
47 struct nlattr *nl_iftype;
49 @@ -171,6 +172,7 @@ static int print_phy_handler(struct nl_m
50 nla_for_each_nested(nl_iftype, tb_band[NL80211_BAND_ATTR_IFTYPE_DATA], rem_band)
51 print_he_info(nl_iftype);
54 if (tb_band[NL80211_BAND_ATTR_FREQS]) {
56 printf("\t\tFrequencies:\n");
57 @@ -213,6 +215,7 @@ next:
62 if (tb_band[NL80211_BAND_ATTR_RATES]) {
63 printf("\t\tBitrates (non-HT):\n");
64 nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) {
65 @@ -229,6 +232,7 @@ next:
73 @@ -294,6 +298,7 @@ next:
74 printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
78 if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) {
79 int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
81 @@ -305,6 +310,7 @@ next:
82 cipher_name(ciphers[i]));
87 if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] &&
88 tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX])
89 @@ -324,11 +330,13 @@ next:
90 printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
94 if (tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]) {
95 printf("\tsoftware interface modes (can always be added):\n");
96 nla_for_each_nested(nl_mode, tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES], rem_mode)
97 printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
101 if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) {
102 struct nlattr *nl_combi;
103 @@ -425,6 +433,7 @@ broken_combination:
104 printf("\tinterface combinations are not supported\n");
108 if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) {
109 printf("\tSupported commands:\n");
110 nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd)
111 @@ -522,6 +531,7 @@ broken_combination:
112 printf("\t\t * wake up on TCP connection\n");
117 if (tb_msg[NL80211_ATTR_ROAM_SUPPORT])
118 printf("\tDevice supports roaming.\n");
119 @@ -560,6 +570,7 @@ broken_combination:
124 if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
125 unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
127 @@ -624,6 +635,7 @@ broken_combination:
128 if (features & NL80211_FEATURE_ND_RANDOM_MAC_ADDR)
129 printf("\tDevice supports randomizing MAC-addr in net-detect scans.\n");
133 if (tb_msg[NL80211_ATTR_TDLS_SUPPORT])
134 printf("\tDevice supports T-DLS.\n");
135 @@ -732,6 +744,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
136 "List all wireless devices and their capabilities.");
137 TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL);
140 static int handle_commands(struct nl80211_state *state, struct nl_msg *msg,
141 int argc, char **argv, enum id_input id)
143 @@ -743,6 +756,7 @@ static int handle_commands(struct nl8021
145 TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands,
146 "list all known commands and their decimal & hex value");
149 static int print_feature_handler(struct nl_msg *msg, void *arg)
153 @@ -1197,6 +1197,9 @@ static void print_ht_op(const uint8_t ty
154 printf("\t\t * secondary channel offset: %s\n",
155 ht_secondary_offset[data[1] & 0x3]);
156 printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]);
160 printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3);
161 printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]);
162 printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2);
163 @@ -1524,6 +1527,14 @@ static void print_ie(const struct ie_pri
165 static const struct ie_print ieprinters[] = {
166 [0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
167 + [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
168 + [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
169 + [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
170 + [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
171 + [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
172 + [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
173 + [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
175 [1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
176 [3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), },
177 [5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), },
178 @@ -1533,21 +1544,15 @@ static const struct ie_print ieprinters[
179 [32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), },
180 [35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), },
181 [42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), },
182 - [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
183 [47] = { "ERP D4.0", print_erp, 1, 255, BIT(PRINT_SCAN), },
184 [74] = { "Overlapping BSS scan params", print_obss_scan_params, 14, 255, BIT(PRINT_SCAN), },
185 - [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
186 - [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
187 - [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
188 - [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
189 - [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
190 [50] = { "Extended supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
191 [113] = { "MESH Configuration", print_mesh_conf, 7, 7, BIT(PRINT_SCAN), },
192 - [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
193 [127] = { "Extended capabilities", print_capabilities, 0, 255, BIT(PRINT_SCAN), },
194 [107] = { "802.11u Interworking", print_interworking, 0, 255, BIT(PRINT_SCAN), },
195 [108] = { "802.11u Advertisement", print_11u_advert, 0, 255, BIT(PRINT_SCAN), },
196 [111] = { "802.11u Roaming Consortium", print_11u_rcon, 0, 255, BIT(PRINT_SCAN), },
200 static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data,
201 @@ -2026,6 +2031,7 @@ void print_ies(unsigned char *ie, int ie
202 ieprinters[ie[0]].flags & BIT(ptype)) {
203 print_ie(&ieprinters[ie[0]],
204 ie[0], ie[1], ie + 2, &ie_buffer);
206 } else if (ie[0] == 221 /* vendor */) {
207 print_vendor(ie[1], ie + 2, unknown, ptype);
208 } else if (unknown) {
209 @@ -2035,6 +2041,7 @@ void print_ies(unsigned char *ie, int ie
210 for (i=0; i<ie[1]; i++)
211 printf(" %.2x", ie[2+i]);
217 @@ -2075,6 +2082,7 @@ static void print_capa_non_dmg(__u16 cap
219 if (capa & WLAN_CAPABILITY_IBSS)
222 if (capa & WLAN_CAPABILITY_CF_POLLABLE)
223 printf(" CfPollable");
224 if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
225 @@ -2103,6 +2111,7 @@ static void print_capa_non_dmg(__u16 cap
226 printf(" DelayedBACK");
227 if (capa & WLAN_CAPABILITY_IMM_BACK)
228 printf(" ImmediateBACK");
232 static int print_bss_handler(struct nl_msg *msg, void *arg)
233 @@ -2187,8 +2196,10 @@ static int print_bss_handler(struct nl_m
234 if (bss[NL80211_BSS_FREQUENCY]) {
235 int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]);
236 printf("\tfreq: %d\n", freq);
242 if (bss[NL80211_BSS_BEACON_INTERVAL])
243 printf("\tbeacon interval: %d TUs\n",
244 @@ -2382,6 +2393,7 @@ static int handle_stop_sched_scan(struct
249 COMMAND(scan, sched_start,
251 NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan,
252 @@ -2392,3 +2404,4 @@ COMMAND(scan, sched_start,
253 COMMAND(scan, sched_stop, "",
254 NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan,
255 "Stop an ongoing scheduled scan.");
259 @@ -291,6 +291,7 @@ static const char *commands[NL80211_CMD_
261 static char cmdbuf[100];
264 const char *command_name(enum nl80211_commands cmd)
266 if (cmd <= NL80211_CMD_MAX && commands[cmd])
267 @@ -298,6 +299,7 @@ const char *command_name(enum nl80211_co
268 sprintf(cmdbuf, "Unknown command (%d)", cmd);
273 int ieee80211_channel_to_frequency(int chan, enum nl80211_band band)
275 @@ -436,6 +438,9 @@ int parse_keys(struct nl_msg *msg, char
287 @@ -22,6 +22,12 @@ _OBJS := $(sort $(patsubst %.c,%.o,$(wil
288 VERSION_OBJS := $(filter-out version.o, $(_OBJS))
289 OBJS := $(VERSION_OBJS) version.o
291 +OBJS_FULL = ocb offch cqm wowlan coalesce roc p2p vendor mgmt ap sha256 nan bloom measurements ftm
293 + CFLAGS += -DIW_FULL
295 + OBJS:=$(filter-out $(patsubst %,%.o,$(OBJS_FULL)),$(OBJS))
299 ifeq ($(NO_PKG_CONFIG),)
302 @@ -736,10 +736,12 @@ static int handle_station_set_plink(stru
307 COMMAND_ALIAS(station, set, "<MAC address> plink_action <open|block>",
308 NL80211_CMD_SET_STATION, 0, CIB_NETDEV, handle_station_set_plink,
309 "Set mesh peer link action for this station (peer).",
310 select_station_cmd, station_set_plink);
313 static int handle_station_set_vlan(struct nl80211_state *state,
315 @@ -834,11 +836,13 @@ static int handle_station_set_mesh_power
320 COMMAND_ALIAS(station, set, "<MAC address> mesh_power_mode "
321 "<active|light|deep>", NL80211_CMD_SET_STATION, 0, CIB_NETDEV,
322 handle_station_set_mesh_power_mode,
323 "Set link-specific mesh power mode for this station",
324 select_station_cmd, station_set_mesh_power_mode);
327 static int handle_station_set_airtime_weight(struct nl80211_state *state,
331 @@ -627,9 +627,11 @@ static int handle_interface_wds_peer(str
336 COMMAND(set, peer, "<MAC address>",
337 NL80211_CMD_SET_WDS_PEER, 0, CIB_NETDEV, handle_interface_wds_peer,
338 "Set interface WDS peer.");
341 static int set_mcast_rate(struct nl80211_state *state,
343 @@ -719,6 +721,7 @@ static int handle_chan(struct nl80211_st
344 return handle_chanfreq(state, msg, true, argc, argv, id);
349 COMMAND(switch, freq,
350 "<freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]\n"
351 @@ -727,3 +730,4 @@ COMMAND(switch, freq,
352 "Switch the operating channel by sending a channel switch announcement (CSA).");
353 COMMAND(switch, channel, "<channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]",
354 NL80211_CMD_CHANNEL_SWITCH, 0, CIB_NETDEV, handle_chan, NULL);
358 @@ -369,6 +369,7 @@ err_out:
359 free(cac_trigger_argv);
363 TOPLEVEL(cac, "channel <channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n"
364 "freq <freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n"
365 "freq <control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]",
366 @@ -380,6 +381,7 @@ COMMAND(cac, trigger,
367 NL80211_CMD_RADAR_DETECT, 0, CIB_NETDEV, handle_cac_trigger,
368 "Start or trigger a channel availability check (CAC) looking to look for\n"
369 "radars on the given channel.");
372 static int handle_fragmentation(struct nl80211_state *state,