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: Oleh Cherpak <oleh.cherpak@globallogic.com>
Change-Id: Ife6e09e41ccfd6c3ccbdc19394175d17986d310d
Merged-In: Ife6e09e41ccfd6c3ccbdc19394175d17986d310d
This commit is contained in:
Oleh Cherpak
2020-02-04 15:36:50 +02:00
committed by Roshan Pius
parent 09f373d6c1
commit 31c434b96c

View File

@@ -58,11 +58,14 @@ void initilializeDriverAndFirmware(const std::string& wifi_instance_name) {
if (wifi_instance_name == "") {
return;
}
sp<IWifiChip> wifi_chip = getWifiChip(wifi_instance_name);
ChipModeId mode_id;
EXPECT_TRUE(configureChipToSupportIfaceType(
wifi_chip, ::android::hardware::wifi::V1_0::IfaceType::STA, &mode_id));
if (getWifi(wifi_instance_name) != nullptr) {
sp<IWifiChip> wifi_chip = getWifiChip(wifi_instance_name);
ChipModeId mode_id;
EXPECT_TRUE(configureChipToSupportIfaceType(
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
@@ -72,8 +75,11 @@ void deInitilializeDriverAndFirmware(const std::string& wifi_instance_name) {
if (wifi_instance_name == "") {
return;
}
stopWifi(wifi_instance_name);
if (getWifi(wifi_instance_name) != nullptr) {
stopWifi(wifi_instance_name);
} else {
LOG(WARNING) << __func__ << ": Vendor HAL not supported";
}
}
// Helper function to find any iface of the desired type exposed.