};
enum connman_iface_flags {
- CONNMAN_IFACE_FLAG_RTNL = (1 << 0),
- CONNMAN_IFACE_FLAG_IPV4 = (1 << 1),
- CONNMAN_IFACE_FLAG_IPV6 = (1 << 2),
- CONNMAN_IFACE_FLAG_CARRIER_DETECT = (1 << 3),
+ CONNMAN_IFACE_FLAG_RTNL = (1 << 0),
+ CONNMAN_IFACE_FLAG_IPV4 = (1 << 1),
+ CONNMAN_IFACE_FLAG_IPV6 = (1 << 2),
+ CONNMAN_IFACE_FLAG_SCANNING = (1 << 3),
};
enum connman_iface_state {
int (*scan) (struct connman_iface *iface);
int (*connect) (struct connman_iface *iface,
struct connman_network *network);
+ int (*disconnect) (struct connman_iface *iface);
void (*set_network) (struct connman_iface *iface,
const char *network);
free(data);
}
-static int iface_activate(struct connman_iface *iface)
-{
- struct iface_data *data = connman_iface_get_data(iface);
-
- printf("[802.11] activate %s\n", data->ifname);
-
- connman_iface_update(iface, CONNMAN_IFACE_STATE_ENABLED);
-
- return 0;
-}
-
-static int iface_shutdown(struct connman_iface *iface)
-{
- struct iface_data *data = connman_iface_get_data(iface);
-
- printf("[802.11] shutdown %s\n", data->ifname);
-
- __supplicant_stop(iface);
-
- connman_iface_update(iface, CONNMAN_IFACE_STATE_OFF);
-
- return 0;
-}
-
static int iface_scan(struct connman_iface *iface)
{
struct iface_data *data = connman_iface_get_data(iface);
return 0;
}
+static int iface_disconnect(struct connman_iface *iface)
+{
+ struct iface_data *data = connman_iface_get_data(iface);
+
+ printf("[802.11] disconnect %s\n", data->ifname);
+
+ __supplicant_stop(iface);
+
+ return 0;
+}
+
static void iface_set_network(struct connman_iface *iface,
const char *network)
{
data->passphrase = g_strdup(passphrase);
}
-static void iface_carrier(struct connman_iface *iface, int carrier)
-{
- printf("[802.11] carrier %s\n", carrier ? "on" : "off");
-
- connman_iface_indicate_carrier(iface, carrier);
-}
-
static void parse_genie(struct station_data *station,
unsigned char *data, int len)
{
.capability = "net.80211",
.probe = iface_probe,
.remove = iface_remove,
- .activate = iface_activate,
- .shutdown = iface_shutdown,
.scan = iface_scan,
.connect = iface_connect,
+ .disconnect = iface_disconnect,
.set_network = iface_set_network,
.set_passphrase = iface_set_passphrase,
- .rtnl_carrier = iface_carrier,
.rtnl_wireless = iface_wireless,
};