NACK.
If wifi is not powered, let's not even try to set regdom, so we should
check it in device.c
---
plugins/wifi.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/plugins/wifi.c b/plugins/wifi.c
index c0f7ddc..7d1aba9 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -990,9 +990,12 @@ static int wifi_set_regdom(struct connman_device *device,
const char *alpha2)
connman_device_ref(device);
- ret = g_supplicant_interface_set_country(wifi->interface,
- wifi_regdom_callback,
- alpha2, device);
+ if (connman_device_get_powered(wifi->device) == FALSE)
+ ret = g_supplicant_set_country(alpha2, wifi_regdom_callback,
device);
+ else
+ ret = g_supplicant_interface_set_country(wifi->interface,
+ wifi_regdom_callback,
+ alpha2, device);
That is not fixing anything here. wifi_set_regdom is meant to be called
for setting regdom on interface basis.
Tomasz
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman