wlan: Flush scan results on interface down

Propagation from qcacld-3.0 to prima.

After successful connection, if interface down(STA) happens on DUT
and if AP changes data rates before interface up happens, there
is a possibility of STA to send packets at older data rates, because
of holding older scan results in SME scan cache. This results in using
stale scan result even after wifi turn off and on. If stale scan result
is used and if AP has updated some params like rates DUT will not be
using those supported rates for tx which is an issue.

To mitigate this issue, flush scan results on STA interface down.
Also, make sure there are no other STA interfaces before flushing
scan results.

Change-Id: I3505c128276fa8e5e05ea5d9110eb75275a746e9
CRs-Fixed: 2259918
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index ebf0a8c..1ebad13 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -2384,4 +2384,13 @@
  */
 bool hdd_is_memdump_supported(void);
 
+/**
+ * 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(hdd_context_t *hdd_ctx);
+
 #endif    // end #if !defined( WLAN_HDD_MAIN_H )