Re-instate REPORT_EVENT_AFTER_EACH_SCAN workaround
Vinit Deshpande [Wed, 30 Jul 2014 01:38:01 +0000 (18:38 -0700)]
Hammerhead still doesn't support this flag - this unblocks some tests.

Bug: 16633917

Change-Id: I04f3d1bc61f55bd58751fa4ae6b92df6970159e7

bcmdhd/wifi_hal/gscan.cpp

index a130bd9..a10f0de 100644 (file)
@@ -495,6 +495,13 @@ public:
         }
 
         int num_scans = 20;
+        for (int i = 0; i < mParams->num_buckets; i++) {
+            if (mParams->buckets[i].report_events == 1) {
+                ALOGD("Setting num_scans to 1");
+                num_scans = 1;
+                break;
+            }
+        }
 
         result = request.put_u32(GSCAN_ATTRIBUTE_NUM_SCANS_TO_CACHE, num_scans);
         if (result < 0) {