qcacld-3.0: Allow sap start in dfs channel if sta in 2g for DBS mode
If DBS mode is supported, when station is connected in 2g channel, sap should be able to start in dfs channel. Allow sap start in dfs channel if sta is connected in 2g for DBS mode. Change-Id: I189651785982b0f08a286da9f5dbe8c91b1f16c4 CRs-Fixed: 2654949
This commit is contained in:
parent
c576364f4d
commit
ae6ab55517
@ -627,6 +627,16 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
|
||||
void policy_mgr_decr_session_set_pcl(struct wlan_objmgr_psoc *psoc,
|
||||
enum QDF_OPMODE mode, uint8_t session_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_skip_dfs_ch() - skip dfs channel or not
|
||||
* @psoc: pointer to soc
|
||||
* @skip_dfs_channel: pointer to result
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS policy_mgr_skip_dfs_ch(struct wlan_objmgr_psoc *psoc,
|
||||
bool *skip_dfs_channel);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_channel() - provide channel number of given mode and vdevid
|
||||
* @psoc: PSOC object information
|
||||
@ -3008,6 +3018,17 @@ void policy_mgr_set_weight_of_dfs_passive_channels_to_zero(
|
||||
*/
|
||||
bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_is_special_mode_active_5g() - check if given mode active in 5g
|
||||
* @psoc: pointer to soc
|
||||
* @mode: operating mode of interface to be checked
|
||||
*
|
||||
* Return: true if given mode is active in 5g
|
||||
*/
|
||||
bool policy_mgr_is_special_mode_active_5g(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode);
|
||||
|
||||
/**
|
||||
* policy_mgr_is_sta_connected_2g() - check if sta connected in 2g
|
||||
* @psoc: pointer to soc
|
||||
|
@ -2119,7 +2119,6 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
|
||||
bool is_etsi13_srd_chan_allowed_in_mas_mode = true;
|
||||
uint32_t i = 0, j = 0;
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
bool sta_sap_scc_on_dfs_chan;
|
||||
uint32_t *channel_list, *channel_list_24, *channel_list_5,
|
||||
*sbs_channel_list, *channel_list_6;
|
||||
|
||||
@ -2166,20 +2165,9 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
|
||||
goto end;
|
||||
}
|
||||
|
||||
/*
|
||||
* if you have atleast one STA connection then don't fill DFS channels
|
||||
* in the preferred channel list
|
||||
*/
|
||||
sta_sap_scc_on_dfs_chan =
|
||||
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
|
||||
if ((mode == PM_SAP_MODE) || (mode == PM_P2P_GO_MODE)) {
|
||||
if ((policy_mgr_mode_specific_connection_count(psoc,
|
||||
PM_STA_MODE,
|
||||
NULL) > 0) &&
|
||||
(!sta_sap_scc_on_dfs_chan)) {
|
||||
policy_mgr_debug("skip DFS ch from pcl for SAP/Go");
|
||||
skip_dfs_channel = true;
|
||||
}
|
||||
policy_mgr_skip_dfs_ch(psoc,
|
||||
&skip_dfs_channel);
|
||||
is_etsi13_srd_chan_allowed_in_mas_mode =
|
||||
wlan_reg_is_etsi13_srd_chan_allowed_master_mode(pm_ctx->
|
||||
pdev);
|
||||
|
@ -3932,6 +3932,32 @@ bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(
|
||||
return status;
|
||||
}
|
||||
|
||||
bool policy_mgr_is_special_mode_active_5g(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
uint32_t conn_index;
|
||||
bool ret = false;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid Context");
|
||||
return ret;
|
||||
}
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
|
||||
conn_index++) {
|
||||
if (pm_conc_connection_list[conn_index].mode == mode &&
|
||||
pm_conc_connection_list[conn_index].freq >=
|
||||
WLAN_REG_MIN_5GHZ_CHAN_FREQ &&
|
||||
pm_conc_connection_list[conn_index].in_use)
|
||||
ret = true;
|
||||
}
|
||||
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool policy_mgr_is_sta_connected_2g(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
@ -403,15 +403,8 @@ uint32_t policy_mgr_get_channel(struct wlan_objmgr_psoc *psoc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* policy_mgr_skip_dfs_ch() - skip dfs channel or not
|
||||
* @psoc: pointer to soc
|
||||
* @skip_dfs_channel: pointer to result
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS policy_mgr_skip_dfs_ch(struct wlan_objmgr_psoc *psoc,
|
||||
bool *skip_dfs_channel)
|
||||
QDF_STATUS policy_mgr_skip_dfs_ch(struct wlan_objmgr_psoc *psoc,
|
||||
bool *skip_dfs_channel)
|
||||
{
|
||||
bool sta_sap_scc_on_dfs_chan;
|
||||
bool dfs_master_capable;
|
||||
@ -434,11 +427,23 @@ static QDF_STATUS policy_mgr_skip_dfs_ch(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
sta_sap_scc_on_dfs_chan =
|
||||
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
|
||||
if ((policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
|
||||
NULL) > 0) &&
|
||||
!sta_sap_scc_on_dfs_chan) {
|
||||
policy_mgr_debug("SAP/Go skips DFS ch if sta connects");
|
||||
*skip_dfs_channel = true;
|
||||
|
||||
if (policy_mgr_is_hw_dbs_capable(psoc)) {
|
||||
if ((policy_mgr_is_special_mode_active_5g(psoc,
|
||||
PM_P2P_CLIENT_MODE) ||
|
||||
policy_mgr_is_special_mode_active_5g(psoc, PM_STA_MODE)) &&
|
||||
!sta_sap_scc_on_dfs_chan) {
|
||||
policy_mgr_debug("skip DFS ch from pcl for DBS SAP/Go");
|
||||
*skip_dfs_channel = true;
|
||||
}
|
||||
} else {
|
||||
if ((policy_mgr_mode_specific_connection_count(psoc,
|
||||
PM_STA_MODE,
|
||||
NULL) > 0) &&
|
||||
!sta_sap_scc_on_dfs_chan) {
|
||||
policy_mgr_debug("skip DFS ch from pcl for non-DBS SAP/Go");
|
||||
*skip_dfs_channel = true;
|
||||
}
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user