|
@@ -3006,6 +3006,13 @@ static int __hdd_stop(struct net_device *dev)
|
|
|
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(hdd_ctx->hHal);
|
|
|
+
|
|
|
/*
|
|
|
* Find if any iface is up. If any iface is up then can't put device to
|
|
|
* sleep/power save mode
|
|
@@ -13599,6 +13606,22 @@ 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);
|