wpa_supplicant 0.7.2+ (from git) didn't connect automatically to a wifi
network. I found out that this because of two calls to
connman_device_set_powered(), from wifi_newlink() and get_interface_reply().
The former was called first and causing the latter call not to trigger a
scan.
Because wpa_supplicant is initialised only in get_interface_reply(), and I
wasn't able to find a reason for the set_powered() call in wifi_newlink(),
the call in wifi_newlink() can be removed. Now connman will work with
both 0.6 and 0.7 versions of wpa_supplicant.
Also the supplicant_scan() is not needed, calling connman_device_set_powered()
in get_interface_reply() will trigger a scan.
if ((wifi->flags & IFF_UP) != (flags & IFF_UP)) {
if (flags & IFF_UP) {
- DBG("power on");
- connman_device_set_powered(device, TRUE);
- supplicant_scan(device);
+ DBG("interface up");
} else {
- connman_device_set_powered(device, FALSE);
- DBG("power off");
+ DBG("interface down");
}
}