qcacld-3.0: Send BIG DATA stats req to fw based on service cap

Validate fw capability to handle big data command before sending
big data stats request to fw.

Change-Id: Id7df4c3ac36e25761938758472ea9281c174a8c9
CRs-Fixed: 2937523
This commit is contained in:
sheenam monga
2021-05-03 22:22:52 +05:30
committed by Madan Koyyalamudi
parent fc063995a7
commit 989e398008
5 changed files with 123 additions and 1 deletions

View File

@@ -278,12 +278,16 @@ struct cca_stats {
* @pending: details of pending requests
* @wow_unspecified_wake_up_count: number of non-wow related wake ups
* @wow_stats: wake_lock stats for vdev
* @big_data_fw_support_enable: big data feature supported by fw or not
*/
struct psoc_mc_cp_stats {
bool is_cp_stats_suspended;
struct pending_stats_requests pending;
uint32_t wow_unspecified_wake_up_count;
struct wake_lock_stats wow_stats;
#ifdef WLAN_FEATURE_BIG_DATA_STATS
bool big_data_fw_support_enable;
#endif
};
/**

View File

@@ -314,6 +314,30 @@ void static inline ucfg_mc_cp_stats_register_pmo_handler(void) { };
QDF_STATUS ucfg_send_big_data_stats_request(struct wlan_objmgr_vdev *vdev,
enum stats_req_type type,
struct request_info *info);
/**
* ucfg_mc_cp_set_big_data_fw_support() - set big data fw support
* @psoc: PSOC object
*
* API to set fw supports big data feature or not
*
* Return: void
*/
void
ucfg_mc_cp_set_big_data_fw_support(struct wlan_objmgr_psoc *psoc,
bool enable);
/**
* ucfg_mc_cp_get_big_data_fw_support() - get big data fw support
* @psoc: PSOC object
*
* API to get fw supports big data feature or not
*
* Return: void
*/
void
ucfg_mc_cp_get_big_data_fw_support(struct wlan_objmgr_psoc *psoc,
bool *enable);
#else
static inline
QDF_STATUS ucfg_send_big_data_stats_request(struct wlan_objmgr_vdev *vdev,
@@ -322,6 +346,16 @@ QDF_STATUS ucfg_send_big_data_stats_request(struct wlan_objmgr_vdev *vdev,
{
return QDF_STATUS_SUCCESS;
}
static inline void
ucfg_mc_cp_set_big_data_fw_support(struct wlan_objmgr_psoc *psoc,
bool enable)
{}
static inline void
ucfg_mc_cp_get_big_data_fw_support(struct wlan_objmgr_psoc *psoc,
bool *enable)
{}
#endif
#else
@@ -385,6 +419,16 @@ QDF_STATUS ucfg_send_big_data_stats_request(struct wlan_objmgr_vdev *vdev,
{
return QDF_STATUS_SUCCESS;
}
static inline void
ucfg_mc_cp_set_big_data_fw_support(struct wlan_objmgr_psoc *psoc,
bool enable)
{}
static inline void
ucfg_mc_cp_big_data_fw_support(struct wlan_objmgr_psoc *psoc,
bool *enable)
{}
#endif /* QCA_SUPPORT_CP_STATS */
#endif /* __WLAN_CP_STATS_MC_UCFG_API_H__ */

View File

@@ -741,6 +741,42 @@ QDF_STATUS ucfg_send_big_data_stats_request(struct wlan_objmgr_vdev *vdev,
}
return tgt_send_mc_cp_stats_req(wlan_vdev_get_psoc(vdev), type, info);
}
void ucfg_mc_cp_set_big_data_fw_support(struct wlan_objmgr_psoc *psoc,
bool enable)
{
struct psoc_mc_cp_stats *psoc_mc_stats;
struct psoc_cp_stats *psoc_cp_stats_priv;
psoc_cp_stats_priv = wlan_cp_stats_get_psoc_stats_obj(psoc);
if (!psoc_cp_stats_priv) {
cp_stats_err("psoc cp stats object is null");
return;
}
wlan_cp_stats_psoc_obj_lock(psoc_cp_stats_priv);
psoc_mc_stats = psoc_cp_stats_priv->obj_stats;
psoc_mc_stats->big_data_fw_support_enable = enable;
wlan_cp_stats_psoc_obj_unlock(psoc_cp_stats_priv);
}
void ucfg_mc_cp_get_big_data_fw_support(struct wlan_objmgr_psoc *psoc,
bool *enable)
{
struct psoc_mc_cp_stats *psoc_mc_stats;
struct psoc_cp_stats *psoc_cp_stats_priv;
psoc_cp_stats_priv = wlan_cp_stats_get_psoc_stats_obj(psoc);
if (!psoc_cp_stats_priv) {
cp_stats_err("psoc cp stats object is null");
return;
}
wlan_cp_stats_psoc_obj_lock(psoc_cp_stats_priv);
psoc_mc_stats = psoc_cp_stats_priv->obj_stats;
*enable = psoc_mc_stats->big_data_fw_support_enable;
wlan_cp_stats_psoc_obj_unlock(psoc_cp_stats_priv);
}
#endif
QDF_STATUS ucfg_mc_cp_stats_get_tx_power(struct wlan_objmgr_vdev *vdev,