qcacmn: Add hal_rx_msdu_end_last_msdu_get API
Implement hal_rx_msdu_end_last_msdu_get API based on the chipset as the macro to retrieve last_msdu value is chipset dependent. Change-Id: I561c28a49062d7b650e68c5a4ce4da0183be34d6 CRs-Fixed: 2522133
Esse commit está contido em:

commit de
nshrivas

pai
79055387d9
commit
55f2d92e61
@@ -700,7 +700,8 @@ dp_rx_null_q_desc_handle(struct dp_soc *soc, qdf_nbuf_t nbuf,
|
||||
hal_rx_msdu_end_first_msdu_get(soc->hal_soc,
|
||||
rx_tlv_hdr));
|
||||
qdf_nbuf_set_rx_chfrag_end(nbuf,
|
||||
hal_rx_msdu_end_last_msdu_get(rx_tlv_hdr));
|
||||
hal_rx_msdu_end_last_msdu_get(soc->hal_soc,
|
||||
rx_tlv_hdr));
|
||||
qdf_nbuf_set_da_mcbc(nbuf, hal_rx_msdu_end_da_is_mcbc_get(soc->hal_soc,
|
||||
rx_tlv_hdr));
|
||||
qdf_nbuf_set_da_valid(nbuf,
|
||||
|
@@ -390,6 +390,7 @@ struct hal_hw_txrx_ops {
|
||||
void (*hal_rx_print_pn)(uint8_t *buf);
|
||||
uint8_t (*hal_rx_msdu_end_first_msdu_get)(uint8_t *buf);
|
||||
uint8_t (*hal_rx_msdu_end_da_is_valid_get)(uint8_t *buf);
|
||||
uint8_t (*hal_rx_msdu_end_last_msdu_get)(uint8_t *buf);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -1811,29 +1811,21 @@ hal_rx_msdu_end_first_msdu_get(hal_soc_handle_t hal_soc_hdl,
|
||||
return hal_soc->ops->hal_rx_msdu_end_first_msdu_get(buf);
|
||||
}
|
||||
|
||||
#define HAL_RX_MSDU_END_LAST_MSDU_GET(_rx_msdu_end) \
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \
|
||||
RX_MSDU_END_5_LAST_MSDU_OFFSET)), \
|
||||
RX_MSDU_END_5_LAST_MSDU_MASK, \
|
||||
RX_MSDU_END_5_LAST_MSDU_LSB))
|
||||
|
||||
/**
|
||||
/**
|
||||
* hal_rx_msdu_end_last_msdu_get: API to get last msdu status
|
||||
* from rx_msdu_end TLV
|
||||
* @hal_soc_hdl: hal soc handle
|
||||
* @buf: pointer to the start of RX PKT TLV headers
|
||||
*
|
||||
* @ buf: pointer to the start of RX PKT TLV headers
|
||||
* Return: last_msdu
|
||||
*/
|
||||
static inline uint8_t
|
||||
hal_rx_msdu_end_last_msdu_get(uint8_t *buf)
|
||||
hal_rx_msdu_end_last_msdu_get(hal_soc_handle_t hal_soc_hdl,
|
||||
uint8_t *buf)
|
||||
{
|
||||
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
|
||||
struct rx_msdu_end *msdu_end = &pkt_tlvs->msdu_end_tlv.rx_msdu_end;
|
||||
uint8_t last_msdu;
|
||||
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
|
||||
|
||||
last_msdu = HAL_RX_MSDU_END_LAST_MSDU_GET(msdu_end);
|
||||
|
||||
return last_msdu;
|
||||
return hal_soc->ops->hal_rx_msdu_end_last_msdu_get(buf);
|
||||
}
|
||||
|
||||
#define HAL_RX_MSDU_END_CCE_METADATA_GET(_rx_msdu_end) \
|
||||
|
@@ -291,6 +291,24 @@ static uint8_t hal_rx_msdu_end_da_is_valid_get_6290(uint8_t *buf)
|
||||
return da_is_valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_rx_msdu_end_last_msdu_get_6290: API to get last msdu status
|
||||
* from rx_msdu_end TLV
|
||||
*
|
||||
* @ buf: pointer to the start of RX PKT TLV headers
|
||||
* Return: last_msdu
|
||||
*/
|
||||
static uint8_t hal_rx_msdu_end_last_msdu_get_6290(uint8_t *buf)
|
||||
{
|
||||
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
|
||||
struct rx_msdu_end *msdu_end = &pkt_tlvs->msdu_end_tlv.rx_msdu_end;
|
||||
uint8_t last_msdu;
|
||||
|
||||
last_msdu = HAL_RX_MSDU_END_LAST_MSDU_GET(msdu_end);
|
||||
|
||||
return last_msdu;
|
||||
}
|
||||
|
||||
struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
|
||||
/* init and setup */
|
||||
hal_srng_dst_hw_init_generic,
|
||||
@@ -342,6 +360,7 @@ struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
|
||||
hal_rx_print_pn_6290,
|
||||
hal_rx_msdu_end_first_msdu_get_6290,
|
||||
hal_rx_msdu_end_da_is_valid_get_6290,
|
||||
hal_rx_msdu_end_last_msdu_get_6290,
|
||||
};
|
||||
|
||||
struct hal_hw_srng_config hw_srng_table_6290[] = {
|
||||
|
@@ -107,6 +107,12 @@
|
||||
RX_MSDU_END_5_DA_IS_VALID_MASK, \
|
||||
RX_MSDU_END_5_DA_IS_VALID_LSB))
|
||||
|
||||
#define HAL_RX_MSDU_END_LAST_MSDU_GET(_rx_msdu_end) \
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \
|
||||
RX_MSDU_END_5_LAST_MSDU_OFFSET)), \
|
||||
RX_MSDU_END_5_LAST_MSDU_MASK, \
|
||||
RX_MSDU_END_5_LAST_MSDU_LSB))
|
||||
|
||||
#if defined(QCA_WIFI_QCA6290_11AX)
|
||||
#define HAL_RX_MSDU_START_MIMO_SS_BITMAP(_rx_msdu_start)\
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR((_rx_msdu_start),\
|
||||
|
@@ -290,6 +290,24 @@ static uint8_t hal_rx_msdu_end_da_is_valid_get_6390(uint8_t *buf)
|
||||
return da_is_valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_rx_msdu_end_last_msdu_get_6390: API to get last msdu status
|
||||
* from rx_msdu_end TLV
|
||||
*
|
||||
* @ buf: pointer to the start of RX PKT TLV headers
|
||||
* Return: last_msdu
|
||||
*/
|
||||
static uint8_t hal_rx_msdu_end_last_msdu_get_6390(uint8_t *buf)
|
||||
{
|
||||
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
|
||||
struct rx_msdu_end *msdu_end = &pkt_tlvs->msdu_end_tlv.rx_msdu_end;
|
||||
uint8_t last_msdu;
|
||||
|
||||
last_msdu = HAL_RX_MSDU_END_LAST_MSDU_GET(msdu_end);
|
||||
|
||||
return last_msdu;
|
||||
}
|
||||
|
||||
struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
|
||||
/* init and setup */
|
||||
hal_srng_dst_hw_init_generic,
|
||||
@@ -341,6 +359,7 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
|
||||
hal_rx_print_pn_6390,
|
||||
hal_rx_msdu_end_first_msdu_get_6390,
|
||||
hal_rx_msdu_end_da_is_valid_get_6390,
|
||||
hal_rx_msdu_end_last_msdu_get_6390,
|
||||
};
|
||||
|
||||
struct hal_hw_srng_config hw_srng_table_6390[] = {
|
||||
|
@@ -107,6 +107,12 @@
|
||||
RX_MSDU_END_5_DA_IS_VALID_MASK, \
|
||||
RX_MSDU_END_5_DA_IS_VALID_LSB))
|
||||
|
||||
#define HAL_RX_MSDU_END_LAST_MSDU_GET(_rx_msdu_end) \
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \
|
||||
RX_MSDU_END_5_LAST_MSDU_OFFSET)), \
|
||||
RX_MSDU_END_5_LAST_MSDU_MASK, \
|
||||
RX_MSDU_END_5_LAST_MSDU_LSB))
|
||||
|
||||
#define HAL_RX_MSDU_START_MIMO_SS_BITMAP(_rx_msdu_start)\
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR((_rx_msdu_start),\
|
||||
RX_MSDU_START_5_MIMO_SS_BITMAP_OFFSET)), \
|
||||
|
@@ -196,6 +196,24 @@ static uint8_t hal_rx_msdu_end_da_is_valid_get_6490(uint8_t *buf)
|
||||
return da_is_valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_rx_msdu_end_last_msdu_get_6490: API to get last msdu status
|
||||
* from rx_msdu_end TLV
|
||||
*
|
||||
* @ buf: pointer to the start of RX PKT TLV headers
|
||||
* Return: last_msdu
|
||||
*/
|
||||
static uint8_t hal_rx_msdu_end_last_msdu_get_6490(uint8_t *buf)
|
||||
{
|
||||
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
|
||||
struct rx_msdu_end *msdu_end = &pkt_tlvs->msdu_end_tlv.rx_msdu_end;
|
||||
uint8_t last_msdu;
|
||||
|
||||
last_msdu = HAL_RX_MSDU_END_LAST_MSDU_GET(msdu_end);
|
||||
|
||||
return last_msdu;
|
||||
}
|
||||
|
||||
struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = {
|
||||
/* rx */
|
||||
hal_rx_get_rx_fragment_number_6490,
|
||||
@@ -207,4 +225,5 @@ struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = {
|
||||
hal_rx_print_pn_6490,
|
||||
hal_rx_msdu_end_first_msdu_get_6490,
|
||||
hal_rx_msdu_end_da_is_valid_get_6490,
|
||||
hal_rx_msdu_end_last_msdu_get_6490,
|
||||
};
|
||||
|
@@ -87,3 +87,9 @@
|
||||
RX_MSDU_END_10_DA_IS_VALID_OFFSET)), \
|
||||
RX_MSDU_END_10_DA_IS_VALID_MASK, \
|
||||
RX_MSDU_END_10_DA_IS_VALID_LSB))
|
||||
|
||||
#define HAL_RX_MSDU_END_LAST_MSDU_GET(_rx_msdu_end) \
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \
|
||||
RX_MSDU_END_10_LAST_MSDU_OFFSET)), \
|
||||
RX_MSDU_END_10_LAST_MSDU_MASK, \
|
||||
RX_MSDU_END_10_LAST_MSDU_LSB))
|
||||
|
@@ -286,6 +286,24 @@ static uint8_t hal_rx_msdu_end_da_is_valid_get_8074v1(uint8_t *buf)
|
||||
return da_is_valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_rx_msdu_end_last_msdu_get_8074v1: API to get last msdu status
|
||||
* from rx_msdu_end TLV
|
||||
*
|
||||
* @ buf: pointer to the start of RX PKT TLV headers
|
||||
* Return: last_msdu
|
||||
*/
|
||||
static uint8_t hal_rx_msdu_end_last_msdu_get_8074v1(uint8_t *buf)
|
||||
{
|
||||
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
|
||||
struct rx_msdu_end *msdu_end = &pkt_tlvs->msdu_end_tlv.rx_msdu_end;
|
||||
uint8_t last_msdu;
|
||||
|
||||
last_msdu = HAL_RX_MSDU_END_LAST_MSDU_GET(msdu_end);
|
||||
|
||||
return last_msdu;
|
||||
}
|
||||
|
||||
struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
|
||||
|
||||
/* init and setup */
|
||||
@@ -338,6 +356,7 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
|
||||
hal_rx_print_pn_8074v1,
|
||||
hal_rx_msdu_end_first_msdu_get_8074v1,
|
||||
hal_rx_msdu_end_da_is_valid_get_8074v1,
|
||||
hal_rx_msdu_end_last_msdu_get_8074v1,
|
||||
};
|
||||
|
||||
struct hal_hw_srng_config hw_srng_table_8074[] = {
|
||||
|
@@ -96,6 +96,11 @@
|
||||
RX_MSDU_END_5_DA_IS_VALID_MASK, \
|
||||
RX_MSDU_END_5_DA_IS_VALID_LSB))
|
||||
|
||||
#define HAL_RX_MSDU_END_LAST_MSDU_GET(_rx_msdu_end) \
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \
|
||||
RX_MSDU_END_5_LAST_MSDU_OFFSET)), \
|
||||
RX_MSDU_END_5_LAST_MSDU_MASK, \
|
||||
RX_MSDU_END_5_LAST_MSDU_LSB))
|
||||
/*
|
||||
* hal_rx_msdu_start_nss_get_8074(): API to get the NSS
|
||||
* Interval from rx_msdu_start
|
||||
|
@@ -285,6 +285,24 @@ static uint8_t hal_rx_msdu_end_da_is_valid_get_8074v2(uint8_t *buf)
|
||||
return da_is_valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_rx_msdu_end_last_msdu_get_8074v2: API to get last msdu status
|
||||
* from rx_msdu_end TLV
|
||||
*
|
||||
* @ buf: pointer to the start of RX PKT TLV headers
|
||||
* Return: last_msdu
|
||||
*/
|
||||
static uint8_t hal_rx_msdu_end_last_msdu_get_8074v2(uint8_t *buf)
|
||||
{
|
||||
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
|
||||
struct rx_msdu_end *msdu_end = &pkt_tlvs->msdu_end_tlv.rx_msdu_end;
|
||||
uint8_t last_msdu;
|
||||
|
||||
last_msdu = HAL_RX_MSDU_END_LAST_MSDU_GET(msdu_end);
|
||||
|
||||
return last_msdu;
|
||||
}
|
||||
|
||||
struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
|
||||
|
||||
/* init and setup */
|
||||
@@ -337,6 +355,7 @@ struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
|
||||
hal_rx_print_pn_8074v2,
|
||||
hal_rx_msdu_end_first_msdu_get_8074v2,
|
||||
hal_rx_msdu_end_da_is_valid_get_8074v2,
|
||||
hal_rx_msdu_end_last_msdu_get_8074v2,
|
||||
};
|
||||
|
||||
struct hal_hw_srng_config hw_srng_table_8074v2[] = {
|
||||
|
@@ -104,6 +104,12 @@
|
||||
RX_MSDU_END_5_DA_IS_VALID_OFFSET)), \
|
||||
RX_MSDU_END_5_DA_IS_VALID_MASK, \
|
||||
RX_MSDU_END_5_DA_IS_VALID_LSB))
|
||||
|
||||
#define HAL_RX_MSDU_END_LAST_MSDU_GET(_rx_msdu_end) \
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_msdu_end, \
|
||||
RX_MSDU_END_5_LAST_MSDU_OFFSET)), \
|
||||
RX_MSDU_END_5_LAST_MSDU_MASK, \
|
||||
RX_MSDU_END_5_LAST_MSDU_LSB))
|
||||
/*
|
||||
* hal_rx_msdu_start_nss_get_8074v2(): API to get the NSS
|
||||
* Interval from rx_msdu_start
|
||||
|
@@ -294,6 +294,24 @@ static uint8_t hal_rx_msdu_end_da_is_valid_get_9000(uint8_t *buf)
|
||||
return da_is_valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_rx_msdu_end_last_msdu_get_9000: API to get last msdu status
|
||||
* from rx_msdu_end TLV
|
||||
*
|
||||
* @ buf: pointer to the start of RX PKT TLV headers
|
||||
* Return: last_msdu
|
||||
*/
|
||||
static uint8_t hal_rx_msdu_end_last_msdu_get_9000(uint8_t *buf)
|
||||
{
|
||||
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
|
||||
struct rx_msdu_end *msdu_end = &pkt_tlvs->msdu_end_tlv.rx_msdu_end;
|
||||
uint8_t last_msdu;
|
||||
|
||||
last_msdu = HAL_RX_MSDU_END_LAST_MSDU_GET(msdu_end);
|
||||
|
||||
return last_msdu;
|
||||
}
|
||||
|
||||
struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
|
||||
|
||||
/* init and setup */
|
||||
@@ -346,6 +364,7 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
|
||||
hal_rx_print_pn_9000,
|
||||
hal_rx_msdu_end_first_msdu_get_9000,
|
||||
hal_rx_msdu_end_da_is_valid_get_9000,
|
||||
hal_rx_msdu_end_last_msdu_get_9000,
|
||||
};
|
||||
|
||||
struct hal_hw_srng_config hw_srng_table_9000[] = {
|
||||
|
Referência em uma nova issue
Block a user