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
zatwierdzone przez Madan Koyyalamudi
rodzic 85d310d232
commit b01b3c5e00
9 zmienionych plików z 100 dodań i 62 usunięć

Wyświetl plik

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -228,6 +228,16 @@ bool wlan_nan_is_beamforming_supported(struct wlan_objmgr_psoc *psoc);
*/
bool wlan_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq);
/**
* nan_handle_emlsr_concurrency()- Handle NAN+eMLSR concurrency
* @psoc: pointer to psoc object
* @nan_enable: Carries true if NAN is getting enabled.
* Carries false upon NAN enable failure/NAN disabled indication
*
* Return: void
*/
void nan_handle_emlsr_concurrency(struct wlan_objmgr_psoc *psoc,
bool nan_enable);
#else /* WLAN_FEATURE_NAN */
static inline QDF_STATUS nan_init(void)
{
@@ -285,6 +295,10 @@ bool wlan_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq)
{
return false;
}
static inline void
nan_handle_emlsr_concurrency(struct wlan_objmgr_psoc *psoc, bool nan_enable)
{}
#endif /* WLAN_FEATURE_NAN */
#if defined(WLAN_FEATURE_NAN) && defined(WLAN_FEATURE_11BE_MLO)

Wyświetl plik

@@ -38,6 +38,7 @@
#include "qdf_platform.h"
#include "wlan_osif_request_manager.h"
#include "wlan_p2p_api.h"
#include "wlan_mlme_vdev_mgr_interface.h"
QDF_STATUS nan_set_discovery_state(struct wlan_objmgr_psoc *psoc,
enum nan_disc_state new_state)
@@ -954,6 +955,7 @@ QDF_STATUS nan_disable_cleanup(struct wlan_objmgr_psoc *psoc)
if (psoc_nan_obj->is_explicit_disable && call_back)
call_back(psoc_nan_obj->nan_disc_request_ctx);
nan_handle_emlsr_concurrency(psoc, false);
policy_mgr_nan_sap_post_disable_conc_check(psoc);
} else {
/* Should not happen, NAN state can always be disabled */
@@ -1205,6 +1207,25 @@ pre_enable_failure:
return status;
}
void nan_handle_emlsr_concurrency(struct wlan_objmgr_psoc *psoc,
bool nan_enable)
{
if (nan_enable) {
/*
* Check if any set link is already progress,
* wait for it to complete
*/
policy_mgr_wait_for_set_link_update(psoc);
wlan_handle_emlsr_sta_concurrency(psoc, true, false);
/* Wait till rsp is received if NAN enable causes a set link */
policy_mgr_wait_for_set_link_update(psoc);
} else {
wlan_handle_emlsr_sta_concurrency(psoc, false, true);
}
}
QDF_STATUS nan_discovery_pre_enable(struct wlan_objmgr_pdev *pdev,
uint32_t nan_ch_freq)
{
@@ -1235,6 +1256,8 @@ QDF_STATUS nan_discovery_pre_enable(struct wlan_objmgr_pdev *pdev,
goto pre_enable_failure;
}
nan_handle_emlsr_concurrency(psoc, true);
/* Try to teardown TDLS links, but do not wait */
status = ucfg_tdls_teardown_links(psoc);
if (QDF_IS_STATUS_ERROR(status))

Wyświetl plik

@@ -887,6 +887,7 @@ post_msg:
NAN_DISC_DISABLED);
if (ucfg_is_nan_dbs_supported(psoc))
policy_mgr_check_n_start_opportunistic_timer(psoc);
nan_handle_emlsr_concurrency(psoc, false);
/*
* If FW respond with NAN enable failure, then