qcacmn: Add hal_rx_mpdu_get_to_ds API

Implement hal_rx_mpdu_get_to_ds API based
on the chipset as the macro to retrieve
to_ds bit value is chipset dependent.

Change-Id: I36d9d14e226bcc604b91d8aecbe52836c5a12272
CRs-Fixed: 2522133
This commit is contained in:
Venkata Sharath Chandra Manchala
2019-09-21 12:44:52 -07:00
committed by nshrivas
父節點 96ed623043
當前提交 e7924fd2da
共有 15 個文件被更改,包括 158 次插入16 次删除

查看文件

@@ -393,6 +393,7 @@ struct hal_hw_txrx_ops {
uint8_t (*hal_rx_msdu_end_last_msdu_get)(uint8_t *buf);
bool (*hal_rx_get_mpdu_mac_ad4_valid)(uint8_t *buf);
uint32_t (*hal_rx_mpdu_start_sw_peer_id_get)(uint8_t *buf);
uint32_t (*hal_rx_mpdu_get_to_ds)(uint8_t *buf);
};
/**

查看文件

@@ -1484,18 +1484,11 @@ hal_rx_msdu_start_get_pkt_type(uint8_t *buf)
*/
static inline uint32_t
hal_rx_mpdu_get_to_ds(uint8_t *buf)
hal_rx_mpdu_get_to_ds(hal_soc_handle_t hal_soc_hdl, uint8_t *buf)
{
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
struct rx_mpdu_start *mpdu_start =
&pkt_tlvs->mpdu_start_tlv.rx_mpdu_start;
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
struct rx_mpdu_info *mpdu_info = &mpdu_start->rx_mpdu_info_details;
uint32_t to_ds;
to_ds = HAL_RX_MPDU_GET_TODS(mpdu_info);
return to_ds;
return hal_soc->ops->hal_rx_mpdu_get_to_ds(buf);
}
#define HAL_RX_MPDU_GET_FROMDS(_rx_mpdu_info) \

查看文件

@@ -341,6 +341,25 @@ static uint32_t hal_rx_mpdu_start_sw_peer_id_get_6290(uint8_t *buf)
return HAL_RX_MPDU_INFO_SW_PEER_ID_GET(
&mpdu_start->rx_mpdu_info_details);
}
/*
* hal_rx_mpdu_get_to_ds_6290(): API to get the tods info
* from rx_mpdu_start
*
* @buf: pointer to the start of RX PKT TLV header
* Return: uint32_t(to_ds)
*/
static uint32_t hal_rx_mpdu_get_to_ds_6290(uint8_t *buf)
{
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
struct rx_mpdu_start *mpdu_start =
&pkt_tlvs->mpdu_start_tlv.rx_mpdu_start;
struct rx_mpdu_info *mpdu_info = &mpdu_start->rx_mpdu_info_details;
return HAL_RX_MPDU_GET_TODS(mpdu_info);
}
struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
/* init and setup */
hal_srng_dst_hw_init_generic,
@@ -395,6 +414,7 @@ struct hal_hw_txrx_ops qca6290_hal_hw_txrx_ops = {
hal_rx_msdu_end_last_msdu_get_6290,
hal_rx_get_mpdu_mac_ad4_valid_6290,
hal_rx_mpdu_start_sw_peer_id_get_6290,
hal_rx_mpdu_get_to_ds_6290,
};
struct hal_hw_srng_config hw_srng_table_6290[] = {

查看文件

@@ -125,6 +125,12 @@
RX_MPDU_INFO_1_SW_PEER_ID_MASK, \
RX_MPDU_INFO_1_SW_PEER_ID_LSB))
#define HAL_RX_MPDU_GET_TODS(_rx_mpdu_info) \
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_mpdu_info, \
RX_MPDU_INFO_2_TO_DS_OFFSET)), \
RX_MPDU_INFO_2_TO_DS_MASK, \
RX_MPDU_INFO_2_TO_DS_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),\

查看文件

