From 0c554500e1d44018c870c56f64d714b55e2f29ea Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 11 Jun 2019 09:25:53 -0700 Subject: [PATCH] auto-t: add simple getter for radios --- autotests/util/hwsim.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/autotests/util/hwsim.py b/autotests/util/hwsim.py index 34a5b2af..4d3748b1 100755 --- a/autotests/util/hwsim.py +++ b/autotests/util/hwsim.py @@ -299,3 +299,11 @@ class Hwsim(iwd.AsyncOpAbstract): iface.SendFrame(bytearray.fromhex(station.replace(':', '')), freq, -30, bytearray.fromhex(frame)) + + def get_radio(self, name): + for path in self.radios: + radio = self.radios[path] + if radio.name == name: + return radio + + return None