Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 17 | #include <android-base/logging.h> |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 18 | |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 19 | #include "hidl_return_util.h" |
| 20 | #include "wifi.h" |
Roshan Pius | 503582e | 2016-10-11 08:25:30 -0700 | [diff] [blame] | 21 | #include "wifi_status_util.h" |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 22 | |
Roshan Pius | cd566bd | 2016-10-10 08:03:42 -0700 | [diff] [blame] | 23 | namespace { |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 24 | // Starting Chip ID, will be assigned to primary chip |
| 25 | static constexpr android::hardware::wifi::V1_0::ChipId kPrimaryChipId = 0; |
Roshan Pius | cd566bd | 2016-10-10 08:03:42 -0700 | [diff] [blame] | 26 | } // namespace |
| 27 | |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 28 | namespace android { |
| 29 | namespace hardware { |
| 30 | namespace wifi { |
Jimmy Chen | d460df3 | 2019-11-29 17:31:22 +0200 | [diff] [blame] | 31 | namespace V1_5 { |
Roshan Pius | 79a9975 | 2016-10-04 13:03:58 -0700 | [diff] [blame] | 32 | namespace implementation { |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 33 | using hidl_return_util::validateAndCall; |
Roshan Pius | 155344b | 2017-08-11 15:47:42 -0700 | [diff] [blame] | 34 | using hidl_return_util::validateAndCallWithLock; |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 35 | |
Roshan Pius | 200a17d | 2017-11-01 13:03:35 -0700 | [diff] [blame] | 36 | Wifi::Wifi( |
Roshan Pius | c885df0 | 2019-05-21 14:49:05 -0700 | [diff] [blame] | 37 | const std::shared_ptr<wifi_system::InterfaceTool> iface_tool, |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 38 | const std::shared_ptr<legacy_hal::WifiLegacyHalFactory> legacy_hal_factory, |
Roshan Pius | 200a17d | 2017-11-01 13:03:35 -0700 | [diff] [blame] | 39 | const std::shared_ptr<mode_controller::WifiModeController> mode_controller, |
Roshan Pius | 99dab38 | 2019-02-14 07:57:10 -0800 | [diff] [blame] | 40 | const std::shared_ptr<iface_util::WifiIfaceUtil> iface_util, |
Roshan Pius | 200a17d | 2017-11-01 13:03:35 -0700 | [diff] [blame] | 41 | const std::shared_ptr<feature_flags::WifiFeatureFlags> feature_flags) |
Roshan Pius | c885df0 | 2019-05-21 14:49:05 -0700 | [diff] [blame] | 42 | : iface_tool_(iface_tool), |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 43 | legacy_hal_factory_(legacy_hal_factory), |
Roshan Pius | 200a17d | 2017-11-01 13:03:35 -0700 | [diff] [blame] | 44 | mode_controller_(mode_controller), |
Roshan Pius | 99dab38 | 2019-02-14 07:57:10 -0800 | [diff] [blame] | 45 | iface_util_(iface_util), |
Roshan Pius | 200a17d | 2017-11-01 13:03:35 -0700 | [diff] [blame] | 46 | feature_flags_(feature_flags), |
Roshan Pius | 6cedc97 | 2016-10-28 10:11:17 -0700 | [diff] [blame] | 47 | run_state_(RunState::STOPPED) {} |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 48 | |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 49 | bool Wifi::isValid() { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 50 | // This object is always valid. |
| 51 | return true; |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 52 | } |
| 53 | |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 54 | Return<void> Wifi::registerEventCallback( |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 55 | const sp<IWifiEventCallback>& event_callback, |
| 56 | registerEventCallback_cb hidl_status_cb) { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 57 | return validateAndCall(this, WifiStatusCode::ERROR_UNKNOWN, |
| 58 | &Wifi::registerEventCallbackInternal, hidl_status_cb, |
| 59 | event_callback); |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 60 | } |
| 61 | |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 62 | Return<bool> Wifi::isStarted() { return run_state_ != RunState::STOPPED; } |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 63 | |
Roshan Pius | 503582e | 2016-10-11 08:25:30 -0700 | [diff] [blame] | 64 | Return<void> Wifi::start(start_cb hidl_status_cb) { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 65 | return validateAndCall(this, WifiStatusCode::ERROR_UNKNOWN, |
| 66 | &Wifi::startInternal, hidl_status_cb); |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | Return<void> Wifi::stop(stop_cb hidl_status_cb) { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 70 | return validateAndCallWithLock(this, WifiStatusCode::ERROR_UNKNOWN, |
| 71 | &Wifi::stopInternal, hidl_status_cb); |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | Return<void> Wifi::getChipIds(getChipIds_cb hidl_status_cb) { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 75 | return validateAndCall(this, WifiStatusCode::ERROR_UNKNOWN, |
| 76 | &Wifi::getChipIdsInternal, hidl_status_cb); |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | Return<void> Wifi::getChip(ChipId chip_id, getChip_cb hidl_status_cb) { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 80 | return validateAndCall(this, WifiStatusCode::ERROR_UNKNOWN, |
| 81 | &Wifi::getChipInternal, hidl_status_cb, chip_id); |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 82 | } |
| 83 | |
xshu | 5899e8e | 2018-01-09 15:36:03 -0800 | [diff] [blame] | 84 | Return<void> Wifi::debug(const hidl_handle& handle, |
| 85 | const hidl_vec<hidl_string>&) { |
| 86 | LOG(INFO) << "-----------Debug is called----------------"; |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 87 | if (chips_.size() == 0) { |
Roshan Pius | 7cf1df7 | 2018-01-24 19:13:09 -0800 | [diff] [blame] | 88 | return Void(); |
| 89 | } |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 90 | |
| 91 | for (sp<WifiChip> chip : chips_) { |
| 92 | if (!chip.get()) continue; |
| 93 | |
| 94 | chip->debug(handle, {}); |
| 95 | } |
| 96 | return Void(); |
xshu | 5899e8e | 2018-01-09 15:36:03 -0800 | [diff] [blame] | 97 | } |
| 98 | |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 99 | WifiStatus Wifi::registerEventCallbackInternal( |
| 100 | const sp<IWifiEventCallback>& event_callback) { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 101 | if (!event_cb_handler_.addCallback(event_callback)) { |
| 102 | return createWifiStatus(WifiStatusCode::ERROR_UNKNOWN); |
| 103 | } |
| 104 | return createWifiStatus(WifiStatusCode::SUCCESS); |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | WifiStatus Wifi::startInternal() { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 108 | if (run_state_ == RunState::STARTED) { |
| 109 | return createWifiStatus(WifiStatusCode::SUCCESS); |
| 110 | } else if (run_state_ == RunState::STOPPING) { |
| 111 | return createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE, |
| 112 | "HAL is stopping"); |
Roshan Pius | 52947fb | 2016-11-18 11:38:07 -0800 | [diff] [blame] | 113 | } |
Roshan Pius | 8fc6d17 | 2017-11-27 16:08:27 -0800 | [diff] [blame] | 114 | WifiStatus wifi_status = initializeModeControllerAndLegacyHal(); |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 115 | if (wifi_status.code == WifiStatusCode::SUCCESS) { |
Ahmed ElArabawy | 2134bf7 | 2020-06-18 15:07:12 -0700 | [diff] [blame] | 116 | // Register the callback for subsystem restart |
| 117 | const auto& on_subsystem_restart_callback = |
| 118 | [this](const std::string& error) { |
| 119 | WifiStatus wifi_status = |
| 120 | createWifiStatus(WifiStatusCode::ERROR_UNKNOWN, error); |
| 121 | for (const auto& callback : event_cb_handler_.getCallbacks()) { |
| 122 | if (!callback->onFailure(wifi_status).isOk()) { |
| 123 | LOG(ERROR) << "Failed to invoke onFailure callback"; |
| 124 | } |
| 125 | } |
| 126 | }; |
| 127 | |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 128 | // Create the chip instance once the HAL is started. |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 129 | android::hardware::wifi::V1_0::ChipId chipId = kPrimaryChipId; |
| 130 | for (auto& hal : legacy_hals_) { |
| 131 | chips_.push_back(new WifiChip( |
| 132 | chipId, chipId == kPrimaryChipId, hal, mode_controller_, |
| 133 | iface_util_, feature_flags_, on_subsystem_restart_callback)); |
| 134 | chipId++; |
| 135 | } |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 136 | run_state_ = RunState::STARTED; |
| 137 | for (const auto& callback : event_cb_handler_.getCallbacks()) { |
| 138 | if (!callback->onStart().isOk()) { |
| 139 | LOG(ERROR) << "Failed to invoke onStart callback"; |
| 140 | }; |
| 141 | } |
| 142 | LOG(INFO) << "Wifi HAL started"; |
| 143 | } else { |
| 144 | for (const auto& callback : event_cb_handler_.getCallbacks()) { |
| 145 | if (!callback->onFailure(wifi_status).isOk()) { |
| 146 | LOG(ERROR) << "Failed to invoke onFailure callback"; |
| 147 | } |
| 148 | } |
| 149 | LOG(ERROR) << "Wifi HAL start failed"; |
Kyounghan Lee | f2e21c2 | 2020-01-29 14:56:15 +0900 | [diff] [blame] | 150 | // Clear the event callback objects since the HAL start failed. |
| 151 | event_cb_handler_.invalidate(); |
Roshan Pius | 52947fb | 2016-11-18 11:38:07 -0800 | [diff] [blame] | 152 | } |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 153 | return wifi_status; |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 154 | } |
| 155 | |
Roshan Pius | 155344b | 2017-08-11 15:47:42 -0700 | [diff] [blame] | 156 | WifiStatus Wifi::stopInternal( |
| 157 | /* NONNULL */ std::unique_lock<std::recursive_mutex>* lock) { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 158 | if (run_state_ == RunState::STOPPED) { |
| 159 | return createWifiStatus(WifiStatusCode::SUCCESS); |
| 160 | } else if (run_state_ == RunState::STOPPING) { |
| 161 | return createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE, |
| 162 | "HAL is stopping"); |
Roshan Pius | aabe575 | 2016-09-29 09:03:59 -0700 | [diff] [blame] | 163 | } |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 164 | // Clear the chip object and its child objects since the HAL is now |
| 165 | // stopped. |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 166 | for (auto& chip : chips_) { |
| 167 | if (chip.get()) { |
| 168 | chip->invalidate(); |
| 169 | chip.clear(); |
| 170 | } |
Roshan Pius | aabe575 | 2016-09-29 09:03:59 -0700 | [diff] [blame] | 171 | } |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 172 | chips_.clear(); |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 173 | WifiStatus wifi_status = stopLegacyHalAndDeinitializeModeController(lock); |
| 174 | if (wifi_status.code == WifiStatusCode::SUCCESS) { |
| 175 | for (const auto& callback : event_cb_handler_.getCallbacks()) { |
| 176 | if (!callback->onStop().isOk()) { |
| 177 | LOG(ERROR) << "Failed to invoke onStop callback"; |
| 178 | }; |
| 179 | } |
| 180 | LOG(INFO) << "Wifi HAL stopped"; |
| 181 | } else { |
| 182 | for (const auto& callback : event_cb_handler_.getCallbacks()) { |
| 183 | if (!callback->onFailure(wifi_status).isOk()) { |
| 184 | LOG(ERROR) << "Failed to invoke onFailure callback"; |
| 185 | } |
| 186 | } |
| 187 | LOG(ERROR) << "Wifi HAL stop failed"; |
| 188 | } |
Kyounghan Lee | f2e21c2 | 2020-01-29 14:56:15 +0900 | [diff] [blame] | 189 | // Clear the event callback objects since the HAL is now stopped. |
| 190 | event_cb_handler_.invalidate(); |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 191 | return wifi_status; |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 192 | } |
| 193 | |
Roshan Pius | 5647665 | 2016-10-26 14:43:05 -0700 | [diff] [blame] | 194 | std::pair<WifiStatus, std::vector<ChipId>> Wifi::getChipIdsInternal() { |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 195 | std::vector<ChipId> chip_ids; |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 196 | |
| 197 | for (auto& chip : chips_) { |
| 198 | ChipId chip_id = getChipIdFromWifiChip(chip); |
| 199 | if (chip_id != UINT32_MAX) chip_ids.emplace_back(chip_id); |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 200 | } |
| 201 | return {createWifiStatus(WifiStatusCode::SUCCESS), std::move(chip_ids)}; |
Roshan Pius | cd566bd | 2016-10-10 08:03:42 -0700 | [diff] [blame] | 202 | } |
| 203 | |
Jimmy Chen | d460df3 | 2019-11-29 17:31:22 +0200 | [diff] [blame] | 204 | std::pair<WifiStatus, sp<V1_4::IWifiChip>> Wifi::getChipInternal( |
| 205 | ChipId chip_id) { |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 206 | for (auto& chip : chips_) { |
| 207 | ChipId cand_id = getChipIdFromWifiChip(chip); |
| 208 | if ((cand_id != UINT32_MAX) && (cand_id == chip_id)) |
| 209 | return {createWifiStatus(WifiStatusCode::SUCCESS), chip}; |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 210 | } |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 211 | |
| 212 | return {createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS), nullptr}; |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 213 | } |
Roshan Pius | 52947fb | 2016-11-18 11:38:07 -0800 | [diff] [blame] | 214 | |
Roshan Pius | 8fc6d17 | 2017-11-27 16:08:27 -0800 | [diff] [blame] | 215 | WifiStatus Wifi::initializeModeControllerAndLegacyHal() { |
| 216 | if (!mode_controller_->initialize()) { |
| 217 | LOG(ERROR) << "Failed to initialize firmware mode controller"; |
| 218 | return createWifiStatus(WifiStatusCode::ERROR_UNKNOWN); |
| 219 | } |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 220 | |
| 221 | legacy_hals_ = legacy_hal_factory_->getHals(); |
| 222 | if (legacy_hals_.empty()) |
| 223 | return createWifiStatus(WifiStatusCode::ERROR_UNKNOWN); |
| 224 | int index = 0; // for failure log |
| 225 | for (auto& hal : legacy_hals_) { |
| 226 | legacy_hal::wifi_error legacy_status = hal->initialize(); |
| 227 | if (legacy_status != legacy_hal::WIFI_SUCCESS) { |
| 228 | // Currently WifiLegacyHal::initialize does not allocate extra mem, |
| 229 | // only initializes the function table. If this changes, need to |
| 230 | // implement WifiLegacyHal::deinitialize and deinitalize the |
| 231 | // HALs already initialized |
| 232 | LOG(ERROR) << "Failed to initialize legacy HAL index: " << index |
| 233 | << " error: " << legacyErrorToString(legacy_status); |
| 234 | return createWifiStatusFromLegacyError(legacy_status); |
| 235 | } |
| 236 | index++; |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 237 | } |
| 238 | return createWifiStatus(WifiStatusCode::SUCCESS); |
Roshan Pius | 52947fb | 2016-11-18 11:38:07 -0800 | [diff] [blame] | 239 | } |
| 240 | |
Roshan Pius | 155344b | 2017-08-11 15:47:42 -0700 | [diff] [blame] | 241 | WifiStatus Wifi::stopLegacyHalAndDeinitializeModeController( |
| 242 | /* NONNULL */ std::unique_lock<std::recursive_mutex>* lock) { |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 243 | legacy_hal::wifi_error legacy_status = legacy_hal::WIFI_SUCCESS; |
| 244 | int index = 0; |
| 245 | |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 246 | run_state_ = RunState::STOPPING; |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 247 | for (auto& hal : legacy_hals_) { |
| 248 | legacy_hal::wifi_error tmp = hal->stop(lock, [&]() {}); |
| 249 | if (tmp != legacy_hal::WIFI_SUCCESS) { |
| 250 | LOG(ERROR) << "Failed to stop legacy HAL index: " << index |
| 251 | << " error: " << legacyErrorToString(legacy_status); |
| 252 | legacy_status = tmp; |
| 253 | } |
| 254 | index++; |
| 255 | } |
| 256 | run_state_ = RunState::STOPPED; |
| 257 | |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 258 | if (legacy_status != legacy_hal::WIFI_SUCCESS) { |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 259 | LOG(ERROR) << "One or more legacy HALs failed to stop"; |
Roshan Pius | abcf78f | 2017-10-06 16:30:38 -0700 | [diff] [blame] | 260 | return createWifiStatusFromLegacyError(legacy_status); |
| 261 | } |
| 262 | if (!mode_controller_->deinitialize()) { |
| 263 | LOG(ERROR) << "Failed to deinitialize firmware mode controller"; |
| 264 | return createWifiStatus(WifiStatusCode::ERROR_UNKNOWN); |
| 265 | } |
| 266 | return createWifiStatus(WifiStatusCode::SUCCESS); |
Roshan Pius | 52947fb | 2016-11-18 11:38:07 -0800 | [diff] [blame] | 267 | } |
Jimmy Chen | 2dddd79 | 2019-12-23 17:50:39 +0200 | [diff] [blame^] | 268 | |
| 269 | ChipId Wifi::getChipIdFromWifiChip(sp<WifiChip>& chip) { |
| 270 | ChipId chip_id = UINT32_MAX; |
| 271 | if (chip.get()) { |
| 272 | chip->getId([&](WifiStatus status, uint32_t id) { |
| 273 | if (status.code == WifiStatusCode::SUCCESS) { |
| 274 | chip_id = id; |
| 275 | } |
| 276 | }); |
| 277 | } |
| 278 | |
| 279 | return chip_id; |
| 280 | } |
Roshan Pius | 79a9975 | 2016-10-04 13:03:58 -0700 | [diff] [blame] | 281 | } // namespace implementation |
Jimmy Chen | d460df3 | 2019-11-29 17:31:22 +0200 | [diff] [blame] | 282 | } // namespace V1_5 |
Roshan Pius | 3c4e8a3 | 2016-10-03 14:53:58 -0700 | [diff] [blame] | 283 | } // namespace wifi |
| 284 | } // namespace hardware |
| 285 | } // namespace android |