qcacmn: Handle ML destination in Intra-BSS code

When destination peer is an ML peer, get the soc from da_peer.

Change-Id: I93d10a7ab9ce805180397bcf0f3b404c27df528b
CRs-Fixed: 3177339
This commit is contained in:
Manoj Ekbote
2022-04-28 10:39:19 -07:00
committed by Madan Koyyalamudi
orang tua 55b630d160
melakukan 74ede2801b
3 mengubah file dengan 37 tambahan dan 26 penghapusan

Melihat File

@@ -1289,7 +1289,6 @@ dp_rx_intrabss_ucast_check_be(qdf_nbuf_t nbuf,
struct dp_txrx_peer *da_peer; struct dp_txrx_peer *da_peer;
bool ret = false; bool ret = false;
uint8_t dest_chip_id; uint8_t dest_chip_id;
uint8_t soc_idx;
dp_txrx_ref_handle txrx_ref_handle = NULL; dp_txrx_ref_handle txrx_ref_handle = NULL;
struct dp_vdev_be *be_vdev = struct dp_vdev_be *be_vdev =
dp_get_be_vdev_from_dp_vdev(ta_peer->vdev); dp_get_be_vdev_from_dp_vdev(ta_peer->vdev);
@@ -1303,21 +1302,39 @@ dp_rx_intrabss_ucast_check_be(qdf_nbuf_t nbuf,
qdf_assert_always(dest_chip_id <= (DP_MLO_MAX_DEST_CHIP_ID - 1)); qdf_assert_always(dest_chip_id <= (DP_MLO_MAX_DEST_CHIP_ID - 1));
da_peer_id = HAL_RX_PEER_ID_GET(msdu_metadata); da_peer_id = HAL_RX_PEER_ID_GET(msdu_metadata);
/* TA is MLD peer */ /* use dest chip id when TA is MLD peer and DA is legacy */
if (be_soc->mlo_enabled && ta_peer->mld_peer) { if (be_soc->mlo_enabled &&
ta_peer->mld_peer &&
!(da_peer_id & HAL_RX_DA_IDX_ML_PEER_MASK)) {
/* validate chip_id, get a ref, and re-assign soc */ /* validate chip_id, get a ref, and re-assign soc */
params->dest_soc = params->dest_soc =
dp_mlo_get_soc_ref_by_chip_id(be_soc->ml_ctxt, dp_mlo_get_soc_ref_by_chip_id(be_soc->ml_ctxt,
dest_chip_id); dest_chip_id);
if (!params->dest_soc) if (!params->dest_soc)
return false; return false;
}
da_peer = dp_txrx_peer_get_ref_by_id(params->dest_soc, da_peer_id, da_peer = dp_txrx_peer_get_ref_by_id(params->dest_soc,
&txrx_ref_handle, DP_MOD_ID_RX); da_peer_id,
if (!da_peer) &txrx_ref_handle,
return false; DP_MOD_ID_RX);
/* soc unref if needed */ if (!da_peer)
return false;
ret = true;
} else {
da_peer = dp_txrx_peer_get_ref_by_id(params->dest_soc,
da_peer_id,
&txrx_ref_handle,
DP_MOD_ID_RX);
if (!da_peer)
return false;
params->dest_soc = da_peer->vdev->pdev->soc;
if (!params->dest_soc)
goto rel_da_peer;
ret = true;
}
params->tx_vdev_id = da_peer->vdev->vdev_id; params->tx_vdev_id = da_peer->vdev->vdev_id;
@@ -1339,20 +1356,15 @@ dp_rx_intrabss_ucast_check_be(qdf_nbuf_t nbuf,
/* MLO specific Intra-BSS check */ /* MLO specific Intra-BSS check */
if (dp_rx_intrabss_fwd_mlo_allow(ta_peer, da_peer)) { if (dp_rx_intrabss_fwd_mlo_allow(ta_peer, da_peer)) {
/* TA is legacy peer */ /* use dest chip id for legacy dest peer */
if (!ta_peer->mld_peer) { if (!(da_peer_id & HAL_RX_DA_IDX_ML_PEER_MASK)) {
params->dest_soc = da_peer->vdev->pdev->soc; if (!(be_vdev->partner_vdev_list[dest_chip_id][0] ==
ret = true; params->tx_vdev_id) &&
goto rel_da_peer; !(be_vdev->partner_vdev_list[dest_chip_id][1] ==
} params->tx_vdev_id)) {
/* index of soc in the array */ /*dp_soc_unref_delete(soc);*/
soc_idx = dest_chip_id << DP_MLO_DEST_CHIP_ID_SHIFT; goto rel_da_peer;
if (!(be_vdev->partner_vdev_list[soc_idx][0] == }
params->tx_vdev_id) &&
!(be_vdev->partner_vdev_list[soc_idx][1] ==
params->tx_vdev_id)) {
/*dp_soc_unref_delete(soc);*/
goto rel_da_peer;
} }
ret = true; ret = true;
} }

Melihat File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@@ -27,8 +27,6 @@
/* Max number of chips supported */ /* Max number of chips supported */
#define DP_MLO_MAX_DEST_CHIP_ID 3 #define DP_MLO_MAX_DEST_CHIP_ID 3
/* shift value to index into the array, used instead of mult by 2 */
#define DP_MLO_DEST_CHIP_ID_SHIFT 1
/* /*
* dp_mlo_ctxt * dp_mlo_ctxt

Melihat File

@@ -28,6 +28,7 @@
#define HAL_RX_DA_IDX_CHIP_ID_MASK 0x3 #define HAL_RX_DA_IDX_CHIP_ID_MASK 0x3
#define HAL_RX_DA_IDX_PEER_ID_MASK 0x3fff #define HAL_RX_DA_IDX_PEER_ID_MASK 0x3fff
#define HAL_RX_DA_IDX_ML_PEER_MASK 0x2000
/* /*
* macro to set the cookie into the rxdma ring entry * macro to set the cookie into the rxdma ring entry