From 4ef4fb339cf4f41d598dc0f168f2db7f4caf7d20 Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Wed, 21 Mar 2018 10:46:59 -0700 Subject: [PATCH] qcacmn: Process scan event for 11d only if event indicates completion Process scan event for 11d only if event indicates completion. Else in case of dequeue due to failure or timeout will also cause scan event handling for 11d which might have undefined effects. Change-Id: I9d3599a9c60bccebea8ded9922dd3ddf995d8d61 CRs-Fixed: 2210347 --- umac/scan/core/src/wlan_scan_manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/umac/scan/core/src/wlan_scan_manager.c b/umac/scan/core/src/wlan_scan_manager.c index 4bbf82e9de..99a1b7c088 100644 --- a/umac/scan/core/src/wlan_scan_manager.c +++ b/umac/scan/core/src/wlan_scan_manager.c @@ -745,7 +745,8 @@ scm_scan_event_handler(struct scheduler_msg *msg) switch (event->type) { case SCAN_EVENT_TYPE_COMPLETED: - scm_11d_decide_country_code(vdev); + if (event->reason == SCAN_REASON_COMPLETED) + scm_11d_decide_country_code(vdev); /* fall through to release the command */ case SCAN_EVENT_TYPE_START_FAILED: case SCAN_EVENT_TYPE_DEQUEUED: