[rdkb][common][app][Add hal ap security owe mode]
[Description]
Add hal ap security owe mode.
[Release-log]
N/A
Change-Id: Ia89477e4b05ce1684c4a1a13f4a7ceb168d55dc2
diff --git a/recipes-wifi/hal/files/0001-Add-owe-mode.patch b/recipes-wifi/hal/files/0001-Add-owe-mode.patch
new file mode 100644
index 0000000..cdea238
--- /dev/null
+++ b/recipes-wifi/hal/files/0001-Add-owe-mode.patch
@@ -0,0 +1,26 @@
+From b7cd3dc333501f11b1e70bbdd5ea8b6929d38f40 Mon Sep 17 00:00:00 2001
+From: "Allen.Ye" <allen.ye@mediatek.com>
+Date: Fri, 13 Jan 2023 13:22:27 +0800
+Subject: [PATCH] Add owe mode
+
+---
+ wifi_hal_ap.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/wifi_hal_ap.h b/wifi_hal_ap.h
+index 9eebe10..15c24f9 100644
+--- a/wifi_hal_ap.h
++++ b/wifi_hal_ap.h
+@@ -2455,7 +2455,8 @@ typedef enum {
+ wifi_security_mode_wpa_wpa2_enterprise = 0x00000100,
+ wifi_security_mode_wpa3_personal = 0x00000200,
+ wifi_security_mode_wpa3_transition = 0x00000400,
+- wifi_security_mode_wpa3_enterprise = 0x00000800
++ wifi_security_mode_wpa3_enterprise = 0x00000800,
++ wifi_security_mode_owe = 0x00001000
+ } wifi_security_modes_t;
+
+ typedef struct {
+--
+2.18.0
+
diff --git a/recipes-wifi/hal/halinterface.bbappend b/recipes-wifi/hal/halinterface.bbappend
index 9f18553..3a26d71 100644
--- a/recipes-wifi/hal/halinterface.bbappend
+++ b/recipes-wifi/hal/halinterface.bbappend
@@ -1,6 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI += "file://sta-network.patch;apply=no \
- file://add_undefined_dfs_function.patch;apply=no \
+SRC_URI += "file://*.patch;apply=no \
"
#This is workaround for missing do_patch when RDK uses external sources
@@ -9,6 +8,7 @@
if [ ! -e patch_applied ]; then
patch -p1 < ${WORKDIR}/sta-network.patch
patch -p1 < ${WORKDIR}/add_undefined_dfs_function.patch
+ patch -p1 < ${WORKDIR}/0001-Add-owe-mode.patch
touch patch_applied
fi
}
diff --git a/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.c b/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.c
index 7411969..4bf1fa2 100644
--- a/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.c
+++ b/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.c
@@ -66,8 +66,7 @@
return RETURN_ERR;
}
sscanf(buf, "wifi%d", &radioIndex);
- fprintf(stderr, "%s: radio index = %d \n", __func__, radioIndex);
- return radioIndex;
+ return radioIndex;
}
void set_channel(wifi_radio_param *radio_param, char *channel)
@@ -209,6 +208,8 @@
intf_param->security.mode = wifi_security_mode_wpa3_enterprise;
}else if(strcmp(encryption_mode, "sae-mixed") == 0){
intf_param->security.mode = wifi_security_mode_wpa3_transition;
+ }else if(strcmp(encryption_mode, "owe") == 0){
+ intf_param->security.mode = wifi_security_mode_owe;
}
if(strstr(encryption_mode, "tkip") && (strstr(encryption_mode, "ccmp") || strstr(encryption_mode, "aes") )){
@@ -219,7 +220,7 @@
intf_param->security.encr = wifi_encryption_aes;
}
- if(!strcmp(encryption_mode, "wpa3") || !strcmp(encryption_mode, "sae")){
+ if(!strcmp(encryption_mode, "wpa3") || !strcmp(encryption_mode, "sae") || !strcmp(encryption_mode, "owe")){
intf_param->security.mfp = wifi_mfp_cfg_required;
}else if (!strcmp(encryption_mode, "sae-mixed")){
intf_param->security.mfp = wifi_mfp_cfg_optional;
@@ -452,6 +453,8 @@
strcpy(key_mgmt, "NONE");
else if (sta_param.security.mode == wifi_security_mode_wpa3_personal)
strcpy(key_mgmt, "SAE");
+ else if (sta_param.security.mode == wifi_security_mode_owe)
+ strcpy(key_mgmt, "OWE");
else
strcpy(key_mgmt, "WPA-PSK");
snprintf(sta->key_mgmt, 64, "%s", key_mgmt);