Skip to content

Commit 7c141fc

Browse files
committed
QuickTrack R3.0 changes
1 parent 3cdeae1 commit 7c141fc

13 files changed

+797
-46
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ TYPE = laptop
33
# Role is dut or platform or sniffer
44
ROLE = dut
55
# Package Version
6-
VERSION = "2.3.0.238"
6+
VERSION = "3.0.0.12"
77

88
OBJS = main.o eloop.o indigo_api.o indigo_packet.o utils.o wpa_ctrl.o
99
CFLAGS += -g
@@ -26,12 +26,14 @@ LD = /openwrt/qsdk/staging_dir/toolchain-aarch64/bin/aarch64-openwrt-linux-ld
2626
# _OPENWRT_: Use OPENWRT
2727
CFLAGS += -D_OPENWRT_
2828
CFLAGS += -DHOSTAPD_SUPPORT_MBSSID_WAR
29+
CFLAGS += -DSUPPORT_THROUGHPUT_TEST
2930
endif
3031

3132
# Define the app is for DUT or platform
3233
ifeq ($(ROLE),dut)
3334
OBJS += indigo_api_callback_dut.o vendor_specific_dut.o
3435
CFLAGS += -D_DUT_
36+
CFLAGS += -DSCAN_ENTRY_FLUSH
3537
else ifeq ($(ROLE), sniffer)
3638
OBJS += indigo_api_callback_sniffer.o vendor_specific_sniffer.o
3739
CFLAGS += -D_TEST_SNIFFER_

