Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: server/site_linux_router.py

Issue 6030011: Rearrange EAP setup so that it is more parameterizable for other EAP types (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Update PEAP and TTLS tests. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « server/site_eap_certs.py ('k') | server/site_tests/network_WiFiSecMat/019CheckWPA_1x_AES » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging, re, time 5 import logging, re, time
6 from autotest_lib.client.common_lib import error 6 from autotest_lib.client.common_lib import error
7 from autotest_lib.server import site_eap_tls
8 7
9 def isLinuxRouter(router): 8 def isLinuxRouter(router):
10 router_uname = router.run('uname').stdout 9 router_uname = router.run('uname').stdout
11 return re.search('Linux', router_uname) 10 return re.search('Linux', router_uname)
12 11
13 class LinuxRouter(object): 12 class LinuxRouter(object):
14 """ 13 """
15 Linux/mac80211-style WiFi Router support for WiFiTest class. 14 Linux/mac80211-style WiFi Router support for WiFiTest class.
16 15
17 This class implements test methods/steps that communicate with a 16 This class implements test methods/steps that communicate with a
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 elif k == 'ht': 250 elif k == 'ht':
252 htcaps.add('') # NB: ensure 802.11n setup below 251 htcaps.add('') # NB: ensure 802.11n setup below
253 elif k == 'htprotmode': 252 elif k == 'htprotmode':
254 pass # TODO(sleffler) need hostapd support 253 pass # TODO(sleffler) need hostapd support
255 elif k == 'rifs': 254 elif k == 'rifs':
256 pass # TODO(sleffler) need hostapd support 255 pass # TODO(sleffler) need hostapd support
257 elif k == 'wepmode': 256 elif k == 'wepmode':
258 pass # NB: meaningless for hostapd; ignore 257 pass # NB: meaningless for hostapd; ignore
259 elif k == '-ampdu': 258 elif k == '-ampdu':
260 pass # TODO(sleffler) need hostapd support 259 pass # TODO(sleffler) need hostapd support
261 elif k == 'eap-tls':
262 conf.update(site_eap_tls.router_config(self.router, v))
263 else: 260 else:
264 conf[k] = v 261 conf[k] = v
265 262
266 # Aggregate ht_capab. 263 # Aggregate ht_capab.
267 if htcaps: 264 if htcaps:
268 conf['ieee80211n'] = 1 265 conf['ieee80211n'] = 1
269 conf['ht_capab'] = ''.join(htcaps) 266 conf['ht_capab'] = ''.join(htcaps)
270 267
271 # Figure out the correct interface. 268 # Figure out the correct interface.
272 if conf.get('hw_mode', 'b') == 'a': 269 if conf.get('hw_mode', 'b') == 'a':
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 341
345 def get_ssid(self): 342 def get_ssid(self):
346 return self.hostapd['conf']['ssid'] 343 return self.hostapd['conf']['ssid']
347 344
348 345
349 def set_txpower(self, params): 346 def set_txpower(self, params):
350 self.router.run("%s dev %s set txpower %s" % 347 self.router.run("%s dev %s set txpower %s" %
351 (self.cmd_iw, params.get('interface', 348 (self.cmd_iw, params.get('interface',
352 self.hostapd['interface']), 349 self.hostapd['interface']),
353 params.get('power', 'auto'))) 350 params.get('power', 'auto')))
OLDNEW
« no previous file with comments | « server/site_eap_certs.py ('k') | server/site_tests/network_WiFiSecMat/019CheckWPA_1x_AES » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698