qcacmn: Add qdf abstraction for ipa wdi stats api

Add qdf abstraction for ipa wlan wdi stats api.

Change-Id: If325950f7151199cf1f720ac0da05274bb307786
CRs-Fixed: 2517709
This commit is contained in:
Sravan Kumar Kairam
2019-08-23 00:47:03 +05:30
committed by nshrivas
parent 78b01a1e1b
commit 3a37692ec1
4 changed files with 52 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-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 above
@@ -213,6 +213,16 @@ typedef __qdf_ipa_gsi_ep_config_t qdf_ipa_gsi_ep_config_t;
*/
typedef __qdf_ipa_dp_evt_type_t qdf_ipa_dp_evt_type_t;
#ifdef WDI3_STATS_UPDATE
/**
* qdf_ipa_wdi_tx_info_t - WLAN embedded TX bytes information
*
* WLAN host fills this structure to update IPA driver about
* embedded TX information.
*/
typedef __qdf_ipa_wdi_tx_info_t qdf_ipa_wdi_tx_info_t;
#endif
typedef __qdf_ipa_hdr_add_t qdf_ipa_hdr_add_t;
typedef __qdf_ipa_hdr_del_t qdf_ipa_hdr_del_t;
typedef __qdf_ipa_ioc_add_hdr_t qdf_ipa_ioc_add_hdr_t;

View File

@@ -398,5 +398,19 @@ static inline int qdf_ipa_wdi_release_smmu_mapping(uint32_t num_buffers,
return __qdf_ipa_wdi_release_smmu_mapping(num_buffers, info);
}
#ifdef WDI3_STATS_UPDATE
/**
* qdf_ipa_wdi_wlan_stats() - Client should call this function to
* send Tx byte counts to IPA driver
* @tx_count: number of Tx bytes
*
* Returns: 0 on success, negative on failure
*/
static inline int qdf_ipa_wdi_wlan_stats(qdf_ipa_wdi_tx_info_t *tx_stats)
{
return __qdf_ipa_wdi_wlan_stats(tx_stats);
}
#endif
#endif /* IPA_OFFLOAD */
#endif /* _QDF_IPA_WDI3_H */

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-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 above
@@ -377,6 +377,18 @@ typedef struct ipa_wdi_buffer_info __qdf_ipa_wdi_buffer_info_t;
*/
typedef struct ipa_gsi_ep_config __qdf_ipa_gsi_ep_config_t;
#ifdef WDI3_STATS_UPDATE
/**
* __qdf_ipa_wdi_tx_info_t - WLAN embedded TX information
*/
typedef struct ipa_wdi_tx_info __qdf_ipa_wdi_tx_info_t;
#define QDF_IPA_WDI_TX_INFO_STA_TX_BYTES(stats_info) \
(((struct ipa_wdi_tx_info *)stats_info)->sta_tx)
#define QDF_IPA_WDI_TX_INFO_SAP_TX_BYTES(stats_info) \
(((struct ipa_wdi_tx_info *)stats_info)->ap_tx)
#endif
/**
* __qdf_ipa_dp_evt_type_t - type of event client callback is
* invoked for on data path

View File

@@ -386,6 +386,20 @@ static inline int __qdf_ipa_wdi_release_smmu_mapping(u32 num_buffers,
return ipa_wdi_release_smmu_mapping(num_buffers, info);
}
#ifdef WDI3_STATS_UPDATE
/**
* __qdf_ipa_wdi_wlan_stats() - Client should call this function to
* send Tx byte counts to IPA driver
* @tx_stats: number of Tx bytes on STA and SAP
*
* Returns: 0 on success, negative on failure
*/
static inline int __qdf_ipa_wdi_wlan_stats(struct ipa_wdi_tx_info *tx_stats)
{
return ipa_wdi_sw_stats(tx_stats);
}
#endif
#else /* CONFIG_IPA_WDI_UNIFIED_API */
/**