3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-21 03:32:42 +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): def _interfaces_removed_handler(self, path, interfaces):
del _dict[path] del _dict[path]
def create(self, name='', p2p_device=False): def create(self, name=None, p2p_device=False):
path = self._radio_manager.CreateRadio(name, p2p_device) args = dbus.Dictionary({
'P2P': p2p_device,
}, signature='sv')
if name:
args['Name'] = name
path = self._radio_manager.CreateRadio(args)
obj = Radio(path) obj = Radio(path)
self._dict[path] = obj self._dict[path] = obj
return obj return obj