Browse Source

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
Wu Gao 8 years ago
parent
commit
5126329e8c
1 changed files with 13 additions and 5 deletions
  1. 13 5
      os_if/linux/scan/src/wlan_cfg80211_scan.c

+ 13 - 5
os_if/linux/scan/src/wlan_cfg80211_scan.c

@@ -641,7 +641,9 @@ static void wlan_cfg80211_scan_done_callback(
 	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 @@ static void wlan_cfg80211_scan_done_callback(
 	 * 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;