|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
|
|
|
*
|
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
@@ -23,6 +23,9 @@
|
|
|
#include "hal_tx.h"
|
|
|
#include "dp_types.h"
|
|
|
#include "hal_api_mon.h"
|
|
|
+#ifndef QCA_WIFI_QCA6018
|
|
|
+#include "phyrx_other_receive_info_su_evm_details.h"
|
|
|
+#endif
|
|
|
|
|
|
#define HAL_RX_MSDU_START_MIMO_SS_BITMAP(_rx_msdu_start)\
|
|
|
(_HAL_MS((*_OFFSET_TO_WORD_PTR((_rx_msdu_start),\
|
|
@@ -101,6 +104,52 @@ static uint8_t hal_rx_get_tlv_8074v2(void *rx_tlv)
|
|
|
return HAL_RX_GET(rx_tlv, PHYRX_RSSI_LEGACY_0, RECEIVE_BANDWIDTH);
|
|
|
}
|
|
|
|
|
|
+#ifndef QCA_WIFI_QCA6018
|
|
|
+#define HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, evm, pilot) \
|
|
|
+ (ppdu_info)->evm_info.pilot_evm[pilot] = HAL_RX_GET(rx_tlv, \
|
|
|
+ PHYRX_OTHER_RECEIVE_INFO, \
|
|
|
+ SU_EVM_DETAILS_##evm##_PILOT_##pilot##_EVM)
|
|
|
+
|
|
|
+static inline void
|
|
|
+hal_rx_update_su_evm_info(void *rx_tlv,
|
|
|
+ void *ppdu_info_hdl)
|
|
|
+{
|
|
|
+ struct hal_rx_ppdu_info *ppdu_info =
|
|
|
+ (struct hal_rx_ppdu_info *)ppdu_info_hdl;
|
|
|
+
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 1, 0);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 2, 1);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 3, 2);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 4, 3);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 5, 4);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 6, 5);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 7, 6);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 8, 7);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 9, 8);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 10, 9);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 11, 10);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 12, 11);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 13, 12);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 14, 13);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 15, 14);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 16, 15);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 17, 16);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 18, 17);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 19, 18);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 20, 19);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 21, 20);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 22, 21);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 23, 22);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 24, 23);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 25, 24);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 26, 25);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 27, 26);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 28, 27);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 29, 28);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 30, 29);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 31, 30);
|
|
|
+ HAL_RX_UPDATE_SU_EVM_INFO(rx_tlv, ppdu_info, 32, 31);
|
|
|
+}
|
|
|
/**
|
|
|
* hal_rx_proc_phyrx_other_receive_info_tlv_8074v2()
|
|
|
* -process other receive info TLV
|
|
@@ -111,10 +160,46 @@ static uint8_t hal_rx_get_tlv_8074v2(void *rx_tlv)
|
|
|
*/
|
|
|
static
|
|
|
void hal_rx_proc_phyrx_other_receive_info_tlv_8074v2(void *rx_tlv_hdr,
|
|
|
- void *ppdu_info)
|
|
|
+ void *ppdu_info_hdl)
|
|
|
{
|
|
|
-}
|
|
|
+ uint16_t tlv_tag;
|
|
|
+ void *rx_tlv;
|
|
|
+ struct hal_rx_ppdu_info *ppdu_info = ppdu_info_hdl;
|
|
|
+
|
|
|
+ /* Skip TLV_HDR for OTHER_RECEIVE_INFO and follows the
|
|
|
+ * embedded TLVs inside
|
|
|
+ */
|
|
|
+ rx_tlv = (uint8_t *)rx_tlv_hdr + HAL_RX_TLV32_HDR_SIZE;
|
|
|
+ tlv_tag = HAL_RX_GET_USER_TLV32_TYPE(rx_tlv);
|
|
|
+
|
|
|
+ switch (tlv_tag) {
|
|
|
+ case WIFIPHYRX_OTHER_RECEIVE_INFO_SU_EVM_DETAILS_E:
|
|
|
|
|
|
+ /* Skip TLV length to get TLV content */
|
|
|
+ rx_tlv = (uint8_t *)rx_tlv + HAL_RX_TLV32_HDR_SIZE;
|
|
|
+
|
|
|
+ ppdu_info->evm_info.number_of_symbols = HAL_RX_GET(rx_tlv,
|
|
|
+ PHYRX_OTHER_RECEIVE_INFO,
|
|
|
+ SU_EVM_DETAILS_0_NUMBER_OF_SYMBOLS);
|
|
|
+ ppdu_info->evm_info.pilot_count = HAL_RX_GET(rx_tlv,
|
|
|
+ PHYRX_OTHER_RECEIVE_INFO,
|
|
|
+ SU_EVM_DETAILS_0_PILOT_COUNT);
|
|
|
+ ppdu_info->evm_info.nss_count = HAL_RX_GET(rx_tlv,
|
|
|
+ PHYRX_OTHER_RECEIVE_INFO,
|
|
|
+ SU_EVM_DETAILS_0_NSS_COUNT);
|
|
|
+ hal_rx_update_su_evm_info(rx_tlv, ppdu_info_hdl);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ qdf_err("TLV tag not found");
|
|
|
+ }
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline
|
|
|
+void hal_rx_proc_phyrx_other_receive_info_tlv_8074v2(void *rx_tlv_hdr,
|
|
|
+ void *ppdu_info_hdl)
|
|
|
+{
|
|
|
+}
|
|
|
+#endif
|
|
|
|
|
|
/**
|
|
|
* hal_rx_dump_msdu_start_tlv_8074v2() : dump RX msdu_start TLV in structured
|
|
@@ -368,4 +453,3 @@ static uint16_t hal_rx_msdu_end_da_idx_get_8074v2(uint8_t *buf)
|
|
|
|
|
|
return da_idx;
|
|
|
}
|
|
|
-
|