Add new program enum value for HS2-R3
Previously, the same enum value was used for both HS2-R2 and HS2-R3.
This needs to be extended to allow HS2-R3 specific behavior.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
diff --git a/ap.c b/ap.c
index f1abe21..022dd35 100644
--- a/ap.c
+++ b/ap.c
@@ -7525,6 +7525,7 @@
dut->ap_tnc_time_stamp = 0;
if (dut->program == PROGRAM_HS2 || dut->program == PROGRAM_HS2_R2 ||
+ dut->program == PROGRAM_HS2_R3 ||
dut->program == PROGRAM_IOTLP) {
int i;
@@ -7581,7 +7582,8 @@
dut->ap_add_sha256 = 0;
}
- if (dut->program == PROGRAM_HS2_R2 || dut->program == PROGRAM_IOTLP) {
+ if (dut->program == PROGRAM_HS2_R2 || dut->program == PROGRAM_HS2_R3 ||
+ dut->program == PROGRAM_IOTLP) {
int i;
const char hessid[] = "50:6f:9a:00:11:22";
diff --git a/sigma_dut.h b/sigma_dut.h
index 01b58dc..73b6bc4 100644
--- a/sigma_dut.h
+++ b/sigma_dut.h
@@ -666,6 +666,7 @@
PROGRAM_OCE,
PROGRAM_WPA3,
PROGRAM_HE,
+ PROGRAM_HS2_R3,
} program;
enum device_type {
diff --git a/sta.c b/sta.c
index eb3d744..fcdbcda 100644
--- a/sta.c
+++ b/sta.c
@@ -6091,7 +6091,7 @@
nan_cmd_sta_reset_default(dut, conn, cmd);
#endif /* ANDROID_NAN */
- if (dut->program == PROGRAM_HS2_R2) {
+ if (dut->program == PROGRAM_HS2_R2 || dut->program == PROGRAM_HS2_R3) {
unlink("SP/wi-fi.org/pps.xml");
if (system("rm -r SP/*") != 0) {
}
@@ -6142,12 +6142,14 @@
set_ps(intf, dut, 0);
- if (dut->program == PROGRAM_HS2 || dut->program == PROGRAM_HS2_R2) {
+ if (dut->program == PROGRAM_HS2 || dut->program == PROGRAM_HS2_R2 ||
+ dut->program == PROGRAM_HS2_R3) {
wpa_command(intf, "SET interworking 1");
wpa_command(intf, "SET hs20 1");
}
if (dut->program == PROGRAM_HS2_R2 ||
+ dut->program == PROGRAM_HS2_R3 ||
dut->program == PROGRAM_OCE) {
wpa_command(intf, "SET pmf 1");
} else {
@@ -9905,7 +9907,7 @@
return 0;
}
- if (dut->program == PROGRAM_HS2_R2) {
+ if (dut->program == PROGRAM_HS2_R2 || dut->program == PROGRAM_HS2_R3) {
/*
* Set provisioning_sp for the test cases where SIM/USIM
* provisioning is used.
diff --git a/utils.c b/utils.c
index e92e0e5..7949ccb 100644
--- a/utils.c
+++ b/utils.c
@@ -95,9 +95,10 @@
if (strcasecmp(prog, "HS2") == 0)
return PROGRAM_HS2;
if (strcasecmp(prog, "HS2_R2") == 0 ||
- strcasecmp(prog, "HS2-R2") == 0 ||
- strcasecmp(prog, "HS2-R3") == 0)
+ strcasecmp(prog, "HS2-R2") == 0)
return PROGRAM_HS2_R2;
+ if (strcasecmp(prog, "HS2-R3") == 0)
+ return PROGRAM_HS2_R3;
if (strcasecmp(prog, "WFD") == 0)
return PROGRAM_WFD;
if (strcasecmp(prog, "DisplayR2") == 0)