blob: 17dad1fd0ebeaf0d7e57d75b3f7ca6c09034afa3 [file] [log] [blame]
From a99b5bf7bcae0aa2d2f161cd28ef0f34c52b31ad Mon Sep 17 00:00:00 2001
From: "howard.hsu" <howard-yh.hsu@mediatek.com>
Date: Mon, 7 Mar 2022 10:50:32 +0800
Subject: [PATCH 07/18] [patch] HAL: implement wifi_setApSecurityMFPConfig()
Change-Id: If05c3550c2f9a152cfea2b8323c6c23973a881ca
---
source/wifi/wifi_hal.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c
index 090db60f..4f54626b 100644
--- a/source/wifi/wifi_hal.c
+++ b/source/wifi/wifi_hal.c
@@ -6214,6 +6214,29 @@ INT wifi_getApSecurityMFPConfig(INT apIndex, CHAR *output_string)
}
INT wifi_setApSecurityMFPConfig(INT apIndex, CHAR *MfpConfig)
{
+ char str[MAX_BUF_SIZE]={'\0'};
+ char cmd[MAX_CMD_SIZE]={'\0'};
+ struct params params;
+ char config_file[MAX_BUF_SIZE] = {0};
+
+ WIFI_ENTRY_EXIT_DEBUG("Inside %s:%d\n",__func__, __LINE__);
+ if(NULL == MfpConfig || strlen(MfpConfig) >= 32 )
+ return RETURN_ERR;
+
+ params.name = "ieee80211w";
+ if (strncmp(MfpConfig, "Disabled", strlen("Disabled")) == 0)
+ params.value = "0";
+ else if (strncmp(MfpConfig, "Optional", strlen("Optional")) == 0)
+ params.value = "1";
+ else if (strncmp(MfpConfig, "Required", strlen("Required")) == 0)
+ params.value = "2";
+ else{
+ wifi_dbg_printf("%s: invalid MfpConfig. Input has to be Disabled, Optional or Required \n", __func__);
+ return RETURN_ERR;
+ }
+ sprintf(config_file, "%s%d.conf", CONFIG_PREFIX, apIndex);
+ wifi_hostapdWrite(config_file, &params, 1);
+ WIFI_ENTRY_EXIT_DEBUG("Exiting %s:%d\n", __func__, __LINE__);
return RETURN_OK;
}
INT wifi_getRadioAutoChannelEnable(INT radioIndex, BOOL *output_bool)
--
2.29.2