diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index dfb658d295be..9cfcfa384267 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -12830,6 +12830,7 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy, struct nlattr *tb[STATS_SET_MAX + 1]; struct net_device *dev = wdev->netdev; struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); + struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_context *hdd_ctx = wiphy_priv(wiphy); struct set_arp_stats_params arp_stats_params = {0}; int err = 0; @@ -12856,6 +12857,11 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy, return -EINVAL; } + if (eConnectionState_Associated != sta_ctx->conn_info.conn_state) { + hdd_debug("Not Associated"); + return 0; + } + err = wlan_cfg80211_nla_parse(tb, STATS_SET_MAX, data, data_len, qca_wlan_vendor_set_nud_stats); if (err) {