mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacmn: Save user configurations in policy manager component
Update policy manager user configuration with INI parameters. Change-Id: I2e13bec2a1e99c9aee9e66d3e90a1275cf87ccfa CRs-Fixed: 2019994
This commit is contained in:
parent
e675dc6fcf
commit
8c8ca7d492
5 changed files with 55 additions and 28 deletions
|
|
@ -1739,4 +1739,18 @@ static inline bool policy_mgr_is_scan_simultaneous_capable(
|
|||
bool policy_mgr_is_mcc_adaptive_scheduler_enabled(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_set_user_cfg() - Function to set user cfg variables
|
||||
* required by policy manager component
|
||||
* @psoc: PSOC object information
|
||||
* @user_cfg: User config valiables structure pointer
|
||||
*
|
||||
* This function sets the user cfg variables required by policy
|
||||
* manager
|
||||
*
|
||||
* Return: SUCCESS or FAILURE
|
||||
*
|
||||
*/
|
||||
QDF_STATUS policy_mgr_set_user_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
struct policy_mgr_user_cfg *user_cfg);
|
||||
#endif /* __WLAN_POLICY_MGR_API_H */
|
||||
|
|
|
|||
|
|
@ -972,4 +972,11 @@ struct dual_mac_config {
|
|||
uint32_t req_fw_mode_config;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct policy_mgr_user_cfg - Policy manager user config variables
|
||||
* @enable_mcc_adaptive_scheduler: Enable MCC adaptive scheduler
|
||||
*/
|
||||
struct policy_mgr_user_cfg {
|
||||
uint8_t enable_mcc_adaptive_scheduler;
|
||||
};
|
||||
#endif /* __WLAN_POLICY_MGR_PUBLIC_STRUCT_H */
|
||||
|
|
|
|||
|
|
@ -144,21 +144,6 @@ bool policy_mgr_is_dual_mac_disabled_in_ini(
|
|||
return wlan_objmgr_psoc_get_dual_mac_disable(psoc);
|
||||
}
|
||||
|
||||
/**
|
||||
* policy_mgr_is_mas_enabled_in_user_cfg() - Check if MCC
|
||||
* adaptive scheduler is enabled in INI
|
||||
* @psoc: PSOC object information
|
||||
*
|
||||
* Checks if MCC adaptive scheduler is enabled in INI
|
||||
*
|
||||
* Return: true if MCC adaptive scheduler is enabled in INI
|
||||
*/
|
||||
bool policy_mgr_is_mas_enabled_in_user_cfg(
|
||||
struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t policy_mgr_mcc_to_scc_switch_mode_in_user_cfg(
|
||||
struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1224,6 +1224,27 @@ QDF_STATUS policy_mgr_get_channel_from_scan_result(
|
|||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS policy_mgr_set_user_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
struct policy_mgr_user_cfg *user_cfg)
|
||||
{
|
||||
|
||||
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_STATUS_E_FAILURE;
|
||||
}
|
||||
if (NULL == user_cfg) {
|
||||
policy_mgr_err("Invalid User Config");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pm_ctx->user_cfg = *user_cfg;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
uint8_t policy_mgr_search_and_check_for_session_conc(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t session_id,
|
||||
|
|
@ -1366,9 +1387,20 @@ bool policy_mgr_is_mcc_adaptive_scheduler_enabled(
|
|||
return false;
|
||||
}
|
||||
|
||||
return pm_ctx->enable_mcc_adaptive_scheduler ? true : false;
|
||||
return pm_ctx->user_cfg.enable_mcc_adaptive_scheduler ?
|
||||
true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
uint8_t vdev_id, enum tQDF_ADAPTER_MODE dev_mode)
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ struct policy_mgr_psoc_priv_obj {
|
|||
uint8_t conc_system_pref;
|
||||
struct dual_mac_config dual_mac_cfg;
|
||||
uint32_t hw_mode_change_in_progress;
|
||||
uint8_t enable_mcc_adaptive_scheduler;
|
||||
struct policy_mgr_user_cfg user_cfg;
|
||||
};
|
||||
|
||||
struct policy_mgr_psoc_priv_obj *policy_mgr_get_context(
|
||||
|
|
@ -276,17 +276,6 @@ QDF_STATUS policy_mgr_get_updated_fw_mode_config(
|
|||
bool policy_mgr_is_dual_mac_disabled_in_ini(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_is_mas_enabled_in_user_cfg() - Check if MCC
|
||||
* adaptive scheduler is enabled in INI
|
||||
* @psoc: PSOC object information
|
||||
*
|
||||
* Checks if MCC adaptive scheduler is enabled in INI
|
||||
*
|
||||
* Return: true if MCC adaptive scheduler is enabled 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue