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
This commit is contained in:
Abhishek Ambure 2021-02-04 16:21:32 +05:30 • committed by snandini
commit e11cb83e40

View file

@ -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");
}
/**