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

Commit 31c434b9 authored by Oleh Cherpak's avatar Oleh Cherpak Committed by Roshan Pius
Browse files

vts: supplicant: Remove optional service registration



Wifi VendorHAL is optional for STA mode to function.
Tests should be runnable even on devices without VendorHAL.

Bug: 148883970
Bug: 158343746
Test: run vts -m VtsHalWifiSupplicantV1_0Host

Signed-off-by: default avatarOleh Cherpak <oleh.cherpak@globallogic.com>
Change-Id: Ife6e09e41ccfd6c3ccbdc19394175d17986d310d
Merged-In: Ife6e09e41ccfd6c3ccbdc19394175d17986d310d
parent 09f373d6
Loading
Loading
Loading
Loading
+13 −7
Original line number Original line Diff line number Diff line
@@ -58,11 +58,14 @@ void initilializeDriverAndFirmware(const std::string& wifi_instance_name) {
    if (wifi_instance_name == "") {
    if (wifi_instance_name == "") {
        return;
        return;
    }
    }

    if (getWifi(wifi_instance_name) != nullptr) {
        sp<IWifiChip> wifi_chip = getWifiChip(wifi_instance_name);
        sp<IWifiChip> wifi_chip = getWifiChip(wifi_instance_name);
        ChipModeId mode_id;
        ChipModeId mode_id;
        EXPECT_TRUE(configureChipToSupportIfaceType(
        EXPECT_TRUE(configureChipToSupportIfaceType(
            wifi_chip, ::android::hardware::wifi::V1_0::IfaceType::STA, &mode_id));
            wifi_chip, ::android::hardware::wifi::V1_0::IfaceType::STA, &mode_id));
    } else {
        LOG(WARNING) << __func__ << ": Vendor HAL not supported";
    }
}
}


// Helper function to deinitialize the driver and firmware
// Helper function to deinitialize the driver and firmware
@@ -72,8 +75,11 @@ void deInitilializeDriverAndFirmware(const std::string& wifi_instance_name) {
    if (wifi_instance_name == "") {
    if (wifi_instance_name == "") {
        return;
        return;
    }
    }

    if (getWifi(wifi_instance_name) != nullptr) {
        stopWifi(wifi_instance_name);
        stopWifi(wifi_instance_name);
    } else {
        LOG(WARNING) << __func__ << ": Vendor HAL not supported";
    }
}
}


// Helper function to find any iface of the desired type exposed.
// Helper function to find any iface of the desired type exposed.