indigo_api.c

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ struct indigo_api indigo_api_list[] = {
3535
{ API_AP_SEND_DISCONNECT, "AP_SEND_DISCONNECT", NULL, NULL },
3636
{ API_AP_SET_PARAM, "API_AP_SET_PARAM", NULL, NULL },
3737
{ API_AP_SEND_BTM_REQ, "API_AP_SEND_BTM_REQ", NULL, NULL },
38-
{ API_AP_SEND_ARP_MSGS, "API_AP_SEND_ARP_MSGS", NULL, NULL },
3938
{ API_AP_START_WPS, "AP_START_WPS", NULL, NULL },
4039
{ API_AP_CONFIGURE_WSC, "AP_CONFIGURE_WSC", NULL, NULL },
4140
{ API_AP_REKEY_GTK, "AP_REKEY_GTK", NULL, NULL },
41+
{ API_AP_SET_MCS_RATES, "AP_SET_MCS_RATES", NULL, NULL },
4242
/* Station specific */
4343
{ API_STA_START_UP, "STA_START_UP", NULL, NULL },
4444
{ API_STA_ASSOCIATE, "STA_ASSOCIATE", NULL, NULL },
@@ -73,6 +73,8 @@ struct indigo_api indigo_api_list[] = {
7373
{ API_STA_INJECT_START, "STA_INJECT_START", NULL, NULL },
7474
{ API_STA_INJECT_FRAME, "STA_INJECT_FRAME", NULL, NULL },
7575
{ API_STA_INJECT_STOP, "STA_INJECT_STOP", NULL, NULL },
76+
{ API_TG_SERVER_START, "TG_SERVER_START", NULL, NULL },
77+
{ API_TG_SERVER_STOP, "TG_SERVER_STOP", NULL, NULL },
7678
{ API_SNIFFER_START, "SNIFFER_START", NULL, NULL },
7779
{ API_SNIFFER_STOP, "SNIFFER_STOP", NULL, NULL },
7880
{ API_SNIFFER_UPLOAD_FILE, "SNIFFER_UPLOAD_FILE", NULL, NULL },
@@ -92,6 +94,7 @@ struct indigo_api indigo_api_list[] = {
9294
{ API_STOP_DHCP, "STOP_DHCP", NULL, NULL },
9395
{ API_GET_WSC_PIN, "GET_WSC_PIN", NULL, NULL },
9496
{ API_GET_WSC_CRED, "GET_WSC_CRED", NULL, NULL },
97+
{ API_SEND_ARP_MSGS, "API_SEND_ARP_MSGS", NULL, NULL },
9598
};
9699

97100
/* Structure to declare the TLV list */
@@ -304,6 +307,43 @@ struct indigo_tlv indigo_tlv_list[] = {
304307
{ TLV_OCV, "OCV" },
305308
{ TLV_MLD_FORCE_SINGLE_LINK, "MLD_FORCE_SINGLE_LINK" },
306309
{ TLV_MLD_CONNECT_BAND_PREF, "MLD_CONNECT_BAND_PREF" },
310+
{ TLV_RX_SS_SUPPORT, "RX_SS_SUPPORT" },
311+
{ TLV_MCS_INDEX, "MCS_INDEX" },
312+
{ TLV_TX_NSS, "TX_NSS" },
313+
{ TLV_TG_SRV_IP, "TG_SRV_IP" },
314+
{ TLV_TG_SRV_PORT, "TG_SRV_PORT" },
315+
{ TLV_TRANS_PROTO, "TRANS_PROTO" },
316+
{ TLV_TG_TYPE, "TG_TYPE" },
317+
{ TLV_STA_HT_MCS, "STA_HT_MCS" },
318+
{ TLV_STA_VHT_CAPA, "STA_VHT_CAPA" },
319+
{ TLV_STA_VHT_CAPA_MASK, "STA_VHT_CAPA_MASK" },
320+
{ TLV_STA_VHT_RX_MCS_NSS_1, "STA_VHT_RX_MCS_NSS_1" },
321+
{ TLV_STA_VHT_TX_MCS_NSS_1, "STA_VHT_TX_MCS_NSS_1" },
322+
{ TLV_STA_VHT_RX_MCS_NSS_2, "STA_VHT_RX_MCS_NSS_2" },
323+
{ TLV_STA_VHT_TX_MCS_NSS_2, "STA_VHT_TX_MCS_NSS_2" },
324+
{ TLV_RSN_OVERRIDE_KEY_MGMT, "RSN_OVERRIDE_KEY_MGMT" },
325+
{ TLV_RSN_OVERRIDE_PAIRWISE, "RSN_OVERRIDE_PAIRWISE" },
326+
{ TLV_RSN_OVERRIDE_MFP, "RSN_OVERRIDE_MFP" },
327+
{ TLV_RSN_OVERRIDE_2_KEY_MGMT, "RSN_OVERRIDE_2_KEY_MGMT" },
328+
{ TLV_RSN_OVERRIDE_2_PAIRWISE, "RSN_OVERRIDE_2_PAIRWISE" },
329+
{ TLV_RSN_OVERRIDE_2_MFP, "RSN_OVERRIDE_2_MFP" },
330+
{ TLV_RSNE_OVERRIDE, "RSNE_OVERRIDE" },
331+
{ TLV_RSNOE_OVERRIDE, "RSNOE_OVERRIDE" },
332+
{ TLV_RSNO2E_OVERRIDE, "RSNO2E_OVERRIDE" },
333+
{ TLV_STA_RSN_OVERRIDING, "STA_RSN_OVERRIDING" },
334+
{ TLV_RSNXE_OVERRIDE, "RSNXE_OVERRIDE" },
335+
{ TLV_RSNXOE_OVERRIDE, "RSNXOE_OVERRIDE" },
336+
{ TLV_EAPOL_KEY_RESERVED_RANDOM, "EAPOL_KEY_RESERVED_RANDOM" },
337+
{ TLV_VENDOR_ELEMENTS, "VENDOR_ELEMENTS" },
338+
{ TLV_ASSOCRESP_ELEMENTS, "ASSOCRESP_ELEMENTS" },
339+
{ TLV_HE_6G_REG_PWR_TYPE, "HE_6G_REG_PWR_TYPE" },
340+
{ TLV_ELEMENT_EXTEND, "ELEMENT_EXTEND" },
341+
{ TLV_RNR, "RNR" },
342+
{ TLV_LARGE_BEACON_VS_SIZE, "LARGE_BEACON_VS_SIZE" },
343+
{ TLV_DTIM_PERIOD, "DTIM_PERIOD" },
344+
{ TLV_ELEMENT_RESERVED_BITS, "ELEMENT_RESERVED_BITS" },
345+
{ TLV_ELEMENT_UNTESTED_BITS, "ELEMENT_UNTESTED_BITS" },
346+
{ TLV_ML_CTRL_EXT_MLD_CAPA_PRES_BIT, "ML_CTRL_EXT_MLD_CAPA_PRES_BIT" },
307347
};
308348

309349
/* Find the type of the API stucture by the ID from the list */

indigo_api.h

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ struct indigo_api {
4848
#define API_AP_SEND_DISCONNECT 0x1004
4949
#define API_AP_SET_PARAM 0x1005
5050
#define API_AP_SEND_BTM_REQ 0x1006
51-
#define API_AP_SEND_ARP_MSGS 0x1007
5251
#define API_AP_START_WPS 0x1008
5352
#define API_AP_CONFIGURE_WSC 0x1009
5453
#define API_AP_REKEY_GTK 0x100a
54+
#define API_AP_SET_MCS_RATES 0x100b
5555

5656
#define API_STA_ASSOCIATE 0x2000
5757
#define API_STA_CONFIGURE 0x2001
@@ -86,6 +86,8 @@ struct indigo_api {
8686
#define API_STA_INJECT_START 0x201e
8787
#define API_STA_INJECT_FRAME 0x201f
8888
#define API_STA_INJECT_STOP 0x2020
89+
#define API_TG_SERVER_START 0x2021
90+
#define API_TG_SERVER_STOP 0x2022
8991

9092
#define API_SNIFFER_START 0x3000
9193
#define API_SNIFFER_STOP 0x3001
@@ -106,6 +108,7 @@ struct indigo_api {
106108
#define API_STOP_DHCP 0x500b
107109
#define API_GET_WSC_PIN 0x500c
108110
#define API_GET_WSC_CRED 0x500d
111+
#define API_SEND_ARP_MSGS 0x500e
109112

110113
/* TLV definition */
111114
#define TLV_SSID 0x0001
@@ -315,6 +318,45 @@ struct indigo_api {
315318
#define TLV_OCV 0x00f4
316319
#define TLV_MLD_FORCE_SINGLE_LINK 0x00f5
317320
#define TLV_MLD_CONNECT_BAND_PREF 0x00f6
321+
#define TLV_RX_SS_SUPPORT 0x00f7
322+
#define TLV_MCS_INDEX 0x00f8
323+
#define TLV_TX_NSS 0x00f9
324+
#define TLV_TG_SRV_IP 0x00fa
325+
#define TLV_TG_SRV_PORT 0x00fb
326+
#define TLV_TRANS_PROTO 0x00fe
327+
#define TLV_TG_TYPE 0x00ff
328+
// 0100 - 0102: used by traffic generator
329+
#define TLV_STA_HT_MCS 0x0103
330+
#define TLV_STA_VHT_CAPA 0x0104
331+
#define TLV_STA_VHT_CAPA_MASK 0x0105
332+
#define TLV_STA_VHT_RX_MCS_NSS_2 0x0106
333+
#define TLV_STA_VHT_TX_MCS_NSS_2 0x0107
334+
#define TLV_STA_VHT_RX_MCS_NSS_1 0x0108
335+
#define TLV_STA_VHT_TX_MCS_NSS_1 0x0109
336+
// 010a: used by traffic generator
337+
#define TLV_RSN_OVERRIDE_KEY_MGMT 0x010b
338+
#define TLV_RSN_OVERRIDE_PAIRWISE 0x010c
339+
#define TLV_RSN_OVERRIDE_MFP 0x010d
340+
#define TLV_RSN_OVERRIDE_2_KEY_MGMT 0x010e
341+
#define TLV_RSN_OVERRIDE_2_PAIRWISE 0x010f
342+
#define TLV_RSN_OVERRIDE_2_MFP 0x0110
343+
#define TLV_RSNE_OVERRIDE 0x0111
344+
#define TLV_RSNOE_OVERRIDE 0x0112
345+
#define TLV_RSNO2E_OVERRIDE 0x0113
346+
#define TLV_STA_RSN_OVERRIDING 0x0114
347+
#define TLV_RSNXE_OVERRIDE 0x0115
348+
#define TLV_RSNXOE_OVERRIDE 0x0116
349+
#define TLV_EAPOL_KEY_RESERVED_RANDOM 0x0117
350+
#define TLV_VENDOR_ELEMENTS 0x0118
351+
#define TLV_ASSOCRESP_ELEMENTS 0x0119
352+
#define TLV_HE_6G_REG_PWR_TYPE 0x011a
353+
#define TLV_ELEMENT_EXTEND 0x011b
354+
#define TLV_RNR 0x011c
355+
#define TLV_LARGE_BEACON_VS_SIZE 0x011d
356+
#define TLV_DTIM_PERIOD 0x011e
357+
#define TLV_ELEMENT_RESERVED_BITS 0x011f
358+
#define TLV_ELEMENT_UNTESTED_BITS 0x0120
359+
#define TLV_ML_CTRL_EXT_MLD_CAPA_PRES_BIT 0x0121
318360

319361
// class ResponseTLV
320362
// List of TLV used in the QuickTrack API response and ACK messages from the DUT
@@ -396,6 +438,7 @@ struct indigo_api {
396438
#define TLV_VALUE_RESET_NOT_OK "Failed to run Device reset"
397439
#define TLV_VALUE_POWER_SAVE_OK "Set power save value successfully"
398440
#define TLV_VALUE_POWER_SAVE_NOT_OK "Failed to set power save value"
441+
#define TLV_VALUE_TG_SRV_NOT_OK "Failed to start traffic generator server"
399442

400443
#define TLV_VALUE_P2P_FIND_NOT_OK "Failed to trigger P2P find"
401444
#define TLV_VALUE_P2P_LISTEN_NOT_OK "Failed to trigger P2P listen"

indigo_api_callback.h

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,28 @@ struct tlv_to_config_name maps[] = {
115115
{ TLV_EHT_OPER_CENTR_FREQ, "eht_oper_centr_freq_seg0_idx", 0 },
116116
{ TLV_WPA_GROUP_REKEY, "wpa_group_rekey", 0 },
117117
{ TLV_WPA_STRICT_REKEY, "wpa_strict_rekey", 0 },
118+
{ TLV_RX_SS_SUPPORT, "rx_ss_support", 0 },
119+
{ TLV_RSN_OVERRIDE_KEY_MGMT, "rsn_override_key_mgmt", 0 },
120+
{ TLV_RSN_OVERRIDE_PAIRWISE, "rsn_override_pairwise", 0 },
121+
{ TLV_RSN_OVERRIDE_MFP, "rsn_override_mfp", 0 },
122+
{ TLV_RSN_OVERRIDE_2_KEY_MGMT, "rsn_override_key_mgmt_2", 0 },
123+
{ TLV_RSN_OVERRIDE_2_PAIRWISE, "rsn_override_pairwise_2", 0 },
124+
{ TLV_RSN_OVERRIDE_2_MFP, "rsn_override_mfp_2", 0 },
125+
{ TLV_RSNE_OVERRIDE, "rsne_override", 0 },
126+
{ TLV_RSNOE_OVERRIDE, "rsnoe_override", 0 },
127+
{ TLV_RSNO2E_OVERRIDE, "rsno2e_override", 0 },
128+
{ TLV_RSNXE_OVERRIDE, "rsnxe_override", 0 },
129+
{ TLV_RSNXOE_OVERRIDE, "rsnxoe_override", 0 },
130+
{ TLV_EAPOL_KEY_RESERVED_RANDOM, "eapol_key_reserved_random", 0 },
131+
{ TLV_VENDOR_ELEMENTS, "vendor_elements", 0 },
132+
{ TLV_ASSOCRESP_ELEMENTS, "assocresp_elements", 0 },
133+
{ TLV_HE_6G_REG_PWR_TYPE, "he_6ghz_reg_pwr_type", 0 },
134+
{ TLV_ELEMENT_EXTEND, "element_extend", 0 },
135+
{ TLV_RNR, "rnr", 0 },
136+
{ TLV_DTIM_PERIOD, "dtim_period", 0 },
137+
{ TLV_ELEMENT_RESERVED_BITS, "element_reserved_bits", 0 },
138+
{ TLV_ELEMENT_UNTESTED_BITS, "element_untested_bits", 0 },
139+
{ TLV_ML_CTRL_EXT_MLD_CAPA_PRES_BIT, "ml_ctrl_ext_mld_capa_pres_bit", 0 },
118140

119141
/* wpas, seperate? */
120142
{ TLV_STA_SSID, "ssid", 1 },
@@ -149,6 +171,14 @@ struct tlv_to_config_name maps[] = {
149171
{ TLV_PREFER, "priority", 0 },
150172
{ TLV_GROUP_MGMT, "group_mgmt", 0 },
151173
{ TLV_SAE_PASSWORD, "sae_password", 1 },
174+
{ TLV_STA_HT_MCS, "ht_mcs", 1 },
175+
{ TLV_STA_VHT_CAPA, "vht_capa", 0 },
176+
{ TLV_STA_VHT_CAPA_MASK, "vht_capa_mask", 0 },
177+
{ TLV_STA_VHT_RX_MCS_NSS_1, "vht_rx_mcs_nss_1", 0 },
178+
{ TLV_STA_VHT_TX_MCS_NSS_1, "vht_tx_mcs_nss_1", 0 },
179+
{ TLV_STA_VHT_RX_MCS_NSS_2, "vht_rx_mcs_nss_2", 0 },
180+
{ TLV_STA_VHT_TX_MCS_NSS_2, "vht_tx_mcs_nss_2", 0 },
181+
{ TLV_STA_RSN_OVERRIDING, "rsn_overriding", 0 },
152182

153183
/* hapd + wpas */
154184
{ TLV_EAP_FRAG_SIZE, "fragment_size", 0 },
@@ -278,6 +308,7 @@ static int start_dhcp_handler(struct packet_wrapper *req, struct packet_wrapper
278308
static int stop_dhcp_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
279309
static int get_wsc_pin_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
280310
static int get_wsc_cred_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
311+
static int send_arp_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
281312
/* AP */
282313
static int stop_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
283314
static int configure_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
@@ -286,10 +317,10 @@ static int send_ap_disconnect_handler(struct packet_wrapper *req, struct packet_
286317
static int set_ap_parameter_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
287318
static int send_ap_btm_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
288319
static int trigger_ap_channel_switch(struct packet_wrapper *req, struct packet_wrapper *resp);
289-
static int send_ap_arp_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
290320
static int start_wps_ap_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
291321
static int configure_ap_wsc_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
292322
static int rekey_ap_gtk_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
323+
static int set_ap_mcs_rates_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
293324
/* STA */
294325
static int stop_sta_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
295326
static int configure_sta_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
@@ -313,6 +344,7 @@ static int enable_wsc_sta_handler(struct packet_wrapper *req, struct packet_wrap
313344
static int set_sta_inject_start_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
314345
static int set_sta_inject_frame_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
315346
static int set_sta_inject_stop_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
347+
static int switch_sta_link_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
316348
/* P2P */
317349
static int start_up_p2p_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
318350
static int p2p_find_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
@@ -330,4 +362,7 @@ static int sniffer_start_handler(struct packet_wrapper *req, struct packet_wrapp
330362
static int sniffer_stop_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
331363
static int sniffer_filter_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
332364
static int sniffer_upload_file_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
365+
/* TG (Traffic Generator) */
366+
static int start_tg_server_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
367+
static int stop_tg_server_handler(struct packet_wrapper *req, struct packet_wrapper *resp);
333368
#endif // __INDIGO_API_CALLBACK

0 commit comments

Comments
 (0)