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