qcacld-3.0: Get netdev stats from DP interface
While requesting sta stats, tx/rx netdev stats update are happening from adapter. But as part of latest code change these stats are moved from adapter to dp interface, because of which some of stats values are displayed as 0. To Fix the issue get tx/rx netdev stats from dp interface, Also add calls to clear netdev stats Change-Id: I64523b035c1d902ccc4a45d82f7508751e518150 CRs-Fixed: 3247540
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f62b46e07c
commit
f0dd63a14e
@@ -622,4 +622,29 @@ dp_is_low_tput_gro_enable(struct wlan_dp_psoc_context *dp_ctx)
|
||||
*/
|
||||
bool dp_is_data_stall_event_enabled(uint32_t evt);
|
||||
|
||||
/*
|
||||
* dp_get_net_dev_stats(): Get netdev stats
|
||||
* @dp_intf: DP interface handle
|
||||
* @stats: To hold netdev stats
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline void
|
||||
dp_get_net_dev_stats(struct wlan_dp_intf *dp_intf, qdf_net_dev_stats *stats)
|
||||
{
|
||||
qdf_mem_copy(stats, &dp_intf->stats, sizeof(dp_intf->stats));
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_clear_net_dev_stats(): Clear netdev stats
|
||||
* @dp_intf: DP interface handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline
|
||||
void dp_clear_net_dev_stats(struct wlan_dp_intf *dp_intf)
|
||||
{
|
||||
qdf_mem_set(&dp_intf->stats, sizeof(dp_intf->stats), 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -1059,7 +1059,7 @@ uint32_t ucfg_dp_get_bus_bw_compute_interval(struct wlan_objmgr_psoc *psoc);
|
||||
int ucfg_dp_get_current_throughput_level(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_dp_get_txrx_stats() - get current bandwidth level
|
||||
* ucfg_dp_get_txrx_stats() - get dp txrx stats
|
||||
* @vdev: vdev handle
|
||||
* @dp_stats : dp_stats pointer
|
||||
*
|
||||
@@ -1070,6 +1070,24 @@ int ucfg_dp_get_current_throughput_level(struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS ucfg_dp_get_txrx_stats(struct wlan_objmgr_vdev *vdev,
|
||||
struct dp_tx_rx_stats *dp_stats);
|
||||
|
||||
/*
|
||||
* ucfg_dp_get_net_dev_stats(): Get netdev stats
|
||||
* @vdev: vdev handle
|
||||
* @stats: To hold netdev stats
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_dp_get_net_dev_stats(struct wlan_objmgr_vdev *vdev,
|
||||
qdf_net_dev_stats *stats);
|
||||
|
||||
/*
|
||||
* ucfg_dp_clear_net_dev_stats(): Clear netdev stats
|
||||
* @dev: Pointer to netdev
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_dp_clear_net_dev_stats(qdf_netdev_t dev);
|
||||
|
||||
/**
|
||||
* ucfg_dp_reset_cont_txtimeout_cnt() - Reset Tx Timeout count
|
||||
* @vdev: vdev handle
|
||||
|
@@ -1969,6 +1969,40 @@ QDF_STATUS ucfg_dp_get_txrx_stats(struct wlan_objmgr_vdev *vdev,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void ucfg_dp_get_net_dev_stats(struct wlan_objmgr_vdev *vdev,
|
||||
qdf_net_dev_stats *stats)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
|
||||
dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
if (unlikely(!dp_intf)) {
|
||||
dp_err_rl("DP interface not found");
|
||||
return;
|
||||
}
|
||||
|
||||
dp_get_net_dev_stats(dp_intf, stats);
|
||||
}
|
||||
|
||||
void ucfg_dp_clear_net_dev_stats(qdf_netdev_t dev)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf;
|
||||
struct wlan_dp_psoc_context *dp_ctx;
|
||||
|
||||
dp_ctx = dp_get_context();
|
||||
if (qdf_unlikely(!dp_ctx)) {
|
||||
dp_err_rl("DP context not found");
|
||||
return;
|
||||
}
|
||||
|
||||
dp_intf = dp_get_intf_by_netdev(dp_ctx, dev);
|
||||
if (qdf_unlikely(!dp_intf)) {
|
||||
dp_err_rl("DP interface not found");
|
||||
return;
|
||||
}
|
||||
|
||||
dp_clear_net_dev_stats(dp_intf);
|
||||
}
|
||||
|
||||
void ucfg_dp_reset_cont_txtimeout_cnt(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_dp_intf *dp_intf = dp_get_vdev_priv_obj(vdev);
|
||||
|
Reference in New Issue
Block a user