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

Commit 7d0bd186 authored by Ahmed ElArabawy's avatar Ahmed ElArabawy Committed by android-build-merger
Browse files

Merge "WiFi: Wait for driver to be ready before operation" into pi-dev

am: ac2f4418

Change-Id: I45c64098fc5ded3c16a1f7bc24e71c577bd008f1
parents 7ce6e7c7 ac2f4418
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -360,12 +360,18 @@ wifi_error WifiLegacyHal::start() {
        LOG(DEBUG) << "Legacy HAL already started";
        return WIFI_SUCCESS;
    }
    LOG(DEBUG) << "Waiting for the driver ready";
    wifi_error status = global_func_table_.wifi_wait_for_driver_ready();
    if (status == WIFI_ERROR_TIMED_OUT) {
        LOG(ERROR) << "Timed out awaiting driver ready";
        return status;
    }
    LOG(DEBUG) << "Starting legacy HAL";
    if (!iface_tool_.SetWifiUpState(true)) {
        LOG(ERROR) << "Failed to set WiFi interface up";
        return WIFI_ERROR_UNKNOWN;
    }
    wifi_error status = global_func_table_.wifi_initialize(&global_handle_);
    status = global_func_table_.wifi_initialize(&global_handle_);
    if (status != WIFI_SUCCESS || !global_handle_) {
        LOG(ERROR) << "Failed to retrieve global handle";
        return status;
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ bool initHalFuncTableWithStubs(wifi_hal_fn* hal_fn) {
        return false;
    }
    populateStubFor(&hal_fn->wifi_initialize);
    populateStubFor(&hal_fn->wifi_wait_for_driver_ready);
    populateStubFor(&hal_fn->wifi_cleanup);
    populateStubFor(&hal_fn->wifi_event_loop);
    populateStubFor(&hal_fn->wifi_get_error_info);