mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacmn: Remove legacy dependency from Policy Manager Part 2
Remove legacy dependency from Policy Manager component Part 2 Change-Id: I26216e9b7fa0f75f144b5d8ef88be31fcb4224b5 CRs-Fixed: 2019994
This commit is contained in:
parent
40a32cc43c
commit
80abcf4ede
4 changed files with 31 additions and 117 deletions
|
|
@ -176,57 +176,19 @@ static inline void policy_mgr_check_concurrent_intf_and_restart_sap(
|
|||
*/
|
||||
uint8_t policy_mgr_is_mcc_in_24G(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_set_mas() - Function to set MAS value to UMAC
|
||||
* @psoc: Pointer to psoc
|
||||
* @mas_value: 0-Disable, 1-Enable MAS
|
||||
* @dev_mode: device mode
|
||||
*
|
||||
* This function passes down the value of MAS to UMAC
|
||||
*
|
||||
* Return: Configuration message posting status, SUCCESS or Fail
|
||||
*
|
||||
*/
|
||||
int32_t policy_mgr_set_mas(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t mas_value,
|
||||
enum tQDF_ADAPTER_MODE dev_mode);
|
||||
|
||||
/**
|
||||
* policy_mgr_set_mcc_p2p_quota() - Function to set quota for P2P
|
||||
* @psoc: PSOC object information
|
||||
* @set_value: Quota value for the interface
|
||||
*
|
||||
* This function is used to set the quota for P2P cases
|
||||
*
|
||||
* Return: Configuration message posting status, SUCCESS or Fail
|
||||
*
|
||||
*/
|
||||
int policy_mgr_set_mcc_p2p_quota(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t set_value);
|
||||
|
||||
/**
|
||||
* policy_mgr_change_mcc_go_beacon_interval() - Change MCC beacon interval
|
||||
* @psoc: PSOC object information
|
||||
* @vdev_id: vdev id
|
||||
* @dev_mode: device mode
|
||||
*
|
||||
* Updates the beacon parameters of the GO in MCC scenario
|
||||
*
|
||||
* Return: Success or Failure depending on the overall function behavior
|
||||
*/
|
||||
QDF_STATUS policy_mgr_change_mcc_go_beacon_interval(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_go_set_mcc_p2p_quota() - Function to set quota for P2P GO
|
||||
* @psoc: PSOC object information
|
||||
* @set_value: Qouta value for the interface
|
||||
*
|
||||
* This function is used to set the quota for P2P GO cases
|
||||
*
|
||||
* Return: Configuration message posting status, SUCCESS or Fail
|
||||
*
|
||||
*/
|
||||
int policy_mgr_go_set_mcc_p2p_quota(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t set_value);
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, enum tQDF_ADAPTER_MODE dev_mode);
|
||||
|
||||
/**
|
||||
* policy_mgr_set_mcc_latency() - Set MCC latency
|
||||
|
|
@ -779,7 +741,7 @@ typedef void (*policy_mgr_nss_update_cback)(struct wlan_objmgr_psoc *psoc,
|
|||
* @sme_pdev_set_hw_mode: Set the new HW mode to FW
|
||||
* @sme_pdev_set_pcl: Set new PCL to FW
|
||||
* @sme_nss_update_request: Update NSS value to FW
|
||||
* @sme_set_mas: Set MCC adaptive scheduler value
|
||||
* @sme_change_mcc_beacon_interval: Set MCC beacon interval to FW
|
||||
*/
|
||||
struct policy_mgr_sme_cbacks {
|
||||
QDF_STATUS (*sme_get_valid_channels)(uint8_t *chan_list,
|
||||
|
|
@ -794,7 +756,7 @@ struct policy_mgr_sme_cbacks {
|
|||
uint8_t new_nss, policy_mgr_nss_update_cback cback,
|
||||
uint8_t next_action, struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_conn_update_reason reason);
|
||||
QDF_STATUS (*sme_set_mas) (uint32_t val);
|
||||
QDF_STATUS (*sme_change_mcc_beacon_interval) (uint8_t session_id);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1300,90 +1300,47 @@ bool policy_mgr_is_mcc_adaptive_scheduler_enabled(
|
|||
}
|
||||
|
||||
/**
|
||||
* policy_mgr_set_mas() - Function to set MAS value to UMAC
|
||||
* @psoc: Pointer to psoc
|
||||
* @mas_value: 0-Disable, 1-Enable MAS
|
||||
* @dev_mode: device mode
|
||||
* policy_mgr_change_mcc_go_beacon_interval() - Change MCC beacon interval
|
||||
* @psoc: PSOC object information
|
||||
* @vdev_id: vdev id
|
||||
* @dev_mode: device mode
|
||||
*
|
||||
* This function passes down the value of MAS to UMAC
|
||||
*
|
||||
* Return: Configuration message posting status, SUCCESS or Fail
|
||||
* Updates the beacon parameters of the GO in MCC scenario
|
||||
*
|
||||
* Return: Success or Failure depending on the overall function behavior
|
||||
*/
|
||||
int32_t policy_mgr_set_mas(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t mas_value,
|
||||
enum tQDF_ADAPTER_MODE dev_mode)
|
||||
QDF_STATUS policy_mgr_change_mcc_go_beacon_interval(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, enum tQDF_ADAPTER_MODE dev_mode)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
QDF_STATUS ret_status;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid context");
|
||||
return -EFAULT;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (mas_value) {
|
||||
if (policy_mgr_is_mas_enabled_in_user_cfg(psoc)) {
|
||||
policy_mgr_info("Miracast is ON. Disable MAS and configure P2P quota");
|
||||
pm_ctx->enable_mcc_adaptive_scheduler = false;
|
||||
ret_status = pm_ctx->sme_cbacks.sme_set_mas(false);
|
||||
if (QDF_STATUS_SUCCESS != ret_status) {
|
||||
policy_mgr_err("Failed to disable MAS");
|
||||
return -EBUSY;
|
||||
}
|
||||
policy_mgr_info("UPDATE Beacon Params");
|
||||
|
||||
if (QDF_SAP_MODE == dev_mode) {
|
||||
if (!pm_ctx->
|
||||
sme_cbacks.sme_change_mcc_beacon_interval) {
|
||||
policy_mgr_err("sme_change_mcc_beacon_interval callback is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* Config p2p quota */
|
||||
if (dev_mode == QDF_STA_MODE)
|
||||
policy_mgr_set_mcc_p2p_quota(psoc,
|
||||
100 - POLICY_MGR_DEFAULT_MCC_P2P_QUOTA);
|
||||
else if (dev_mode == QDF_P2P_GO_MODE)
|
||||
policy_mgr_go_set_mcc_p2p_quota(psoc,
|
||||
POLICY_MGR_DEFAULT_MCC_P2P_QUOTA);
|
||||
else
|
||||
policy_mgr_set_mcc_p2p_quota(psoc,
|
||||
POLICY_MGR_DEFAULT_MCC_P2P_QUOTA);
|
||||
} else {
|
||||
policy_mgr_info("Miracast is OFF. Enable MAS and reset P2P quota");
|
||||
if (dev_mode == QDF_P2P_GO_MODE)
|
||||
policy_mgr_go_set_mcc_p2p_quota(psoc,
|
||||
POLICY_MGR_RESET_MCC_P2P_QUOTA);
|
||||
else
|
||||
policy_mgr_set_mcc_p2p_quota(psoc,
|
||||
POLICY_MGR_RESET_MCC_P2P_QUOTA);
|
||||
|
||||
if (policy_mgr_is_mas_enabled_in_user_cfg(psoc)) {
|
||||
pm_ctx->enable_mcc_adaptive_scheduler = true;
|
||||
ret_status = pm_ctx->sme_cbacks.sme_set_mas(true);
|
||||
if (QDF_STATUS_SUCCESS != ret_status) {
|
||||
policy_mgr_err("Unable to enable MAS");
|
||||
return -EBUSY;
|
||||
}
|
||||
status = pm_ctx->sme_cbacks.
|
||||
sme_change_mcc_beacon_interval(vdev_id);
|
||||
if (status == QDF_STATUS_E_FAILURE) {
|
||||
policy_mgr_err("Failed to update Beacon Params");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t policy_mgr_set_mcc_p2p_quota(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t set_value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
QDF_STATUS policy_mgr_change_mcc_go_beacon_interval(
|
||||
struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
int32_t policy_mgr_go_set_mcc_p2p_quota(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t set_value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void policy_mgr_set_mcc_latency(struct wlan_objmgr_psoc *psoc, int set_value)
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -67,12 +67,6 @@ extern enum cds_band_type cds_chan_to_band(uint32_t chan);
|
|||
#define CONNECTION_UPDATE_TIMEOUT 1000
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Some P2P quota calues for MCC
|
||||
*/
|
||||
#define POLICY_MGR_DEFAULT_MCC_P2P_QUOTA 70
|
||||
#define POLICY_MGR_RESET_MCC_P2P_QUOTA 50
|
||||
|
||||
/**
|
||||
* Policy Mgr hardware mode list bit-mask definitions.
|
||||
* Bits 4:0, 31:29 are unused.
|
||||
|
|
|
|||
|
|
@ -396,7 +396,8 @@ QDF_STATUS policy_mgr_register_sme_cb(struct wlan_objmgr_psoc *psoc,
|
|||
sme_cbacks->sme_pdev_set_pcl;
|
||||
pm_ctx->sme_cbacks.sme_soc_set_dual_mac_config =
|
||||
sme_cbacks->sme_soc_set_dual_mac_config;
|
||||
pm_ctx->sme_cbacks.sme_set_mas = sme_cbacks->sme_set_mas;
|
||||
pm_ctx->sme_cbacks.sme_change_mcc_beacon_interval =
|
||||
sme_cbacks->sme_change_mcc_beacon_interval;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue