diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index f4c14a67fa33..83002d694c87 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -4368,6 +4368,22 @@ void hdd_wlan_fill_per_chain_rssi_stats(struct station_info *sinfo, #endif +#if defined(CFG80211_RX_FCS_ERROR_REPORTING_SUPPORT) +static void hdd_fill_fcs_and_mpdu_count(struct hdd_adapter *adapter, + struct station_info *sinfo) +{ + sinfo->rx_mpdu_count = adapter->hdd_stats.peer_stats.rx_count; + sinfo->fcs_err_count = adapter->hdd_stats.peer_stats.fcs_count; + hdd_debug("RX mpdu count %d fcs_err_count %d", + sinfo->rx_mpdu_count, sinfo->fcs_err_count); +} +#else +static void hdd_fill_fcs_and_mpdu_count(struct hdd_adapter *adapter, + struct station_info *sinfo) +{ +} +#endif + /** * wlan_hdd_get_sta_stats() - get aggregate STA stats * @wiphy: wireless phy @@ -4550,8 +4566,10 @@ static int wlan_hdd_get_sta_stats(struct wiphy *wiphy, wlan_hdd_fill_summary_stats(&adapter->hdd_stats.summary_stat, sinfo); sinfo->tx_bytes = adapter->stats.tx_bytes; - sinfo->rx_bytes = adapter->hdd_stats.peer_stats.rx_bytes; - sinfo->rx_packets = adapter->hdd_stats.peer_stats.rx_count; + sinfo->rx_bytes = adapter->stats.rx_bytes; + sinfo->rx_packets = adapter->stats.rx_packets; + + hdd_fill_fcs_and_mpdu_count(adapter, sinfo); qdf_mem_copy(&sta_ctx->conn_info.txrate, &sinfo->txrate, sizeof(sinfo->txrate));