Revert "wifi: remove wifi instance name string check"

This reverts commit 1c50a59eae.

Reason for revert: This was not needed. Does not fix the issue at hand.
Bug: 161951052
Test: atest VtsHalWifiSupplicantV1_1TargetTest

Change-Id: I872a1b3e87f17a43eb3c22c930e916c7e5e2d2a6
This commit is contained in:
Roshan Pius 2020-09-23 22:04:28 +00:00
parent 0cd6bffb74
commit 533a44d096

View file

@ -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<IWifiChip> 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 {