Diff between e847a85605775903cf33231f489e17350d9f3dac and 61fd5a8e1263b280fbb70348cfcf73367aec699c

Changed Files

File Additions Deletions Status
src/adapter.c +6 -1 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index f5f8c8c..4a66da1 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1228,7 +1228,12 @@ static void stop_passive_scanning_complete(uint8_t status, uint16_t length,
 	dev = adapter->connect_le;
 	adapter->connect_le = NULL;
 
-	if (status != MGMT_STATUS_SUCCESS) {
+	/*
+	 * MGMT_STATUS_REJECTED may be returned from kernel because the passive
+	 * scan timer had expired in kernel and passive scan was disabled just
+	 * around the time we called stop_passive_scanning().
+	 */
+	if (status != MGMT_STATUS_SUCCESS && status != MGMT_STATUS_REJECTED) {
 		error("Stopping passive scanning failed: %s",
 							mgmt_errstr(status));
 		return;