diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 69620c016b4c..1e07e2e47e2f 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -22067,15 +22067,21 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy, if (wlan_hdd_validate_vdev_id(adapter->vdev_id)) return -EINVAL; + status = wlan_hdd_validate_context(hdd_ctx); + + if (status) + return status; + + if (hdd_ctx->is_wiphy_suspended) { + hdd_info_rl("wiphy is suspended retry disconnect"); + return -EAGAIN; + } + qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_HDD, TRACE_CODE_HDD_CFG80211_DISCONNECT, adapter->vdev_id, reason); hdd_print_netdev_txq_status(dev); - status = wlan_hdd_validate_context(hdd_ctx); - - if (0 != status) - return status; qdf_mutex_acquire(&adapter->disconnection_status_lock); if (adapter->disconnection_in_progress) {