WiFi-HAL: Validate gscan capabilities
driver/firmware can return invalid gscan_capabilities in some
cases and they can cause potential issues in framework.
max_scan_buckets is such gscan capability parameter which is
used by framework to allocate memory for the bucket configuration.
To avoid such issues, return failure to the
API wifi_get_gscan_capabilities() if max_scan_buckets is 0 or
failed to receive capabilities from driver.
Change-Id: I77fae19e336d32c451c20ee7e8fb816a4b86066b
CRs-Fixed: 1002955
2 files changed