qcacld-3.0: Add ini to enable/disable WLS 6ghz support

Host sends the WLAN_MSG_WLAN_STATUS_IND to WiFi Location Service(WLS) via
cnss daemon which includes supported channels. WLS service is yet not 6GHz
capable. Hence to limit the 2.4GHz/5GHz channels only in
WLAN_MSG_WLAN_STATUS_IND introduce new INI "wls_6ghz_capable".

Change-Id: I77b284d2025601fec72aa35d430f18865f15f247
CRs-Fixed: 2748489
This commit is contained in:
Abhishek Ambure
2020-08-04 17:42:16 +05:30
committed by snandini
parent 4e68c1c28d
commit ab079ed334
7 changed files with 80 additions and 9 deletions

View File

@@ -331,6 +331,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
gen->debug_packet_log = cfg_get(psoc, CFG_ENABLE_DEBUG_PACKET_LOG); gen->debug_packet_log = cfg_get(psoc, CFG_ENABLE_DEBUG_PACKET_LOG);
gen->enable_deauth_to_disassoc_map = gen->enable_deauth_to_disassoc_map =
cfg_get(psoc, CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP); cfg_get(psoc, CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP);
gen->wls_6ghz_capable = cfg_get(psoc, CFG_WLS_6GHZ_CAPABLE);
mlme_init_pmf_cfg(psoc, gen); mlme_init_pmf_cfg(psoc, gen);
mlme_init_lpass_support_cfg(psoc, gen); mlme_init_lpass_support_cfg(psoc, gen);

View File

@@ -760,6 +760,27 @@
0, 0x52, 0x49, CFG_VALUE_OR_DEFAULT, \ 0, 0x52, 0x49, CFG_VALUE_OR_DEFAULT, \
"Bit mask to retry Auth and full connection on assoc timeout to same AP for SAE connection") "Bit mask to retry Auth and full connection on assoc timeout to same AP for SAE connection")
/*
* <ini>
*
* wls_6ghz_capable - WiFi Location Service(WLS) is 6Ghz capable
* @Min: 0 (WLS 6Ghz non-capable)
* @Max: 1 (WLS 6Ghz capable)
* @Default: 0 (WLS 6Ghz non-capable)
*
* Related: None
*
* Supported Feature: General
*
* Usage: Internal
*
* </ini>
*/
#define CFG_WLS_6GHZ_CAPABLE CFG_INI_BOOL( \
"wls_6ghz_capable", \
0, \
"WiFi Location Service(WLS) is 6Ghz capable or not")
#define CFG_GENERIC_ALL \ #define CFG_GENERIC_ALL \
CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \ CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \ CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
@@ -791,5 +812,6 @@
CFG(CFG_BMISS_SKIP_FULL_SCAN) \ CFG(CFG_BMISS_SKIP_FULL_SCAN) \
CFG(CFG_ENABLE_RING_BUFFER) \ CFG(CFG_ENABLE_RING_BUFFER) \
CFG(CFG_DFS_CHAN_AGEOUT_TIME) \ CFG(CFG_DFS_CHAN_AGEOUT_TIME) \
CFG(CFG_SAE_CONNECION_RETRIES) CFG(CFG_SAE_CONNECION_RETRIES) \
CFG(CFG_WLS_6GHZ_CAPABLE)
#endif /* __CFG_MLME_GENERIC_H */ #endif /* __CFG_MLME_GENERIC_H */

View File

