qcacmn: Add hal_rx_mpdu_get_addr2 API

Implement hal_rx_mpdu_get_addr2 API
based on the chipset as
the macro to retrieve addr2 value is
chipset dependent.

Change-Id: I4026db892d4f2f41db72c50f780ba898b8a17fa7
CRs-Fixed: 2522133
此提交包含在:
Venkata Sharath Chandra Manchala
2019-09-21 14:29:40 -07:00
提交者 nshrivas
父節點 e3ae3193f9
當前提交 a81a2fed42
共有 15 個檔案被更改,包括 317 行新增47 行删除

查看文件

@@ -430,6 +430,40 @@ static QDF_STATUS hal_rx_mpdu_get_addr1_9000(uint8_t *buf,
return QDF_STATUS_E_FAILURE;
}
/*
* hal_rx_mpdu_get_addr2_9000(): API to check get address2 of the mpdu
* in the packet
*
* @buf: pointer to the start of RX PKT TLV header
* @mac_addr: pointer to mac address
* Return: success/failure
*/
static QDF_STATUS hal_rx_mpdu_get_addr2_9000(uint8_t *buf, uint8_t *mac_addr)
{
struct __attribute__((__packed__)) hal_addr2 {
uint16_t ad2_15_0;
uint32_t ad2_47_16;
};
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;
struct hal_addr2 *addr = (struct hal_addr2 *)mac_addr;
uint32_t mac_addr_ad2_valid;
mac_addr_ad2_valid = HAL_RX_MPDU_MAC_ADDR_AD2_VALID_GET(mpdu_info);
if (mac_addr_ad2_valid) {
addr->ad2_15_0 = HAL_RX_MPDU_AD2_15_0_GET(mpdu_info);
addr->ad2_47_16 = HAL_RX_MPDU_AD2_47_16_GET(mpdu_info);
return QDF_STATUS_SUCCESS;
}
return QDF_STATUS_E_FAILURE;
}
struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
/* init and setup */
@@ -489,6 +523,7 @@ struct hal_hw_txrx_ops qcn9000_hal_hw_txrx_ops = {
hal_rx_mpdu_get_fr_ds_9000,
hal_rx_get_mpdu_frame_control_valid_9000,
hal_rx_mpdu_get_addr1_9000,
hal_rx_mpdu_get_addr2_9000,
};
struct hal_hw_srng_config hw_srng_table_9000[] = {