mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
auto-t: add support for AP StartWithConfig API
If a psk is not provided to start_ap, it is assumed that the AP is being started with a config file.
This commit is contained in:
parent
e1b3e73c2b
commit
d03ea531de
@ -467,7 +467,7 @@ class Device(IWDDBusAbstract):
|
|||||||
error_handler=self._failure)
|
error_handler=self._failure)
|
||||||
self._wait_for_async_op()
|
self._wait_for_async_op()
|
||||||
|
|
||||||
def start_ap(self, ssid, psk):
|
def start_ap(self, ssid, psk=None):
|
||||||
try:
|
try:
|
||||||
self._prop_proxy.Set(IWD_DEVICE_INTERFACE, 'Mode', 'ap')
|
self._prop_proxy.Set(IWD_DEVICE_INTERFACE, 'Mode', 'ap')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -476,8 +476,12 @@ class Device(IWDDBusAbstract):
|
|||||||
self._ap_iface = dbus.Interface(self._bus.get_object(IWD_SERVICE,
|
self._ap_iface = dbus.Interface(self._bus.get_object(IWD_SERVICE,
|
||||||
self.device_path),
|
self.device_path),
|
||||||
IWD_AP_INTERFACE)
|
IWD_AP_INTERFACE)
|
||||||
self._ap_iface.Start(ssid, psk, reply_handler=self._success,
|
if psk:
|
||||||
error_handler=self._failure)
|
self._ap_iface.Start(ssid, psk, reply_handler=self._success,
|
||||||
|
error_handler=self._failure)
|
||||||
|
else:
|
||||||
|
self._ap_iface.StartProfile(ssid, reply_handler=self._success,
|
||||||
|
error_handler=self._failure)
|
||||||
self._wait_for_async_op()
|
self._wait_for_async_op()
|
||||||
|
|
||||||
def stop_ap(self):
|
def stop_ap(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user