From e11cb83e406a4258d70864a131cae8a6c3b2ce95 Mon Sep 17 00:00:00 2001 From: Abhishek Ambure Date: Thu, 4 Feb 2021 16:21:32 +0530 Subject: [PATCH] qcacld-3.0: Set OEM 6Ghz support only if Reg domain supports 6Ghz Host uses "oem_6g_support_disable" INI value to configure oem_6g_support_disable of wifi pos priv psoc object. If the Reg domain doesn't support 6Ghz band and INI "oem_6g_support_disable" value is 0, then host enables support for 6Ghz. Thus OEM apps supporting 6Ghz fails to get 6Ghz channel information from host. Hence use reg domain 6Ghz support and "oem_6g_support_disable" INI value to update oem_6g_support_disable of wifi pos priv psoc object. Change-Id: Id5e5b6220f3ce880da3c40aa959887ebc6bbfa7c CRs-Fixed: 2870971 --- core/hdd/src/wlan_hdd_cfg.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 5cd343bb5b27..b67aafa0356e 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -539,12 +539,29 @@ static void hdd_set_fine_time_meas_cap(struct hdd_context *hdd_ctx) */ static void hdd_set_oem_6g_supported(struct hdd_context *hdd_ctx) { - bool oem_6g_disable = 1; + bool oem_6g_disable = true; + bool is_reg_6g_support, set_wifi_pos_6g_disabled; ucfg_mlme_get_oem_6g_supported(hdd_ctx->psoc, &oem_6g_disable); - ucfg_wifi_pos_set_oem_6g_supported(hdd_ctx->psoc, oem_6g_disable); + is_reg_6g_support = wlan_reg_is_6ghz_supported(hdd_ctx->psoc); + set_wifi_pos_6g_disabled = (oem_6g_disable || !is_reg_6g_support); + + /** + * Host uses following truth table to set wifi pos 6Ghz disable in + * ucfg_wifi_pos_set_oem_6g_supported(). + * ----------------------------------------------------------------- + * oem_6g_disable INI value | reg domain 6G support | Disable 6Ghz | + * ----------------------------------------------------------------- + * 1 | 1 | 1 | + * 1 | 0 | 1 | + * 0 | 1 | 0 | + * 0 | 0 | 1 | + * ----------------------------------------------------------------- + */ + ucfg_wifi_pos_set_oem_6g_supported(hdd_ctx->psoc, + set_wifi_pos_6g_disabled); hdd_debug("oem 6g support is - %s", - oem_6g_disable ? "Enabled" : "Disbaled"); + set_wifi_pos_6g_disabled ? "Disbaled" : "Enabled"); } /**