3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 23:09:34 +01:00

auto-t: add simple getter for radios

This commit is contained in:
James Prestwood 2019-06-11 09:25:53 -07:00 committed by Denis Kenzior
parent 38bb528c71
commit 0c554500e1

View File

@ -299,3 +299,11 @@ class Hwsim(iwd.AsyncOpAbstract):
iface.SendFrame(bytearray.fromhex(station.replace(':', '')), iface.SendFrame(bytearray.fromhex(station.replace(':', '')),
freq, -30, bytearray.fromhex(frame)) 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