1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <VtsCoreUtil.h>
18 
19 #include <android-base/logging.h>
20 #include <cutils/properties.h>
21 
22 #include <gtest/gtest.h>
23 #include <hidl/GtestPrinter.h>
24 #include <hidl/ServiceManagement.h>
25 
26 #include <android/hardware/wifi/1.0/IWifi.h>
27 #include <android/hardware/wifi/hostapd/1.2/IHostapd.h>
28 #include <android/hardware/wifi/hostapd/1.3/IHostapd.h>
29 
30 #include "hostapd_hidl_call_util.h"
31 #include "hostapd_hidl_test_utils.h"
32 
33 using ::android::sp;
34 using ::android::hardware::hidl_string;
35 using ::android::hardware::Return;
36 using ::android::hardware::Void;
37 using ::android::hardware::wifi::hostapd::V1_2::DebugLevel;
38 using ::android::hardware::wifi::hostapd::V1_2::HostapdStatusCode;
39 using ::android::hardware::wifi::hostapd::V1_2::Ieee80211ReasonCode;
40 using ::android::hardware::wifi::hostapd::V1_2::IHostapd;
41 using ::android::hardware::wifi::V1_0::IWifi;
42 
43 namespace {
44 constexpr unsigned char kNwSsid[] = {'t', 'e', 's', 't', '1',
45                                      '2', '3', '4', '5'};
46 constexpr char kNwPassphrase[] = "test12345";
47 constexpr char kInvalidMaxPskNwPassphrase[] =
48     "0123456789012345678901234567890123456789012345678901234567890123456789";
49 constexpr char kInvalidMinPskNwPassphrase[] = "test";
50 constexpr int kIfaceChannel = 6;
51 constexpr int kIfaceInvalidChannel = 567;
52 constexpr uint8_t kTestZeroMacAddr[] = {[0 ... 5] = 0x0};
53 constexpr Ieee80211ReasonCode kTestDisconnectReasonCode =
54     Ieee80211ReasonCode::WLAN_REASON_UNSPECIFIED;
55 }  // namespace
56 
57 class HostapdHidlTest
58     : public ::testing::TestWithParam<std::tuple<std::string, std::string>> {
59    public:
SetUp()60     virtual void SetUp() override {
61         wifi_instance_name_ = std::get<0>(GetParam());
62         hostapd_instance_name_ = std::get<1>(GetParam());
63         stopSupplicantIfNeeded(wifi_instance_name_);
64         startHostapdAndWaitForHidlService(wifi_instance_name_,
65                                           hostapd_instance_name_);
66         hostapd_ = IHostapd::getService(hostapd_instance_name_);
67         ASSERT_NE(hostapd_.get(), nullptr);
68         isAcsSupport_ = testing::checkSubstringInCommandOutput(
69             "/system/bin/cmd wifi get-softap-supported-features",
70             "wifi_softap_acs_supported");
71         isWpa3SaeSupport_ = testing::checkSubstringInCommandOutput(
72             "/system/bin/cmd wifi get-softap-supported-features",
73             "wifi_softap_wpa3_sae_supported");
74     }
75 
TearDown()76     virtual void TearDown() override {
77         HIDL_INVOKE_VOID_WITHOUT_ARGUMENTS(hostapd_, terminate);
78         stopHostapd(wifi_instance_name_);
79     }
80 
81    protected:
82     bool isWpa3SaeSupport_ = false;
83     bool isAcsSupport_ = false;
getPrimaryWlanIfaceName()84     std::string getPrimaryWlanIfaceName() {
85         std::array<char, PROPERTY_VALUE_MAX> buffer;
86         auto res = property_get("ro.vendor.wifi.sap.interface", buffer.data(),
87                                 nullptr);
88         if (res > 0) return buffer.data();
89         property_get("wifi.interface", buffer.data(), "wlan0");
90         return buffer.data();
91     }
92 
getIfaceParamsWithoutAcs()93     IHostapd::IfaceParams getIfaceParamsWithoutAcs() {
94         ::android::hardware::wifi::hostapd::V1_0::IHostapd::IfaceParams
95             iface_params;
96         ::android::hardware::wifi::hostapd::V1_1::IHostapd::IfaceParams
97             iface_params_1_1;
98         IHostapd::IfaceParams iface_params_1_2;
99 
100         iface_params.ifaceName = getPrimaryWlanIfaceName();
101         iface_params.hwModeParams.enable80211N = true;
102         iface_params.hwModeParams.enable80211AC = false;
103         iface_params.channelParams.enableAcs = false;
104         iface_params.channelParams.acsShouldExcludeDfs = false;
105         iface_params.channelParams.channel = kIfaceChannel;
106         iface_params_1_1.V1_0 = iface_params;
107         iface_params_1_2.V1_1 = iface_params_1_1;
108         // Newly added attributes in V1_2
109         iface_params_1_2.hwModeParams.enable80211AX = false;
110         iface_params_1_2.hwModeParams.enable6GhzBand = false;
111         iface_params_1_2.channelParams.bandMask = 0;
112         iface_params_1_2.channelParams.bandMask |=
113             IHostapd::BandMask::BAND_2_GHZ;
114         return iface_params_1_2;
115     }
116 
getIfaceParamsWithAcs()117     IHostapd::IfaceParams getIfaceParamsWithAcs() {
118         // First get the settings for WithoutAcs and then make changes
119         IHostapd::IfaceParams iface_params_1_2 = getIfaceParamsWithoutAcs();
120         iface_params_1_2.V1_1.V1_0.channelParams.enableAcs = true;
121         iface_params_1_2.V1_1.V1_0.channelParams.acsShouldExcludeDfs = true;
122         iface_params_1_2.V1_1.V1_0.channelParams.channel = 0;
123         iface_params_1_2.channelParams.bandMask |=
124             IHostapd::BandMask::BAND_5_GHZ;
125 
126         return iface_params_1_2;
127     }
128 
getIfaceParamsWithAcsAndFreqRange()129     IHostapd::IfaceParams getIfaceParamsWithAcsAndFreqRange() {
130         IHostapd::IfaceParams iface_params_1_2 = getIfaceParamsWithAcs();
131         ::android::hardware::wifi::hostapd::V1_2::IHostapd::AcsFrequencyRange
132             acsFrequencyRange;
133         acsFrequencyRange.start = 2412;
134         acsFrequencyRange.end = 2462;
135         std::vector<::android::hardware::wifi::hostapd::V1_2::IHostapd::
136                         AcsFrequencyRange>
137             vec_acsFrequencyRange;
138         vec_acsFrequencyRange.push_back(acsFrequencyRange);
139         iface_params_1_2.channelParams.acsChannelFreqRangesMhz =
140             vec_acsFrequencyRange;
141         return iface_params_1_2;
142     }
143 
getIfaceParamsWithAcsAndInvalidFreqRange()144     IHostapd::IfaceParams getIfaceParamsWithAcsAndInvalidFreqRange() {
145         IHostapd::IfaceParams iface_params_1_2 =
146             getIfaceParamsWithAcsAndFreqRange();
147         iface_params_1_2.channelParams.acsChannelFreqRangesMhz[0].start = 222;
148         iface_params_1_2.channelParams.acsChannelFreqRangesMhz[0].end = 999;
149         return iface_params_1_2;
150     }
151 
getOpenNwParams()152     IHostapd::NetworkParams getOpenNwParams() {
153         IHostapd::NetworkParams nw_params_1_2;
154         ::android::hardware::wifi::hostapd::V1_0::IHostapd::NetworkParams
155             nw_params_1_0;
156         nw_params_1_0.ssid =
157             std::vector<uint8_t>(kNwSsid, kNwSsid + sizeof(kNwSsid));
158         nw_params_1_0.isHidden = false;
159         nw_params_1_2.V1_0 = nw_params_1_0;
160         nw_params_1_2.encryptionType = IHostapd::EncryptionType::NONE;
161         return nw_params_1_2;
162     }
163 
getPskNwParams()164     IHostapd::NetworkParams getPskNwParams() {
165         IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
166         nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA2;
167         nw_params_1_2.passphrase = kNwPassphrase;
168         return nw_params_1_2;
169     }
170 
getInvalidPskNwParams()171     IHostapd::NetworkParams getInvalidPskNwParams() {
172         IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
173         nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA2;
174         nw_params_1_2.passphrase = kInvalidMaxPskNwPassphrase;
175 
176         return nw_params_1_2;
177     }
178 
getSaeTransitionNwParams()179     IHostapd::NetworkParams getSaeTransitionNwParams() {
180         IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
181         nw_params_1_2.encryptionType =
182             IHostapd::EncryptionType::WPA3_SAE_TRANSITION;
183         nw_params_1_2.passphrase = kNwPassphrase;
184         return nw_params_1_2;
185     }
186 
getInvalidSaeTransitionNwParams()187     IHostapd::NetworkParams getInvalidSaeTransitionNwParams() {
188         IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
189         nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA2;
190         nw_params_1_2.passphrase = kInvalidMinPskNwPassphrase;
191         return nw_params_1_2;
192     }
193 
getSaeNwParams()194     IHostapd::NetworkParams getSaeNwParams() {
195         IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
196         nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA3_SAE;
197         nw_params_1_2.passphrase = kNwPassphrase;
198         return nw_params_1_2;
199     }
200 
getInvalidSaeNwParams()201     IHostapd::NetworkParams getInvalidSaeNwParams() {
202         IHostapd::NetworkParams nw_params_1_2 = getOpenNwParams();
203         nw_params_1_2.encryptionType = IHostapd::EncryptionType::WPA3_SAE;
204         nw_params_1_2.passphrase = "";
205         return nw_params_1_2;
206     }
207 
getIfaceParamsWithInvalidChannel()208     IHostapd::IfaceParams getIfaceParamsWithInvalidChannel() {
209         IHostapd::IfaceParams iface_params_1_2 = getIfaceParamsWithoutAcs();
210         iface_params_1_2.V1_1.V1_0.channelParams.channel = kIfaceInvalidChannel;
211         return iface_params_1_2;
212     }
213 
214     // IHostapd object used for all tests in this fixture.
215     sp<IHostapd> hostapd_;
216     std::string wifi_instance_name_;
217     std::string hostapd_instance_name_;
218 };
219 
is_1_3(const sp<IHostapd> & hostapd)220 bool is_1_3(const sp<IHostapd>& hostapd) {
221     sp<::android::hardware::wifi::hostapd::V1_3::IHostapd> hostapd_1_3 =
222         ::android::hardware::wifi::hostapd::V1_3::IHostapd::castFrom(hostapd);
223     return hostapd_1_3.get() != nullptr;
224 }
225 
226 /**
227  * Adds an access point with PSK network config & ACS enabled.
228  * Access point creation should pass.
229  */
TEST_P(HostapdHidlTest,AddPskAccessPointWithAcs)230 TEST_P(HostapdHidlTest, AddPskAccessPointWithAcs) {
231     if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
232     if (is_1_3(hostapd_))
233         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
234     auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
235                               getIfaceParamsWithAcs(), getPskNwParams());
236     EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
237 }
238 
239 /**
240  * Adds an access point with PSK network config, ACS enabled & frequency Range.
241  * Access point creation should pass.
242  */
TEST_P(HostapdHidlTest,AddPskAccessPointWithAcsAndFreqRange)243 TEST_P(HostapdHidlTest, AddPskAccessPointWithAcsAndFreqRange) {
244     if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
245     if (is_1_3(hostapd_))
246         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
247     auto status =
248         HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
249                     getIfaceParamsWithAcsAndFreqRange(), getPskNwParams());
250     EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
251 }
252 
253 /**
254  * Adds an access point with invalid channel range.
255  * Access point creation should fail.
256  */
TEST_P(HostapdHidlTest,AddPskAccessPointWithAcsAndInvalidFreqRange)257 TEST_P(HostapdHidlTest, AddPskAccessPointWithAcsAndInvalidFreqRange) {
258     if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
259     if (is_1_3(hostapd_))
260         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
261     auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
262                               getIfaceParamsWithAcsAndInvalidFreqRange(),
263                               getPskNwParams());
264     EXPECT_NE(HostapdStatusCode::SUCCESS, status.code);
265 }
266 
267 /**
268  * Adds an access point with Open network config & ACS enabled.
269  * Access point creation should pass.
270  */
TEST_P(HostapdHidlTest,AddOpenAccessPointWithAcs)271 TEST_P(HostapdHidlTest, AddOpenAccessPointWithAcs) {
272     if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
273     if (is_1_3(hostapd_))
274         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
275     auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
276                               getIfaceParamsWithAcs(), getOpenNwParams());
277     EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
278 }
279 
280 /**
281  * Adds an access point with PSK network config & ACS disabled.
282  * Access point creation should pass.
283  */
TEST_P(HostapdHidlTest,AddPskAccessPointWithoutAcs)284 TEST_P(HostapdHidlTest, AddPskAccessPointWithoutAcs) {
285     if (is_1_3(hostapd_))
286         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
287     auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
288                               getIfaceParamsWithoutAcs(), getPskNwParams());
289     EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
290 }
291 
292 /**
293  * Adds an access point with Open network config & ACS disabled.
294  * Access point creation should pass.
295  */
TEST_P(HostapdHidlTest,AddOpenAccessPointWithoutAcs)296 TEST_P(HostapdHidlTest, AddOpenAccessPointWithoutAcs) {
297     if (is_1_3(hostapd_))
298         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
299     auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
300                               getIfaceParamsWithoutAcs(), getOpenNwParams());
301     EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
302 }
303 
304 /**
305  * Adds an access point with SAE Transition network config & ACS disabled.
306  * Access point creation should pass.
307  */
TEST_P(HostapdHidlTest,AddSaeTransitionAccessPointWithoutAcs)308 TEST_P(HostapdHidlTest, AddSaeTransitionAccessPointWithoutAcs) {
309     if (!isWpa3SaeSupport_) GTEST_SKIP() << "Missing SAE support";
310     if (is_1_3(hostapd_))
311         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
312     auto status =
313         HIDL_INVOKE(hostapd_, addAccessPoint_1_2, getIfaceParamsWithoutAcs(),
314                     getSaeTransitionNwParams());
315     EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
316 }
317 
318 /**
319  * Adds an access point with SAE network config & ACS disabled.
320  * Access point creation should pass.
321  */
TEST_P(HostapdHidlTest,AddSAEAccessPointWithoutAcs)322 TEST_P(HostapdHidlTest, AddSAEAccessPointWithoutAcs) {
323     if (!isWpa3SaeSupport_) GTEST_SKIP() << "Missing SAE support";
324     if (is_1_3(hostapd_))
325         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
326     auto status = HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
327                               getIfaceParamsWithoutAcs(), getSaeNwParams());
328     EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
329 }
330 
331 /**
332  * Adds & then removes an access point with PSK network config & ACS enabled.
333  * Access point creation & removal should pass.
334  */
TEST_P(HostapdHidlTest,RemoveAccessPointWithAcs)335 TEST_P(HostapdHidlTest, RemoveAccessPointWithAcs) {
336     if (!isAcsSupport_) GTEST_SKIP() << "Missing ACS support";
337     if (is_1_3(hostapd_))
338         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
339     auto status_1_2 = HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
340                                   getIfaceParamsWithAcs(), getPskNwParams());
341     EXPECT_EQ(HostapdStatusCode::SUCCESS, status_1_2.code);
342     auto status =
343         HIDL_INVOKE(hostapd_, removeAccessPoint, getPrimaryWlanIfaceName());
344     EXPECT_EQ(
345         android::hardware::wifi::hostapd::V1_0::HostapdStatusCode::SUCCESS,
346         status.code);
347 }
348 
349 /**
350  * Adds & then removes an access point with PSK network config & ACS disabled.
351  * Access point creation & removal should pass.
352  */
TEST_P(HostapdHidlTest,RemoveAccessPointWithoutAcs)353 TEST_P(HostapdHidlTest, RemoveAccessPointWithoutAcs) {
354     if (is_1_3(hostapd_))
355         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
356     auto status_1_2 = HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
357                                   getIfaceParamsWithoutAcs(), getPskNwParams());
358     EXPECT_EQ(HostapdStatusCode::SUCCESS, status_1_2.code);
359     auto status =
360         HIDL_INVOKE(hostapd_, removeAccessPoint, getPrimaryWlanIfaceName());
361     EXPECT_EQ(
362         android::hardware::wifi::hostapd::V1_0::HostapdStatusCode::SUCCESS,
363         status.code);
364 }
365 
366 /**
367  * Adds an access point with invalid channel.
368  * Access point creation should fail.
369  */
TEST_P(HostapdHidlTest,AddPskAccessPointWithInvalidChannel)370 TEST_P(HostapdHidlTest, AddPskAccessPointWithInvalidChannel) {
371     if (is_1_3(hostapd_))
372         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
373     auto status =
374         HIDL_INVOKE(hostapd_, addAccessPoint_1_2,
375                     getIfaceParamsWithInvalidChannel(), getPskNwParams());
376     EXPECT_NE(HostapdStatusCode::SUCCESS, status.code);
377 }
378 
379 /**
380  * Adds an access point with invalid PSK network config.
381  * Access point creation should fail.
382  */
TEST_P(HostapdHidlTest,AddInvalidPskAccessPointWithoutAcs)383 TEST_P(HostapdHidlTest, AddInvalidPskAccessPointWithoutAcs) {
384     if (is_1_3(hostapd_))
385         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
386     auto status =
387         HIDL_INVOKE(hostapd_, addAccessPoint_1_2, getIfaceParamsWithoutAcs(),
388                     getInvalidPskNwParams());
389     EXPECT_NE(HostapdStatusCode::SUCCESS, status.code);
390 }
391 
392 /**
393  * Adds an access point with invalid SAE transition network config.
394  * Access point creation should fail.
395  */
TEST_P(HostapdHidlTest,AddInvalidSaeTransitionAccessPointWithoutAcs)396 TEST_P(HostapdHidlTest, AddInvalidSaeTransitionAccessPointWithoutAcs) {
397     if (!isWpa3SaeSupport_) GTEST_SKIP() << "Missing SAE support";
398     if (is_1_3(hostapd_))
399         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
400     auto status =
401         HIDL_INVOKE(hostapd_, addAccessPoint_1_2, getIfaceParamsWithoutAcs(),
402                     getInvalidSaeTransitionNwParams());
403     EXPECT_NE(HostapdStatusCode::SUCCESS, status.code);
404 }
405 
406 /**
407  * Adds an access point with invalid SAE network config.
408  * Access point creation should fail.
409  */
TEST_P(HostapdHidlTest,AddInvalidSaeAccessPointWithoutAcs)410 TEST_P(HostapdHidlTest, AddInvalidSaeAccessPointWithoutAcs) {
411     if (!isWpa3SaeSupport_) GTEST_SKIP() << "Missing SAE support";
412     if (is_1_3(hostapd_))
413         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
414     auto status =
415         HIDL_INVOKE(hostapd_, addAccessPoint_1_2, getIfaceParamsWithoutAcs(),
416                     getInvalidSaeNwParams());
417     EXPECT_NE(HostapdStatusCode::SUCCESS, status.code);
418 }
419 
420 /**
421  * forceClientDisconnect should return FAILURE_IFACE_UNKNOWN
422  * when hotspot interface doesn't init..
423  */
TEST_P(HostapdHidlTest,DisconnectClientWhenIfaceNotAvailable)424 TEST_P(HostapdHidlTest, DisconnectClientWhenIfaceNotAvailable) {
425     auto status =
426         HIDL_INVOKE(hostapd_, forceClientDisconnect, getPrimaryWlanIfaceName(),
427                     kTestZeroMacAddr, kTestDisconnectReasonCode);
428     EXPECT_EQ(HostapdStatusCode::FAILURE_IFACE_UNKNOWN, status.code);
429 }
430 
431 /**
432  * forceClientDisconnect should return FAILURE_CLIENT_UNKNOWN
433  * when hotspot interface available.
434  */
TEST_P(HostapdHidlTest,DisconnectClientWhenIfacAvailable)435 TEST_P(HostapdHidlTest, DisconnectClientWhenIfacAvailable) {
436     if (is_1_3(hostapd_))
437         GTEST_SKIP() << "Ignore addAccessPoint_1_2 on hostapd 1_3";
438     auto status_1_2 =
439         HIDL_INVOKE(hostapd_, addAccessPoint_1_2, getIfaceParamsWithoutAcs(),
440                     getOpenNwParams());
441     EXPECT_EQ(HostapdStatusCode::SUCCESS, status_1_2.code);
442 
443     status_1_2 =
444         HIDL_INVOKE(hostapd_, forceClientDisconnect, getPrimaryWlanIfaceName(),
445                     kTestZeroMacAddr, kTestDisconnectReasonCode);
446     EXPECT_EQ(HostapdStatusCode::FAILURE_CLIENT_UNKNOWN, status_1_2.code);
447 }
448 
449 /*
450  * SetDebugParams
451  */
TEST_P(HostapdHidlTest,SetDebugParams)452 TEST_P(HostapdHidlTest, SetDebugParams) {
453     auto status = HIDL_INVOKE(hostapd_, setDebugParams, DebugLevel::EXCESSIVE);
454     EXPECT_EQ(HostapdStatusCode::SUCCESS, status.code);
455 }
456 
457 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(HostapdHidlTest);
458 INSTANTIATE_TEST_CASE_P(
459     PerInstance, HostapdHidlTest,
460     testing::Combine(
461         testing::ValuesIn(
462             android::hardware::getAllHalInstanceNames(IWifi::descriptor)),
463         testing::ValuesIn(android::hardware::getAllHalInstanceNames(
464             android::hardware::wifi::hostapd::V1_2::IHostapd::descriptor))),
465     android::hardware::PrintInstanceTupleNameToString<>);
466