qcacmn: Add qdf abstraction for ipa uc bw monitor

Add qdf abstraction for ipa uc bandwidth monitor for
wlan client.

Change-Id: I64718f118dd4982b060c72e2a2e7bd3e317bdb73
CRs-Fixed: 2526548
This commit is contained in:
Sravan Kumar Kairam
2019-09-10 20:04:39 +05:30
committed by nshrivas
parent 3a37692ec1
commit aedfbffdfd
4 changed files with 59 additions and 2 deletions

View File

@@ -221,6 +221,18 @@ typedef __qdf_ipa_dp_evt_type_t qdf_ipa_dp_evt_type_t;
* embedded TX information.
*/
typedef __qdf_ipa_wdi_tx_info_t qdf_ipa_wdi_tx_info_t;
/**
* qdf_ipa_wdi_bw_info_t - BW threshold levels to be monitored
* by IPA uC
*/
typedef __qdf_ipa_wdi_bw_info_t qdf_ipa_wdi_bw_info_t;
/**
* qdf_ipa_inform_wlan_bw_t - BW information given by IPA driver
* whenever uC detects threshold level reached
*/
typedef __qdf_ipa_inform_wlan_bw_t qdf_ipa_inform_wlan_bw_t;
#endif
typedef __qdf_ipa_hdr_add_t qdf_ipa_hdr_add_t;

View File

@@ -410,6 +410,17 @@ static inline int qdf_ipa_wdi_wlan_stats(qdf_ipa_wdi_tx_info_t *tx_stats)
{
return __qdf_ipa_wdi_wlan_stats(tx_stats);
}
/**
* qdf_ipa_uc_bw_monitor() - start/stop uc bw monitoring
* @bw_info: set bw info levels to monitor
*
* Returns: 0 on success, negative on failure
*/
static inline int qdf_ipa_uc_bw_monitor(qdf_ipa_wdi_bw_info_t *bw_info)
{
return __qdf_ipa_uc_bw_monitor(bw_info);
}
#endif
#endif /* IPA_OFFLOAD */

View File

@@ -387,7 +387,31 @@ typedef struct ipa_wdi_tx_info __qdf_ipa_wdi_tx_info_t;
(((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_wdi_bw_info_t - BW levels to be monitored by uC
*/
typedef struct ipa_wdi_bw_info __qdf_ipa_wdi_bw_info_t;
#define QDF_IPA_WDI_BW_INFO_THRESHOLD_LEVEL_1(bw_info) \
(((struct ipa_wdi_bw_info *)bw_info)->threshold[0])
#define QDF_IPA_WDI_BW_INFO_THRESHOLD_LEVEL_2(bw_info) \
(((struct ipa_wdi_bw_info *)bw_info)->threshold[1])
#define QDF_IPA_WDI_BW_INFO_THRESHOLD_LEVEL_3(bw_info) \
(((struct ipa_wdi_bw_info *)bw_info)->threshold[2])
#define QDF_IPA_WDI_BW_INFO_START_STOP(bw_info) \
(((struct ipa_wdi_bw_info *)bw_info)->stop)
/**
* __qdf_ipa_inform_wlan_bw_t - BW information given by IPA driver
*/
typedef struct ipa_inform_wlan_bw __qdf_ipa_inform_wlan_bw_t;
#define QDF_IPA_INFORM_WLAN_BW_INDEX(bw_inform) \
(((struct ipa_inform_wlan_bw*)bw_inform)->index)
#define QDF_IPA_INFORM_WLAN_BW_THROUGHPUT(bw_inform) \
(((struct ipa_inform_wlan_bw*)bw_inform)->throughput)
#endif /* WDI3_STATS_UPDATE */
/**
* __qdf_ipa_dp_evt_type_t - type of event client callback is

View File

@@ -398,8 +398,18 @@ static inline int __qdf_ipa_wdi_wlan_stats(struct ipa_wdi_tx_info *tx_stats)
{
return ipa_wdi_sw_stats(tx_stats);
}
#endif
/**
* ipa_uc_bw_monitor() - start/stop uc bw monitoring
* @bw_info: set bw info levels to monitor
*
* Returns: 0 on success, negative on failure
*/
static inline int __qdf_ipa_uc_bw_monitor(struct ipa_wdi_bw_info *bw_info)
{
return ipa_uc_bw_monitor(bw_info);
}
#endif
#else /* CONFIG_IPA_WDI_UNIFIED_API */
/**