WiFi HAL: fixing gscan batch result calculation
Sreenath Sharma [Mon, 27 Jun 2016 09:55:10 +0000 (14:55 +0530)]
Fixing gscan batch result calculation by using the correct scan
result structure

BUG=29795406

Change-Id: I7d3ed3ed3e836e3d0a3eb7617b110a98b9a83fa5
Signed-off-by: Sreenath Sharma <sreenath.sharma@broadcom.com>

bcmdhd/wifi_hal/gscan.cpp

index 52ec284..620fbe4 100644 (file)
@@ -937,7 +937,7 @@ public:
                             ALOGW("Stored %d scans, ignoring excess results", mRetrieved);
                             break;
                         }
-                        num = min(num, (int)(it2.get_len()/sizeof(wifi_scan_result)));
+                        num = min(num, (int)(it2.get_len()/sizeof(wifi_gscan_result)));
                         num = min(num, (int)MAX_AP_CACHE_PER_SCAN);
                         ALOGV("Copying %d scan results", num);
                         wifi_gscan_result_t *results = (wifi_gscan_result_t *)it2.get_data();