qcacld-3.0: Cancel Remain on channel command before stop ap

qcacld-2.0 to qcacld-3.0 propagation

If P2P-GO stop comes during ROC, it may cause WLANSAP_StopBss
API to fail. ROC is stuck as firmware is running Gscan which
is higher priority than p2p ROC scan prioirty.
This causes ROC command to be stuck in the active list for 10
seconds and will eventually cause a crash in FW when host will
try to add self peer since older peer is still present in the
FW with same mac address

Add change to increase the priority of P2P scan and cancel ROC
before calling stop AP API.

CRs-Fixed: 1065161
Change-Id: I3a62234596c8c2acc0155b483847b9adc159d757
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index de59d24..46459b3 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -7546,6 +7546,7 @@
 	}
 
 	hdd_cleanup_actionframe(pHddCtx, pAdapter);
+	wlan_hdd_cleanup_remain_on_channel_ctx(pAdapter);
 
 	mutex_lock(&pHddCtx->sap_lock);
 	if (test_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags)) {
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 3418f1d..1bba4b8 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -566,6 +566,9 @@
 			 cmd.vdev_id, P2P_SCAN_TYPE_LISTEN);
 	WMA_LOGI("scan_id 0x%x, vdev_id %d, p2pScanType %d, msg_type 0x%x",
 		 cmd.scan_id, cmd.vdev_id, scan_req->p2pScanType, msg_type);
+
+	if (scan_req->p2pScanType)
+		cmd.scan_priority = WMI_SCAN_PRIORITY_MEDIUM;
 	/*
 	 * Cache vdev_id and scan_id because cmd is freed after calling
 	 * wmi_unified_cmd_send cmd. WMI internally frees cmd buffer after