wifi: Return a tethering error if AP mode is not supported at all
authorSamuel Ortiz <sameo@linux.intel.com>
Thu, 3 Feb 2011 12:00:48 +0000 (13:00 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 3 Feb 2011 12:00:48 +0000 (13:00 +0100)
plugins/wifi.c

index ec0846d..59e9fb5 100644 (file)
@@ -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)