|
@@ -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
|
|
|
- *
|
|
|
- * This function passes down the value of MAS to UMAC
|
|
|
+ * policy_mgr_change_mcc_go_beacon_interval() - Change MCC beacon interval
|
|
|
+ * @psoc: PSOC object information
|
|
|
+ * @vdev_id: vdev id
|
|
|
+ * @dev_mode: device mode
|
|
|
*
|
|
|
- * 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");
|
|
|
|
|
|
- /* 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;
|
|
|
- }
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ 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;
|