qcacmn: Trigger UMAC reset with mode1 SSR teardown
Add support to trigger UMAC reset with mode1 teardown request for mode1 target recovery SSR. Change-Id: Ib2d1679162a2084488081c76f6753287a6e4d5c4 CRs-Fixed: 3458369
This commit is contained in:

committad av
Madan Koyyalamudi

förälder
351f4a79a7
incheckning
cb01519700
@@ -589,9 +589,8 @@ struct wlan_lmac_if_mlme_tx_ops {
|
||||
uint8_t grp_id);
|
||||
QDF_STATUS (*target_if_mlo_ready)(struct wlan_objmgr_pdev **pdev,
|
||||
uint8_t num_pdevs);
|
||||
QDF_STATUS (*target_if_mlo_teardown_req)(struct wlan_objmgr_pdev **pdev,
|
||||
uint8_t num_pdevs,
|
||||
uint32_t grp_id);
|
||||
QDF_STATUS (*target_if_mlo_teardown_req)(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t grp_id, bool reset);
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
|
||||
QDF_STATUS (*vdev_send_set_mac_addr)(struct qdf_mac_addr mac_addr,
|
||||
|
@@ -143,6 +143,7 @@ struct mlo_chip_info {
|
||||
* @soc_id_list: list of soc ids part of this mlo group
|
||||
* @state: MLO link state
|
||||
* @valid_link_bitmap: valid MLO link bitmap
|
||||
* @trigger_umac_reset: teardown require umac reset, for mode1 SSR
|
||||
* @state_lock: lock to protect access to link state
|
||||
* @event: event for teardown completion
|
||||
* @dp_handle: pointer to DP ML context
|
||||
@@ -160,6 +161,7 @@ struct mlo_setup_info {
|
||||
uint8_t soc_id_list[MAX_MLO_CHIPS];
|
||||
enum MLO_LINK_STATE state[MAX_MLO_LINKS];
|
||||
uint16_t valid_link_bitmap;
|
||||
bool trigger_umac_reset;
|
||||
qdf_spinlock_t state_lock;
|
||||
qdf_event_t event;
|
||||
struct cdp_mlo_ctxt *dp_handle;
|
||||
|
@@ -612,6 +612,8 @@ void wlan_mlo_partner_peer_disconnect_notify(struct wlan_objmgr_peer *src_peer)
|
||||
}
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_mlo_partner_peer_disconnect_notify);
|
||||
|
||||
static void mlo_peer_populate_link_peer(
|
||||
struct wlan_mlo_peer_context *ml_peer,
|
||||
struct wlan_objmgr_peer *link_peer)
|
||||
@@ -1988,6 +1990,8 @@ bool wlan_mlo_partner_peer_delete_is_allowed(struct wlan_objmgr_peer *src_peer)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_mlo_partner_peer_delete_is_allowed);
|
||||
#endif
|
||||
|
||||
QDF_STATUS wlan_mlo_validate_reassocreq(struct wlan_mlo_peer_context *ml_peer)
|
||||
|
@@ -918,6 +918,8 @@ void mlo_link_teardown_complete(struct wlan_objmgr_pdev *pdev, uint8_t grp_id)
|
||||
|
||||
qdf_info("Teardown complete");
|
||||
|
||||
setup_info->trigger_umac_reset = false;
|
||||
|
||||
qdf_event_set(&setup_info->event);
|
||||
}
|
||||
|
||||
@@ -944,12 +946,78 @@ static void mlo_force_teardown(uint8_t grp_id)
|
||||
setup_info->state[link_idx] = MLO_LINK_TEARDOWN;
|
||||
}
|
||||
|
||||
static void mlo_send_teardown_req(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t grp_id, uint32_t reason)
|
||||
{
|
||||
struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
|
||||
struct wlan_lmac_if_tx_ops *tx_ops;
|
||||
struct wlan_objmgr_pdev *temp_pdev;
|
||||
struct mlo_setup_info *setup_info;
|
||||
uint8_t link_idx;
|
||||
uint8_t tot_links;
|
||||
bool umac_reset = 0;
|
||||
|
||||
if (!mlo_ctx)
|
||||
return;
|
||||
|
||||
if (grp_id >= mlo_ctx->total_grp) {
|
||||
mlo_err("Invalid grp id %d, total no of groups %d",
|
||||
grp_id, mlo_ctx->total_grp);
|
||||
return;
|
||||
}
|
||||
|
||||
tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
|
||||
if (!tx_ops) {
|
||||
mlo_err("Tx Ops is null for the psoc id %d",
|
||||
wlan_psoc_get_id(psoc));
|
||||
return;
|
||||
}
|
||||
|
||||
setup_info = &mlo_ctx->setup_info[grp_id];
|
||||
tot_links = setup_info->tot_links;
|
||||
|
||||
if (reason == WMI_MLO_TEARDOWN_REASON_MODE1_SSR) {
|
||||
for (link_idx = 0; link_idx < tot_links; link_idx++) {
|
||||
umac_reset = 0;
|
||||
temp_pdev = setup_info->pdev_list[link_idx];
|
||||
if (!temp_pdev)
|
||||
continue;
|
||||
|
||||
if (!setup_info->trigger_umac_reset) {
|
||||
if (psoc == wlan_pdev_get_psoc(temp_pdev)) {
|
||||
umac_reset = 1;
|
||||
setup_info->trigger_umac_reset = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (tx_ops && tx_ops->mops.target_if_mlo_teardown_req) {
|
||||
mlo_info(
|
||||
"Trigger Teardown with Pdev %d Psoc id %d link idx %d Umac reset %d for Mode 1",
|
||||
wlan_objmgr_pdev_get_pdev_id(temp_pdev),
|
||||
wlan_psoc_get_id(wlan_pdev_get_psoc(temp_pdev)),
|
||||
link_idx, umac_reset);
|
||||
tx_ops->mops.target_if_mlo_teardown_req(
|
||||
setup_info->pdev_list[link_idx],
|
||||
reason, umac_reset);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (link_idx = 0; link_idx < setup_info->tot_links; link_idx++)
|
||||
if (tx_ops && tx_ops->mops.target_if_mlo_teardown_req) {
|
||||
if (!setup_info->pdev_list[link_idx])
|
||||
continue;
|
||||
tx_ops->mops.target_if_mlo_teardown_req(
|
||||
setup_info->pdev_list[link_idx],
|
||||
reason, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define MLO_MGR_TEARDOWN_TIMEOUT 3000
|
||||
QDF_STATUS mlo_link_teardown_link(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t grp_id,
|
||||
uint32_t reason)
|
||||
{
|
||||
struct wlan_lmac_if_tx_ops *tx_ops;
|
||||
QDF_STATUS status;
|
||||
struct mlo_setup_info *setup_info;
|
||||
struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
|
||||
@@ -977,14 +1045,8 @@ QDF_STATUS mlo_link_teardown_link(struct wlan_objmgr_psoc *psoc,
|
||||
if (!mlo_check_all_pdev_state(psoc, grp_id, MLO_LINK_TEARDOWN))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
|
||||
/* Trigger MLO teardown */
|
||||
if (tx_ops && tx_ops->mops.target_if_mlo_teardown_req) {
|
||||
tx_ops->mops.target_if_mlo_teardown_req(
|
||||
setup_info->pdev_list,
|
||||
setup_info->num_links,
|
||||
reason);
|
||||
}
|
||||
mlo_send_teardown_req(psoc, grp_id, reason);
|
||||
|
||||
if (reason == WMI_MLO_TEARDOWN_REASON_SSR) {
|
||||
/* do not wait for teardown event completion here for SSR */
|
||||
|
Referens i nytt ärende
Block a user