qcacmn: Move monitor mode HTT parsing from mon_1_0 to common

Moving HTT parsing to common file dp_mon.c
Initialize function pointer to stats ind handler for BE

CRs-Fixed: 3071271
Change-Id: I08fb98f8dbed075c3b49baebca399771bfb5077c
This commit is contained in:
aloksing
2021-10-11 21:25:12 +05:30
committed by Madan Koyyalamudi
parent 66181cbbbb
commit 3637ac16b0
7 changed files with 2413 additions and 2385 deletions

View File

@@ -65,6 +65,11 @@ int htt_wbm_event_record(struct htt_logger *h, uint8_t tx_status,
#endif #endif
#define HTT_MGMT_CTRL_TLV_HDR_RESERVERD_LEN 16
#define HTT_TLV_HDR_LEN HTT_T2H_EXT_STATS_CONF_TLV_HDR_SIZE
#define HTT_SHIFT_UPPER_TIMESTAMP 32
#define HTT_MASK_UPPER_TIMESTAMP 0xFFFFFFFF00000000
void htt_htc_pkt_pool_free(struct htt_soc *soc); void htt_htc_pkt_pool_free(struct htt_soc *soc);
#define HTT_TX_MUTEX_TYPE qdf_spinlock_t #define HTT_TX_MUTEX_TYPE qdf_spinlock_t

View File

@@ -5380,3 +5380,30 @@ void dp_peer_flush_frags(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
dp_peer_unref_delete(peer, DP_MOD_ID_CDP); dp_peer_unref_delete(peer, DP_MOD_ID_CDP);
} }
/*
* dp_peer_find_by_id_valid - check if peer exists for given id
* @soc: core DP soc context
* @peer_id: peer id from peer object can be retrieved
*
* Return: true if peer exists of false otherwise
*/
bool dp_peer_find_by_id_valid(struct dp_soc *soc, uint16_t peer_id)
{
struct dp_peer *peer = dp_peer_get_ref_by_id(soc, peer_id,
DP_MOD_ID_HTT);
if (peer) {
/*
* Decrement the peer ref which is taken as part of
* dp_peer_get_ref_by_id if PEER_LOCK_REF_PROTECT is enabled
*/
dp_peer_unref_delete(peer, DP_MOD_ID_HTT);
return true;
}
return false;
}
qdf_export_symbol(dp_peer_find_by_id_valid);

View File

@@ -71,6 +71,7 @@ struct dp_peer *dp_peer_find_hash_find(struct dp_soc *soc,
int mac_addr_is_aligned, int mac_addr_is_aligned,
uint8_t vdev_id, uint8_t vdev_id,
enum dp_mod_id id); enum dp_mod_id id);
bool dp_peer_find_by_id_valid(struct dp_soc *soc, uint16_t peer_id);
/** /**
* dp_peer_get_ref() - Returns peer object given the peer id * dp_peer_get_ref() - Returns peer object given the peer id

File diff suppressed because it is too large Load Diff

View File

@@ -801,7 +801,7 @@ dp_mon_register_feature_ops_2_0(struct dp_soc *soc)
#endif #endif
#if defined(WDI_EVENT_ENABLE) &&\ #if defined(WDI_EVENT_ENABLE) &&\
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG)) (defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
mon_ops->mon_ppdu_stats_ind_handler = NULL; mon_ops->mon_ppdu_stats_ind_handler = dp_ppdu_stats_ind_handler;
#endif #endif
#ifdef WLAN_RX_PKT_CAPTURE_ENH #ifdef WLAN_RX_PKT_CAPTURE_ENH
mon_ops->mon_config_enh_rx_capture = NULL; mon_ops->mon_config_enh_rx_capture = NULL;

File diff suppressed because it is too large Load Diff

View File

@@ -50,6 +50,16 @@ struct dp_peer_tx_capture {
}; };
#endif #endif
#ifndef WLAN_TX_PKT_CAPTURE_ENH
static inline void
dp_process_ppdu_stats_update_failed_bitmap(struct dp_pdev *pdev,
void *data,
uint32_t ppdu_id,
uint32_t size)
{
}
#endif
/* /*
* dp_mon_soc_attach() - DP monitor soc attach * dp_mon_soc_attach() - DP monitor soc attach
* @soc: Datapath SOC handle * @soc: Datapath SOC handle
@@ -354,6 +364,21 @@ dp_vdev_set_monitor_mode_rings(struct dp_pdev *pdev,
} }
#endif #endif
#if defined(WDI_EVENT_ENABLE) &&\
(defined(QCA_ENHANCED_STATS_SUPPORT) || !defined(REMOVE_PKT_LOG))
/*
* dp_ppdu_stats_ind_handler() - PPDU stats msg handler
* @htt_soc: HTT SOC handle
* @msg_word: Pointer to payload
* @htt_t2h_msg: HTT msg nbuf
*
* Return: True if buffer should be freed by caller.
*/
bool dp_ppdu_stats_ind_handler(struct htt_soc *soc,
uint32_t *msg_word,
qdf_nbuf_t htt_t2h_msg);
#endif
struct dp_mon_ops { struct dp_mon_ops {
QDF_STATUS (*mon_soc_cfg_init)(struct dp_soc *soc); QDF_STATUS (*mon_soc_cfg_init)(struct dp_soc *soc);
QDF_STATUS (*mon_soc_attach)(struct dp_soc *soc); QDF_STATUS (*mon_soc_attach)(struct dp_soc *soc);