qcacld-3.0: Handle eMLSR+NAN concurrency

eMLSR + NAN concurrency is not supported currently, so handle it
as mentioned below
1. eMLSR+NAN: If NAN is coming up when eMLSR is active, disable
   one ML link so that eMLSR gets disabled.
2. NAN+eMLSR: If eMLSR is coming up when NAN is already enabled,
   disable one link so that eMLSR doesn't get enabled.

Also, cleanup the APIs to carry a generic flag to indicate that
a concurrent connection is coming up instead of mode specific flag
as there is no dependency on modes to handle concurrency.

Change-Id: I625f8b18f9d7e991922d22af53f3e8743a3727bd
CRs-Fixed: 3443900
This commit is contained in:
Srinivas Dasari
2023-03-31 19:32:32 +05:30
کامیت شده توسط Madan Koyyalamudi
والد 85d310d232
کامیت b01b3c5e00
9فایلهای تغییر یافته به همراه100 افزوده شده و 62 حذف شده

مشاهده پرونده

@@ -1212,6 +1212,14 @@ void policy_mgr_move_vdev_from_connection_to_disabled_tbl(
bool
policy_mgr_ml_link_vdev_need_to_be_disabled(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_vdev *vdev);
/**
* policy_mgr_wait_for_set_link_update() - Wait for set/clear link response
* @psoc: psoc pointer
*
* Return: QDF_STATUS
*/
QDF_STATUS policy_mgr_wait_for_set_link_update(struct wlan_objmgr_psoc *psoc);
#else
static inline bool
policy_mgr_is_ml_vdev_id(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
@@ -1241,6 +1249,12 @@ static inline void
policy_mgr_move_vdev_from_connection_to_disabled_tbl(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id) {}
static inline QDF_STATUS
policy_mgr_wait_for_set_link_update(struct wlan_objmgr_psoc *psoc)
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif
/**
@@ -4757,10 +4771,10 @@ void policy_mgr_handle_ml_sta_links_on_vdev_down(struct wlan_objmgr_psoc *psoc,
* policy_mgr_handle_emlsr_sta_concurrency() - Handle concurrency scenarios with
* EMLSR STA.
* @psoc: objmgr psoc
* @vdev: pointer to vdev
* @ap_coming_up: Check if the new connection request is SAP/P2P GO/NAN
* @sta_coming_up: Check if the new connection request is STA/P2P Client
* @emlsr_sta_coming_up: Check if the new connection request is EMLSR STA
* @conc_con_coming_up: Indicates if any concurrent connection is coming up
* @emlsr_sta_coming_up: Carries true when eMLSR STA is coming up.
* Carries true when an unsupported concurrency is
* gone, so that host can let firmware go to eMLSR mode.
*
* The API handles concurrency scenarios with existing EMLSR connection when a
* new connection request is received OR with an existing legacy connection when
@@ -4769,9 +4783,7 @@ void policy_mgr_handle_ml_sta_links_on_vdev_down(struct wlan_objmgr_psoc *psoc,
* Return: none
*/
void policy_mgr_handle_emlsr_sta_concurrency(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_vdev *vdev,
bool ap_coming_up,
bool sta_coming_up,
bool conc_con_coming_up,
bool emlsr_sta_coming_up);
/**

مشاهده پرونده

@@ -5864,9 +5864,7 @@ end:
}
void policy_mgr_handle_emlsr_sta_concurrency(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_vdev *vdev,
bool ap_coming_up,
bool sta_coming_up,
bool conc_con_coming_up,
bool emlsr_sta_coming_up)
{
uint8_t num_mlo = 0;
@@ -5877,25 +5875,24 @@ void policy_mgr_handle_emlsr_sta_concurrency(struct wlan_objmgr_psoc *psoc,
&num_mlo);
if (num_mlo < 2) {
policy_mgr_debug("vdev %d ap state %d num mlo sta links %d",
wlan_vdev_get_id(vdev), ap_coming_up, num_mlo);
policy_mgr_debug("conc_con_coming_up %d num mlo sta links %d",
conc_con_coming_up, num_mlo);
return;
}
policy_mgr_debug("vdev %d num_mlo %d is_mlo_emlsr %d",
wlan_vdev_get_id(vdev), num_mlo, is_mlo_emlsr);
policy_mgr_debug("ap state %d legacy sta state %d emlsr sta state %d",
ap_coming_up, sta_coming_up, emlsr_sta_coming_up);
policy_mgr_debug("num_mlo %d is_mlo_emlsr %d conc_con_coming_up: %d",
num_mlo, is_mlo_emlsr, conc_con_coming_up);
if (!is_mlo_emlsr)
return;
if (ap_coming_up || sta_coming_up || (emlsr_sta_coming_up &&
policy_mgr_get_connection_count(psoc) > 2)) {
if (conc_con_coming_up ||
(emlsr_sta_coming_up &&
policy_mgr_get_connection_count(psoc) > 2)) {
/*
* Force disable one of the links (FW will decide which link) if
* 1) EMLSR STA is present and new SAP/STA connection comes up.
* 2) There is a legacy connection (SAP/P2P) and a STA comes
* 1) EMLSR STA is present and SAP/STA/NAN connection comes up.
* 2) There is a legacy connection (SAP/P2P/NAN) and a STA comes
* up in EMLSR mode.
*/
policy_mgr_mlo_sta_set_link(psoc, MLO_LINK_FORCE_REASON_CONNECT,
@@ -5904,14 +5901,15 @@ void policy_mgr_handle_emlsr_sta_concurrency(struct wlan_objmgr_psoc *psoc,
return;
}
if (!(ap_coming_up || sta_coming_up) && emlsr_sta_coming_up)
if (!conc_con_coming_up && emlsr_sta_coming_up)
/*
* No force i.e. Re-enable the disabled link if-
* 1) EMLSR STA is present and new SAP/STA connection goes down.
* One of the links was disabled while a new connection came up.
* 2) Legacy connection (SAP/P2P) goes down and if STA is EMLSR
* capable. One of the links was disabled after EMLSR
* association.
* 1) EMLSR STA is present and new SAP/STA/NAN connection goes
* down. One of the links was disabled while a new connection
* came up.
* 2) Legacy connection (SAP/P2P/NAN) goes down and if STA is
* EMLSR capable. One of the links was disabled after EMLSR
* association.
*/
policy_mgr_mlo_sta_set_link(psoc,
MLO_LINK_FORCE_REASON_DISCONNECT,
@@ -6729,11 +6727,17 @@ policy_mgr_handle_ml_sta_links_on_vdev_up_csa(struct wlan_objmgr_psoc *psoc,
}
#define SET_LINK_TIMEOUT 6000
static QDF_STATUS
policy_mgr_wait_for_set_link_update(struct policy_mgr_psoc_priv_obj *pm_ctx)
QDF_STATUS policy_mgr_wait_for_set_link_update(struct wlan_objmgr_psoc *psoc)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
QDF_STATUS status;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return QDF_STATUS_E_INVAL;
}
if (!policy_mgr_get_link_in_progress(pm_ctx)) {
policy_mgr_err("link is not in progress");
return QDF_STATUS_E_FAILURE;
@@ -6755,16 +6759,8 @@ void policy_mgr_handle_ml_sta_link_on_traffic_type_change(
struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_vdev *vdev)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return;
}
/* Check if any set link is already progress and thus wait */
policy_mgr_wait_for_set_link_update(pm_ctx);
policy_mgr_wait_for_set_link_update(psoc);
policy_mgr_handle_sap_cli_go_ml_sta_up_csa(psoc, vdev);
@@ -6772,7 +6768,7 @@ void policy_mgr_handle_ml_sta_link_on_traffic_type_change(
* Check if traffic type change lead to set link is progress and
* thus wait for it to complete.
*/
policy_mgr_wait_for_set_link_update(pm_ctx);
policy_mgr_wait_for_set_link_update(psoc);
}
static QDF_STATUS