summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-02-22 16:52:41 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2011-02-23 18:37:07 +0100
commit1b1d534babf1e9d26d8936f6f547e918b63ff1c4 (patch)
tree2bfab92a832cbb6cd2abc3ec1836dbbe2ea5b1ee /plugins
parent800c6c3c92b13a7dc19e86491801639dde5053e9 (diff)
downloadconnman-1b1d534babf1e9d26d8936f6f547e918b63ff1c4.tar.gz
connman-1b1d534babf1e9d26d8936f6f547e918b63ff1c4.tar.bz2
connman-1b1d534babf1e9d26d8936f6f547e918b63ff1c4.zip
network: Remove address field
The address network field holds the WiFi BSSID but is unused.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/wifi.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index b943a258..83745064 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -73,45 +73,6 @@ struct wifi_data {
static GList *iface_list = NULL;
-static int get_bssid(struct connman_device *device,
- unsigned char *bssid, unsigned int *bssid_len)
-{
- struct iwreq wrq;
- char *ifname;
- int ifindex;
- int fd, err;
-
- ifindex = connman_device_get_index(device);
- if (ifindex < 0)
- return -EINVAL;
-
- ifname = connman_inet_ifname(ifindex);
- if (ifname == NULL)
- return -EINVAL;
-
- fd = socket(PF_INET, SOCK_DGRAM, 0);
- if (fd < 0) {
- g_free(ifname);
- return -EINVAL;
- }
-
- memset(&wrq, 0, sizeof(wrq));
- strncpy(wrq.ifr_name, ifname, IFNAMSIZ);
-
- err = ioctl(fd, SIOCGIWAP, &wrq);
-
- g_free(ifname);
- close(fd);
-
- if (err < 0)
- return -EIO;
-
- memcpy(bssid, wrq.u.ap_addr.sa_data, ETH_ALEN);
- *bssid_len = ETH_ALEN;
-
- return 0;
-}
-
static void wifi_newlink(unsigned flags, unsigned change, void *user_data)
{
struct connman_device *device = user_data;
@@ -640,8 +601,6 @@ static void interface_state(GSupplicantInterface *interface)
struct connman_device *device;
struct wifi_data *wifi;
GSupplicantState state = g_supplicant_interface_get_state(interface);
- unsigned char bssid[ETH_ALEN];
- unsigned int bssid_len;
connman_bool_t wps;
wifi = g_supplicant_interface_get_data(interface);
@@ -674,9 +633,6 @@ static void interface_state(GSupplicantInterface *interface)
/* reset scan trigger and schedule background scan */
connman_device_schedule_scan(device);
- if (get_bssid(device, bssid, &bssid_len) == 0)
- connman_network_set_address(network,
- bssid, bssid_len);
connman_network_set_connected(network, TRUE);
break;