Merge "[[RDKB]rdkb development]"
diff --git a/src/logan_wifi/wifi_hal.c b/src/logan_wifi/wifi_hal.c
index a672c0a..aa6f2da 100644
--- a/src/logan_wifi/wifi_hal.c
+++ b/src/logan_wifi/wifi_hal.c
@@ -13556,6 +13556,26 @@
wifi_dbg_printf("\n[%s]: ieee80211w is : %s", __func__, output);
return RETURN_OK;
}
+INT wifi_setApMBOConfig(INT apIndex)
+{
+ struct params params;
+ char config_file[MAX_BUF_SIZE] = {0};
+ int res;
+
+ params.name = "mbo";
+ params.value = "0";
+
+ res = snprintf(config_file, sizeof(config_file), "%s%d.conf", CONFIG_PREFIX, apIndex);
+ if (os_snprintf_error(sizeof(config_file), res)) {
+ wifi_debug(DEBUG_ERROR, "Unexpected snprintf fail\n");
+ return RETURN_ERR;
+ }
+
+ wifi_hostapdWrite(config_file, ¶ms, 1);
+ wifi_hostapdProcessUpdate(apIndex, ¶ms, 1);
+ return RETURN_OK;
+}
+
INT wifi_setApSecurityMFPConfig(INT apIndex, CHAR *MfpConfig)
{
struct params params;
@@ -13568,8 +13588,11 @@
return RETURN_ERR;
params.name = "ieee80211w";
- if (strncmp(MfpConfig, "Disabled", strlen("Disabled")) == 0)
+ if (strncmp(MfpConfig, "Disabled", strlen("Disabled")) == 0) {
params.value = "0";
+ /* mbo should disable when pmf = 0*/
+ wifi_setApMBOConfig(apIndex);
+ }
else if (strncmp(MfpConfig, "Optional", strlen("Optional")) == 0)
params.value = "1";
else if (strncmp(MfpConfig, "Required", strlen("Required")) == 0)
@@ -19102,6 +19125,7 @@
char band[64] = {0};
char buf[256] = {0};
char config_file[64] = {0};
+ char dat_file[128] = {0};
UINT mode = 0;
BOOL enabled = FALSE;
@@ -19123,6 +19147,11 @@
wifi_debug(DEBUG_ERROR, "Unexpected snprintf fail\n");
return RETURN_ERR;
}
+ res = snprintf(dat_file, sizeof(dat_file), "%s%d.dat", LOGAN_DAT_FILE, index);
+ if (os_snprintf_error(sizeof(dat_file), res)) {
+ wifi_debug(DEBUG_ERROR, "Unexpected snprintf fail\n");
+ return RETURN_ERR;
+ }
if (wifi_getRadioEnable(index, &enabled) != RETURN_OK)
{
wifi_debug(DEBUG_ERROR, "wifi_getRadioEnable return error.\n");
@@ -19225,7 +19254,7 @@
operationParam->operationalDataTransmitRates = operationalDataTransmitRates;
memset(buf, 0, sizeof(buf));
- wifi_hostapdRead(config_file, "fragm_threshold", buf, sizeof(buf));
+ wifi_datfileRead(dat_file, "FragThreshold", buf, sizeof(buf));
if (hal_strtoul(buf, 10, &tmp) < 0) {
wifi_debug(DEBUG_ERROR, "Unexpected strtoul fail\n");
}
@@ -19244,7 +19273,7 @@
operationParam->transmitPower = transmitPower;
memset(buf, 0, sizeof(buf));
- wifi_hostapdRead(config_file, "rts_threshold", buf, sizeof(buf));
+ wifi_datfileRead(dat_file, "RTSThreshold", buf, sizeof(buf));
if (strcmp(buf, "-1") == 0) {
operationParam->rtsThreshold = (UINT)-1; // maxuimum unsigned integer value
operationParam->ctsProtection = FALSE;
@@ -19257,7 +19286,7 @@
}
memset(buf, 0, sizeof(buf));
- wifi_hostapdRead(config_file, "ht_coex", buf, sizeof(buf));
+ wifi_datfileRead(dat_file, "HT_BSSCoexistence", buf, sizeof(buf));
if (strcmp(buf, "0") == 0)
operationParam->obssCoex = FALSE;
else