Home | History | Annotate | Download | only in network_WiFi_BeaconInterval
      1 # Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 from autotest_lib.client.common_lib.cros.network import iw_runner
      6 from autotest_lib.client.common_lib.cros.network import xmlrpc_datatypes
      7 from autotest_lib.server.cros.network import hostap_config
      8 from autotest_lib.server.cros.network import wifi_cell_test_base
      9 
     10 
     11 class network_WiFi_BeaconInterval(wifi_cell_test_base.WiFiCellTestBase):
     12     """Test that we understand the routers negotiated beacon interval."""
     13     version = 1
     14 
     15 
     16     def run_once(self):
     17         """Body of the test."""
     18         bint_val = 200
     19         configuration = hostap_config.HostapConfig(
     20                 channel=6,
     21                 mode=hostap_config.HostapConfig.MODE_11B,
     22                 beacon_interval=bint_val)
     23         self.context.configure(configuration)
     24         assoc_params = xmlrpc_datatypes.AssociationParameters()
     25         assoc_params.ssid = self.context.router.get_ssid()
     26         self.context.assert_connect_wifi(assoc_params)
     27         self.context.client.check_iw_link_value(
     28                 iw_runner.IW_LINK_KEY_BEACON_INTERVAL,
     29                 bint_val)
     30         self.context.assert_ping_from_dut()
     31         self.context.client.shill.disconnect(assoc_params.ssid)
     32         self.context.router.deconfig()
     33