qcacmn: Add HAL changes for TX completions on WCN6450
Add HAL changes required to parse TX completions on WCN6450. Change-Id: Ice5fdf9ef52d9bf8680976c9e765922a28c1c97a CRs-Fixed: 3381815
This commit is contained in:

committed by
Madan Koyyalamudi

parent
8d58a4e757
commit
4971375b9a
@@ -140,11 +140,18 @@ do { \
|
|||||||
* on wbm_release_ring DWORDs 2,3 ,4 and 5for software based completions
|
* on wbm_release_ring DWORDs 2,3 ,4 and 5for software based completions
|
||||||
* (Exception frames and TQM bypass frames)
|
* (Exception frames and TQM bypass frames)
|
||||||
*/
|
*/
|
||||||
|
#if defined(CONFIG_BERYLLIUM) || defined(CONFIG_LITHIUM)
|
||||||
#define HAL_TX_COMP_HTT_STATUS_OFFSET 8
|
#define HAL_TX_COMP_HTT_STATUS_OFFSET 8
|
||||||
|
#else
|
||||||
|
#define HAL_TX_COMP_HTT_STATUS_OFFSET 0 /* Rhine */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_BERYLLIUM
|
#ifdef CONFIG_BERYLLIUM
|
||||||
#define HAL_TX_COMP_HTT_STATUS_LEN 20
|
#define HAL_TX_COMP_HTT_STATUS_LEN 20
|
||||||
#else
|
#elif defined(CONFIG_LITHIUM)
|
||||||
#define HAL_TX_COMP_HTT_STATUS_LEN 16
|
#define HAL_TX_COMP_HTT_STATUS_LEN 16
|
||||||
|
#else
|
||||||
|
#define HAL_TX_COMP_HTT_STATUS_LEN 32 /* Rhine */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAL_TX_BUF_TYPE_BUFFER 0
|
#define HAL_TX_BUF_TYPE_BUFFER 0
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include "hal_tx.h"
|
#include "hal_tx.h"
|
||||||
#include "hal_rh_tx.h"
|
#include "hal_rh_tx.h"
|
||||||
#include "hal_rh_rx.h"
|
#include "hal_rh_rx.h"
|
||||||
|
#include <htt.h>
|
||||||
|
|
||||||
#ifdef QCA_UNDECODED_METADATA_SUPPORT
|
#ifdef QCA_UNDECODED_METADATA_SUPPORT
|
||||||
static inline void
|
static inline void
|
||||||
@@ -2148,4 +2149,81 @@ static uint16_t hal_rx_get_frame_ctrl_field_rh(uint8_t *buf)
|
|||||||
|
|
||||||
return frame_ctrl;
|
return frame_ctrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(WLAN_FEATURE_TSF_UPLINK_DELAY) || defined(WLAN_CONFIG_TX_DELAY)
|
||||||
|
static inline void
|
||||||
|
hal_tx_comp_get_buffer_timestamp_rh(void *desc,
|
||||||
|
struct hal_tx_completion_status *ts)
|
||||||
|
{
|
||||||
|
uint32_t *msg_word = (struct uint32_t *)desc;
|
||||||
|
|
||||||
|
ts->buffer_timestamp =
|
||||||
|
HTT_TX_MSDU_INFO_BUFFER_TIMESTAMP_GET(*(msg_word + 4));
|
||||||
|
}
|
||||||
|
#else /* !WLAN_FEATURE_TSF_UPLINK_DELAY || WLAN_CONFIG_TX_DELAY */
|
||||||
|
static inline void
|
||||||
|
hal_tx_comp_get_buffer_timestamp_rh(void *desc,
|
||||||
|
struct hal_tx_completion_status *ts)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif /* WLAN_FEATURE_TSF_UPLINK_DELAY || WLAN_CONFIG_TX_DELAY */
|
||||||
|
|
||||||
|
/* TODO: revalidate the assignments below after HTT interfaces
|
||||||
|
* changes are in.
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
hal_tx_comp_get_status_generic_rh(void *desc, void *ts1, struct hal_soc *hal)
|
||||||
|
{
|
||||||
|
uint8_t tx_status;
|
||||||
|
uint8_t rate_stats_valid = 0;
|
||||||
|
struct hal_tx_completion_status *ts =
|
||||||
|
(struct hal_tx_completion_status *)ts1;
|
||||||
|
uint32_t *msg_word = (uint32_t *)desc;
|
||||||
|
|
||||||
|
if (HTT_TX_BUFFER_ADDR_INFO_RELEASE_SOURCE_GET(*(msg_word + 1)) ==
|
||||||
|
HTT_TX_MSDU_RELEASE_SOURCE_FW)
|
||||||
|
ts->release_src = HAL_TX_COMP_RELEASE_SOURCE_FW;
|
||||||
|
else
|
||||||
|
ts->release_src = HAL_TX_COMP_RELEASE_SOURCE_TQM;
|
||||||
|
|
||||||
|
if (HTT_TX_MSDU_INFO_VALID_GET(*(msg_word + 2))) {
|
||||||
|
ts->peer_id = HTT_TX_MSDU_INFO_SW_PEER_ID_GET(*(msg_word + 2));
|
||||||
|
ts->tid = HTT_TX_MSDU_INFO_TID_GET(*(msg_word + 2));
|
||||||
|
} else {
|
||||||
|
ts->peer_id = HTT_INVALID_PEER;
|
||||||
|
ts->tid = HTT_INVALID_TID;
|
||||||
|
}
|
||||||
|
ts->transmit_cnt = HTT_TX_MSDU_INFO_TRANSMIT_CNT_GET(*(msg_word + 2));
|
||||||
|
|
||||||
|
tx_status = HTT_TX_MSDU_INFO_RELEASE_REASON_GET(*(msg_word + 3));
|
||||||
|
ts->status = (tx_status == HTT_TX_MSDU_RELEASE_REASON_FRAME_ACKED ?
|
||||||
|
HAL_TX_TQM_RR_FRAME_ACKED : HAL_TX_TQM_RR_REM_CMD_REM);
|
||||||
|
ts->ppdu_id = HTT_TX_MSDU_INFO_TQM_STATUS_NUMBER_GET(*(msg_word + 3));
|
||||||
|
|
||||||
|
ts->ack_frame_rssi =
|
||||||
|
HTT_TX_MSDU_INFO_ACK_FRAME_RSSI_GET(*(msg_word + 4));
|
||||||
|
ts->first_msdu = HTT_TX_MSDU_INFO_FIRST_MSDU_GET(*(msg_word + 4));
|
||||||
|
ts->last_msdu = HTT_TX_MSDU_INFO_LAST_MSDU_GET(*(msg_word + 4));
|
||||||
|
ts->msdu_part_of_amsdu =
|
||||||
|
HTT_TX_MSDU_INFO_MSDU_PART_OF_AMSDU_GET(*(msg_word + 4));
|
||||||
|
|
||||||
|
rate_stats_valid = HTT_TX_RATE_STATS_INFO_VALID_GET(*(msg_word + 5));
|
||||||
|
ts->valid = rate_stats_valid;
|
||||||
|
|
||||||
|
if (rate_stats_valid) {
|
||||||
|
ts->bw = HTT_TX_RATE_STATS_INFO_TRANSMIT_BW_GET(*(msg_word + 5));
|
||||||
|
ts->pkt_type =
|
||||||
|
HTT_TX_RATE_STATS_INFO_TRANSMIT_PKT_TYPE_GET(*(msg_word + 5));
|
||||||
|
ts->stbc = HTT_TX_RATE_STATS_INFO_TRANSMIT_STBC_GET(*(msg_word + 5));
|
||||||
|
ts->ldpc = HTT_TX_RATE_STATS_INFO_TRANSMIT_LDPC_GET(*(msg_word + 5));
|
||||||
|
ts->sgi = HTT_TX_RATE_STATS_INFO_TRANSMIT_SGI_GET(*(msg_word + 5));
|
||||||
|
ts->mcs = HTT_TX_RATE_STATS_INFO_TRANSMIT_MCS_GET(*(msg_word + 5));
|
||||||
|
ts->ofdma =
|
||||||
|
HTT_TX_RATE_STATS_INFO_OFDMA_TRANSMISSION_GET(*(msg_word + 5));
|
||||||
|
ts->tones_in_ru = HTT_TX_RATE_STATS_INFO_TONES_IN_RU_GET(*(msg_word + 5));
|
||||||
|
}
|
||||||
|
|
||||||
|
ts->tsf = HTT_TX_RATE_STATS_INFO_PPDU_TRANSMISSION_TSF_GET(*(msg_word + 6));
|
||||||
|
hal_tx_comp_get_buffer_timestamp_rh(desc, ts);
|
||||||
|
}
|
||||||
#endif /* _HAL_RH_GENERIC_API_H_ */
|
#endif /* _HAL_RH_GENERIC_API_H_ */
|
||||||
|
@@ -217,11 +217,6 @@ static void hal_tx_update_dscp_tid_6450(struct hal_soc *hal_soc, uint8_t tid,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hal_tx_comp_get_status_6450(void *desc, void *ts1,
|
|
||||||
struct hal_soc *hal)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint8_t hal_tx_comp_get_release_reason_6450(void *hal_desc)
|
static uint8_t hal_tx_comp_get_release_reason_6450(void *hal_desc)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1755,7 +1750,7 @@ static void hal_hw_txrx_ops_attach_wcn6450(struct hal_soc *hal_soc)
|
|||||||
hal_soc->ops->hal_tx_desc_set_cache_set_num =
|
hal_soc->ops->hal_tx_desc_set_cache_set_num =
|
||||||
hal_tx_desc_set_cache_set_num_generic_rh;
|
hal_tx_desc_set_cache_set_num_generic_rh;
|
||||||
hal_soc->ops->hal_tx_comp_get_status =
|
hal_soc->ops->hal_tx_comp_get_status =
|
||||||
hal_tx_comp_get_status_6450;
|
hal_tx_comp_get_status_generic_rh;
|
||||||
hal_soc->ops->hal_tx_comp_get_release_reason =
|
hal_soc->ops->hal_tx_comp_get_release_reason =
|
||||||
hal_tx_comp_get_release_reason_6450;
|
hal_tx_comp_get_release_reason_6450;
|
||||||
hal_soc->ops->hal_get_wbm_internal_error =
|
hal_soc->ops->hal_get_wbm_internal_error =
|
||||||
|
Reference in New Issue
Block a user