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:

committed by
Madan Koyyalamudi

parent
55b630d160
commit
74ede2801b
@@ -1289,7 +1289,6 @@ dp_rx_intrabss_ucast_check_be(qdf_nbuf_t nbuf,
|
||||
struct dp_txrx_peer *da_peer;
|
||||
bool ret = false;
|
||||
uint8_t dest_chip_id;
|
||||
uint8_t soc_idx;
|
||||
dp_txrx_ref_handle txrx_ref_handle = NULL;
|
||||
struct dp_vdev_be *be_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));
|
||||
da_peer_id = HAL_RX_PEER_ID_GET(msdu_metadata);
|
||||
|
||||
/* TA is MLD peer */
|
||||
if (be_soc->mlo_enabled && ta_peer->mld_peer) {
|
||||
/* use dest chip id when TA is MLD peer and DA is legacy */
|
||||
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 */
|
||||
params->dest_soc =
|
||||
dp_mlo_get_soc_ref_by_chip_id(be_soc->ml_ctxt,
|
||||
dest_chip_id);
|
||||
if (!params->dest_soc)
|
||||
return false;
|
||||
}
|
||||
|
||||
da_peer = dp_txrx_peer_get_ref_by_id(params->dest_soc, da_peer_id,
|
||||
&txrx_ref_handle, DP_MOD_ID_RX);
|
||||
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;
|
||||
/* soc unref if needed */
|
||||
|
||||
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;
|
||||
|
||||
@@ -1339,21 +1356,16 @@ dp_rx_intrabss_ucast_check_be(qdf_nbuf_t nbuf,
|
||||
|
||||
/* MLO specific Intra-BSS check */
|
||||
if (dp_rx_intrabss_fwd_mlo_allow(ta_peer, da_peer)) {
|
||||
/* TA is legacy peer */
|
||||
if (!ta_peer->mld_peer) {
|
||||
params->dest_soc = da_peer->vdev->pdev->soc;
|
||||
ret = true;
|
||||
goto rel_da_peer;
|
||||
}
|
||||
/* index of soc in the array */
|
||||
soc_idx = dest_chip_id << DP_MLO_DEST_CHIP_ID_SHIFT;
|
||||
if (!(be_vdev->partner_vdev_list[soc_idx][0] ==
|
||||
/* use dest chip id for legacy dest peer */
|
||||
if (!(da_peer_id & HAL_RX_DA_IDX_ML_PEER_MASK)) {
|
||||
if (!(be_vdev->partner_vdev_list[dest_chip_id][0] ==
|
||||
params->tx_vdev_id) &&
|
||||
!(be_vdev->partner_vdev_list[soc_idx][1] ==
|
||||
!(be_vdev->partner_vdev_list[dest_chip_id][1] ==
|
||||
params->tx_vdev_id)) {
|
||||
/*dp_soc_unref_delete(soc);*/
|
||||
goto rel_da_peer;
|
||||
}
|
||||
}
|
||||
ret = true;
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -27,8 +27,6 @@
|
||||
|
||||
/* Max number of chips supported */
|
||||
#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
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#define HAL_RX_DA_IDX_CHIP_ID_MASK 0x3
|
||||
|
||||
#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
|
||||
|
Reference in New Issue
Block a user