autotest: WiFi: Enable capture on CrOS-based routers
Enable the "router_capture_all" run option to work correctly
on a ChromeOS based router/server. This required a few changes:
- Allow phy/frequency discovery to take note if multiple phys
can support the same frequency.
- Allow the _get_wlanif code to select the most appropriate
phy to perform an operation for a specific phy type.
- Detect which bus each phy is connected to.
- Allow router subtypes (like LinuxCrosRouter) to specify a
bus affinity for different roles (e.g., captures should
use the USB interface by default).
- When the router is the same as the server, do captures
using the router role, rather than the server role so we
use the above mechanisms to decide which phy would be best
to use in a given situation.
BUG=chromium-os:36670
TEST=Add "run_options=router_capture_all" to the arguments
to run_remote_tests and observe:
- pcap files are generated and avalable in the debug dir
- During the test ensure the output of "iw dev" matches
what we expect from the phy_bus_preference parameter.
Change-Id: Ic3cc42c21b6102e37df1648d694346af8620d7c0
Reviewed-on: https://gerrit.chromium.org/gerrit/38817
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
5 files changed