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

Unified Diff: server/site_linux_router.py

Issue 6250109: Set transmit power on config() (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: Only tx_power change 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/site_linux_router.py
diff --git a/server/site_linux_router.py b/server/site_linux_router.py
index 0e0a1abeece9bfe8c8e5aa6e8c13d371a32865ab..b17c0666767a82ff13f0b2c6fee7dfef9e24184c 100644
--- a/server/site_linux_router.py
+++ b/server/site_linux_router.py
@@ -158,6 +158,7 @@ class LinuxRouter(object):
if self.apmode:
# Construct the hostapd.conf file and start hostapd.
conf = self.hostapd['conf']
+ tx_power_params = {}
htcaps = set()
conf['driver'] = params.get('hostapd_driver',
@@ -257,6 +258,8 @@ class LinuxRouter(object):
pass # NB: meaningless for hostapd; ignore
elif k == '-ampdu':
pass # TODO(sleffler) need hostapd support
+ elif k == 'txpower':
+ tx_power_params['power'] = v
else:
conf[k] = v
@@ -301,6 +304,11 @@ class LinuxRouter(object):
self.router.run("%s link set %s up" %
(self.cmd_ip, self.bridgeif))
self.hostapd['interface'] = conf['interface']
+ else:
+ tx_power_params['interface'] = conf['interface']
+
+ # Configure transmit power
+ self.set_txpower(tx_power_params)
logging.info("AP configured.")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698