@@ -341,6 +341,23 @@ static uint32_t hal_rx_mpdu_start_sw_peer_id_get_6390(uint8_t *buf)
&mpdu_start->rx_mpdu_info_details);
}
/*
* hal_rx_mpdu_get_to_ds_6390(): API to get the tods info
* from rx_mpdu_start
*
* @buf: pointer to the start of RX PKT TLV header
* Return: uint32_t(to_ds)
*/
static uint32_t hal_rx_mpdu_get_to_ds_6390(uint8_t *buf)
{
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
struct rx_mpdu_start *mpdu_start =
&pkt_tlvs->mpdu_start_tlv.rx_mpdu_start;
struct rx_mpdu_info *mpdu_info = &mpdu_start->rx_mpdu_info_details;
return HAL_RX_MPDU_GET_TODS(mpdu_info);
}
struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
/* init and setup */
hal_srng_dst_hw_init_generic,
@@ -395,6 +412,7 @@ struct hal_hw_txrx_ops qca6390_hal_hw_txrx_ops = {
hal_rx_msdu_end_last_msdu_get_6390,
hal_rx_get_mpdu_mac_ad4_valid_6390,
hal_rx_mpdu_start_sw_peer_id_get_6390,
hal_rx_mpdu_get_to_ds_6390,
};
struct hal_hw_srng_config hw_srng_table_6390[] = {

查看文件

@@ -125,6 +125,12 @@
RX_MPDU_INFO_1_SW_PEER_ID_MASK, \
RX_MPDU_INFO_1_SW_PEER_ID_LSB))
#define HAL_RX_MPDU_GET_TODS(_rx_mpdu_info) \
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_mpdu_info, \
RX_MPDU_INFO_2_TO_DS_OFFSET)), \
RX_MPDU_INFO_2_TO_DS_MASK, \
RX_MPDU_INFO_2_TO_DS_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)), \

查看文件

@@ -247,6 +247,24 @@ static uint32_t hal_rx_mpdu_start_sw_peer_id_get_6490(uint8_t *buf)
&mpdu_start->rx_mpdu_info_details);
}
/**
* hal_rx_mpdu_get_to_ds_6490(): API to get the tods info
* from rx_mpdu_start
*
* @buf: pointer to the start of RX PKT TLV header
* Return: uint32_t(to_ds)
*/
static uint32_t hal_rx_mpdu_get_to_ds_6490(uint8_t *buf)
{
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
struct rx_mpdu_start *mpdu_start =
&pkt_tlvs->mpdu_start_tlv.rx_mpdu_start;
struct rx_mpdu_info *mpdu_info = &mpdu_start->rx_mpdu_info_details;
return HAL_RX_MPDU_GET_TODS(mpdu_info);
}
struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = {
/* rx */
hal_rx_get_rx_fragment_number_6490,
@@ -261,4 +279,5 @@ struct hal_hw_txrx_ops qca6490_hal_hw_txrx_ops = {
hal_rx_msdu_end_last_msdu_get_6490,
hal_rx_get_mpdu_mac_ad4_valid_6490,
hal_rx_mpdu_start_sw_peer_id_get_6490,
hal_rx_mpdu_get_to_ds_6490,
};

查看文件

@@ -105,3 +105,9 @@
RX_MPDU_INFO_10_SW_PEER_ID_OFFSET)), \
RX_MPDU_INFO_10_SW_PEER_ID_MASK, \
RX_MPDU_INFO_10_SW_PEER_ID_LSB))
#define HAL_RX_MPDU_GET_TODS(_rx_mpdu_info) \
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_mpdu_info, \
RX_MPDU_INFO_11_TO_DS_OFFSET)), \
RX_MPDU_INFO_11_TO_DS_MASK, \
RX_MPDU_INFO_11_TO_DS_LSB))

查看文件

