qcacld-3.0: For single MAC no-interband MCC

Concurrency related changes for single MAC target which
doesn't support Inter-Band MCC as well.

Change-Id: Id9d02d6353103f21dee8b9e6767d2fc8b1277278
CRs-Fixed: 2711462
This commit is contained in:
Rachit Kankane
2020-05-18 16:00:58 +05:30
committed by nshrivas
parent a20d8c02af
commit 20ae27ea60
7 changed files with 89 additions and 9 deletions

View File

@@ -2387,6 +2387,15 @@ bool policy_mgr_is_dbs_enable(struct wlan_objmgr_psoc *psoc);
*/ */
bool policy_mgr_is_hw_dbs_capable(struct wlan_objmgr_psoc *psoc); bool policy_mgr_is_hw_dbs_capable(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_is_interband_mcc_supported() - Checks for interband MCC support
* @psoc: PSOC object information
* Checks if target supports interband MCC or not
*
* Return: True if the target supports interband MCC else False
*/
bool policy_mgr_is_interband_mcc_supported(struct wlan_objmgr_psoc *psoc);
/** /**
* policy_mgr_is_dbs_scan_allowed() - Check if DBS scan is allowed or not * policy_mgr_is_dbs_scan_allowed() - Check if DBS scan is allowed or not
* @psoc: PSOC object information * @psoc: PSOC object information

View File

@@ -26,7 +26,6 @@
/* Include files */ /* Include files */
#include "wlan_policy_mgr_api.h" #include "wlan_policy_mgr_api.h"
#include "wlan_policy_mgr_tables_no_dbs_i.h"
#include "wlan_policy_mgr_i.h" #include "wlan_policy_mgr_i.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "qdf_trace.h" #include "qdf_trace.h"
@@ -2913,7 +2912,8 @@ enum policy_mgr_pcl_type policy_mgr_get_pcl_from_second_conn_table(
if (dbs_capable) if (dbs_capable)
return (*second_connection_pcl_dbs_table)[idx][type][sys_pref]; return (*second_connection_pcl_dbs_table)[idx][type][sys_pref];
else else
return second_connection_pcl_nodbs_table[idx][type][sys_pref]; return (*second_connection_pcl_non_dbs_table)
[idx][type][sys_pref];
} }
enum policy_mgr_pcl_type policy_mgr_get_pcl_from_third_conn_table( enum policy_mgr_pcl_type policy_mgr_get_pcl_from_third_conn_table(
@@ -2927,6 +2927,7 @@ enum policy_mgr_pcl_type policy_mgr_get_pcl_from_third_conn_table(
if (dbs_capable) if (dbs_capable)
return (*third_connection_pcl_dbs_table)[idx][type][sys_pref]; return (*third_connection_pcl_dbs_table)[idx][type][sys_pref];
else else
return third_connection_pcl_nodbs_table[idx][type][sys_pref]; return (*third_connection_pcl_non_dbs_table)
[idx][type][sys_pref];
} }
#endif #endif

View File

@@ -2677,7 +2677,8 @@ bool policy_mgr_allow_new_home_channel(
QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION) QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION)
) && (pm_conc_connection_list[0].mac == ) && (pm_conc_connection_list[0].mac ==
pm_conc_connection_list[1].mac)) { pm_conc_connection_list[1].mac)) {
if (policy_mgr_is_hw_dbs_capable(psoc) == false) { if (!policy_mgr_is_hw_dbs_capable(psoc) &&
policy_mgr_is_interband_mcc_supported(psoc)) {
if (ch_freq != if (ch_freq !=
pm_conc_connection_list[0].freq && pm_conc_connection_list[0].freq &&
ch_freq != ch_freq !=
@@ -2716,7 +2717,8 @@ bool policy_mgr_allow_new_home_channel(
} else if (pm_conc_connection_list[0].mac == } else if (pm_conc_connection_list[0].mac ==
pm_conc_connection_list[1].mac) { pm_conc_connection_list[1].mac) {
/* Existing two connections are SCC */ /* Existing two connections are SCC */
if (policy_mgr_is_hw_dbs_capable(psoc) == false) { if (!policy_mgr_is_hw_dbs_capable(psoc) &&
policy_mgr_is_interband_mcc_supported(psoc)) {
/* keep legacy chip "allow" as it is */ /* keep legacy chip "allow" as it is */
policy_mgr_rl_debug("allow 2 intf SCC + new intf ch %d for legacy hw", policy_mgr_rl_debug("allow 2 intf SCC + new intf ch %d for legacy hw",
ch_freq); ch_freq);
@@ -2753,6 +2755,16 @@ bool policy_mgr_allow_new_home_channel(
policy_mgr_rl_debug("Existing DFS connection, new 2-port DFS connection is not allowed"); policy_mgr_rl_debug("Existing DFS connection, new 2-port DFS connection is not allowed");
status = false; status = false;
} else if ((num_connections == 1) &&
!policy_mgr_is_hw_dbs_capable(psoc) &&
!policy_mgr_is_interband_mcc_supported(psoc)) {
/* For target which is single mac and doesn't support
* interband MCC
*/
if ((pm_conc_connection_list[0].mode != PM_NAN_DISC_MODE) &&
(mode != PM_NAN_DISC_MODE))
status = wlan_reg_is_same_band_freqs(ch_freq,
pm_conc_connection_list[0].freq);
} }
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);

View File

@@ -1050,6 +1050,27 @@ bool policy_mgr_is_hw_dbs_capable(struct wlan_objmgr_psoc *psoc)
return true; return true;
} }
bool policy_mgr_is_interband_mcc_supported(struct wlan_objmgr_psoc *psoc)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
struct wmi_unified *wmi_handle;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return false;
}
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
if (!wmi_handle) {
policy_mgr_debug("Invalid WMI handle");
return false;
}
return !wmi_service_enabled(wmi_handle,
wmi_service_no_interband_mcc_support);
}
bool policy_mgr_is_hw_sbs_capable(struct wlan_objmgr_psoc *psoc) bool policy_mgr_is_hw_sbs_capable(struct wlan_objmgr_psoc *psoc)
{ {
if (!policy_mgr_find_if_fw_supports_dbs(psoc)) { if (!policy_mgr_find_if_fw_supports_dbs(psoc)) {
@@ -2369,7 +2390,10 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
policy_mgr_get_ch_width(bw)); policy_mgr_get_ch_width(bw));
if (chan_state == CHANNEL_STATE_DFS) if (chan_state == CHANNEL_STATE_DFS)
is_dfs_ch = true; is_dfs_ch = true;
/* don't allow 3rd home channel on same MAC */ /* don't allow 3rd home channel on same MAC
* also check for single mac target which doesn't
* support interbad MCC as well
*/
if (!policy_mgr_allow_new_home_channel(psoc, mode, ch_freq, if (!policy_mgr_allow_new_home_channel(psoc, mode, ch_freq,
num_connections, num_connections,
is_dfs_ch)) is_dfs_ch))

View File

@@ -199,8 +199,15 @@ extern const enum policy_mgr_pcl_type
extern enum policy_mgr_pcl_type extern enum policy_mgr_pcl_type
(*second_connection_pcl_dbs_table)[PM_MAX_ONE_CONNECTION_MODE] (*second_connection_pcl_dbs_table)[PM_MAX_ONE_CONNECTION_MODE]
[PM_MAX_NUM_OF_MODE][PM_MAX_CONC_PRIORITY_MODE]; [PM_MAX_NUM_OF_MODE][PM_MAX_CONC_PRIORITY_MODE];
extern enum policy_mgr_pcl_type const
(*second_connection_pcl_non_dbs_table)[PM_MAX_ONE_CONNECTION_MODE]
[PM_MAX_NUM_OF_MODE][PM_MAX_CONC_PRIORITY_MODE];
extern pm_dbs_pcl_third_connection_table_type extern pm_dbs_pcl_third_connection_table_type
*third_connection_pcl_dbs_table; *third_connection_pcl_dbs_table;
extern enum policy_mgr_pcl_type const
(*third_connection_pcl_non_dbs_table)[PM_MAX_TWO_CONNECTION_MODE]
[PM_MAX_NUM_OF_MODE][PM_MAX_CONC_PRIORITY_MODE];
extern policy_mgr_next_action_two_connection_table_type extern policy_mgr_next_action_two_connection_table_type
*next_action_two_connection_table; *next_action_two_connection_table;
extern policy_mgr_next_action_three_connection_table_type extern policy_mgr_next_action_three_connection_table_type

View File

@@ -26,6 +26,7 @@
/* Include files */ /* Include files */
#include "wlan_policy_mgr_api.h" #include "wlan_policy_mgr_api.h"
#include "wlan_policy_mgr_tables_no_dbs_i.h"
#include "wlan_policy_mgr_tables_1x1_dbs_i.h" #include "wlan_policy_mgr_tables_1x1_dbs_i.h"
#include "wlan_policy_mgr_tables_2x2_dbs_i.h" #include "wlan_policy_mgr_tables_2x2_dbs_i.h"
#include "wlan_policy_mgr_tables_2x2_5g_1x1_2g.h" #include "wlan_policy_mgr_tables_2x2_5g_1x1_2g.h"
@@ -406,6 +407,24 @@ static void policy_mgr_update_5g_scc_prefer(struct wlan_objmgr_psoc *psoc)
} }
} }
#ifdef FEATURE_NO_DBS_INTRABAND_MCC_SUPPORT
static void policy_mgr_init_non_dbs_pcl(void)
{
second_connection_pcl_non_dbs_table =
&second_connection_pcl_nodbs_no_interband_mcc_table;
third_connection_pcl_non_dbs_table =
&third_connection_pcl_nodbs_no_interband_mcc_table;
}
#else
static void policy_mgr_init_non_dbs_pcl(void)
{
second_connection_pcl_non_dbs_table =
&second_connection_pcl_nodbs_table;
third_connection_pcl_non_dbs_table =
&third_connection_pcl_nodbs_table;
}
#endif
QDF_STATUS policy_mgr_psoc_enable(struct wlan_objmgr_psoc *psoc) QDF_STATUS policy_mgr_psoc_enable(struct wlan_objmgr_psoc *psoc)
{ {
QDF_STATUS status; QDF_STATUS status;
@@ -503,6 +522,9 @@ QDF_STATUS policy_mgr_psoc_enable(struct wlan_objmgr_psoc *psoc)
third_connection_pcl_dbs_table = third_connection_pcl_dbs_table =
&pm_third_connection_pcl_dbs_1x1_table; &pm_third_connection_pcl_dbs_1x1_table;
/* Initialize non-DBS pcl table pointer to particular table*/
policy_mgr_init_non_dbs_pcl();
if (policy_mgr_is_hw_dbs_2x2_capable(psoc) || if (policy_mgr_is_hw_dbs_2x2_capable(psoc) ||
policy_mgr_is_hw_dbs_required_for_band(psoc, policy_mgr_is_hw_dbs_required_for_band(psoc,
HW_MODE_MAC_BAND_2G)) { HW_MODE_MAC_BAND_2G)) {

View File

@@ -26,7 +26,6 @@
/* Include files */ /* Include files */
#include "wlan_policy_mgr_api.h" #include "wlan_policy_mgr_api.h"
#include "wlan_policy_mgr_tables_no_dbs_i.h"
#include "wlan_policy_mgr_i.h" #include "wlan_policy_mgr_i.h"
#include "qdf_types.h" #include "qdf_types.h"
#include "qdf_trace.h" #include "qdf_trace.h"
@@ -52,8 +51,14 @@ first_connection_pcl_table[PM_MAX_NUM_OF_MODE]
enum policy_mgr_pcl_type enum policy_mgr_pcl_type
(*second_connection_pcl_dbs_table)[PM_MAX_ONE_CONNECTION_MODE] (*second_connection_pcl_dbs_table)[PM_MAX_ONE_CONNECTION_MODE]
[PM_MAX_NUM_OF_MODE][PM_MAX_CONC_PRIORITY_MODE]; [PM_MAX_NUM_OF_MODE][PM_MAX_CONC_PRIORITY_MODE];
enum policy_mgr_pcl_type const
(*second_connection_pcl_non_dbs_table)[PM_MAX_ONE_CONNECTION_MODE]
[PM_MAX_NUM_OF_MODE][PM_MAX_CONC_PRIORITY_MODE];
pm_dbs_pcl_third_connection_table_type pm_dbs_pcl_third_connection_table_type
*third_connection_pcl_dbs_table; *third_connection_pcl_dbs_table;
enum policy_mgr_pcl_type const
(*third_connection_pcl_non_dbs_table)[PM_MAX_TWO_CONNECTION_MODE]
[PM_MAX_NUM_OF_MODE][PM_MAX_CONC_PRIORITY_MODE];
policy_mgr_next_action_two_connection_table_type policy_mgr_next_action_two_connection_table_type
*next_action_two_connection_table; *next_action_two_connection_table;
policy_mgr_next_action_three_connection_table_type policy_mgr_next_action_three_connection_table_type
@@ -815,7 +820,7 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
pcl = (*second_connection_pcl_dbs_table) pcl = (*second_connection_pcl_dbs_table)
[second_index][mode][conc_system_pref]; [second_index][mode][conc_system_pref];
} else { } else {
pcl = second_connection_pcl_nodbs_table pcl = (*second_connection_pcl_non_dbs_table)
[second_index][mode][conc_system_pref]; [second_index][mode][conc_system_pref];
} }
@@ -832,7 +837,7 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
pcl = (*third_connection_pcl_dbs_table) pcl = (*third_connection_pcl_dbs_table)
[third_index][mode][conc_system_pref]; [third_index][mode][conc_system_pref];
} else { } else {
pcl = third_connection_pcl_nodbs_table pcl = (*third_connection_pcl_non_dbs_table)
[third_index][mode][conc_system_pref]; [third_index][mode][conc_system_pref];
} }
break; break;