From 5126329e8ca205eeec4ffa7f67a74d47e7d03813 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Wed, 5 Apr 2017 20:37:38 +0800 Subject: [PATCH] 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 --- os_if/linux/scan/src/wlan_cfg80211_scan.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c index f4cfd8a7b5fa..8d767b56419b 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 @@ 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;