diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 00380667a8..6622030263 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -7304,24 +7304,14 @@ wlan_hdd_refill_os_rateflags(struct rate_info *os_rate, uint8_t preamble) * @sinfo: kernel station_info struct to populate * @link_info: pointer to link_info struct in adapter, * where hdd_stats is located in this struct - * @mac_handle: opaque handle to MAC context - * @rate_flags: indicating phy mode and bandwidth - * @fw_mcs_index: MCS from parsing rate_flags and fw_raw_rate - * @fw_rate: raw_rate from fw - * @nss_max: max nss * - * When rates info reported is provided by driver, this function - * will take effect to replace the bandwidth calculated from fw. + * This function is to replace RX rates which was previously filled by fw. * * Return: None */ static void wlan_hdd_refill_actual_rate(struct station_info *sinfo, - struct wlan_hdd_link_info *link_info, - mac_handle_t mac_handle, - enum tx_rate_info rate_flags, - uint8_t fw_mcs_index, - uint16_t fw_rate, uint8_t nss_max) + struct wlan_hdd_link_info *link_info) { uint8_t preamble = link_info->hdd_stats.class_a_stat.rx_preamble; @@ -7334,16 +7324,10 @@ wlan_hdd_refill_actual_rate(struct station_info *sinfo, } else if (qdf_unlikely(preamble == INVALID_PREAMBLE)) { /* * If preamble is invalid, it means that DP has not received - * a data frame since assoc or roaming so there is no rates - * info. In this case, we report max rate with FW rates info. + * a data frame since assoc or roaming so there is no rates. + * In this case, using FW rates which was set previously. */ - hdd_report_max_rate(link_info, mac_handle, - &sinfo->rxrate, - sinfo->signal, - rate_flags, - fw_mcs_index, - fw_rate, - nss_max); + hdd_debug("Driver failed to get rate, reporting FW rate"); return; } @@ -7371,11 +7355,7 @@ wlan_hdd_refill_actual_rate(struct station_info *sinfo, #else static inline void wlan_hdd_refill_actual_rate(struct station_info *sinfo, - struct wlan_hdd_link_info *link_info, - mac_handle_t mac_handle, - enum tx_rate_info rate_flags, - uint8_t fw_mcs_index, - uint16_t fw_rate, uint8_t nss_max) + struct wlan_hdd_link_info *link_info) { } #endif @@ -7591,8 +7571,6 @@ static int wlan_hdd_update_rate_info(struct wlan_hdd_link_info *link_info, rx_nss, rx_dcm, rx_gi); } } else { - uint8_t rx_nss_max = wlan_vdev_mlme_get_nss(vdev); - /* Fill TX stats */ hdd_report_actual_rate(tx_rate_flags, my_tx_rate, &sinfo->txrate, tx_mcs_index, @@ -7604,9 +7582,7 @@ static int wlan_hdd_update_rate_info(struct wlan_hdd_link_info *link_info, rx_nss, rx_dcm, rx_gi); /* Using driver RX rate to replace the FW RX rate */ - wlan_hdd_refill_actual_rate(sinfo, link_info, mac_handle, - rx_rate_flags, rx_mcs_index, - my_rx_rate, rx_nss_max); + wlan_hdd_refill_actual_rate(sinfo, link_info); } wlan_hdd_fill_summary_stats(&hdd_stats->summary_stat, @@ -9122,8 +9098,10 @@ void wlan_hdd_get_peer_rx_rate_stats(struct wlan_hdd_link_info *link_info) return; peer_stats = qdf_mem_malloc(sizeof(*peer_stats)); - if (!peer_stats) + if (!peer_stats) { + hdd_err("Failed to malloc peer_stats"); return; + } /* * If failed to get RX rates info, assign an invalid value to the @@ -9134,7 +9112,7 @@ void wlan_hdd_get_peer_rx_rate_stats(struct wlan_hdd_link_info *link_info) status = wlan_hdd_get_per_peer_stats(link_info, peer_stats); if (qdf_unlikely(QDF_IS_STATUS_ERROR(status)) || qdf_unlikely(peer_stats->rx.last_rx_rate == 0)) { - hdd_debug("No rates, reporting max rate, rx mcs=%d, status=%d", + hdd_debug("Driver failed to get rx rates, rx mcs=%d, status=%d", hdd_stats->class_a_stat.rx_mcs_index, status); hdd_stats->class_a_stat.rx_preamble = INVALID_PREAMBLE; if (hdd_stats->class_a_stat.rx_mcs_index == INVALID_MCS_IDX) {