From ca2197bc2724ed4534fc052d99d8815845d9315e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 8 Jan 2008 10:55:49 +0100 Subject: [PATCH] Remove callback for getting the hardware address --- include/iface.h | 2 -- plugins/80211.c | 24 ------------------------ 2 files changed, 26 deletions(-) diff --git a/include/iface.h b/include/iface.h index a916cd1..ed85984 100644 --- a/include/iface.h +++ b/include/iface.h @@ -98,8 +98,6 @@ struct connman_iface_driver { int (*connect) (struct connman_iface *iface, struct connman_network *network); - const char * (*get_address) (struct connman_iface *iface); - void (*set_network) (struct connman_iface *iface, const char *network); void (*set_passphrase) (struct connman_iface *iface, diff --git a/plugins/80211.c b/plugins/80211.c index 5aebe96..5a74de5 100644 --- a/plugins/80211.c +++ b/plugins/80211.c @@ -58,7 +58,6 @@ struct station_data { struct iface_data { char ifname[IFNAMSIZ]; - char ifaddr[18]; GSList *stations; gchar *network; @@ -164,7 +163,6 @@ static int iface_probe(struct connman_iface *iface) { struct iface_data *data; struct ifreq ifr; - struct ether_addr *eth; int sk, err; sk = socket(PF_INET, SOCK_DGRAM, 0); @@ -176,9 +174,6 @@ static int iface_probe(struct connman_iface *iface) err = ioctl(sk, SIOCGIFNAME, &ifr); - if (err == 0) - err = ioctl(sk, SIOCGIFHWADDR, &ifr); - close(sk); if (err < 0) @@ -194,15 +189,6 @@ static int iface_probe(struct connman_iface *iface) memcpy(data->ifname, ifr.ifr_name, IFNAMSIZ); - eth = (void *) &ifr.ifr_hwaddr.sa_data; - sprintf(data->ifaddr, "%02X:%02X:%02X:%02X:%02X:%02X", - eth->ether_addr_octet[0], - eth->ether_addr_octet[1], - eth->ether_addr_octet[2], - eth->ether_addr_octet[3], - eth->ether_addr_octet[4], - eth->ether_addr_octet[5]); - iface->type = CONNMAN_IFACE_TYPE_80211; iface->flags = CONNMAN_IFACE_FLAG_RTNL | @@ -290,15 +276,6 @@ static int iface_connect(struct connman_iface *iface, return 0; } -static const char *iface_get_address(struct connman_iface *iface) -{ - struct iface_data *data = connman_iface_get_data(iface); - - printf("[802.11] get address %s\n", data->ifname); - - return data->ifaddr; -} - static void iface_set_network(struct connman_iface *iface, const char *network) { @@ -535,7 +512,6 @@ static struct connman_iface_driver iface_driver = { .activate = iface_activate, .scan = iface_scan, .connect = iface_connect, - .get_address = iface_get_address, .set_network = iface_set_network, .set_passphrase = iface_set_passphrase, .rtnl_carrier = iface_carrier, -- 2.7.4