소스 검색

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 년 전
부모
커밋
5126329e8c
1개의 변경된 파일13개의 추가작업 그리고 5개의 파일을 삭제
  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;