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:

committed by
nshrivas

parent
96ed623043
commit
e7924fd2da
@@ -608,6 +608,7 @@ QDF_STATUS dp_rx_filter_mesh_packets(struct dp_vdev *vdev, qdf_nbuf_t nbuf,
|
||||
uint8_t *rx_tlv_hdr)
|
||||
{
|
||||
union dp_align_mac_addr mac_addr;
|
||||
struct dp_soc *soc = vdev->pdev->soc;
|
||||
|
||||
if (qdf_unlikely(vdev->mesh_rx_filter)) {
|
||||
if (vdev->mesh_rx_filter & MESH_FILTER_OUT_FROMDS)
|
||||
@@ -615,12 +616,14 @@ QDF_STATUS dp_rx_filter_mesh_packets(struct dp_vdev *vdev, qdf_nbuf_t nbuf,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (vdev->mesh_rx_filter & MESH_FILTER_OUT_TODS)
|
||||
if (hal_rx_mpdu_get_to_ds(rx_tlv_hdr))
|
||||
if (hal_rx_mpdu_get_to_ds(soc->hal_soc,
|
||||
rx_tlv_hdr))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (vdev->mesh_rx_filter & MESH_FILTER_OUT_NODS)
|
||||
if (!hal_rx_mpdu_get_fr_ds(rx_tlv_hdr)
|
||||
&& !hal_rx_mpdu_get_to_ds(rx_tlv_hdr))
|
||||
if (!hal_rx_mpdu_get_fr_ds(rx_tlv_hdr) &&
|
||||
!hal_rx_mpdu_get_to_ds(soc->hal_soc,
|
||||
rx_tlv_hdr))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (vdev->mesh_rx_filter & MESH_FILTER_OUT_RA) {
|
||||
|
@@ -515,13 +515,14 @@ static QDF_STATUS dp_rx_defrag_wep_decap(qdf_nbuf_t msdu, uint16_t hdrlen)
|
||||
|
||||
/*
|
||||
* dp_rx_defrag_hdrsize(): Calculate the header size of the received fragment
|
||||
* @soc: soc handle
|
||||
* @nbuf: Pointer to the fragment
|
||||
*
|
||||
* Calculate the header size of the received fragment
|
||||
*
|
||||
* Returns: header size (uint16_t)
|
||||
*/
|
||||
static uint16_t dp_rx_defrag_hdrsize(qdf_nbuf_t nbuf)
|
||||
static uint16_t dp_rx_defrag_hdrsize(struct dp_soc *soc, qdf_nbuf_t nbuf)
|
||||
{
|
||||
uint8_t *rx_tlv_hdr = qdf_nbuf_data(nbuf);
|
||||
uint16_t size = sizeof(struct ieee80211_frame);
|
||||
@@ -530,7 +531,7 @@ static uint16_t dp_rx_defrag_hdrsize(qdf_nbuf_t nbuf)
|
||||
uint8_t frm_ctrl_valid;
|
||||
uint16_t frm_ctrl_field;
|
||||
|
||||
to_ds = hal_rx_mpdu_get_to_ds(rx_tlv_hdr);
|
||||
to_ds = hal_rx_mpdu_get_to_ds(soc->hal_soc, rx_tlv_hdr);
|
||||
fr_ds = hal_rx_mpdu_get_fr_ds(rx_tlv_hdr);
|
||||
frm_ctrl_valid = hal_rx_get_mpdu_frame_control_valid(rx_tlv_hdr);
|
||||
frm_ctrl_field = hal_rx_get_frame_ctrl_field(rx_tlv_hdr);
|
||||
@@ -1188,7 +1189,7 @@ static QDF_STATUS dp_rx_defrag(struct dp_peer *peer, unsigned tid,
|
||||
struct dp_soc *soc = vdev->pdev->soc;
|
||||
uint8_t status = 0;
|
||||
|
||||
hdr_space = dp_rx_defrag_hdrsize(cur);
|
||||
hdr_space = dp_rx_defrag_hdrsize(soc, cur);
|
||||
index = hal_rx_msdu_is_wlan_mcast(cur) ?
|
||||
dp_sec_mcast : dp_sec_ucast;
|
||||
|
||||
|
@@ -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[] = {
|
||||
|
Reference in New Issue
Block a user