@@ -319,6 +319,17 @@ QDF_STATUS wlan_mlme_get_crash_inject(struct wlan_objmgr_psoc *psoc,
QDF_STATUS wlan_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc,
bool *lpass_support); bool *lpass_support);
/**
* wlan_mlme_get_wls_6ghz_cap() - Get the wifi location service(WLS)
* 6ghz capability
* @psoc: pointer to psoc object
* @wls_6ghz_capable: Pointer to the variable from caller
*
* Return: void
*/
void wlan_mlme_get_wls_6ghz_cap(struct wlan_objmgr_psoc *psoc,
bool *wls_6ghz_capable);
/** /**
* wlan_mlme_get_self_recovery() - Get the self recovery config * wlan_mlme_get_self_recovery() - Get the self recovery config
* @psoc: pointer to psoc object * @psoc: pointer to psoc object

View File

@@ -1110,6 +1110,7 @@ struct wlan_mlme_chainmask {
* @peer_create_conf_support: Peer create confirmation command support * @peer_create_conf_support: Peer create confirmation command support
* @dual_sta_roam_fw_support: Firmware support for dual sta roaming feature * @dual_sta_roam_fw_support: Firmware support for dual sta roaming feature
* @sae_connect_retries: sae connect retry bitmask * @sae_connect_retries: sae connect retry bitmask
* @wls_6ghz_capable: wifi location service(WLS) is 6ghz capable
*/ */
struct wlan_mlme_generic { struct wlan_mlme_generic {
uint32_t band_capability; uint32_t band_capability;
@@ -1151,6 +1152,7 @@ struct wlan_mlme_generic {
bool peer_create_conf_support; bool peer_create_conf_support;
bool dual_sta_roam_fw_support; bool dual_sta_roam_fw_support;
uint32_t sae_connect_retries; uint32_t sae_connect_retries;
bool wls_6ghz_capable;
}; };
/* /*

View File

@@ -325,6 +325,21 @@ QDF_STATUS ucfg_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_get_lpass_support(psoc, lpass_support); return wlan_mlme_get_lpass_support(psoc, lpass_support);
} }
/**
* ucfg_mlme_get_wls_6ghz_cap() - Get the WiFi Location Service(WLS)
* 6ghz capability
* @psoc: pointer to psoc object
* @wls_6ghz_capable: Pointer to the variable from caller
*
* Return: void
*/
static inline
void ucfg_mlme_get_wls_6ghz_cap(struct wlan_objmgr_psoc *psoc,
bool *wls_6ghz_capable)
{
wlan_mlme_get_wls_6ghz_cap(psoc, wls_6ghz_capable);
}
/** /**
* ucfg_mlme_get_self_recovery() - Get the self recovery config * ucfg_mlme_get_self_recovery() - Get the self recovery config
* @psoc: pointer to psoc object * @psoc: pointer to psoc object

View File

@@ -285,6 +285,19 @@ QDF_STATUS wlan_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
void wlan_mlme_get_wls_6ghz_cap(struct wlan_objmgr_psoc *psoc,
bool *wls_6ghz_capable)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj) {
*wls_6ghz_capable = cfg_default(CFG_WLS_6GHZ_CAPABLE);
return;
}
*wls_6ghz_capable = mlme_obj->cfg.gen.wls_6ghz_capable;
}
QDF_STATUS wlan_mlme_get_self_recovery(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_self_recovery(struct wlan_objmgr_psoc *psoc,
bool *self_recovery) bool *self_recovery)
{ {

View File

@@ -88,7 +88,7 @@ static int wlan_hdd_gen_wlan_status_pack(struct wlan_status_data *data,
uint32_t chan_id; uint32_t chan_id;
uint32_t *chan_freq_list, chan_freq_len; uint32_t *chan_freq_list, chan_freq_len;
struct svc_channel_info *chan_info; struct svc_channel_info *chan_info;
bool lpass_support; bool lpass_support, wls_6ghz_capable = false;
QDF_STATUS status; QDF_STATUS status;
if (!data) { if (!data) {
@@ -116,7 +116,7 @@ static int wlan_hdd_gen_wlan_status_pack(struct wlan_status_data *data,
hdd_err("Failed to get LPASS support config"); hdd_err("Failed to get LPASS support config");
return -EIO; return -EIO;
} }
ucfg_mlme_get_wls_6ghz_cap(hdd_ctx->psoc, &wls_6ghz_capable);
if (hdd_ctx->lpss_support && lpass_support) if (hdd_ctx->lpss_support && lpass_support)
data->lpss_support = 1; data->lpss_support = 1;
else else
@@ -130,17 +130,24 @@ static int wlan_hdd_gen_wlan_status_pack(struct wlan_status_data *data,
chan_freq_len = WLAN_SVC_MAX_NUM_CHAN; chan_freq_len = WLAN_SVC_MAX_NUM_CHAN;
sme_get_cfg_valid_channels(chan_freq_list, &chan_freq_len); sme_get_cfg_valid_channels(chan_freq_list, &chan_freq_len);
data->numChannels = chan_freq_len; data->numChannels = 0;
for (i = 0; i < chan_freq_len; i++) {
if (!wls_6ghz_capable &&
wlan_reg_is_6ghz_chan_freq(chan_freq_list[i]))
continue;
for (i = 0; i < data->numChannels; i++) { chan_id = wlan_reg_freq_to_chan(hdd_ctx->pdev,
chan_info = &data->channel_info[i]; chan_freq_list[i]);
data->channel_list[i] = if (!chan_id)
wlan_reg_freq_to_chan(hdd_ctx->pdev, chan_freq_list[i]); continue;
chan_id = data->channel_list[i];
chan_info = &data->channel_info[data->numChannels];
data->channel_list[data->numChannels] = chan_id;
chan_info->chan_id = chan_id; chan_info->chan_id = chan_id;
wlan_hdd_get_channel_info(hdd_ctx, wlan_hdd_get_channel_info(hdd_ctx,
chan_info, chan_info,
chan_freq_list[i]); chan_freq_list[i]);
data->numChannels++;
} }
qdf_mem_free(chan_freq_list); qdf_mem_free(chan_freq_list);