From 533a44d0968a032ebed86c99a63e633c2ed25b2f Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Wed, 23 Sep 2020 22:04:28 +0000 Subject: [PATCH] Revert "wifi: remove wifi instance name string check" This reverts commit 1c50a59eae395bdd4c08b72a0edefbb83dbb194b. Reason for revert: This was not needed. Does not fix the issue at hand. Bug: 161951052 Test: atest VtsHalWifiSupplicantV1_1TargetTest Change-Id: I872a1b3e87f17a43eb3c22c930e916c7e5e2d2a6 --- .../1.0/vts/functional/supplicant_hidl_test_utils.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp index da3996b80e..be6aad9583 100644 --- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp +++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp @@ -52,6 +52,10 @@ namespace { // Helper function to initialize the driver and firmware to STA mode // using the vendor HAL HIDL interface. void initilializeDriverAndFirmware(const std::string& wifi_instance_name) { + // Skip if wifi instance is not set. + if (wifi_instance_name == "") { + return; + } if (getWifi(wifi_instance_name) != nullptr) { sp wifi_chip = getWifiChip(wifi_instance_name); ChipModeId mode_id; @@ -65,6 +69,10 @@ void initilializeDriverAndFirmware(const std::string& wifi_instance_name) { // Helper function to deinitialize the driver and firmware // using the vendor HAL HIDL interface. void deInitilializeDriverAndFirmware(const std::string& wifi_instance_name) { + // Skip if wifi instance is not set. + if (wifi_instance_name == "") { + return; + } if (getWifi(wifi_instance_name) != nullptr) { stopWifi(wifi_instance_name); } else {