From 926318dedf9a36415e71c6cab52de32874a78be9 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 3 Feb 2011 13:00:48 +0100 Subject: wifi: Return a tethering error if AP mode is not supported at all --- plugins/wifi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index ec0846d4..59e9fb59 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -989,6 +989,7 @@ static int tech_set_tethering(struct connman_technology *technology, struct wifi_tethering_info *info; const char *ifname; unsigned int mode; + int err; DBG(""); @@ -1041,12 +1042,14 @@ static int tech_set_tethering(struct connman_technology *technology, info->wifi->tethering = TRUE; - return g_supplicant_interface_remove(interface, + err = g_supplicant_interface_remove(interface, sta_remove_callback, info); + if (err == 0) + return err; } - return 0; + return -EOPNOTSUPP; } static void regdom_callback(void *user_data) -- cgit v1.2.3