blob: 8bf39574ae2c71f3052e996d43a6cec625b5bee6 [file] [log] [blame]
From 7e38f393db902a6ed31c284d7a61336c836a3344 Mon Sep 17 00:00:00 2001
From: "Allen.Ye" <allen.ye@mediatek.com>
Date: Thu, 4 Aug 2022 18:15:29 +0800
Subject: [PATCH] HAL: add Obss Coexistence Enable function
---
source/wifi/wifi_hal.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c
index be72a31..72f925c 100644
--- a/source/wifi/wifi_hal.c
+++ b/source/wifi/wifi_hal.c
@@ -3815,8 +3815,22 @@ INT wifi_setRadioCtsProtectionEnable(INT apIndex, BOOL enable)
// enables OBSS Coexistence - fall back to 20MHz if necessary for the radio used by this ap
INT wifi_setRadioObssCoexistenceEnable(INT apIndex, BOOL enable)
{
- //save config and Apply instantly
- return RETURN_ERR;
+ char config_file[64] = {'\0'};
+ char buf[64] = {'\0'};
+ struct params list;
+
+ WIFI_ENTRY_EXIT_DEBUG("Inside %s:%d\n",__func__, __LINE__);
+ list.name = "ht_coex";
+ snprintf(buf, sizeof(buf), "%d", enable);
+ list.value = buf;
+
+ snprintf(config_file, sizeof(config_file), "%s%d.conf", CONFIG_PREFIX, apIndex);
+ wifi_hostapdWrite(config_file, &list, 1);
+ wifi_hostapdProcessUpdate(apIndex, &list, 1);
+
+ WIFI_ENTRY_EXIT_DEBUG("Exiting %s:%d\n",__func__, __LINE__);
+
+ return RETURN_OK;
}
//P3 // sets the fragmentation threshold in bytes for the radio used by this ap
--
2.18.0