mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:23:37 +00:00
Merge changes I71097c3a,I872a1b3e
* changes: supplicant(vts): Stop adding empty instance for vendor HAL Revert "wifi: remove wifi instance name string check"
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -33,6 +33,7 @@ using ::android::hardware::wifi::supplicant::V1_0::SupplicantStatus;
|
||||
using ::android::hardware::wifi::supplicant::V1_0::SupplicantStatusCode;
|
||||
using ::android::hardware::wifi::supplicant::V1_0::IfaceType;
|
||||
using ::android::hardware::wifi::supplicant::V1_1::ISupplicant;
|
||||
using ::android::hardware::wifi::V1_0::IWifi;
|
||||
using ::android::sp;
|
||||
|
||||
class SupplicantHidlTest : public SupplicantHidlTestBaseV1_1 {
|
||||
@@ -139,21 +140,12 @@ TEST_P(SupplicantHidlTest, RemoveP2pInterface) {
|
||||
*/
|
||||
TEST_P(SupplicantHidlTest, Terminate) { supplicant_->terminate(); }
|
||||
|
||||
static std::vector<std::string> get_wifi_instances() {
|
||||
std::vector<std::string> instances =
|
||||
android::hardware::getAllHalInstanceNames(
|
||||
android::hardware::wifi::V1_0::IWifi::descriptor);
|
||||
// Also test when wifi instance is not set.
|
||||
instances.push_back("");
|
||||
|
||||
return instances;
|
||||
}
|
||||
|
||||
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(SupplicantHidlTest);
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
PerInstance, SupplicantHidlTest,
|
||||
testing::Combine(
|
||||
testing::ValuesIn(get_wifi_instances()),
|
||||
testing::ValuesIn(
|
||||
android::hardware::getAllHalInstanceNames(IWifi::descriptor)),
|
||||
testing::ValuesIn(android::hardware::getAllHalInstanceNames(
|
||||
android::hardware::wifi::supplicant::V1_1::ISupplicant::
|
||||
descriptor))),
|
||||
|
||||
Reference in New Issue
Block a user