|
@@ -132,7 +132,7 @@
|
|
|
{
|
|
{
|
|
|
--- a/scan.c
|
|
--- a/scan.c
|
|
|
+++ b/scan.c
|
|
+++ b/scan.c
|
|
|
-@@ -1308,6 +1308,9 @@ static void print_ht_op(const uint8_t ty
|
|
|
|
|
|
|
+@@ -1309,6 +1309,9 @@ static void print_ht_op(const uint8_t ty
|
|
|
printf("\t\t * secondary channel offset: %s\n",
|
|
printf("\t\t * secondary channel offset: %s\n",
|
|
|
ht_secondary_offset[data[1] & 0x3]);
|
|
ht_secondary_offset[data[1] & 0x3]);
|
|
|
printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]);
|
|
printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]);
|
|
@@ -142,55 +142,62 @@
|
|
|
printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3);
|
|
printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3);
|
|
|
printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]);
|
|
printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]);
|
|
|
printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2);
|
|
printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2);
|
|
|
-@@ -1818,30 +1821,31 @@ static void print_ie(const struct ie_pri
|
|
|
|
|
|
|
+@@ -1808,17 +1811,25 @@ static void print_ie(const struct ie_pri
|
|
|
static const struct ie_print ieprinters[] = {
|
|
static const struct ie_print ieprinters[] = {
|
|
|
- [0] = { "SSID", print_ssid, 0, 32,
|
|
|
|
|
- BIT(PRINT_SCAN) | BIT(PRINT_LINK) | BIT(PRINT_LINK_MLO_MLD), },
|
|
|
|
|
-+ [11] = { "BSS Load", print_bss_load, 5, 5, BIT(PRINT_SCAN), },
|
|
|
|
|
-+ [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
|
|
|
|
|
-+ [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
-+ [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
|
|
|
|
|
-+ [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
|
|
|
|
|
-+ [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
|
|
|
|
|
-+ [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
-+ [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
|
|
+ [EID_SSID] = { "SSID", print_ssid, 0, 32,
|
|
|
|
|
+ BIT(PRINT_SCAN) | BIT(PRINT_LINK) | BIT(PRINT_LINK_MLO_MLD), },
|
|
|
|
|
++ [EID_BSS_LOAD] = { "BSS Load", print_bss_load, 5, 5, BIT(PRINT_SCAN), },
|
|
|
|
|
++ [EID_HT_CAPABILITY] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
|
|
|
|
|
++ [EID_RSN] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
++ [EID_HT_OPERATION] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
|
|
|
|
|
++ [EID_SECONDARY_CH_OFFSET] = { "Secondary Channel Offset",
|
|
|
|
|
++ print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
|
|
|
|
|
++ [EID_MESH_ID] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
|
|
|
|
|
++ [EID_VHT_CAPABILITY] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
++ [EID_VHT_OPERATION] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
|
|
|
+#ifdef IW_FULL
|
|
+#ifdef IW_FULL
|
|
|
- [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), },
|
|
|
|
|
- [6] = { "IBSS ATIM window", print_ibssatim, 2, 2, BIT(PRINT_SCAN), },
|
|
|
|
|
- [7] = { "Country", print_country, 3, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
-- [11] = { "BSS Load", print_bss_load, 5, 5, BIT(PRINT_SCAN), },
|
|
|
|
|
- [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), },
|
|
|
|
|
-- [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
|
|
|
|
|
- [47] = { "ERP D4.0", print_erp, 1, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
- [51] = { "AP Channel Report", print_ap_channel_report, 1, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
- [59] = { "Supported operating classes", print_supp_op_classes, 1, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
- [66] = { "Measurement Pilot Transmission", print_measurement_pilot_tx, 1, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
- [74] = { "Overlapping BSS scan params", print_obss_scan_params, 14, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
-- [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
|
|
|
|
|
-- [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
|
|
|
|
|
-- [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
-- [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
-- [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
- [50] = { "Extended supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
- [70] = { "RM enabled capabilities", print_rm_enabled_capabilities, 5, 5, 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), },
|
|
|
|
|
- [127] = { "Extended capabilities", print_capabilities, 0, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
- [107] = { "802.11u Interworking", print_interworking, 0, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
- [108] = { "802.11u Advertisement", print_11u_advert, 0, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
-@@ -1850,6 +1854,7 @@ static const struct ie_print ieprinters[
|
|
|
|
|
- [214] = { "Short beacon interval", print_short_beacon_int, 2, 2, BIT(PRINT_SCAN), },
|
|
|
|
|
- [217] = { "S1G capabilities", print_s1g_capa, 15, 15, BIT(PRINT_SCAN), },
|
|
|
|
|
- [232] = { "S1G operation", print_s1g_oper, 6, 6, BIT(PRINT_SCAN), },
|
|
|
|
|
|
|
+ [EID_SUPP_RATES] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_DS_PARAMS] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_TIM] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_IBSS_TIM_PARAMS] = { "IBSS ATIM window", print_ibssatim, 2, 2, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_COUNTRY] = { "Country", print_country, 3, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+- [EID_BSS_LOAD] = { "BSS Load", print_bss_load, 5, 5, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_POWER_CONSTRAINT] = { "Power constraint", print_powerconstraint,
|
|
|
|
|
+ 1, 1, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_TPC_REPORT] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_ERP_INFO] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+- [EID_HT_CAPABILITY] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_ERP_D4_0] = { "ERP D4.0", print_erp, 1, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_AP_CHAN_REPORT] = { "AP Channel Report", print_ap_channel_report,
|
|
|
|
|
+ 1, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+@@ -1828,18 +1839,11 @@ static const struct ie_print ieprinters[
|
|
|
|
|
+ print_measurement_pilot_tx, 1, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_OVERLAP_BSS_SCAN_PARAM] = { "Overlapping BSS scan params",
|
|
|
|
|
+ print_obss_scan_params, 14, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+- [EID_HT_OPERATION] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
|
|
|
|
|
+- [EID_SECONDARY_CH_OFFSET] = { "Secondary Channel Offset",
|
|
|
|
|
+- print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
|
|
|
|
|
+- [EID_VHT_CAPABILITY] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+- [EID_VHT_OPERATION] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+- [EID_RSN] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_EXT_SUPP_RATES] = { "Extended supported rates", print_supprates,
|
|
|
|
|
+ 0, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_RM_ENABLED_CAPABILITIES] = { "RM enabled capabilities",
|
|
|
|
|
+ print_rm_enabled_capabilities, 5, 5, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_MESH_CONFIG] = { "MESH Configuration", print_mesh_conf, 7, 7, BIT(PRINT_SCAN), },
|
|
|
|
|
+- [EID_MESH_ID] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
|
|
|
|
|
+ [EID_EXT_CAPABILITY] = { "Extended capabilities", print_capabilities,
|
|
|
|
|
+ 0, 255, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_INTERWORKING] = { "802.11u Interworking", print_interworking,
|
|
|
|
|
+@@ -1854,6 +1858,7 @@ static const struct ie_print ieprinters[
|
|
|
|
|
+ print_short_beacon_int, 2, 2, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_S1G_CAPABILITY] = { "S1G capabilities", print_s1g_capa, 15, 15, BIT(PRINT_SCAN), },
|
|
|
|
|
+ [EID_S1G_OPERATION] = { "S1G operation", print_s1g_oper, 6, 6, BIT(PRINT_SCAN), },
|
|
|
+#endif
|
|
+#endif
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data,
|
|
static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data,
|
|
|
-@@ -2185,8 +2190,10 @@ static void print_wifi_wps(const uint8_t
|
|
|
|
|
|
|
+@@ -2189,8 +2194,10 @@ static void print_wifi_wps(const uint8_t
|
|
|
|
|
|
|
|
static const struct ie_print wifiprinters[] = {
|
|
static const struct ie_print wifiprinters[] = {
|
|
|
[1] = { "WPA", print_wifi_wpa, 2, 255, BIT(PRINT_SCAN), },
|
|
[1] = { "WPA", print_wifi_wpa, 2, 255, BIT(PRINT_SCAN), },
|
|
@@ -201,7 +208,7 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
static inline void print_p2p(const uint8_t type, uint8_t len,
|
|
static inline void print_p2p(const uint8_t type, uint8_t len,
|
|
|
-@@ -2349,6 +2356,10 @@ static void print_vendor(unsigned char l
|
|
|
|
|
|
|
+@@ -2353,6 +2360,10 @@ static void print_vendor(unsigned char l
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -212,7 +219,7 @@
|
|
|
if (len >= 4 && memcmp(data, wfa_oui, 3) == 0) {
|
|
if (len >= 4 && memcmp(data, wfa_oui, 3) == 0) {
|
|
|
if (data[3] < ARRAY_SIZE(wfa_printers) &&
|
|
if (data[3] < ARRAY_SIZE(wfa_printers) &&
|
|
|
wfa_printers[data[3]].name &&
|
|
wfa_printers[data[3]].name &&
|
|
|
-@@ -2491,6 +2502,7 @@ static void print_capa_non_dmg(__u16 cap
|
|
|
|
|
|
|
+@@ -2544,6 +2555,7 @@ static void print_capa_non_dmg(__u16 cap
|
|
|
printf(" ESS");
|
|
printf(" ESS");
|
|
|
if (capa & WLAN_CAPABILITY_IBSS)
|
|
if (capa & WLAN_CAPABILITY_IBSS)
|
|
|
printf(" IBSS");
|
|
printf(" IBSS");
|
|
@@ -220,7 +227,7 @@
|
|
|
if (capa & WLAN_CAPABILITY_CF_POLLABLE)
|
|
if (capa & WLAN_CAPABILITY_CF_POLLABLE)
|
|
|
printf(" CfPollable");
|
|
printf(" CfPollable");
|
|
|
if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
|
|
if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
|
|
|
-@@ -2519,6 +2531,7 @@ static void print_capa_non_dmg(__u16 cap
|
|
|
|
|
|
|
+@@ -2572,6 +2584,7 @@ static void print_capa_non_dmg(__u16 cap
|
|
|
printf(" DelayedBACK");
|
|
printf(" DelayedBACK");
|
|
|
if (capa & WLAN_CAPABILITY_IMM_BACK)
|
|
if (capa & WLAN_CAPABILITY_IMM_BACK)
|
|
|
printf(" ImmediateBACK");
|
|
printf(" ImmediateBACK");
|
|
@@ -228,7 +235,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static int print_bss_handler(struct nl_msg *msg, void *arg)
|
|
static int print_bss_handler(struct nl_msg *msg, void *arg)
|
|
|
-@@ -2609,8 +2622,10 @@ static int print_bss_handler(struct nl_m
|
|
|
|
|
|
|
+@@ -2662,8 +2675,10 @@ static int print_bss_handler(struct nl_m
|
|
|
else
|
|
else
|
|
|
printf("\tfreq: %d\n", freq);
|
|
printf("\tfreq: %d\n", freq);
|
|
|
|
|
|
|
@@ -239,7 +246,7 @@
|
|
|
}
|
|
}
|
|
|
if (bss[NL80211_BSS_BEACON_INTERVAL])
|
|
if (bss[NL80211_BSS_BEACON_INTERVAL])
|
|
|
printf("\tbeacon interval: %d TUs\n",
|
|
printf("\tbeacon interval: %d TUs\n",
|
|
|
-@@ -2804,6 +2819,7 @@ static int handle_stop_sched_scan(struct
|
|
|
|
|
|
|
+@@ -2857,6 +2872,7 @@ static int handle_stop_sched_scan(struct
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -247,7 +254,7 @@
|
|
|
COMMAND(scan, sched_start,
|
|
COMMAND(scan, sched_start,
|
|
|
SCHED_SCAN_OPTIONS,
|
|
SCHED_SCAN_OPTIONS,
|
|
|
NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan,
|
|
NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan,
|
|
|
-@@ -2814,3 +2830,4 @@ COMMAND(scan, sched_start,
|
|
|
|
|
|
|
+@@ -2867,3 +2883,4 @@ COMMAND(scan, sched_start,
|
|
|
COMMAND(scan, sched_stop, "",
|
|
COMMAND(scan, sched_stop, "",
|
|
|
NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan,
|
|
NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan,
|
|
|
"Stop an ongoing scheduled scan.");
|
|
"Stop an ongoing scheduled scan.");
|