@@ -337,6 +337,25 @@ static uint32_t hal_rx_mpdu_start_sw_peer_id_get_8074v1(uint8_t *buf)
&mpdu_start->rx_mpdu_info_details);
}
/*
* hal_rx_mpdu_get_to_ds_8074v1(): API to get the tods info
* from rx_mpdu_start
*
* @buf: pointer to the start of RX PKT TLV header
* Return: uint32_t(to_ds)
*/
static uint32_t hal_rx_mpdu_get_to_ds_8074v1(uint8_t *buf)
{
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
struct rx_mpdu_start *mpdu_start =
&pkt_tlvs->mpdu_start_tlv.rx_mpdu_start;
struct rx_mpdu_info *mpdu_info = &mpdu_start->rx_mpdu_info_details;
return HAL_RX_MPDU_GET_TODS(mpdu_info);
}
struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
/* init and setup */
@@ -392,6 +411,7 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
hal_rx_msdu_end_last_msdu_get_8074v1,
hal_rx_get_mpdu_mac_ad4_valid_8074v1,
hal_rx_mpdu_start_sw_peer_id_get_8074v1,
hal_rx_mpdu_get_to_ds_8074v1,
};
struct hal_hw_srng_config hw_srng_table_8074[] = {

查看文件

@@ -113,6 +113,12 @@
RX_MPDU_INFO_1_SW_PEER_ID_OFFSET)), \
RX_MPDU_INFO_1_SW_PEER_ID_MASK, \
RX_MPDU_INFO_1_SW_PEER_ID_LSB))
#define HAL_RX_MPDU_GET_TODS(_rx_mpdu_info) \
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_mpdu_info, \
RX_MPDU_INFO_2_TO_DS_OFFSET)), \
RX_MPDU_INFO_2_TO_DS_MASK, \
RX_MPDU_INFO_2_TO_DS_LSB))
/*
* hal_rx_msdu_start_nss_get_8074(): API to get the NSS
* Interval from rx_msdu_start

查看文件

@@ -336,6 +336,23 @@ static uint32_t hal_rx_mpdu_start_sw_peer_id_get_8074v2(uint8_t *buf)
&mpdu_start->rx_mpdu_info_details);
}
/*
* hal_rx_mpdu_get_to_ds_8074v2(): API to get the tods info
* from rx_mpdu_start
*
* @buf: pointer to the start of RX PKT TLV header
* Return: uint32_t(to_ds)
*/
static uint32_t hal_rx_mpdu_get_to_ds_8074v2(uint8_t *buf)
{
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
struct rx_mpdu_start *mpdu_start =
&pkt_tlvs->mpdu_start_tlv.rx_mpdu_start;
struct rx_mpdu_info *mpdu_info = &mpdu_start->rx_mpdu_info_details;
return HAL_RX_MPDU_GET_TODS(mpdu_info);
}
struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
/* init and setup */
@@ -391,6 +408,7 @@ struct hal_hw_txrx_ops qca8074v2_hal_hw_txrx_ops = {
hal_rx_msdu_end_last_msdu_get_8074v2,
hal_rx_get_mpdu_mac_ad4_valid_8074v2,
hal_rx_mpdu_start_sw_peer_id_get_8074v2,
hal_rx_mpdu_get_to_ds_8074v2,
};
struct hal_hw_srng_config hw_srng_table_8074v2[] = {

查看文件

@@ -122,6 +122,12 @@
RX_MPDU_INFO_1_SW_PEER_ID_OFFSET)), \
RX_MPDU_INFO_1_SW_PEER_ID_MASK, \
RX_MPDU_INFO_1_SW_PEER_ID_LSB))
#define HAL_RX_MPDU_GET_TODS(_rx_mpdu_info) \
(_HAL_MS((*_OFFSET_TO_WORD_PTR(_rx_mpdu_info, \
RX_MPDU_INFO_2_TO_DS_OFFSET)), \
RX_MPDU_INFO_2_TO_DS_MASK, \
RX_MPDU_INFO_2_TO_DS_LSB))
/*
* hal_rx_msdu_start_nss_get_8074v2(): API to get the NSS
* Interval from rx_msdu_start

查看文件

@@ -345,6 +345,24 @@ static uint32_t hal_rx_mpdu_start_sw_peer_id_get_9000(uint8_t *buf)
&mpdu_start->rx_mpdu_info_details);
}
/*
* hal_rx_mpdu_get_to_ds_9000(): API to get the tods info
* from rx_mpdu_start
*
* @buf: pointer to the start of RX PKT TLV header
* Return: uint32_t(to_ds)
*/
static uint32_t hal_rx_mpdu_get_to_ds_9000(uint8_t *buf)
{
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
struct rx_mpdu_start *mpdu_start =
&pkt_tlvs->mpdu_start_tlv.rx_mpdu_start;
struct rx_mpdu_info *mpdu_info = &mpdu_start->rx_mpdu_info_details;
return HAL_RX_MPDU_GET_TODS(mpdu_info);
}
struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
/* init and setup */
@@ -400,6 +418,7 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
hal_rx_msdu_end_last_msdu_get_9000,
hal_rx_get_mpdu_mac_ad4_valid_9000,
hal_rx_mpdu_start_sw_peer_id_get_9000,
hal_rx_mpdu_get_to_ds_9000,
};
struct hal_hw_srng_config hw_srng_table_9000[] = {