diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 4d3b35c3fb21..e335fcaf84d6 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -1226,6 +1226,14 @@ static void wlan_hdd_cfg80211_link_layer_stats_callback(void *ctx, linkLayerStatsResults->num_peers); spin_lock(&context->context_lock); + /* Firmware doesn't send peerstats event if no peers are + * connected. HDD should not wait for any peerstats in + * this case and return the status to middleware after + * receiving iface stats + */ + if (!linkLayerStatsResults->num_peers) + context->request_bitmap &= + ~(WMI_LINK_STATS_ALL_PEER); context->request_bitmap &= ~(WMI_LINK_STATS_IFACE); spin_unlock(&context->context_lock);