diff options
| -rw-r--r-- | core/hdd/src/wlan_hdd_hostapd.c | 5 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 7d27f5d51234..19c99cbd4fcd 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -311,11 +311,6 @@ static int __hdd_hostapd_stop(struct net_device *dev) return -ENODEV; } - if (!test_bit(DEVICE_IFACE_OPENED, &adapter->event_flags)) { - hdd_info("iface is not in open state, flags: %lu", - adapter->event_flags); - return 0; - } if (!sap_ctx) { hdd_err("invalid sap ctx : %p", sap_ctx); return -ENODEV; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 02e77cc87a7e..ad3fe67d5c59 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3606,6 +3606,12 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter, ENTER(); + if (!test_bit(DEVICE_IFACE_OPENED, &adapter->event_flags)) { + hdd_info("interface %d is not up %lu", + adapter->device_mode, adapter->event_flags); + return -ENODEV; + } + scan_info = &adapter->scan_info; hdd_notice("Disabling queues"); wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_TX_DISABLE_N_CARRIER, |
