diff options
Diffstat (limited to 'wifi/1.6/default')
-rw-r--r-- | wifi/1.6/default/wifi_legacy_hal.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/wifi/1.6/default/wifi_legacy_hal.cpp b/wifi/1.6/default/wifi_legacy_hal.cpp index 8a75fd83e3..bb8cf590d9 100644 --- a/wifi/1.6/default/wifi_legacy_hal.cpp +++ b/wifi/1.6/default/wifi_legacy_hal.cpp @@ -1549,13 +1549,14 @@ wifi_error WifiLegacyHal::setIndoorState(bool isIndoor) { std::pair<wifi_error, wifi_radio_combination_matrix*> WifiLegacyHal::getSupportedRadioCombinationsMatrix() { - std::array<char, kMaxSupportedRadioCombinationsMatrixLength> buffer; - buffer.fill(0); + char* buffer = new char[kMaxSupportedRadioCombinationsMatrixLength]; + std::fill(buffer, buffer + kMaxSupportedRadioCombinationsMatrixLength, 0); uint32_t size = 0; wifi_radio_combination_matrix* radio_combination_matrix_ptr = - reinterpret_cast<wifi_radio_combination_matrix*>(buffer.data()); + reinterpret_cast<wifi_radio_combination_matrix*>(buffer); wifi_error status = global_func_table_.wifi_get_supported_radio_combinations_matrix( - global_handle_, buffer.size(), &size, radio_combination_matrix_ptr); + global_handle_, kMaxSupportedRadioCombinationsMatrixLength, &size, + radio_combination_matrix_ptr); CHECK(size >= 0 && size <= kMaxSupportedRadioCombinationsMatrixLength); return {status, radio_combination_matrix_ptr}; } |