3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-20 19:12:33 +01:00

auto-t: update hwsim radio create to use dictionary

This commit is contained in:
James Prestwood 2020-12-17 11:36:05 -08:00 committed by Denis Kenzior
parent 6a1853b01a
commit 5525f32cdd

View File

@ -249,8 +249,15 @@ class RadioList(collections.Mapping):
def _interfaces_removed_handler(self, path, interfaces):
del _dict[path]
def create(self, name='', p2p_device=False):
path = self._radio_manager.CreateRadio(name, p2p_device)
def create(self, name=None, p2p_device=False):
args = dbus.Dictionary({
'P2P': p2p_device,
}, signature='sv')
if name:
args['Name'] = name
path = self._radio_manager.CreateRadio(args)
obj = Radio(path)
self._dict[path] = obj
return obj