From 58aaaadfb1e80ba0023a68cf7fc69d24a011f79a Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Tue, 4 Dec 2018 18:36:05 +0530 Subject: [PATCH] Revert "qcacld-3.0: Flush scan results on interface down" This reverts the change id- I3505c128276fa8e5e05ea5d9110eb75275a746e9. When wifi is toggled from GUI, in order to support MAC randomization security mechanism driver should not flush scan cache during interface down. Framework has to set the scan flush flag so that driver will flush the scan results while interface up and then do the scan. Remove scan flush logic from driver on interface down. Change-Id: I45ad1a257ab7ef4bd5474f52fd0dbfde5e3514c4 CRs-Fixed: 2360898 --- core/hdd/inc/wlan_hdd_main.h | 9 --------- core/hdd/src/wlan_hdd_hostapd.c | 4 ---- core/hdd/src/wlan_hdd_main.c | 23 ----------------------- 3 files changed, 36 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 42b3f42a61cd..90963f73d10a 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -3544,15 +3544,6 @@ static inline void hdd_driver_memdump_deinit(void) { } #endif /* WLAN_FEATURE_MEMDUMP_ENABLE */ -/** - * hdd_is_cli_iface_up() - check if there is any cli iface up - * @hdd_ctx: HDD context - * - * Return: return true if there is any cli iface(STA/P2P_CLI) is up - * else return false - */ -bool hdd_is_cli_iface_up(struct hdd_context *hdd_ctx); - /** * hdd_set_disconnect_status() - set adapter disconnection status * @hdd_adapter: Pointer to hdd adapter diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 2e115e71201f..0a504f1e422c 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -496,10 +496,6 @@ static int __hdd_hostapd_stop(struct net_device *dev) hdd_stop_adapter(hdd_ctx, adapter); hdd_deinit_adapter(hdd_ctx, adapter, true); clear_bit(DEVICE_IFACE_OPENED, &adapter->event_flags); - - if (!hdd_is_cli_iface_up(hdd_ctx)) - sme_scan_flush_result(hdd_ctx->mac_handle); - /* Stop all tx queues */ hdd_debug("Disabling queues"); wlan_hdd_netif_queue_control(adapter, diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 88450d388b2c..482d0444244b 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3317,13 +3317,6 @@ static int __hdd_stop(struct net_device *dev) /* DeInit the adapter. This ensures datapath cleanup as well */ hdd_deinit_adapter(hdd_ctx, adapter, true); - /* - * Upon wifi turn off, DUT has to flush the scan results so if - * this is the last cli iface, flush the scan database. - */ - if (!hdd_is_cli_iface_up(hdd_ctx)) - sme_scan_flush_result(mac_handle); - if (!hdd_is_any_interface_open(hdd_ctx)) hdd_psoc_idle_timer_start(hdd_ctx); @@ -14936,22 +14929,6 @@ void hdd_set_rx_mode_rps(bool enable) } } -bool hdd_is_cli_iface_up(struct hdd_context *hdd_ctx) -{ - struct hdd_adapter *adapter = NULL; - - hdd_for_each_adapter(hdd_ctx, adapter) { - if ((adapter->device_mode == QDF_STA_MODE || - adapter->device_mode == QDF_P2P_CLIENT_MODE) && - qdf_atomic_test_bit(DEVICE_IFACE_OPENED, - &adapter->event_flags)){ - return true; - } - } - - return false; -} - /* Register the module init/exit functions */ module_init(hdd_module_init); module_exit(hdd_module_exit);