blob: 7e6d7c8b7cb2e96352053e08f43f868de211a89d [file] [log] [blame]
developer15a43312022-04-12 11:23:23 +08001From bd22b8ef61e88e1e379925aecb6224bc3cd43963 Mon Sep 17 00:00:00 2001
2From: "howard.hsu" <howard-yh.hsu@mediatek.com>
3Date: Mon, 7 Mar 2022 19:17:56 +0800
4Subject: [PATCH 11/18] [patch] HAL: implement wifi_setApWmmEnable()
5
6Change-Id: Ifee29de1c42ef26528d26996937db7c959d8fd06
7---
8 source/wifi/wifi_hal.c | 15 ++++++++++++++-
9 1 file changed, 14 insertions(+), 1 deletion(-)
10
11diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c
12index 4e220ed6..62350c1b 100644
13--- a/source/wifi/wifi_hal.c
14+++ b/source/wifi/wifi_hal.c
15@@ -4514,7 +4514,20 @@ INT wifi_getApWmmEnable(INT apIndex, BOOL *output)
16 INT wifi_setApWmmEnable(INT apIndex, BOOL enable)
17 {
18 //Save config and apply instantly.
19- return RETURN_ERR;
20+ char config_file[MAX_BUF_SIZE] = {0};
21+ struct params list;
22+
23+ WIFI_ENTRY_EXIT_DEBUG("Inside %s:%d\n",__func__, __LINE__);
24+ list.name = "wmm_enabled";
25+ list.value = enable?"1":"0";
26+
27+ sprintf(config_file,"%s%d.conf",CONFIG_PREFIX,apIndex);
28+ wifi_hostapdWrite(config_file, &list, 1);
29+ wifi_hostapdProcessUpdate(apIndex, &list, 1);
30+ wifi_reloadAp(apIndex);
31+ WIFI_ENTRY_EXIT_DEBUG("Exiting %s:%d\n",__func__, __LINE__);
32+
33+ return RETURN_OK;
34 }
35
36 //Whether U-APSD support is currently enabled. When enabled, this is indicated in beacon frames. Note: U-APSD can only be enabled if WMM is also enabled.
37--
382.29.2
39