qcacld-3.0: Start the SAP if force SAP ini is set

Currently, the driver trims the channel list with
the PCL if external acs policy ini is set, and
if the channels are unsafe then that can lead
to 0 channels and the SAP can fail.

Fix is to check whether the force SAP start ini
is set and override the channel.

Change-Id: If245bf27deda0f6022343d7a175520fdd92d106b
CRs-Fixed: 2667742
Цей коміт міститься в:
gaurank kathpalia
2020-04-20 14:53:52 +05:30
зафіксовано nshrivas
джерело 472b23379b
коміт 3935335687
4 змінених файлів з 45 додано та 1 видалено

Переглянути файл

@@ -1904,6 +1904,18 @@ QDF_STATUS wlan_mlme_get_vht_tx_mcs_2x2(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
wlan_mlme_get_vht20_mcs9(struct wlan_objmgr_psoc *psoc, bool *value);
/**
* wlan_mlme_get_force_sap_enabled() - Get the value of force SAP enabled
* @psoc: psoc context
* @value: data to get
*
* Get the value of force SAP enabled
*
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
*/
QDF_STATUS
wlan_mlme_get_force_sap_enabled(struct wlan_objmgr_psoc *psoc, bool *value);
/**
* wlan_mlme_get_vht_enable2x2() - Enables/disables VHT Tx/Rx MCS values for 2x2
* @psoc: psoc context

Переглянути файл

@@ -2500,6 +2500,21 @@ ucfg_mlme_get_vht_enable2x2(struct wlan_objmgr_psoc *psoc, bool *value)
return wlan_mlme_get_vht_enable2x2(psoc, value);
}
/**
* ucfg_mlme_get_force_sap_enabled() - Get the value of force SAP enabled
* @psoc: psoc context
* @value: data to get
*
* Get the value of force SAP enabled
*
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
*/
static inline QDF_STATUS
ucfg_mlme_get_force_sap_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
{
return wlan_mlme_get_force_sap_enabled(psoc, value);
}
/**
* ucfg_mlme_set_vht_enable2x2() - Enables/disables VHT Tx/Rx MCS values for 2x2
* @psoc: psoc context

Переглянути файл

@@ -2991,6 +2991,20 @@ wlan_mlme_get_vht_enable2x2(struct wlan_objmgr_psoc *psoc, bool *value)
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_mlme_get_force_sap_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return QDF_STATUS_E_FAILURE;
*value = mlme_obj->cfg.acs.force_sap_start;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_mlme_set_vht_enable2x2(struct wlan_objmgr_psoc *psoc, bool value)
{

Переглянути файл

@@ -2922,6 +2922,7 @@ static void wlan_hdd_handle_zero_acs_list(struct hdd_context *hdd_ctx,
{
uint16_t i, sta_count;
uint32_t acs_chan_default = 0;
bool force_sap_allowed = false;
if (!acs_ch_list_count || *acs_ch_list_count > 0 ||
!acs_freq_list) {
@@ -2936,7 +2937,9 @@ static void wlan_hdd_handle_zero_acs_list(struct hdd_context *hdd_ctx,
(hdd_ctx->psoc, PM_STA_MODE, NULL);
sta_count += policy_mgr_mode_specific_connection_count
(hdd_ctx->psoc, PM_P2P_CLIENT_MODE, NULL);
if (!sta_count)
ucfg_mlme_get_force_sap_enabled(hdd_ctx->psoc, &force_sap_allowed);
if (!sta_count && !force_sap_allowed)
return;
for (i = 0; i < org_ch_list_count; i++) {