qcacmn: Peer id parsing changes for beryllium

Take care of the MLO peer bit indication to be
concatenated with peer_id to access the peer map
object.

Change-Id: Ia603a728101e83829a8906d1b847f42389e78ca6
CRs-Fixed: 3039326
This commit is contained in:
Rakesh Pillai
2021-06-22 03:13:01 -07:00
committed by Madan Koyyalamudi
父節點 2069fa6cdd
當前提交 57e2c01e5e
共有 17 個文件被更改,包括 159 次插入53 次删除

查看文件

@@ -27,6 +27,32 @@
extern uint8_t sec_type_map[MAX_CDP_SEC_TYPE];
#ifdef DP_USE_REDUCED_PEER_ID_FIELD_WIDTH
static inline uint16_t dp_tx_comp_get_peer_id(struct dp_soc *soc,
void *tx_comp_hal_desc)
{
uint16_t peer_id = hal_tx_comp_get_peer_id(tx_comp_hal_desc);
struct dp_tx_comp_peer_id *tx_peer_id =
(struct dp_tx_comp_peer_id *)&peer_id;
return (tx_peer_id->peer_id |
(tx_peer_id->ml_peer_valid << soc->peer_id_shift));
}
#else
/* Combine ml_peer_valid and peer_id field */
#define DP_BE_TX_COMP_PEER_ID_MASK 0x00003fff
#define DP_BE_TX_COMP_PEER_ID_SHIFT 0
static inline uint16_t dp_tx_comp_get_peer_id(struct dp_soc *soc,
void *tx_comp_hal_desc)
{
uint16_t peer_id = hal_tx_comp_get_peer_id(tx_comp_hal_desc);
return ((peer_id & DP_BE_TX_COMP_PEER_ID_MASK) >>
DP_BE_TX_COMP_PEER_ID_SHIFT);
}
#endif
#ifdef DP_FEATURE_HW_COOKIE_CONVERSION
#ifdef DP_HW_COOKIE_CONVERT_EXCEPTION
void dp_tx_comp_get_params_from_hal_desc_be(struct dp_soc *soc,
@@ -46,6 +72,10 @@ void dp_tx_comp_get_params_from_hal_desc_be(struct dp_soc *soc,
*r_tx_desc =
(struct dp_tx_desc_s *)dp_cc_desc_find(soc, tx_desc_id);
}
if (*r_tx_desc)
(*r_tx_desc)->peer_id = dp_tx_comp_get_peer_id(soc,
tx_comp_hal_desc);
}
#else
void dp_tx_comp_get_params_from_hal_desc_be(struct dp_soc *soc,
@@ -54,6 +84,10 @@ void dp_tx_comp_get_params_from_hal_desc_be(struct dp_soc *soc,
{
*r_tx_desc = (struct dp_tx_desc_s *)
hal_tx_comp_get_desc_va(tx_comp_hal_desc);
if (*r_tx_desc)
(*r_tx_desc)->peer_id = dp_tx_comp_get_peer_id(soc,
tx_comp_hal_desc);
}
#endif /* DP_HW_COOKIE_CONVERT_EXCEPTION */
#else
@@ -68,6 +102,10 @@ void dp_tx_comp_get_params_from_hal_desc_be(struct dp_soc *soc,
tx_desc_id = hal_tx_comp_get_desc_id(tx_comp_hal_desc);
*r_tx_desc =
(struct dp_tx_desc_s *)dp_cc_desc_find(soc, tx_desc_id);
if (*r_tx_desc)
(*r_tx_desc)->peer_id = dp_tx_comp_get_peer_id(soc,
tx_comp_hal_desc);
}
#endif /* DP_FEATURE_HW_COOKIE_CONVERSION */