qcacmn: support dequeue and start failed event for scan from STA

It doesn't process scan dequeue and start failed event, which cause
STA scan doesn't complete and blocking next scan work in
wpa_supplicant. For scan dequeue and start failed event with match
reason, indicate scan aborted to up layer.

Change-Id: I8861e277143116878f6714e50b600d77df69eeb1
CRs-Fixed: 2029955
diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c
index f4cfd8a..8d767b5 100644
--- a/os_if/linux/scan/src/wlan_cfg80211_scan.c
+++ b/os_if/linux/scan/src/wlan_cfg80211_scan.c
@@ -641,7 +641,9 @@
 	struct wlan_objmgr_pdev *pdev;
 	QDF_STATUS status;
 
-	if (event->type != SCAN_EVENT_TYPE_COMPLETED)
+	if ((event->type != SCAN_EVENT_TYPE_COMPLETED) &&
+	    (event->type != SCAN_EVENT_TYPE_DEQUEUED) &&
+	    (event->type != SCAN_EVENT_TYPE_START_FAILED))
 		return;
 
 	cfg80211_info("scan ID = %d vdev id = %d, event type %s(%d) reason = %s(%d)",
@@ -656,13 +658,19 @@
 	 * of scanning
 	 */
 	if ((event->type == SCAN_EVENT_TYPE_COMPLETED) &&
-		((event->reason == SCAN_REASON_CANCELLED) ||
-		(event->reason == SCAN_REASON_TIMEDOUT) ||
-		(event->reason == SCAN_REASON_INTERNAL_FAILURE))) {
+	    ((event->reason == SCAN_REASON_CANCELLED) ||
+	     (event->reason == SCAN_REASON_TIMEDOUT) ||
+	     (event->reason == SCAN_REASON_INTERNAL_FAILURE))) {
 		aborted = true;
 	} else if ((event->type == SCAN_EVENT_TYPE_COMPLETED) &&
-			(event->reason == SCAN_REASON_COMPLETED))
+		   (event->reason == SCAN_REASON_COMPLETED))
 		aborted = false;
+	else if ((event->type == SCAN_EVENT_TYPE_DEQUEUED) &&
+		 (event->reason == SCAN_REASON_CANCELLED))
+		aborted = true;
+	else if ((event->type == SCAN_EVENT_TYPE_START_FAILED) &&
+		 (event->reason == SCAN_REASON_COMPLETED))
+		aborted = true;
 	else
 		/* cfg80211 is not interested on all other scan events */
 		return;