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