Bring up monitor interface first before setting the frequency.
This is needed for configuring monitor interface on a WP2 device, where
the driver would throw an error when trying to set the frequency on an
interface that's not up yet.
BUG=chrome-os-partner:32215
TEST=Verify network_WiFi_SimpleConnect.wifi_check11g passes on both
stumpy and panther APs.
Change-Id: I6936c6ad02a77de80e39b21b129c1db11ac94509
Reviewed-on: https://chromium-review.googlesource.com/219554
Tested-by: Peter Qiu <zqiu@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
diff --git a/server/cros/network/packet_capturer.py b/server/cros/network/packet_capturer.py
index 3474869..491357d 100644
--- a/server/cros/network/packet_capturer.py
+++ b/server/cros/network/packet_capturer.py
@@ -238,10 +238,10 @@
if ht_type not in ('HT20', 'HT40+', 'HT40-'):
raise error.TestError('Cannot set HT mode: %s', ht_type)
+ self._host.run("%s link set %s up" % (self._cmd_ip, monitor_device))
self._host.run("%s dev %s set freq %s" % (self._cmd_iw,
monitor_device,
channel_args))
- self._host.run("%s link set %s up" % (self._cmd_ip, monitor_device))
def create_managed_monitor(self, existing_dev, monitor_device=None):