From 10e5cdcde26b21026db4460ded6e0b11c045a96a Mon Sep 17 00:00:00 2001
From: "Allen.Ye" <allen.ye@mediatek.com>
Date: Thu, 25 Aug 2022 17:27:06 +0800
Subject: [PATCH] HAL: add set STBC enable function

---
 source/wifi/wifi_hal.c | 61 ++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 59 insertions(+), 2 deletions(-)

diff --git a/source/wifi/wifi_hal.c b/source/wifi/wifi_hal.c
index 8ec1d0e..34989ea 100644
--- a/source/wifi/wifi_hal.c
+++ b/source/wifi/wifi_hal.c
@@ -4049,8 +4049,65 @@ INT wifi_setRadioFragmentationThreshold(INT apIndex, UINT threshold)
 // enable STBC mode in the hardwarwe, 0 == not enabled, 1 == enabled
 INT wifi_setRadioSTBCEnable(INT radioIndex, BOOL STBC_Enable)
 {
-    //Save config and Apply instantly
-    return RETURN_ERR;
+    char config_file[64] = {'\0'};
+    char cmd[128] = {'\0'};
+    char buf[64] = {'\0'};
+    char stbc_config[16] = {'\0'};
+    wifi_band band;
+    int iterator = 0;
+    BOOL current_stbc = FALSE;
+
+    WIFI_ENTRY_EXIT_DEBUG("Inside %s:%d\n",__func__, __LINE__);
+
+    band = wifi_index_to_band(radioIndex);
+    if (band == band_invalid)
+        return RETURN_ERR;
+
+    if (band == band_2_4)
+        iterator = 1;
+    else if (band == band_5)
+        iterator = 2;
+    else
+        return RETURN_OK;
+
+    snprintf(config_file, sizeof(config_file), "%s%d.conf", CONFIG_PREFIX, radioIndex);
+
+    // set ht and vht config
+    for (int i = 0; i < iterator; i++) {
+        memset(stbc_config, 0, sizeof(stbc_config));
+        memset(cmd, 0, sizeof(cmd));
+        memset(buf, 0, sizeof(buf));
+        snprintf(stbc_config, sizeof(stbc_config), "%sht_capab", (i == 0)?"":"v");
+        snprintf(cmd, sizeof(cmd), "cat %s | grep -E '^%s' | grep 'STBC'", config_file, stbc_config);
+        _syscmd(cmd, buf, sizeof(buf));
+        if (strlen(buf) != 0)
+            current_stbc = TRUE;
+        if (current_stbc == STBC_Enable)
+            continue;
+
+        if (STBC_Enable == TRUE) {
+            // Append the STBC flags in capab config
+            memset(cmd, 0, sizeof(cmd));
+            if (i == 0)
+                snprintf(cmd, sizeof(cmd), "sed -E -i '/^ht_capab=.*/s/$/[TX-STBC][RX-STBC1]/' %s", config_file);
+            else
+                snprintf(cmd, sizeof(cmd), "sed -E -i '/^vht_capab=.*/s/$/[TX-STBC-2BY1][RX-STBC-1]/' %s", config_file);
+            _syscmd(cmd, buf, sizeof(buf));
+        } else if (STBC_Enable == FALSE) {
+            // Remove the STBC flags and remain other flags in capab
+            memset(cmd, 0, sizeof(cmd));
+            snprintf(cmd, sizeof(cmd), "sed -E -i 's/\\[TX-STBC(-2BY1)?*\\]//' %s", config_file);
+            _syscmd(cmd, buf, sizeof(buf));
+            memset(cmd, 0, sizeof(cmd));
+            snprintf(cmd, sizeof(cmd), "sed -E -i 's/\\[RX-STBC-?[1-3]*\\]//' %s", config_file);
+            _syscmd(cmd, buf, sizeof(buf));
+        }
+    }
+
+    wifi_reloadAp(radioIndex);
+
+    WIFI_ENTRY_EXIT_DEBUG("Exiting %s:%d\n",__func__, __LINE__);
+    return RETURN_OK;
 }
 
 // outputs A-MSDU enable status, 0 == not enabled, 1 == enabled
-- 
2.18.0

