mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 10:05:19 +00:00
wifi(implementation): Use strlen for size of ssid
Looks like the legacy hal uses a null termination for indicating the size of ssid. While there, Use the helper function to convert wifi band from hidl to legacy. Bug: 35765841 Test: Integration tests pass now. Change-Id: Ie480f9d6735a21c5ccedfc68bfde5f0d920dcdc9
This commit is contained in:
@@ -350,7 +350,7 @@ bool convertHidlGscanParamsToLegacy(
|
||||
legacy_scan_params->buckets[bucket_idx];
|
||||
legacy_bucket_spec.bucket = bucket_idx;
|
||||
legacy_bucket_spec.band =
|
||||
static_cast<legacy_hal::wifi_band>(hidl_bucket_spec.band);
|
||||
convertHidlWifiBandToLegacy(hidl_bucket_spec.band);
|
||||
legacy_bucket_spec.period = hidl_bucket_spec.periodInMs;
|
||||
legacy_bucket_spec.max_period = hidl_bucket_spec.exponentialMaxPeriodInMs;
|
||||
legacy_bucket_spec.base = hidl_bucket_spec.exponentialBase;
|
||||
@@ -429,7 +429,7 @@ bool convertLegacyGscanResultToHidl(
|
||||
hidl_scan_result->timeStampInUs = legacy_scan_result.ts;
|
||||
hidl_scan_result->ssid = std::vector<uint8_t>(
|
||||
legacy_scan_result.ssid,
|
||||
legacy_scan_result.ssid + sizeof(legacy_scan_result.ssid));
|
||||
legacy_scan_result.ssid + strlen(legacy_scan_result.ssid));
|
||||
memcpy(hidl_scan_result->bssid.data(),
|
||||
legacy_scan_result.bssid,
|
||||
hidl_scan_result->bssid.size());
|
||||
|
||||
Reference in New Issue
Block a user