qcacmn: Add HAL APIs to set search type and index
HAL APIs added to set search type and search index in tx descriptor Change-Id: I9fc2eae5d1f75a7cb72ba141f45a60f248b52f9c CRs-fixed: 2312178
This commit is contained in:

committed by
nshrivas

parent
2467ed1445
commit
710e2959f2
@@ -1515,3 +1515,51 @@ static inline void hal_srng_dst_hw_init_generic(void *halsoc,
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_tx_desc_set_search_type - Set the search type value
|
||||||
|
* @desc: Handle to Tx Descriptor
|
||||||
|
* @search_type: search type
|
||||||
|
* 0 – Normal search
|
||||||
|
* 1 – Index based address search
|
||||||
|
* 2 – Index based flow search
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
#ifdef TCL_DATA_CMD_2_SEARCH_TYPE_OFFSET
|
||||||
|
static void hal_tx_desc_set_search_type_generic(void *desc,
|
||||||
|
uint8_t search_type)
|
||||||
|
{
|
||||||
|
HAL_SET_FLD(desc, TCL_DATA_CMD_2, SEARCH_TYPE) |=
|
||||||
|
HAL_TX_SM(TCL_DATA_CMD_2, SEARCH_TYPE, search_type);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void hal_tx_desc_set_search_type_generic(void *desc,
|
||||||
|
uint8_t search_type)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_tx_desc_set_search_index - Set the search index value
|
||||||
|
* @desc: Handle to Tx Descriptor
|
||||||
|
* @search_index: The index that will be used for index based address or
|
||||||
|
* flow search. The field is valid when 'search_type' is
|
||||||
|
* 1 0r 2
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
#ifdef TCL_DATA_CMD_5_SEARCH_INDEX_OFFSET
|
||||||
|
static void hal_tx_desc_set_search_index_generic(void *desc,
|
||||||
|
uint32_t search_index)
|
||||||
|
{
|
||||||
|
HAL_SET_FLD(desc, TCL_DATA_CMD_5, SEARCH_INDEX) |=
|
||||||
|
HAL_TX_SM(TCL_DATA_CMD_5, SEARCH_INDEX, search_index);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void hal_tx_desc_set_search_index_generic(void *desc,
|
||||||
|
uint32_t search_index)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@@ -307,6 +307,8 @@ struct hal_hw_txrx_ops {
|
|||||||
uint32_t (*hal_rx_status_get_tlv_info)(void *rx_tlv_hdr,
|
uint32_t (*hal_rx_status_get_tlv_info)(void *rx_tlv_hdr,
|
||||||
void *ppdu_info,
|
void *ppdu_info,
|
||||||
void *hal);
|
void *hal);
|
||||||
|
void (*hal_tx_desc_set_search_type)(void *desc, uint8_t search_type);
|
||||||
|
void (*hal_tx_desc_set_search_index)(void *desc, uint32_t search_index);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -922,6 +922,38 @@ static inline void hal_tx_desc_set_lmac_id(struct hal_soc *hal_soc,
|
|||||||
hal_soc->ops->hal_tx_desc_set_lmac_id(desc, lmac_id);
|
hal_soc->ops->hal_tx_desc_set_lmac_id(desc, lmac_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_tx_desc_set_search_type - Set the search type value
|
||||||
|
* @desc: Handle to Tx Descriptor
|
||||||
|
* @search_type: search type
|
||||||
|
* 0 – Normal search
|
||||||
|
* 1 – Index based address search
|
||||||
|
* 2 – Index based flow search
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
static inline void hal_tx_desc_set_search_type(struct hal_soc *hal_soc,
|
||||||
|
void *desc, uint8_t search_type)
|
||||||
|
{
|
||||||
|
hal_soc->ops->hal_tx_desc_set_search_type(desc, search_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hal_tx_desc_set_search_index - Set the search index value
|
||||||
|
* @desc: Handle to Tx Descriptor
|
||||||
|
* @search_index: The index that will be used for index based address or
|
||||||
|
* flow search. The field is valid when 'search_type' is
|
||||||
|
* 1 0r 2
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
static inline void hal_tx_desc_set_search_index(struct hal_soc *hal_soc,
|
||||||
|
void *desc,
|
||||||
|
uint32_t search_index)
|
||||||
|
{
|
||||||
|
hal_soc->ops->hal_tx_desc_set_search_index(desc, search_index);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
|
@@ -138,6 +138,8 @@ struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
|
|||||||
hal_rx_link_desc_msdu0_ptr_generic,
|
hal_rx_link_desc_msdu0_ptr_generic,
|
||||||
hal_reo_status_get_header_generic,
|
hal_reo_status_get_header_generic,
|
||||||
hal_rx_status_get_tlv_info_generic,
|
hal_rx_status_get_tlv_info_generic,
|
||||||
|
hal_tx_desc_set_search_type_generic,
|
||||||
|
hal_tx_desc_set_search_index_generic,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hal_hw_srng_config hw_srng_table_6290[] = {
|
struct hal_hw_srng_config hw_srng_table_6290[] = {
|
||||||
|
@@ -138,6 +138,8 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
|
|||||||
hal_rx_link_desc_msdu0_ptr_generic,
|
hal_rx_link_desc_msdu0_ptr_generic,
|
||||||
hal_reo_status_get_header_generic,
|
hal_reo_status_get_header_generic,
|
||||||
hal_rx_status_get_tlv_info_generic,
|
hal_rx_status_get_tlv_info_generic,
|
||||||
|
hal_tx_desc_set_search_type_generic,
|
||||||
|
hal_tx_desc_set_search_index_generic,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hal_hw_srng_config hw_srng_table_6390[] = {
|
struct hal_hw_srng_config hw_srng_table_6390[] = {
|
||||||
|
@@ -134,6 +134,8 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
|
|||||||
hal_rx_link_desc_msdu0_ptr_generic,
|
hal_rx_link_desc_msdu0_ptr_generic,
|
||||||
hal_reo_status_get_header_generic,
|
hal_reo_status_get_header_generic,
|
||||||
hal_rx_status_get_tlv_info_generic,
|
hal_rx_status_get_tlv_info_generic,
|
||||||
|
hal_tx_desc_set_search_type_generic,
|
||||||
|
hal_tx_desc_set_search_index_generic,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hal_hw_srng_config hw_srng_table_8074[] = {
|
struct hal_hw_srng_config hw_srng_table_8074[] = {
|
||||||
|
@@ -134,6 +134,8 @@ struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
|
|||||||
hal_rx_link_desc_msdu0_ptr_generic,
|
hal_rx_link_desc_msdu0_ptr_generic,
|
||||||
hal_reo_status_get_header_generic,
|
hal_reo_status_get_header_generic,
|
||||||
hal_rx_status_get_tlv_info_generic,
|
hal_rx_status_get_tlv_info_generic,
|
||||||
|
hal_tx_desc_set_search_type_generic,
|
||||||
|
hal_tx_desc_set_search_index_generic,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hal_hw_srng_config hw_srng_table_8074v2[] = {
|
struct hal_hw_srng_config hw_srng_table_8074v2[] = {
|
||||||
|
Reference in New Issue
Block a user