qcacld-3.0: Add INI to disable 6ghz support for oem

6Ghz channels information is not used by legacy OEM apps example
"lowi-server" having no support for 6Ghz channels.

Hence "oem_6g_support_disable" INI is added. By default INI value is
1. 6Ghz supported OEM applications sets INI value to 0 and gets 6Ghz
channel information from driver.

Change-Id: I2650e6ad2976b64e46ab0143b2bafc2df2343e94
CRs-Fixed: 2597651
This commit is contained in:
Abhishek Ambure
2020-01-03 19:52:05 +05:30
committed by nshrivas
parent 0f66b0ad33
commit 4706d0fe80
6 changed files with 85 additions and 4 deletions

View File

@@ -1986,6 +1986,8 @@ static void mlme_init_wifi_pos_cfg(struct wlan_objmgr_psoc *psoc,
{
wifi_pos_cfg->fine_time_meas_cap =
cfg_get(psoc, CFG_FINE_TIME_MEAS_CAPABILITY);
wifi_pos_cfg->oem_6g_support_disable =
cfg_get(psoc, CFG_OEM_SIXG_SUPPORT_DISABLE);
}
#ifdef FEATURE_WLAN_ESE

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -68,7 +68,34 @@
CFG_VALUE_OR_DEFAULT, \
"fine timing measurement capability")
/*
* <ini>
* oem_6g_support_disable - oem 6g support is disabled
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to show OEM is 6Ghz disabled. For legacy OEM apps
* having no support for 6Ghz, the default value is 1 and thus driver will
* not serve 6Ghz info to legacy oem application.
* OEM apps supporting 6Ghz sets the ini value to 0 to get 6Ghz
* information from driver.
*
* Related: None
*
* Supported Feature: WIFI POS
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_OEM_SIXG_SUPPORT_DISABLE CFG_INI_BOOL( \
"oem_6g_support_disable", \
1, \
"oem 6Ghz support Enabled/disabled")
#define CFG_WIFI_POS_ALL \
CFG(CFG_FINE_TIME_MEAS_CAPABILITY)
CFG(CFG_FINE_TIME_MEAS_CAPABILITY) \
CFG(CFG_OEM_SIXG_SUPPORT_DISABLE)
#endif /* __CFG_MLME_WIFI_POS_H */

View File

@@ -2057,9 +2057,11 @@ struct wlan_mlme_wep_cfg {
/**
* struct wlan_mlme_wifi_pos_cfg - WIFI POS configs
* @fine_time_meas_cap: fine timing measurement capability information
* @oem_6g_support_disable: oem is 6Ghz disabled if set
*/
struct wlan_mlme_wifi_pos_cfg {
uint32_t fine_time_meas_cap;
bool oem_6g_support_disable;
};
#define MLME_SET_BIT(value, bit_offset) ((value) |= (1 << (bit_offset)))

View File

@@ -806,6 +806,17 @@ QDF_STATUS
ucfg_mlme_set_dfs_filter_offload(struct wlan_objmgr_psoc *psoc,
bool dfs_filter_offload);
/**
* ucfg_mlme_get_oem_6g_supported() - Get oem 6Ghz supported
* @psoc: pointer to psoc object
* @oem_6g_supported: Pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_oem_6g_supported(struct wlan_objmgr_psoc *psoc,
bool *oem_6g_supported);
/**
* ucfg_mlme_get_fine_time_meas_cap() - Get fine timing measurement capability
* @psoc: pointer to psoc object

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -254,6 +254,24 @@ ucfg_mlme_get_dfs_master_capability(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_oem_6g_supported(struct wlan_objmgr_psoc *psoc,
bool *oem_6g_disable)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj) {
*oem_6g_disable =
cfg_default(CFG_OEM_SIXG_SUPPORT_DISABLE);
return QDF_STATUS_E_INVAL;
}
*oem_6g_disable = mlme_obj->cfg.wifi_pos_cfg.oem_6g_support_disable;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_fine_time_meas_cap(struct wlan_objmgr_psoc *psoc,
uint32_t *fine_time_meas_cap)

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -480,6 +480,26 @@ static void hdd_set_fine_time_meas_cap(struct hdd_context *hdd_ctx)
hdd_debug("fine time meas capability - Enabled: %04x", capability);
}
/**
* hdd_set_oem_6g_supported() - set oem 6g support enabled/disable
* @hdd_ctx: HDD context
*
* This function is used to pass oem 6g support enabled/disable value
* coming from INI to SME. This function make sure that configure
* INI is supported by the device.
*
* Return: None
*/
static void hdd_set_oem_6g_supported(struct hdd_context *hdd_ctx)
{
bool oem_6g_disable = 1;
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);
hdd_debug("oem 6g support is - %s",
oem_6g_disable ? "Enabled" : "Disbaled");
}
/**
* hdd_convert_string_to_u8_array() - used to convert string into u8 array
* @str: String to be converted
@@ -891,6 +911,7 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
sme_config->csr_config.max_intf_count = hdd_ctx->max_intf_count;
hdd_set_fine_time_meas_cap(hdd_ctx);
hdd_set_oem_6g_supported(hdd_ctx);
cds_set_multicast_logging(hdd_ctx->config->multicast_host_fw_msgs);