qcacmn: Add hal api to set word mask
Add hal api to set tx monitor word mask Change-Id: I4eb365b3a7d4f83edcb20146951daf0d5af3d68d CRs-Fixed: 3421500
This commit is contained in:

committed by
Madan Koyyalamudi

parent
ba18ce8164
commit
8c72eb9696
@@ -1432,6 +1432,27 @@ hal_tx_status_get_tlv_tag(void *tx_tlv_hdr)
|
||||
|
||||
return tlv_tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_txmon_set_word_mask() - api to set word mask for tx monitor
|
||||
* @hal_soc_hdl: HAL soc handle
|
||||
* @wmask: pointer to hal_txmon_word_mask_config_t
|
||||
*
|
||||
* Return: bool
|
||||
*/
|
||||
static inline bool
|
||||
hal_txmon_set_word_mask(hal_soc_handle_t hal_soc_hdl,
|
||||
hal_txmon_word_mask_config_t *wmask)
|
||||
{
|
||||
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
|
||||
|
||||
if (hal_soc->ops->hal_txmon_set_word_mask) {
|
||||
hal_soc->ops->hal_txmon_set_word_mask(wmask);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -1380,6 +1380,22 @@ hal_txmon_status_get_num_users_generic_be(void *tx_tlv_hdr, uint8_t *num_users)
|
||||
return tlv_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_txmon_set_word_mask_generic_be() - api to set word mask for tx monitor
|
||||
* @wmask: pointer to hal_txmon_word_mask_config_t
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline
|
||||
void hal_txmon_set_word_mask_generic_be(void *wmask)
|
||||
{
|
||||
hal_txmon_word_mask_config_t *word_mask = NULL;
|
||||
|
||||
word_mask = (hal_txmon_word_mask_config_t *)wmask;
|
||||
qdf_mem_set(word_mask, sizeof(hal_txmon_word_mask_config_t), 0xFF);
|
||||
word_mask->compaction_enable = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_tx_get_ppdu_info() - api to get tx ppdu info
|
||||
* @data_info: populate dp_ppdu_info data
|
||||
|
@@ -1443,4 +1443,39 @@ hal_clear_rx_status_done(uint8_t *rx_tlv)
|
||||
*(uint32_t *)rx_tlv = 0;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef QCA_MONITOR_2_0_SUPPORT
|
||||
/**
|
||||
* struct hal_txmon_word_mask_config - hal tx monitor word mask filter setting
|
||||
* @pcu_ppdu_setup_init: PCU_PPDU_SETUP TLV word mask
|
||||
* @tx_peer_entry: TX_PEER_ENTRY TLV word mask
|
||||
* @tx_queue_ext: TX_QUEUE_EXTENSION TLV word mask
|
||||
* @tx_fes_status_end: TX_FES_STATUS_END TLV word mask
|
||||
* @response_end_status: RESPONSE_END_STATUS TLV word mask
|
||||
* @tx_fes_status_prot: TX_FES_STATUS_PROT TLV word mask
|
||||
* @tx_fes_setup: TX_FES_SETUP TLV word mask
|
||||
* @tx_msdu_start: TX_MSDU_START TLV word mask
|
||||
* @tx_mpdu_start: TX_MPDU_START TLV word mask
|
||||
* @rxpcu_user_setup: RXPCU_USER_SETUP TLV word mask
|
||||
* @compaction_enable: flag to enable word mask compaction
|
||||
*/
|
||||
struct hal_txmon_word_mask_config {
|
||||
uint32_t pcu_ppdu_setup_init;
|
||||
uint16_t tx_peer_entry;
|
||||
uint16_t tx_queue_ext;
|
||||
uint16_t tx_fes_status_end;
|
||||
uint16_t response_end_status;
|
||||
uint16_t tx_fes_status_prot;
|
||||
uint8_t tx_fes_setup;
|
||||
uint8_t tx_msdu_start;
|
||||
uint8_t tx_mpdu_start;
|
||||
uint8_t rxpcu_user_setup;
|
||||
uint8_t compaction_enable;
|
||||
};
|
||||
|
||||
/*
|
||||
* typedef hal_txmon_word_mask_config_t - handle for tx monitor word mask
|
||||
*/
|
||||
typedef struct hal_txmon_word_mask_config hal_txmon_word_mask_config_t;
|
||||
#endif /* QCA_MONITOR_2_0_SUPPORT */
|
||||
#endif
|
||||
|
@@ -1287,6 +1287,7 @@ struct hal_hw_txrx_ops {
|
||||
qdf_frag_t status_frag);
|
||||
uint32_t (*hal_txmon_status_get_num_users)(void *tx_tlv_hdr,
|
||||
uint8_t *num_users);
|
||||
void (*hal_txmon_set_word_mask)(void *wmask);
|
||||
#endif /* QCA_MONITOR_2_0_SUPPORT */
|
||||
QDF_STATUS (*hal_reo_shared_qaddr_setup)(hal_soc_handle_t hal_soc_hdl,
|
||||
struct reo_queue_ref_table
|
||||
|
@@ -1795,6 +1795,13 @@ static void hal_hw_txrx_ops_attach_qcn9224(struct hal_soc *hal_soc)
|
||||
hal_txmon_status_parse_tlv_generic_be;
|
||||
hal_soc->ops->hal_txmon_status_get_num_users =
|
||||
hal_txmon_status_get_num_users_generic_be;
|
||||
#if defined(TX_MONITOR_WORD_MASK)
|
||||
hal_soc->ops->hal_txmon_set_word_mask =
|
||||
hal_txmon_set_word_mask_qcn9224;
|
||||
#else
|
||||
hal_soc->ops->hal_txmon_set_word_mask =
|
||||
hal_txmon_set_word_mask_generic_be;
|
||||
#endif /* TX_MONITOR_WORD_MASK */
|
||||
#endif /* QCA_MONITOR_2_0_SUPPORT */
|
||||
hal_soc->ops->hal_compute_reo_remap_ix0 = NULL;
|
||||
hal_soc->ops->hal_tx_vdev_mismatch_routing_set =
|
||||
|
@@ -529,6 +529,32 @@ struct pcu_ppdu_setup_init_compact_9224 {
|
||||
/* DWORD - 57 */
|
||||
uint32_t protection_frame_ad4_47_16 : 32;
|
||||
};
|
||||
|
||||
/**
|
||||
* hal_txmon_set_word_mask_qcn9224() - api to set word mask for tx monitor
|
||||
* @wmask: pointer to hal_txmon_word_mask_config_t
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline
|
||||
void hal_txmon_set_word_mask_qcn9224(void *wmask)
|
||||
{
|
||||
hal_txmon_word_mask_config_t *word_mask = NULL;
|
||||
|
||||
word_mask = (hal_txmon_word_mask_config_t *)wmask;
|
||||
|
||||
word_mask->compaction_enable = 1;
|
||||
word_mask->tx_fes_setup = TX_FES_SETUP_MASK;
|
||||
word_mask->tx_peer_entry = TX_PEER_ENTRY_MASK;
|
||||
word_mask->tx_queue_ext = TX_QUEUE_EXT_MASK;
|
||||
word_mask->tx_msdu_start = TX_MSDU_START_MASK;
|
||||
word_mask->pcu_ppdu_setup_init = PCU_PPDU_SETUP_INIT_MASK;
|
||||
word_mask->tx_mpdu_start = TX_MPDU_START_MASK;
|
||||
word_mask->rxpcu_user_setup = 0xFF;
|
||||
word_mask->tx_fes_status_end = TX_FES_STATUS_END_MASK;
|
||||
word_mask->response_end_status = RESPONSE_END_STATUS_MASK;
|
||||
word_mask->tx_fes_status_prot = TX_FES_STATUS_PROT_MASK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user