qcacmn: Remove legacy dependency from Policy Manager Part 4

Remove legacy dependency from Policy Manager component Part 4

Change-Id: I9b96a03031c27b87c9e74a3df512f6032051bd85
CRs-Fixed: 2019994
这个提交包含在:
Archana Ramachandran
2017-03-06 17:07:44 -08:00
提交者 Sandeep Puligilla
父节点 94fef7786b
当前提交 aab9ff4cbb
修改 5 个文件,包含 114 行新增59 行删除

查看文件

@@ -95,12 +95,13 @@ uint32_t policy_mgr_get_connection_count(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_get_concurrency_mode() - return concurrency mode
* @psoc: PSOC object information
*
* This routine is used to retrieve concurrency mode
*
* Return: uint32_t value of concurrency mask
*/
uint32_t policy_mgr_get_concurrency_mode(void);
uint32_t policy_mgr_get_concurrency_mode(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_search_and_check_for_session_conc() - Checks if
@@ -150,15 +151,19 @@ QDF_STATUS policy_mgr_handle_conc_multiport(
* policy_mgr_check_concurrent_intf_and_restart_sap() - Check
* concurrent change intf
* @psoc: PSOC object information
* @operation_channel: operation channel
*
* Checks the concurrent change interface and restarts SAP
*
* Return: None
*/
void policy_mgr_check_concurrent_intf_and_restart_sap(
struct wlan_objmgr_psoc *psoc);
struct wlan_objmgr_psoc *psoc,
uint8_t operation_channel);
#else
static inline void policy_mgr_check_concurrent_intf_and_restart_sap(
struct wlan_objmgr_psoc *psoc)
struct wlan_objmgr_psoc *psoc,
uint8_t operation_channel)
{
}
@@ -904,13 +909,15 @@ QDF_STATUS policy_mgr_get_channel_from_scan_result(
/**
* policy_mgr_concurrent_open_sessions_running() - Checks for
* concurrent open session
* @psoc: PSOC object information
*
* Checks if more than one open session is running for all the allowed modes
* in the driver
*
* Return: True if more than one open session exists, False otherwise
*/
bool policy_mgr_concurrent_open_sessions_running(void);
bool policy_mgr_concurrent_open_sessions_running(
struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_max_concurrent_connections_reached() - Check if
@@ -966,13 +973,15 @@ bool policy_mgr_is_sta_active_connection_exists(
/**
* policy_mgr_concurrent_beaconing_sessions_running() - Checks
* for concurrent beaconing entities
* @psoc: PSOC object information
*
* Checks if multiple beaconing sessions are running i.e., if SAP or GO or IBSS
* are beaconing together
*
* Return: True if multiple entities are beaconing together, False otherwise
*/
bool policy_mgr_concurrent_beaconing_sessions_running(void);
bool policy_mgr_concurrent_beaconing_sessions_running(
struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_wait_for_connection_update() - Wait for hw mode

查看文件

@@ -577,13 +577,22 @@ QDF_STATUS policy_mgr_handle_conc_multiport(struct wlan_objmgr_psoc *psoc,
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
void policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
{
return;
}
/**
* policy_mgr_check_concurrent_intf_and_restart_sap() - Check
* concurrent change intf
* @psoc: PSOC object information
* @operation_channel: operation channel
*
* Checks the concurrent change interface and restarts SAP
*
* Return: None
*/
void policy_mgr_check_concurrent_intf_and_restart_sap(
struct wlan_objmgr_psoc *psoc)
struct wlan_objmgr_psoc *psoc,
uint8_t operation_channel)
{
return;
}
#endif /* FEATURE_WLAN_MCC_TO_SCC_SWITCH */

查看文件

@@ -159,6 +159,12 @@ bool policy_mgr_is_mas_enabled_in_user_cfg(
return false;
}
uint32_t policy_mgr_mcc_to_scc_switch_mode_in_user_cfg(
struct wlan_objmgr_psoc *psoc)
{
return 0;
}
/**
* policy_mgr_get_dbs_config() - Get DBS bit
*

查看文件

@@ -1158,9 +1158,28 @@ done:
return status;
}
uint32_t policy_mgr_get_concurrency_mode(void)
/**
* policy_mgr_get_concurrency_mode() - return concurrency mode
* @psoc: PSOC object information
*
* This routine is used to retrieve concurrency mode
*
* Return: uint32_t value of concurrency mask
*/
uint32_t policy_mgr_get_concurrency_mode(struct wlan_objmgr_psoc *psoc)
{
return 0;
struct policy_mgr_psoc_priv_obj *pm_ctx;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid context");
return QDF_STA_MASK;
}
policy_mgr_info("concurrency_mode: 0x%x",
pm_ctx->concurrency_mode);
return pm_ctx->concurrency_mode;
}
/**
@@ -1239,6 +1258,11 @@ uint8_t policy_mgr_search_and_check_for_session_conc(
return channel;
}
uint8_t policy_mgr_is_mcc_in_24G(struct wlan_objmgr_psoc *psoc)
{
return 0;
}
bool policy_mgr_check_for_session_conc(struct wlan_objmgr_psoc *psoc,
uint8_t session_id, uint8_t channel)
{
@@ -1266,51 +1290,6 @@ bool policy_mgr_check_for_session_conc(struct wlan_objmgr_psoc *psoc,
return true;
}
uint8_t policy_mgr_is_mcc_in_24G(struct wlan_objmgr_psoc *psoc)
{
uint32_t num_connections = 0;
bool is_24G_mcc = false;
num_connections = policy_mgr_get_connection_count(psoc);
switch (num_connections) {
case 1:
break;
case 2:
if ((pm_conc_connection_list[0].chan !=
pm_conc_connection_list[1].chan) &&
(pm_conc_connection_list[0].mac ==
pm_conc_connection_list[1].mac) &&
(pm_conc_connection_list[0].chan <=
WLAN_REG_MAX_24GHZ_CH_NUM) &&
(pm_conc_connection_list[1].chan <=
WLAN_REG_MAX_24GHZ_CH_NUM))
is_24G_mcc = true;
break;
case 3:
if (((pm_conc_connection_list[0].chan !=
pm_conc_connection_list[1].chan) ||
(pm_conc_connection_list[0].chan !=
pm_conc_connection_list[2].chan) ||
(pm_conc_connection_list[1].chan !=
pm_conc_connection_list[2].chan)) &&
(pm_conc_connection_list[0].chan <=
WLAN_REG_MAX_24GHZ_CH_NUM) &&
(pm_conc_connection_list[1].chan <=
WLAN_REG_MAX_24GHZ_CH_NUM) &&
(pm_conc_connection_list[2].chan <=
WLAN_REG_MAX_24GHZ_CH_NUM))
is_24G_mcc = true;
break;
default:
policy_mgr_err("unexpected num_connections value %d",
num_connections);
break;
}
return is_24G_mcc;
}
/**
* policy_mgr_is_mcc_adaptive_scheduler_enabled() - Function to
* gets the policy manager mcc adaptive scheduler enabled
@@ -1413,14 +1392,55 @@ enum policy_mgr_con_mode policy_mgr_convert_device_mode_to_qdf_type(
return mode;
}
bool policy_mgr_concurrent_open_sessions_running(void)
/**
* policy_mgr_concurrent_open_sessions_running() - Checks for
* concurrent open session
* @psoc: PSOC object information
*
* Checks if more than one open session is running for all the allowed modes
* in the driver
*
* Return: True if more than one open session exists, False otherwise
*/
bool policy_mgr_concurrent_open_sessions_running(
struct wlan_objmgr_psoc *psoc)
{
return true;
uint8_t i = 0;
uint8_t j = 0;
struct policy_mgr_psoc_priv_obj *pm_ctx;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid context");
return false;
}
for (i = 0; i < QDF_MAX_NO_OF_MODE; i++)
j += pm_ctx->no_of_open_sessions[i];
return j > 1;
}
bool policy_mgr_concurrent_beaconing_sessions_running(void)
/**
* policy_mgr_concurrent_beaconing_sessions_running() - Checks
* for concurrent beaconing entities
* @psoc: PSOC object information
*
* Checks if multiple beaconing sessions are running i.e., if SAP or GO or IBSS
* are beaconing together
*
* Return: True if multiple entities are beaconing together, False otherwise
*/
bool policy_mgr_concurrent_beaconing_sessions_running(
struct wlan_objmgr_psoc *psoc)
{
return true;
return (policy_mgr_mode_specific_connection_count(
psoc, QDF_SAP_MODE, NULL) +
policy_mgr_mode_specific_connection_count(
psoc, QDF_P2P_GO_MODE, NULL) +
policy_mgr_mode_specific_connection_count(
psoc, QDF_IBSS_MODE, NULL) > 1) ?
true : false;
}

查看文件

@@ -312,6 +312,17 @@ bool policy_mgr_is_dual_mac_disabled_in_ini(
*/
bool policy_mgr_is_mas_enabled_in_user_cfg(
struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_mcc_to_scc_switch_mode_in_user_cfg() - MCC to SCC
* switch mode value in the user config
* @psoc: PSOC object information
*
* MCC to SCC switch mode value in user config
*
* Return: MCC to SCC switch mode value
*/
uint32_t policy_mgr_mcc_to_scc_switch_mode_in_user_cfg(
struct wlan_objmgr_psoc *psoc);
bool policy_mgr_get_dbs_config(struct wlan_objmgr_psoc *psoc);
bool policy_mgr_get_agile_dfs_config(struct wlan_objmgr_psoc *psoc);
bool policy_mgr_get_dbs_scan_config(struct wlan_objmgr_psoc *psoc);