qcacld-3.0: Handle eMLSR STA concurrencies in policy mgr
Handle the following the eMLSR STA concurrency scenarios 1) eMLSR STA + SAP/P2P GO/NAN - Send a force disable link request to FW on any one of the eMLSR links. FW will decide which link to disable. 2) eMLSR STA + STA/P2P Client - Send a force disable link request to FW on any one of the eMLSR links. FW will decide which link to disable. This action happens before vdev start of the new connection request. 3) eMLSR STA + TDLS - TDLS connection is not allowed since eMLSR STA is given higher priority. 4) If there is already an existing connection, then eMLSR is not allowed. Once the other connection goes down, the disabled eMLSR link is restored. The concurrency handling API is invoked from corresponding interface manager APIs. Change-Id: Ib7d5da5dcb8eb3ea16c6e50c8fcadc20972d7d05 CRs-Fixed: 3185078
This commit is contained in:

committed by
Madan Koyyalamudi

szülő
61a1943070
commit
61dfd77555
@@ -28,6 +28,7 @@
|
||||
#include "wlan_p2p_cfg_api.h"
|
||||
#include "wlan_tdls_api.h"
|
||||
#include "wlan_p2p_api.h"
|
||||
#include "wlan_mlme_vdev_mgr_interface.h"
|
||||
|
||||
QDF_STATUS if_mgr_ap_start_bss(struct wlan_objmgr_vdev *vdev,
|
||||
struct if_mgr_event_data *event_data)
|
||||
@@ -45,6 +46,10 @@ QDF_STATUS if_mgr_ap_start_bss(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
wlan_tdls_teardown_links_sync(psoc);
|
||||
|
||||
if (wlan_vdev_mlme_get_opmode(vdev) == QDF_SAP_MODE ||
|
||||
wlan_vdev_mlme_get_opmode(vdev) == QDF_P2P_GO_MODE)
|
||||
wlan_handle_emlsr_sta_concurrency(vdev, true, false);
|
||||
|
||||
if (policy_mgr_is_hw_mode_change_in_progress(psoc)) {
|
||||
if (!QDF_IS_STATUS_SUCCESS(
|
||||
policy_mgr_wait_for_connection_update(psoc))) {
|
||||
@@ -119,6 +124,9 @@ if_mgr_ap_stop_bss_complete(struct wlan_objmgr_vdev *vdev,
|
||||
if (!psoc)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (wlan_vdev_mlme_get_opmode(vdev) == QDF_SAP_MODE ||
|
||||
wlan_vdev_mlme_get_opmode(vdev) == QDF_P2P_GO_MODE)
|
||||
wlan_handle_emlsr_sta_concurrency(vdev, false, false);
|
||||
/*
|
||||
* Due to audio share glitch with P2P GO caused by
|
||||
* roam scan on concurrent interface, disable
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <wlan_mlo_mgr_cmn.h>
|
||||
#include <wlan_cm_roam_api.h>
|
||||
#include "wlan_nan_api.h"
|
||||
#include "wlan_mlme_vdev_mgr_interface.h"
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
#include <wlan_mlo_mgr_sta.h>
|
||||
#endif
|
||||
@@ -68,6 +69,10 @@ QDF_STATUS if_mgr_connect_start(struct wlan_objmgr_vdev *vdev,
|
||||
&vdev_id_list[sta_cnt],
|
||||
PM_SAP_MODE);
|
||||
op_mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
|
||||
if (op_mode == QDF_STA_MODE || op_mode == QDF_P2P_CLIENT_MODE)
|
||||
wlan_handle_emlsr_sta_concurrency(vdev, false, true);
|
||||
|
||||
if (op_mode == QDF_P2P_CLIENT_MODE || sap_cnt || sta_cnt) {
|
||||
for (i = 0; i < sta_cnt + sap_cnt; i++) {
|
||||
if (vdev_id_list[i] == wlan_vdev_get_id(vdev))
|
||||
@@ -200,6 +205,10 @@ QDF_STATUS if_mgr_disconnect_complete(struct wlan_objmgr_vdev *vdev,
|
||||
if (!psoc)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (wlan_vdev_mlme_get_opmode(vdev) == QDF_STA_MODE ||
|
||||
wlan_vdev_mlme_get_opmode(vdev) == QDF_P2P_CLIENT_MODE)
|
||||
wlan_handle_emlsr_sta_concurrency(vdev, false, false);
|
||||
|
||||
status = if_mgr_enable_roaming_after_p2p_disconnect(pdev, vdev,
|
||||
RSO_INVALID_REQUESTOR);
|
||||
if (status) {
|
||||
|
@@ -2951,6 +2951,19 @@ bool policy_mgr_is_current_hwmode_dbs(struct wlan_objmgr_psoc *psoc);
|
||||
*/
|
||||
bool policy_mgr_is_current_hwmode_sbs(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_is_curr_hwmode_emlsr() - Function to check if current HW mode is
|
||||
* eMLSR
|
||||
*
|
||||
* @psoc: Pointer to psoc
|
||||
*
|
||||
* This Function checks if current HW mode is eMLSR
|
||||
*
|
||||
* Return:True if current HW mode is eMLSR.
|
||||
*
|
||||
*/
|
||||
bool policy_mgr_is_curr_hwmode_emlsr(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_is_dp_hw_dbs_capable() - if hardware is capable of dbs 2x2
|
||||
* or 1X1 for Data Path (HW mode)
|
||||
@@ -4290,6 +4303,20 @@ bool policy_mgr_is_mlo_in_mode_sbs(struct wlan_objmgr_psoc *psoc,
|
||||
enum policy_mgr_con_mode mode,
|
||||
uint8_t *mlo_vdev_lst, uint8_t *num_mlo);
|
||||
|
||||
/**
|
||||
* policy_mgr_is_mlo_in_mode_emlsr() - Check whether current connection is eMLSR
|
||||
* @psoc: PSOC object information
|
||||
* @mlo_vdev_lst: Pointer to mlo vdev list, this function wil fill this with
|
||||
* list of mlo vdev
|
||||
* @num_mlo: Pointer to number of mlo link, this function will fill this with
|
||||
* number of mlo links
|
||||
*
|
||||
* Return: True if current connection is in eMLSR mode i.e. Both STA and AP
|
||||
* support eMLSR connection along with vendor command selection
|
||||
*/
|
||||
bool policy_mgr_is_mlo_in_mode_emlsr(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *mlo_vdev_lst, uint8_t *num_mlo);
|
||||
|
||||
/*
|
||||
* policy_mgr_handle_ml_sta_links_on_vdev_up_csa() - Handle enable/disable
|
||||
* link on vdev UP and channel change
|
||||
@@ -4331,6 +4358,10 @@ void policy_mgr_handle_ml_sta_link_on_traffic_type_change(
|
||||
void policy_mgr_handle_ml_sta_links_on_vdev_down(struct wlan_objmgr_psoc *psoc,
|
||||
enum QDF_OPMODE mode,
|
||||
uint8_t vdev_id);
|
||||
|
||||
void policy_mgr_handle_emlsr_sta_concurrency(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
bool is_ap_up, bool sta_coming_up);
|
||||
#else
|
||||
|
||||
static inline bool policy_mgr_is_mlo_sap_concurrency_allowed(
|
||||
@@ -4373,6 +4404,13 @@ policy_mgr_handle_ml_sta_link_on_traffic_type_change(
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
bool policy_mgr_is_mlo_in_mode_emlsr(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *mlo_vdev_lst, uint8_t *num_mlo)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline
|
||||
void policy_mgr_handle_ml_sta_links_on_vdev_down(struct wlan_objmgr_psoc *psoc,
|
||||
enum QDF_OPMODE mode,
|
||||
|
@@ -1287,6 +1287,7 @@ QDF_STATUS policy_mgr_update_hw_mode_list(struct wlan_objmgr_psoc *psoc,
|
||||
hw_config_type = tmp->hw_mode_config_type;
|
||||
dbs_mode = HW_MODE_DBS_NONE;
|
||||
sbs_mode = HW_MODE_SBS_NONE;
|
||||
emlsr_mode = HW_MODE_EMLSR_NONE;
|
||||
mac1_ss_bw_info.mac_tx_stream = 0;
|
||||
mac1_ss_bw_info.mac_rx_stream = 0;
|
||||
mac1_ss_bw_info.mac_bw = 0;
|
||||
@@ -4762,6 +4763,116 @@ bool policy_mgr_is_mlo_in_mode_sbs(struct wlan_objmgr_psoc *psoc,
|
||||
return is_sbs_link;
|
||||
}
|
||||
|
||||
bool policy_mgr_is_curr_hwmode_emlsr(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct policy_mgr_hw_mode_params hw_mode;
|
||||
|
||||
if (!policy_mgr_is_hw_emlsr_capable(psoc))
|
||||
return false;
|
||||
|
||||
if (QDF_STATUS_SUCCESS != policy_mgr_get_current_hw_mode(psoc,
|
||||
&hw_mode))
|
||||
return false;
|
||||
|
||||
if (!hw_mode.emlsr_cap)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool policy_mgr_is_mlo_in_mode_emlsr(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *mlo_vdev_lst, uint8_t *num_mlo)
|
||||
{
|
||||
bool emlsr_connection = false;
|
||||
uint32_t mode_num = 0;
|
||||
uint8_t i, mlo_idx = 0;
|
||||
struct wlan_objmgr_vdev *temp_vdev;
|
||||
uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS] = {0};
|
||||
|
||||
mode_num = policy_mgr_get_mode_specific_conn_info(psoc, NULL,
|
||||
vdev_id_list,
|
||||
PM_STA_MODE);
|
||||
|
||||
if (!mode_num || mode_num < 2)
|
||||
goto end;
|
||||
|
||||
for (i = 0; i < mode_num; i++) {
|
||||
temp_vdev = wlan_objmgr_get_vdev_by_id_from_psoc(
|
||||
psoc, vdev_id_list[i],
|
||||
WLAN_POLICY_MGR_ID);
|
||||
if (!temp_vdev) {
|
||||
policy_mgr_err("invalid vdev for id %d",
|
||||
vdev_id_list[i]);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (wlan_vdev_mlme_is_mlo_vdev(temp_vdev)) {
|
||||
if (mlo_vdev_lst)
|
||||
mlo_vdev_lst[mlo_idx] = vdev_id_list[i];
|
||||
mlo_idx++;
|
||||
}
|
||||
/* Check if existing vdev is eMLSR STA */
|
||||
if (wlan_vdev_mlme_get_emlsr_caps(temp_vdev))
|
||||
emlsr_connection = true;
|
||||
|
||||
wlan_objmgr_vdev_release_ref(temp_vdev, WLAN_POLICY_MGR_ID);
|
||||
}
|
||||
end:
|
||||
if (num_mlo)
|
||||
*num_mlo = mlo_idx;
|
||||
|
||||
return emlsr_connection;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
uint8_t num_mlo = 0;
|
||||
uint8_t mlo_vdev_lst[MAX_NUMBER_OF_CONC_CONNECTIONS] = {0};
|
||||
bool is_mlo_emlsr;
|
||||
struct mac_context *mac_ctx = cds_get_context(QDF_MODULE_ID_SME);
|
||||
|
||||
if (!mac_ctx)
|
||||
return;
|
||||
|
||||
is_mlo_emlsr = policy_mgr_is_mlo_in_mode_emlsr(psoc, mlo_vdev_lst,
|
||||
&num_mlo);
|
||||
|
||||
if (num_mlo < 2) {
|
||||
policy_mgr_debug("vdev %d AP_state %d MLO Sta links %d",
|
||||
wlan_vdev_get_id(vdev), ap_coming_up, num_mlo);
|
||||
return;
|
||||
}
|
||||
|
||||
policy_mgr_debug("vdev %d: AP coming up %d STA coming up %d num_mlo %d is_mlo_emlsr %d",
|
||||
wlan_vdev_get_id(vdev), ap_coming_up, sta_coming_up,
|
||||
num_mlo, is_mlo_emlsr);
|
||||
|
||||
if (!is_mlo_emlsr)
|
||||
return;
|
||||
|
||||
if (ap_coming_up || sta_coming_up) {
|
||||
/*
|
||||
* During SAP/STA up, If eMLSR STA is present,
|
||||
* then Disable one of the links. FW will decide which link.
|
||||
*/
|
||||
policy_mgr_mlo_sta_set_link(psoc, MLO_LINK_FORCE_REASON_CONNECT,
|
||||
MLO_LINK_FORCE_MODE_INACTIVE_NUM,
|
||||
num_mlo, mlo_vdev_lst);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* During SAP/STA down, if eMLSR STA is present, re-enable both the
|
||||
* links, as one of them was disabled during up.
|
||||
*/
|
||||
policy_mgr_mlo_sta_set_link(psoc, MLO_LINK_FORCE_REASON_DISCONNECT,
|
||||
MLO_LINK_FORCE_MODE_NO_FORCE,
|
||||
num_mlo, mlo_vdev_lst);
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
policy_mgr_get_affected_links_for_sta_sta(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t num_ml, qdf_freq_t *freq_list,
|
||||
|
Reference in New Issue
Block a user