qcacmn: Add hal_rx_msdu_get_flow_params chip specific
Implement hal_rx_msdu_get_flow_params API per chipset as the macro to retrieve the flow parameters is chipset dependent. Change-Id: I6ef83232ebdf7497871a7fc588e082d14cdc9e75 CRs-Fixed: 2522133
此提交包含在:

提交者
nshrivas

父節點
8fc894afc8
當前提交
1059fae62c
@@ -18,6 +18,8 @@
|
|||||||
#ifndef _HAL_GENERIC_API_H_
|
#ifndef _HAL_GENERIC_API_H_
|
||||||
#define _HAL_GENERIC_API_H_
|
#define _HAL_GENERIC_API_H_
|
||||||
|
|
||||||
|
#include <hal_rx.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hal_tx_comp_get_status() - TQM Release reason
|
* hal_tx_comp_get_status() - TQM Release reason
|
||||||
* @hal_desc: completion ring Tx status
|
* @hal_desc: completion ring Tx status
|
||||||
|
@@ -442,6 +442,12 @@ struct hal_hw_txrx_ops {
|
|||||||
bool (*hal_rx_msdu_flow_idx_timeout)(uint8_t *buf);
|
bool (*hal_rx_msdu_flow_idx_timeout)(uint8_t *buf);
|
||||||
uint32_t (*hal_rx_msdu_fse_metadata_get)(uint8_t *buf);
|
uint32_t (*hal_rx_msdu_fse_metadata_get)(uint8_t *buf);
|
||||||
uint16_t (*hal_rx_msdu_cce_metadata_get)(uint8_t *buf);
|
uint16_t (*hal_rx_msdu_cce_metadata_get)(uint8_t *buf);
|
||||||
|
void
|
||||||
|
(*hal_rx_msdu_get_flow_params)(
|
||||||
|
uint8_t *buf,
|
||||||
|
bool *flow_invalid,
|
||||||
|
bool *flow_timeout,
|
||||||
|
uint32_t *flow_index);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -3235,29 +3235,6 @@ hal_rx_msdu_flow_idx_invalid(hal_soc_handle_t hal_soc_hdl,
|
|||||||
return hal_soc->ops->hal_rx_msdu_flow_idx_invalid(buf);
|
return hal_soc->ops->hal_rx_msdu_flow_idx_invalid(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* hal_rx_msdu_get_flow_params: API to get flow index, flow index invalid
|
|
||||||
* and flow index timeout from rx_msdu_end TLV
|
|
||||||
* @buf: pointer to the start of RX PKT TLV headers
|
|
||||||
* @flow_invalid: pointer to return value of flow_idx_valid
|
|
||||||
* @flow_timeout: pointer to return value of flow_idx_timeout
|
|
||||||
* @flow_index: pointer to return value of flow_idx
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
static inline void hal_rx_msdu_get_flow_params(uint8_t *buf,
|
|
||||||
bool *flow_invalid,
|
|
||||||
bool *flow_timeout,
|
|
||||||
uint32_t *flow_index)
|
|
||||||
{
|
|
||||||
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;
|
|
||||||
|
|
||||||
*flow_invalid = HAL_RX_MSDU_END_FLOW_IDX_INVALID_GET(msdu_end);
|
|
||||||
*flow_timeout = HAL_RX_MSDU_END_FLOW_IDX_TIMEOUT_GET(msdu_end);
|
|
||||||
*flow_index = HAL_RX_MSDU_END_FLOW_IDX_GET(msdu_end);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hal_rx_hw_desc_get_ppduid_get() - Retrieve ppdu id
|
* hal_rx_hw_desc_get_ppduid_get() - Retrieve ppdu id
|
||||||
* @hal_soc_hdl: hal_soc handle
|
* @hal_soc_hdl: hal_soc handle
|
||||||
@@ -3396,4 +3373,37 @@ void hal_reo_config(struct hal_soc *hal_soc,
|
|||||||
reg_val,
|
reg_val,
|
||||||
reo_params);
|
reo_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_rx_msdu_get_flow_params: API to get flow index,
|
||||||
|
* flow index invalid and flow index timeout from rx_msdu_end TLV
|
||||||
|
* @buf: pointer to the start of RX PKT TLV headers
|
||||||
|
* @flow_invalid: pointer to return value of flow_idx_valid
|
||||||
|
* @flow_timeout: pointer to return value of flow_idx_timeout
|
||||||
|
* @flow_index: pointer to return value of flow_idx
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_rx_msdu_get_flow_params(hal_soc_handle_t hal_soc_hdl,
|
||||||
|
uint8_t *buf,
|
||||||
|
bool *flow_invalid,
|
||||||
|
bool *flow_timeout,
|
||||||
|
uint32_t *flow_index)
|
||||||
|
{
|
||||||
|
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
|
||||||
|
|
||||||
|
if ((!hal_soc) || (!hal_soc->ops)) {
|
||||||
|
hal_err("hal handle is NULL");
|
||||||
|
QDF_BUG(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hal_soc->ops->hal_rx_msdu_get_flow_params)
|
||||||
|
hal_soc->ops->
|
||||||
|
hal_rx_msdu_get_flow_params(buf,
|
||||||
|
flow_invalid,
|
||||||
|
flow_timeout,
|
||||||
|
flow_index);
|
||||||
|
}
|
||||||
#endif /* _HAL_RX_H */
|
#endif /* _HAL_RX_H */
|
||||||
|
@@ -926,6 +926,30 @@ hal_rx_msdu_cce_metadata_get_6290(uint8_t *buf)
|
|||||||
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_rx_msdu_get_flow_params_6290: API to get flow index, flow index invalid
|
||||||
|
* and flow index timeout from rx_msdu_end TLV
|
||||||
|
* @buf: pointer to the start of RX PKT TLV headers
|
||||||
|
* @flow_invalid: pointer to return value of flow_idx_valid
|
||||||
|
* @flow_timeout: pointer to return value of flow_idx_timeout
|
||||||
|
* @flow_index: pointer to return value of flow_idx
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_rx_msdu_get_flow_params_6290(uint8_t *buf,
|
||||||
|
bool *flow_invalid,
|
||||||
|
bool *flow_timeout,
|
||||||
|
uint32_t *flow_index)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
*flow_invalid = HAL_RX_MSDU_END_FLOW_IDX_INVALID_GET(msdu_end);
|
||||||
|
*flow_timeout = HAL_RX_MSDU_END_FLOW_IDX_TIMEOUT_GET(msdu_end);
|
||||||
|
*flow_index = HAL_RX_MSDU_END_FLOW_IDX_GET(msdu_end);
|
||||||
|
}
|
||||||
|
|
||||||
struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
|
struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
|
||||||
/* init and setup */
|
/* init and setup */
|
||||||
hal_srng_dst_hw_init_generic,
|
hal_srng_dst_hw_init_generic,
|
||||||
@@ -1008,6 +1032,7 @@ struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
|
|||||||
hal_rx_msdu_flow_idx_timeout_6290,
|
hal_rx_msdu_flow_idx_timeout_6290,
|
||||||
hal_rx_msdu_fse_metadata_get_6290,
|
hal_rx_msdu_fse_metadata_get_6290,
|
||||||
hal_rx_msdu_cce_metadata_get_6290,
|
hal_rx_msdu_cce_metadata_get_6290,
|
||||||
|
hal_rx_msdu_get_flow_params_6290,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hal_hw_srng_config hw_srng_table_6290[] = {
|
struct hal_hw_srng_config hw_srng_table_6290[] = {
|
||||||
|
@@ -922,6 +922,30 @@ hal_rx_msdu_cce_metadata_get_6390(uint8_t *buf)
|
|||||||
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_rx_msdu_get_flow_params_6390: API to get flow index, flow index invalid
|
||||||
|
* and flow index timeout from rx_msdu_end TLV
|
||||||
|
* @buf: pointer to the start of RX PKT TLV headers
|
||||||
|
* @flow_invalid: pointer to return value of flow_idx_valid
|
||||||
|
* @flow_timeout: pointer to return value of flow_idx_timeout
|
||||||
|
* @flow_index: pointer to return value of flow_idx
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_rx_msdu_get_flow_params_6390(uint8_t *buf,
|
||||||
|
bool *flow_invalid,
|
||||||
|
bool *flow_timeout,
|
||||||
|
uint32_t *flow_index)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
*flow_invalid = HAL_RX_MSDU_END_FLOW_IDX_INVALID_GET(msdu_end);
|
||||||
|
*flow_timeout = HAL_RX_MSDU_END_FLOW_IDX_TIMEOUT_GET(msdu_end);
|
||||||
|
*flow_index = HAL_RX_MSDU_END_FLOW_IDX_GET(msdu_end);
|
||||||
|
}
|
||||||
|
|
||||||
struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
|
struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
|
||||||
/* init and setup */
|
/* init and setup */
|
||||||
hal_srng_dst_hw_init_generic,
|
hal_srng_dst_hw_init_generic,
|
||||||
@@ -1004,6 +1028,7 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
|
|||||||
hal_rx_msdu_flow_idx_timeout_6390,
|
hal_rx_msdu_flow_idx_timeout_6390,
|
||||||
hal_rx_msdu_fse_metadata_get_6390,
|
hal_rx_msdu_fse_metadata_get_6390,
|
||||||
hal_rx_msdu_cce_metadata_get_6390,
|
hal_rx_msdu_cce_metadata_get_6390,
|
||||||
|
hal_rx_msdu_get_flow_params_6390,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hal_hw_srng_config hw_srng_table_6390[] = {
|
struct hal_hw_srng_config hw_srng_table_6390[] = {
|
||||||
|
@@ -840,4 +840,5 @@ struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = {
|
|||||||
hal_rx_msdu_flow_idx_timeout_6490,
|
hal_rx_msdu_flow_idx_timeout_6490,
|
||||||
hal_rx_msdu_fse_metadata_get_6490,
|
hal_rx_msdu_fse_metadata_get_6490,
|
||||||
hal_rx_msdu_cce_metadata_get_6490,
|
hal_rx_msdu_cce_metadata_get_6490,
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
|
@@ -922,6 +922,30 @@ hal_rx_msdu_cce_metadata_get_8074v1(uint8_t *buf)
|
|||||||
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_rx_msdu_get_flow_params_8074v1: API to get flow index, flow index invalid
|
||||||
|
* and flow index timeout from rx_msdu_end TLV
|
||||||
|
* @buf: pointer to the start of RX PKT TLV headers
|
||||||
|
* @flow_invalid: pointer to return value of flow_idx_valid
|
||||||
|
* @flow_timeout: pointer to return value of flow_idx_timeout
|
||||||
|
* @flow_index: pointer to return value of flow_idx
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_rx_msdu_get_flow_params_8074v1(uint8_t *buf,
|
||||||
|
bool *flow_invalid,
|
||||||
|
bool *flow_timeout,
|
||||||
|
uint32_t *flow_index)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
*flow_invalid = HAL_RX_MSDU_END_FLOW_IDX_INVALID_GET(msdu_end);
|
||||||
|
*flow_timeout = HAL_RX_MSDU_END_FLOW_IDX_TIMEOUT_GET(msdu_end);
|
||||||
|
*flow_index = HAL_RX_MSDU_END_FLOW_IDX_GET(msdu_end);
|
||||||
|
}
|
||||||
|
|
||||||
struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
|
struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
|
||||||
|
|
||||||
/* init and setup */
|
/* init and setup */
|
||||||
@@ -1005,6 +1029,7 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
|
|||||||
hal_rx_msdu_flow_idx_timeout_8074v1,
|
hal_rx_msdu_flow_idx_timeout_8074v1,
|
||||||
hal_rx_msdu_fse_metadata_get_8074v1,
|
hal_rx_msdu_fse_metadata_get_8074v1,
|
||||||
hal_rx_msdu_cce_metadata_get_8074v1,
|
hal_rx_msdu_cce_metadata_get_8074v1,
|
||||||
|
hal_rx_msdu_get_flow_params_8074v1,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hal_hw_srng_config hw_srng_table_8074[] = {
|
struct hal_hw_srng_config hw_srng_table_8074[] = {
|
||||||
|
@@ -919,6 +919,30 @@ hal_rx_msdu_cce_metadata_get_8074v2(uint8_t *buf)
|
|||||||
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_rx_msdu_get_flow_params_8074v2: API to get flow index, flow index invalid
|
||||||
|
* and flow index timeout from rx_msdu_end TLV
|
||||||
|
* @buf: pointer to the start of RX PKT TLV headers
|
||||||
|
* @flow_invalid: pointer to return value of flow_idx_valid
|
||||||
|
* @flow_timeout: pointer to return value of flow_idx_timeout
|
||||||
|
* @flow_index: pointer to return value of flow_idx
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_rx_msdu_get_flow_params_8074v2(uint8_t *buf,
|
||||||
|
bool *flow_invalid,
|
||||||
|
bool *flow_timeout,
|
||||||
|
uint32_t *flow_index)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
*flow_invalid = HAL_RX_MSDU_END_FLOW_IDX_INVALID_GET(msdu_end);
|
||||||
|
*flow_timeout = HAL_RX_MSDU_END_FLOW_IDX_TIMEOUT_GET(msdu_end);
|
||||||
|
*flow_index = HAL_RX_MSDU_END_FLOW_IDX_GET(msdu_end);
|
||||||
|
}
|
||||||
|
|
||||||
struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
|
struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
|
||||||
|
|
||||||
/* init and setup */
|
/* init and setup */
|
||||||
@@ -1003,6 +1027,7 @@ struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
|
|||||||
hal_rx_msdu_flow_idx_timeout_8074v2,
|
hal_rx_msdu_flow_idx_timeout_8074v2,
|
||||||
hal_rx_msdu_fse_metadata_get_8074v2,
|
hal_rx_msdu_fse_metadata_get_8074v2,
|
||||||
hal_rx_msdu_cce_metadata_get_8074v2,
|
hal_rx_msdu_cce_metadata_get_8074v2,
|
||||||
|
hal_rx_msdu_get_flow_params_8074v2,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hal_hw_srng_config hw_srng_table_8074v2[] = {
|
struct hal_hw_srng_config hw_srng_table_8074v2[] = {
|
||||||
|
@@ -928,6 +928,30 @@ hal_rx_msdu_cce_metadata_get_9000(uint8_t *buf)
|
|||||||
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
return HAL_RX_MSDU_END_CCE_METADATA_GET(msdu_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_rx_msdu_get_flow_params_9000: API to get flow index, flow index invalid
|
||||||
|
* and flow index timeout from rx_msdu_end TLV
|
||||||
|
* @buf: pointer to the start of RX PKT TLV headers
|
||||||
|
* @flow_invalid: pointer to return value of flow_idx_valid
|
||||||
|
* @flow_timeout: pointer to return value of flow_idx_timeout
|
||||||
|
* @flow_index: pointer to return value of flow_idx
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_rx_msdu_get_flow_params_9000(uint8_t *buf,
|
||||||
|
bool *flow_invalid,
|
||||||
|
bool *flow_timeout,
|
||||||
|
uint32_t *flow_index)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
*flow_invalid = HAL_RX_MSDU_END_FLOW_IDX_INVALID_GET(msdu_end);
|
||||||
|
*flow_timeout = HAL_RX_MSDU_END_FLOW_IDX_TIMEOUT_GET(msdu_end);
|
||||||
|
*flow_index = HAL_RX_MSDU_END_FLOW_IDX_GET(msdu_end);
|
||||||
|
}
|
||||||
|
|
||||||
struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
|
struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
|
||||||
|
|
||||||
/* init and setup */
|
/* init and setup */
|
||||||
@@ -1012,6 +1036,7 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
|
|||||||
hal_rx_msdu_flow_idx_timeout_9000,
|
hal_rx_msdu_flow_idx_timeout_9000,
|
||||||
hal_rx_msdu_fse_metadata_get_9000,
|
hal_rx_msdu_fse_metadata_get_9000,
|
||||||
hal_rx_msdu_cce_metadata_get_9000,
|
hal_rx_msdu_cce_metadata_get_9000,
|
||||||
|
hal_rx_msdu_get_flow_params_9000,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hal_hw_srng_config hw_srng_table_9000[] = {
|
struct hal_hw_srng_config hw_srng_table_9000[] = {
|
||||||
|
新增問題並參考
封鎖使用者