diff --git a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h index 7dc47ecdee..6fd5e885eb 100644 --- a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +++ b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h @@ -1650,6 +1650,35 @@ bool policy_mgr_is_vdev_ll_sap(struct wlan_objmgr_psoc *psoc, uint32_t vdev_id); +/** + * policy_mgr_is_vdev_ht_ll_sap() - Check whether given vdev is HT LL SAP or not + * @psoc: psoc object + * @vdev_id: vdev id + * + * Based on vdev id ap profile set via vendor command is get and compared with + * ht_ll_type AP type and is return true if profile set is throghput sensitive. + * + * Return: true if it's present otherwise false + */ +bool +policy_mgr_is_vdev_ht_ll_sap(struct wlan_objmgr_psoc *psoc, + uint32_t vdev_id); + +/** + * policy_mgr_is_vdev_lt_ll_sap() - Check whether given vdev is LT LL SAP or not + * @psoc: psoc object + * @vdev_id: vdev id + * + * Based on vdev id ap profile set via vendor command is get and compared with + * lt_ll_type AP and is return true if profile set is gaming or losless audio + * where latency matters. + * + * Return: true if it's present otherwise false + */ +bool +policy_mgr_is_vdev_lt_ll_sap(struct wlan_objmgr_psoc *psoc, + uint32_t vdev_id); + /** * policy_mgr_get_preferred_dbs_action_table() - get dbs action table type * @psoc: Pointer to psoc diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c index 2a6a775be7..ab758daa5e 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c @@ -4086,9 +4086,18 @@ bool policy_mgr_is_sta_chan_valid_for_connect_and_roam( return true; } -bool -policy_mgr_is_vdev_ll_sap(struct wlan_objmgr_psoc *psoc, - uint32_t vdev_id) +/** + * _policy_mgr_is_vdev_ll_sap() - Check whether any LL SAP is present or not + * for provided ap policy + * @psoc: psoc object + * @vdev_id: vdev id + * @ap_type: LL SAP type + * + * Return: true if it's present otherwise false + */ +static bool +_policy_mgr_is_vdev_ll_sap(struct wlan_objmgr_psoc *psoc, + uint32_t vdev_id, enum ll_ap_type ap_type) { struct wlan_objmgr_vdev *vdev; bool is_ll_sap = false; @@ -4116,14 +4125,52 @@ policy_mgr_is_vdev_ll_sap(struct wlan_objmgr_psoc *psoc, } profile = wlan_mlme_get_ap_policy(vdev); - if (profile == HOST_CONCURRENT_AP_POLICY_GAMING_AUDIO || - profile == HOST_CONCURRENT_AP_POLICY_LOSSLESS_AUDIO_STREAMING) - is_ll_sap = true; - wlan_objmgr_vdev_release_ref(vdev, WLAN_POLICY_MGR_ID); + switch (ap_type) { + case LL_AP_TYPE_HT: + if (profile == HOST_CONCURRENT_AP_POLICY_XR) + is_ll_sap = true; + break; + case LL_AP_TYPE_LT: + if (profile == HOST_CONCURRENT_AP_POLICY_GAMING_AUDIO || + profile == + HOST_CONCURRENT_AP_POLICY_LOSSLESS_AUDIO_STREAMING) + is_ll_sap = true; + break; + case LL_AP_TYPE_ANY: + if (profile == HOST_CONCURRENT_AP_POLICY_GAMING_AUDIO || + profile == + HOST_CONCURRENT_AP_POLICY_LOSSLESS_AUDIO_STREAMING || + profile == HOST_CONCURRENT_AP_POLICY_XR) + is_ll_sap = true; + break; + default: + policy_mgr_err("invalid ap type %d", ap_type); + } return is_ll_sap; } +bool +policy_mgr_is_vdev_ll_sap(struct wlan_objmgr_psoc *psoc, + uint32_t vdev_id) +{ + return _policy_mgr_is_vdev_ll_sap(psoc, vdev_id, LL_AP_TYPE_ANY); +} + +bool +policy_mgr_is_vdev_ht_ll_sap(struct wlan_objmgr_psoc *psoc, + uint32_t vdev_id) +{ + return _policy_mgr_is_vdev_ll_sap(psoc, vdev_id, LL_AP_TYPE_HT); +} + +bool +policy_mgr_is_vdev_lt_ll_sap(struct wlan_objmgr_psoc *psoc, + uint32_t vdev_id) +{ + return _policy_mgr_is_vdev_ll_sap(psoc, vdev_id, LL_AP_TYPE_LT); +} + QDF_STATUS policy_mgr_get_pcl_chlist_for_ll_sap(struct wlan_objmgr_psoc *psoc, uint32_t *len, uint32_t *pcl_channels, diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index dfd1704bf7..f6d431756e 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -2909,4 +2909,16 @@ enum host_concurrent_ap_policy { HOST_CONCURRENT_AP_POLICY_LOSSLESS_AUDIO_STREAMING = 2, HOST_CONCURRENT_AP_POLICY_XR = 3 }; + +/** + * enum ll_ap_type - low latency AP type + * @LL_AP_TYPE_HT: low latency AP type high throughput + * @LL_AP_TYPE_LT: low latency AP type low latency + * @LL_AP_TYPE_ANY: low latency AP type any + */ +enum ll_ap_type { + LL_AP_TYPE_HT = 0, + LL_AP_TYPE_LT = 1, + LL_AP_TYPE_ANY = 2, +}; #endif