Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 633e2d84 authored by Etan Cohen's avatar Etan Cohen Committed by android-build-merger
Browse files

Merge "[HAL] Invalidate chip before shutting down legacy HAL" into oc-mr1-dev am: 3aae4079

am: b7ca25ca

Change-Id: Icb13337f8e04f2326607f860978ba2b45c5932cc
parents 9456f67b b7ca25ca
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -126,6 +126,12 @@ WifiStatus Wifi::stopInternal() {
    return createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE,
                            "HAL is stopping");
  }
  // Clear the chip object and its child objects since the HAL is now
  // stopped.
  if (chip_.get()) {
    chip_->invalidate();
    chip_.clear();
  }
  WifiStatus wifi_status = stopLegacyHalAndDeinitializeModeController();
  if (wifi_status.code == WifiStatusCode::SUCCESS) {
    for (const auto& callback : event_cb_handler_.getCallbacks()) {
@@ -140,12 +146,6 @@ WifiStatus Wifi::stopInternal() {
      }
    }
  }
  // Clear the chip object and its child objects since the HAL is now
  // stopped.
  if (chip_.get()) {
    chip_->invalidate();
    chip_.clear();
  }
  LOG(INFO) << "Wifi HAL stopped";
  return wifi_status;
}