blob: 7f92e27643c24bed242c02c88a0dc9c9c63321e1 [file] [log] [blame]
Bindu Mahadev27c2d292018-03-19 16:13:08 -07001#!/usr/bin/env python3.4
2#
3# Copyright 2018 - The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17import itertools
18import pprint
19import queue
20import sys
21import time
22
23import acts.base_test
24import acts.signals as signals
25import acts.test_utils.wifi.wifi_test_utils as wutils
26import acts.utils as utils
27
28from acts import asserts
29from acts.controllers.ap_lib import hostapd_constants
30from acts.test_decorators import test_tracker_info
31from acts.test_utils.tel.tel_test_utils import WIFI_CONFIG_APBAND_2G
32from acts.test_utils.tel.tel_test_utils import WIFI_CONFIG_APBAND_5G
33from acts.test_utils.wifi.WifiBaseTest import WifiBaseTest
34from threading import Thread
35
36WifiEnums = wutils.WifiEnums
37WIFI_CONFIG_APBAND_AUTO = -1
38
39class WifiSoftApAcsTest(WifiBaseTest):
40 """Tests for Automatic Channel Selection.
41
42 Test Bed Requirement:
43 * Two Android devices and an AP.
44 * 2GHz and 5GHz Wi-Fi network visible to the device.
45 """
46
Bindu Mahadev27c2d292018-03-19 16:13:08 -070047 def setup_class(self):
Xianyuan Jia168103b2019-09-06 12:22:52 -070048 super().setup_class()
49
Bindu Mahadev27c2d292018-03-19 16:13:08 -070050 self.dut = self.android_devices[0]
51 self.dut_client = self.android_devices[1]
52 wutils.wifi_test_device_init(self.dut)
53 wutils.wifi_test_device_init(self.dut_client)
54 utils.require_sl4a((self.dut, self.dut_client))
55 utils.sync_device_time(self.dut)
56 utils.sync_device_time(self.dut_client)
57 # Set country code explicitly to "US".
58 self.dut.droid.wifiSetCountryCode(wutils.WifiEnums.CountryCode.US)
59 self.dut_client.droid.wifiSetCountryCode(wutils.WifiEnums.CountryCode.US)
60 # Enable verbose logging on the duts
61 self.dut.droid.wifiEnableVerboseLogging(1)
62 asserts.assert_equal(self.dut.droid.wifiGetVerboseLoggingLevel(), 1,
63 "Failed to enable WiFi verbose logging on the softap dut.")
64 self.dut_client.droid.wifiEnableVerboseLogging(1)
65 asserts.assert_equal(self.dut_client.droid.wifiGetVerboseLoggingLevel(), 1,
66 "Failed to enable WiFi verbose logging on the client dut.")
67 req_params = []
Girish Moturu55e46be2019-08-16 14:42:24 -070068 opt_param = ["iperf_server_address", "reference_networks",
69 "iperf_server_port"]
Bindu Mahadev27c2d292018-03-19 16:13:08 -070070 self.unpack_userparams(
71 req_param_names=req_params, opt_param_names=opt_param)
Bindu Mahadev27c2d292018-03-19 16:13:08 -070072
73 def setup_test(self):
74 self.dut.droid.wakeLockAcquireBright()
75 self.dut.droid.wakeUpNow()
76
77 def teardown_test(self):
78 self.dut.droid.wakeLockRelease()
79 self.dut.droid.goToSleepNow()
80 wutils.stop_wifi_tethering(self.dut)
81 wutils.reset_wifi(self.dut)
82 wutils.reset_wifi(self.dut_client)
83 try:
84 if "AccessPoint" in self.user_params:
85 del self.user_params["reference_networks"]
86 del self.user_params["open_network"]
87 except:
88 pass
Bindu Mahadev0c378a52018-05-10 16:49:01 -070089 self.access_points[0].close()
Bindu Mahadev27c2d292018-03-19 16:13:08 -070090
Bindu Mahadev27c2d292018-03-19 16:13:08 -070091 def on_fail(self, test_name, begin_time):
92 self.dut.take_bug_report(test_name, begin_time)
93 self.dut.cat_adb_log(test_name, begin_time)
94
95 """Helper Functions"""
96
97 def run_iperf_client(self, params):
98 """Run iperf traffic after connection.
99
100 Args:
101 params: A tuple of network info and AndroidDevice object.
102
103 """
104 if "iperf_server_address" in self.user_params:
105 network, ad = params
106 SSID = network[WifiEnums.SSID_KEY]
107 self.log.info("Starting iperf traffic through {}".format(SSID))
Girish Moturu55e46be2019-08-16 14:42:24 -0700108 port_arg = "-p {} -t {}".format(self.iperf_server_port, 3)
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700109 success, data = ad.run_iperf_client(self.iperf_server_address,
110 port_arg)
111 self.log.debug(pprint.pformat(data))
112 asserts.assert_true(success, "Error occurred in iPerf traffic.")
113 self.log.info("Finished iperf traffic through {}".format(SSID))
114
115 def start_softap_and_verify(self, band):
116 """Bring-up softap and verify AP mode and in scan results.
117
118 Args:
119 band: The band to use for softAP.
120
121 """
122 config = wutils.create_softap_config()
123 wutils.start_wifi_tethering(self.dut,
124 config[wutils.WifiEnums.SSID_KEY],
125 config[wutils.WifiEnums.PWD_KEY], band=band)
126 asserts.assert_true(self.dut.droid.wifiIsApEnabled(),
127 "SoftAp is not reported as running")
128 wutils.start_wifi_connection_scan_and_ensure_network_found(
129 self.dut_client, config[wutils.WifiEnums.SSID_KEY])
130 return config
131
132 def get_softap_acs(self, softap):
133 """Connect to the softap on client-dut and get the softap channel
134 information.
135
136 Args:
137 softap: The softap network configuration information.
138
139 """
140 wutils.connect_to_wifi_network(self.dut_client, softap,
141 check_connectivity=False)
142 softap_info = self.dut_client.droid.wifiGetConnectionInfo()
143 self.log.debug("DUT is connected to softAP %s with details: %s" %
144 (softap[wutils.WifiEnums.SSID_KEY], softap_info))
Bindu Mahadev0c378a52018-05-10 16:49:01 -0700145 frequency = softap_info['frequency']
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700146 return hostapd_constants.CHANNEL_MAP[frequency]
147
148 def configure_ap(self, channel_2g=None, channel_5g=None):
149 """Configure and bring up AP on required channel.
150
151 Args:
152 channel_2g: The channel number to use for 2GHz network.
153 channel_5g: The channel number to use for 5GHz network.
154
155 """
156 if "AccessPoint" in self.user_params:
157 if not channel_2g:
158 self.legacy_configure_ap_and_start(channel_5g=channel_5g)
159 elif not channel_5g:
160 self.legacy_configure_ap_and_start(channel_2g=channel_2g)
161 else:
162 self.legacy_configure_ap_and_start(channel_2g=channel_2g,
163 channel_5g=chanel_5g)
164
165 def start_traffic_and_softap(self, network, softap_band):
166 """Start iPerf traffic on client dut, during softAP bring-up on dut.
167
168 Args:
169 network: Network information of the network to connect to.
170 softap_band: The band to use for softAP.
171
172 """
173 if not network:
174 # For a clean environment just bring up softap and return channel.
175 softap = self.start_softap_and_verify(softap_band)
176 channel = self.get_softap_acs(softap)
177 return channel
178 # Connect to the AP and start IPerf traffic, while we bring up softap.
179 wutils.connect_to_wifi_network(self.dut_client, network)
180 t = Thread(target=self.run_iperf_client,args=((network,self.dut_client),))
181 t.setDaemon(True)
182 t.start()
183 time.sleep(1)
184 softap = self.start_softap_and_verify(softap_band)
185 t.join()
186 channel = self.get_softap_acs(softap)
187 return channel
188
189 def verify_acs_channel(self, chan, avoid_chan):
190 """Verify ACS algorithm by ensuring that softAP came up on a channel,
191 different than the active channels.
192
193 Args:
194 chan: The channel number softap came-up on.
195 avoid_chan: The channel to avoid during this test.
196
197 """
198 if avoid_chan in range(1,12):
199 avoid_chan2 = hostapd_constants.AP_DEFAULT_CHANNEL_5G
Bindu Mahadevf014b282018-05-30 14:00:28 -0700200 elif avoid_chan in range(36, 166):
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700201 avoid_chan2 = hostapd_constants.AP_DEFAULT_CHANNEL_2G
202 if chan == avoid_chan or chan == avoid_chan2:
203 raise signals.TestFailure("ACS chose the same channel that the "
204 "AP was beaconing on. Channel = %d" % chan)
205
206 """Tests"""
207 @test_tracker_info(uuid="3507bd18-e787-4380-8725-1872916d4267")
208 def test_softap_2G_clean_env(self):
209 """Test to bring up SoftAp on 2GHz in clean environment."""
210 network = None
211 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
212 if not chan in range(1, 12):
213 raise signals.TestFailure("ACS chose incorrect channel %d for 2GHz "
214 "band" % chan)
215
216 @test_tracker_info(uuid="3d18da8b-d29a-45f9-8018-5348e10099e9")
217 def test_softap_5G_clean_env(self):
218 """Test to bring up SoftAp on 5GHz in clean environment."""
219 network = None
220 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
221 if not chan in range(36, 166):
222 # Note: This does not treat DFS channel separately.
223 raise signals.TestFailure("ACS chose incorrect channel %d for 5GHz "
224 "band" % chan)
225
226 @test_tracker_info(uuid="cc353bda-3831-4d6e-b990-e501b8e4eafe")
227 def test_softap_auto_clean_env(self):
228 """Test to bring up SoftAp on AUTO-band in clean environment."""
229 network = None
230 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_AUTO)
231 if not chan in range(36, 166):
232 # Note: This does not treat DFS channel separately.
233 raise signals.TestFailure("ACS chose incorrect channel %d for 5GHz "
234 "band" % chan)
235
236 @test_tracker_info(uuid="a5f6a926-76d2-46a7-8136-426e35b5a5a8")
237 def test_softap_2G_avoid_channel_1(self):
238 """Test to configure AP and bring up SoftAp on 2G."""
239 self.configure_ap(channel_2g=1)
240 network = self.reference_networks[0]["2g"]
241 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
242 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
243 self.verify_acs_channel(chan, avoid_chan)
244
245 @test_tracker_info(uuid="757e2019-b027-40bf-a562-2b01f3e5957e")
246 def test_softap_5G_avoid_channel_1(self):
247 """Test to configure AP and bring up SoftAp on 5G."""
248 self.configure_ap(channel_2g=1)
249 network = self.reference_networks[0]["2g"]
250 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
251 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
252 self.verify_acs_channel(chan, avoid_chan)
253
254 @test_tracker_info(uuid="b96e39d1-9041-4662-a55f-22641c2e2b02")
255 def test_softap_2G_avoid_channel_2(self):
256 """Test to configure AP and bring up SoftAp on 2G."""
257 self.configure_ap(channel_2g=2)
258 network = self.reference_networks[0]["2g"]
259 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
260 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
261 self.verify_acs_channel(chan, avoid_chan)
262
263 @test_tracker_info(uuid="941c4e2b-ae35-4b49-aa81-13d3dc44b5b6")
264 def test_softap_5G_avoid_channel_2(self):
265 """Test to configure AP and bring up SoftAp on 5G."""
266 self.configure_ap(channel_2g=2)
267 network = self.reference_networks[0]["2g"]
268 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
269 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
270 self.verify_acs_channel(chan, avoid_chan)
271
272 @test_tracker_info(uuid="444c4a34-7f6b-4f02-9802-2e896e7d1796")
273 def test_softap_2G_avoid_channel_3(self):
274 """Test to configure AP and bring up SoftAp on 2G."""
275 self.configure_ap(channel_2g=3)
276 network = self.reference_networks[0]["2g"]
277 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
278 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
279 self.verify_acs_channel(chan, avoid_chan)
280
281 @test_tracker_info(uuid="eccd06b1-6df5-4144-8fda-1504cb822375")
282 def test_softap_5G_avoid_channel_3(self):
283 """Test to configure AP and bring up SoftAp on 5G."""
284 self.configure_ap(channel_2g=3)
285 network = self.reference_networks[0]["2g"]
286 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
287 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
288 self.verify_acs_channel(chan, avoid_chan)
289
290 @test_tracker_info(uuid="fb257644-2081-4c3d-8394-7a308dde0047")
291 def test_softap_2G_avoid_channel_4(self):
292 """Test to configure AP and bring up SoftAp on 2G."""
293 self.configure_ap(channel_2g=4)
294 network = self.reference_networks[0]["2g"]
295 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
296 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
297 self.verify_acs_channel(chan, avoid_chan)
298
299 @test_tracker_info(uuid="88b9cd16-4541-408a-8607-415fe60001f2")
300 def test_softap_5G_avoid_channel_4(self):
301 """Test to configure AP and bring up SoftAp on 5G."""
302 self.configure_ap(channel_2g=4)
303 network = self.reference_networks[0]["2g"]
304 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
305 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
306 self.verify_acs_channel(chan, avoid_chan)
307
308 @test_tracker_info(uuid="b3626ec8-50e8-412c-bdbe-5c5ade647d7b")
309 def test_softap_2G_avoid_channel_5(self):
310 """Test to configure AP and bring up SoftAp on 2G."""
311 self.configure_ap(channel_2g=5)
312 network = self.reference_networks[0]["2g"]
313 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
314 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
315 self.verify_acs_channel(chan, avoid_chan)
316
317 @test_tracker_info(uuid="45c4396b-9b0c-44f3-adf2-ea9c86fcab1d")
318 def test_softap_5G_avoid_channel_5(self):
319 """Test to configure AP and bring up SoftAp on 5G."""
320 self.configure_ap(channel_2g=5)
321 network = self.reference_networks[0]["2g"]
322 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
323 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
324 self.verify_acs_channel(chan, avoid_chan)
325
326 @test_tracker_info(uuid="f70634e7-c6fd-403d-8cd7-439fbbda6af0")
327 def test_softap_2G_avoid_channel_6(self):
328 """Test to configure AP and bring up SoftAp on 2G."""
329 self.configure_ap(channel_2g=6)
330 network = self.reference_networks[0]["2g"]
331 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
332 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
333 self.verify_acs_channel(chan, avoid_chan)
334
335 @test_tracker_info(uuid="f3341136-10bc-44e2-b9a8-2d27d3284b73")
336 def test_softap_5G_avoid_channel_6(self):
337 """Test to configure AP and bring up SoftAp on 5G."""
338 self.configure_ap(channel_2g=6)
339 network = self.reference_networks[0]["2g"]
340 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
341 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
342 self.verify_acs_channel(chan, avoid_chan)
343
344 @test_tracker_info(uuid="8129594d-1608-448b-8548-5a8c4022f2a1")
345 def test_softap_2G_avoid_channel_7(self):
346 """Test to configure AP and bring up SoftAp on 2G."""
347 self.configure_ap(channel_2g=7)
348 network = self.reference_networks[0]["2g"]
349 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
350 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
351 self.verify_acs_channel(chan, avoid_chan)
352
353 @test_tracker_info(uuid="7b470b82-d19b-438c-8f98-ce697e0eb474")
354 def test_softap_5G_avoid_channel_7(self):
355 """Test to configure AP and bring up SoftAp on 5G."""
356 self.configure_ap(channel_2g=7)
357 network = self.reference_networks[0]["2g"]
358 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
359 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
360 self.verify_acs_channel(chan, avoid_chan)
361
362 @test_tracker_info(uuid="11540182-d471-4bf0-8f8b-add89443c329")
363 def test_softap_2G_avoid_channel_8(self):
364 """Test to configure AP and bring up SoftAp on 2G."""
365 self.configure_ap(channel_2g=8)
366 network = self.reference_networks[0]["2g"]
367 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
368 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
369 self.verify_acs_channel(chan, avoid_chan)
370
371 @test_tracker_info(uuid="1280067c-389e-42e9-aa75-6bfbd61340f3")
372 def test_softap_5G_avoid_channel_8(self):
373 """Test to configure AP and bring up SoftAp on 5G."""
Bindu Mahadeved92b572019-02-08 16:38:20 -0800374 self.configure_ap(channel_2g=8)
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700375 network = self.reference_networks[0]["2g"]
376 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
377 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
378 self.verify_acs_channel(chan, avoid_chan)
379
380 @test_tracker_info(uuid="6feeb83c-2723-49cb-93c1-6297d4a3d853")
381 def test_softap_2G_avoid_channel_9(self):
382 """Test to configure AP and bring up SoftAp on 2G."""
383 self.configure_ap(channel_2g=9)
384 network = self.reference_networks[0]["2g"]
385 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
386 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
387 self.verify_acs_channel(chan, avoid_chan)
388
389 @test_tracker_info(uuid="49a110cd-03e8-4e99-9327-5123eab40902")
390 def test_softap_5G_avoid_channel_9(self):
391 """Test to configure AP and bring up SoftAp on 5G."""
392 self.configure_ap(channel_2g=9)
393 network = self.reference_networks[0]["2g"]
394 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
395 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
396 self.verify_acs_channel(chan, avoid_chan)
397
398 @test_tracker_info(uuid="a03c9e45-8763-4b5c-bead-e574fb9899a2")
399 def test_softap_2G_avoid_channel_10(self):
400 """Test to configure AP and bring up SoftAp on 2G."""
401 self.configure_ap(channel_2g=10)
402 network = self.reference_networks[0]["2g"]
403 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
404 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
405 self.verify_acs_channel(chan, avoid_chan)
406
407 @test_tracker_info(uuid="c1a1d272-a646-4c2d-8425-09d2ae6ae8e6")
408 def test_softap_5G_avoid_channel_10(self):
409 """Test to configure AP and bring up SoftAp on 5G."""
410 self.configure_ap(channel_2g=10)
411 network = self.reference_networks[0]["2g"]
412 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
413 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
414 self.verify_acs_channel(chan, avoid_chan)
415
416 @test_tracker_info(uuid="f38d8911-92d4-4dcd-ba23-1e1667fa1f5a")
417 def test_softap_2G_avoid_channel_11(self):
418 """Test to configure AP and bring up SoftAp on 2G."""
419 self.configure_ap(channel_2g=11)
420 network = self.reference_networks[0]["2g"]
421 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
422 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
423 self.verify_acs_channel(chan, avoid_chan)
424
425 @test_tracker_info(uuid="24cc35ba-45e3-4b7a-9bc9-25b7abe92fa9")
426 def test_softap_5G_avoid_channel_11(self):
427 """Test to configure AP and bring up SoftAp on 5G."""
428 self.configure_ap(channel_2g=11)
429 network = self.reference_networks[0]["2g"]
430 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
431 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
432 self.verify_acs_channel(chan, avoid_chan)
433
434 @test_tracker_info(uuid="85aef720-4f3c-43bb-9de0-615b88c2bfe0")
435 def test_softap_2G_avoid_channel_36(self):
436 """Test to configure AP and bring up SoftAp on 2G."""
437 self.configure_ap(channel_5g=36)
438 network = self.reference_networks[0]["5g"]
439 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
440 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
441 self.verify_acs_channel(chan, avoid_chan)
442
443 @test_tracker_info(uuid="433e8db3-93b5-463e-a83c-0d4b9b9a8700")
444 def test_softap_5G_avoid_channel_36(self):
445 """Test to configure AP and bring up SoftAp on 5G."""
446 self.configure_ap(channel_5g=36)
447 network = self.reference_networks[0]["5g"]
448 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
449 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
450 self.verify_acs_channel(chan, avoid_chan)
451
452 @test_tracker_info(uuid="326e0e42-3219-4e63-a18d-5dc32c58e7d8")
453 def test_softap_2G_avoid_channel_40(self):
454 """Test to configure AP and bring up SoftAp on 2G."""
455 self.configure_ap(channel_5g=40)
456 network = self.reference_networks[0]["5g"]
457 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
458 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
459 self.verify_acs_channel(chan, avoid_chan)
460
461 @test_tracker_info(uuid="45953c03-c978-4775-a39b-fb7e70c8990a")
462 def test_softap_5G_avoid_channel_40(self):
463 """Test to configure AP and bring up SoftAp on 5G."""
464 self.configure_ap(channel_5g=40)
465 network = self.reference_networks[0]["5g"]
466 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
467 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
468 self.verify_acs_channel(chan, avoid_chan)
469
470 @test_tracker_info(uuid="e8e89cec-aa27-4780-8ff8-546d5af820f7")
471 def test_softap_2G_avoid_channel_44(self):
472 """Test to configure AP and bring up SoftAp on 2G."""
473 self.configure_ap(channel_5g=44)
474 network = self.reference_networks[0]["5g"]
475 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
476 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
477 self.verify_acs_channel(chan, avoid_chan)
478
479 @test_tracker_info(uuid="5e386d7d-d4c9-40cf-9333-06da55e11ba1")
480 def test_softap_5G_avoid_channel_44(self):
481 """Test to configure AP and bring up SoftAp on 5G."""
482 self.configure_ap(channel_5g=44)
483 network = self.reference_networks[0]["5g"]
484 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
485 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
486 self.verify_acs_channel(chan, avoid_chan)
487
488 @test_tracker_info(uuid="cb51dfca-f8de-4dfc-b513-e590c838c766")
489 def test_softap_2G_avoid_channel_48(self):
490 """Test to configure AP and bring up SoftAp on 2G."""
491 self.configure_ap(channel_5g=48)
492 network = self.reference_networks[0]["5g"]
493 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
494 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
495 self.verify_acs_channel(chan, avoid_chan)
496
497 @test_tracker_info(uuid="490b8ed1-196c-4941-b06b-5f0721ca440b")
498 def test_softap_5G_avoid_channel_48(self):
499 """Test to configure AP and bring up SoftAp on 5G."""
500 self.configure_ap(channel_5g=48)
501 network = self.reference_networks[0]["5g"]
502 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
503 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
504 self.verify_acs_channel(chan, avoid_chan)
505
506 @test_tracker_info(uuid="c5ab141b-e145-4cc1-b0d7-dd610cbfb462")
507 def test_softap_2G_avoid_channel_149(self):
508 """Test to configure AP and bring up SoftAp on 2G."""
509 self.configure_ap(channel_5g=149)
510 network = self.reference_networks[0]["5g"]
511 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
512 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
513 self.verify_acs_channel(chan, avoid_chan)
514
515 @test_tracker_info(uuid="108d7ef8-6fe7-49ba-b684-3820e881fcf0")
516 def test_softap_5G_avoid_channel_149(self):
517 """Test to configure AP and bring up SoftAp on 5G."""
518 self.configure_ap(channel_5g=149)
519 network = self.reference_networks[0]["5g"]
520 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
521 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
522 self.verify_acs_channel(chan, avoid_chan)
523
524 @test_tracker_info(uuid="f6926f40-0afc-41c5-9b38-c95a99788ff5")
525 def test_softap_2G_avoid_channel_153(self):
526 """Test to configure AP and bring up SoftAp on 2G."""
527 self.configure_ap(channel_5g=153)
528 network = self.reference_networks[0]["5g"]
529 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
530 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
531 self.verify_acs_channel(chan, avoid_chan)
532
533 @test_tracker_info(uuid="3d7b653b-c094-4c57-8e6a-047629b05216")
534 def test_softap_5G_avoid_channel_153(self):
535 """Test to configure AP and bring up SoftAp on 5G."""
536 self.configure_ap(channel_5g=153)
537 network = self.reference_networks[0]["5g"]
538 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
539 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
540 self.verify_acs_channel(chan, avoid_chan)
541
542 @test_tracker_info(uuid="b866ceea-d3ca-45d4-964a-4edea96026e6")
543 def test_softap_2G_avoid_channel_157(self):
544 """Test to configure AP and bring up SoftAp on 2G."""
545 self.configure_ap(channel_5g=157)
546 network = self.reference_networks[0]["5g"]
547 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
548 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
549 self.verify_acs_channel(chan, avoid_chan)
550
551 @test_tracker_info(uuid="03cb9163-bca3-442e-9691-6df82f8c51c7")
Hsiu-Chang Chen32df2012019-05-22 14:24:46 +0800552 def test_softap_5G_avoid_channel_157(self):
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700553 """Test to configure AP and bring up SoftAp on 5G."""
554 self.configure_ap(channel_5g=157)
555 network = self.reference_networks[0]["5g"]
556 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
557 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
558 self.verify_acs_channel(chan, avoid_chan)
559
560 @test_tracker_info(uuid="ae10f23a-da70-43c8-9991-2c2f4a602724")
561 def test_softap_2G_avoid_channel_161(self):
562 """Test to configure AP and bring up SoftAp on 2G."""
563 self.configure_ap(channel_5g=161)
564 network = self.reference_networks[0]["5g"]
565 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
566 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
567 self.verify_acs_channel(chan, avoid_chan)
568
569 @test_tracker_info(uuid="521686c2-acfa-42d1-861b-aa10ac4dad34")
570 def test_softap_5G_avoid_channel_161(self):
571 """Test to configure AP and bring up SoftAp on 5G."""
572 self.configure_ap(channel_5g=161)
573 network = self.reference_networks[0]["5g"]
574 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
575 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
576 self.verify_acs_channel(chan, avoid_chan)
577
578 @test_tracker_info(uuid="77ebecd7-c036-463f-b77d-2cd70d89bc81")
579 def test_softap_2G_avoid_channel_165(self):
580 """Test to configure AP and bring up SoftAp on 2G."""
581 self.configure_ap(channel_5g=165)
582 network = self.reference_networks[0]["5g"]
583 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
584 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
585 self.verify_acs_channel(chan, avoid_chan)
586
587 @test_tracker_info(uuid="85d9386d-fe60-4708-9f91-75bbf8bec54f")
588 def test_softap_5G_avoid_channel_165(self):
589 """Test to configure AP and bring up SoftAp on 5G."""
590 self.configure_ap(channel_5g=165)
591 network = self.reference_networks[0]["5g"]
592 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
593 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
594 self.verify_acs_channel(chan, avoid_chan)