qcacmn: Add hal_rx_is_unicast API

Implement hal_rx_is_unicase API based
on the chipset as the macro to retrieve
is_unicast bit value is chipset dependent.

Change-Id: I38807f478c295309adf2a07ce9010b1bc04c734e
CRs-Fixed: 2522133
This commit is contained in:
Venkata Sharath Chandra Manchala
2019-09-21 15:53:03 -07:00
committed by nshrivas
parent 68d6f0d585
commit 5ddc518b2e
9 changed files with 151 additions and 15 deletions

View File

@@ -539,6 +539,29 @@ static uint8_t hal_rx_get_mpdu_sequence_control_valid_8074v1(uint8_t *buf)
return HAL_RX_MPDU_GET_SEQUENCE_CONTROL_VALID(rx_mpdu_info);
}
/**
* hal_rx_is_unicast_8074v1: check packet is unicast frame or not.
*
* @ buf: pointer to rx pkt TLV.
*
* Return: true on unicast.
*/
static bool hal_rx_is_unicast_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;
uint32_t grp_id;
uint8_t *rx_mpdu_info = (uint8_t *)&mpdu_start->rx_mpdu_info_details;
grp_id = (_HAL_MS((*_OFFSET_TO_WORD_PTR((rx_mpdu_info),
RX_MPDU_INFO_0_SW_FRAME_GROUP_ID_OFFSET)),
RX_MPDU_INFO_0_SW_FRAME_GROUP_ID_MASK,
RX_MPDU_INFO_0_SW_FRAME_GROUP_ID_LSB));
return (HAL_MPDU_SW_FRAME_GROUP_UNICAST_DATA == grp_id) ? true : false;
}
struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
/* init and setup */
@@ -602,6 +625,7 @@ struct hal_hw_txrx_ops qca8074_hal_hw_txrx_ops = {
hal_rx_mpdu_get_addr3_8074v1,
hal_rx_mpdu_get_addr4_8074v1,
hal_rx_get_mpdu_sequence_control_valid_8074v1,
hal_rx_is_unicast_8074v1,
};
struct hal_hw_srng_config hw_srng_table_8074[] = {