The restart() function almost never works here - perhaps some part
of NM takes a bit too long to stop() and then blocks the start()
operation - but "sleep 2" between them makes everything fine.
Given connection details, complete the connection as well as possible
using the given specific object and device, add it to system
settings, and activate it all in one method.
System settings still links to libnm-glib, which also contains
an NMDeviceWimax class. We don't care about the libnm-glib
class, so link the wimax bits first to ensure they are the ones
used.
This issue will go away when user settings is removed in the
near future.
Otherwise it doesn't auto-scan and we get no network list. As a later
optimization, we could detect this, call iwmx_sdk_get_connected_network()
to get the current NSP, match that up with a connection, and "assume"
the connection like we do for Ethernet devices.
Otherwise it doesn't auto-scan and we get no network list. As a later
optimization, we could detect this, call iwmx_sdk_get_connected_network()
to get the current NSP, match that up with a connection, and "assume"
the connection like we do for Ethernet devices.
Sometimes the add/remove code will get re-entered by the SDK because
the SDK is stupid. Lock the code to ensure we don't double-detect
the same device.
If wimaxd gets started after NetworkManager, we need to notify
NetworkManager that the daemon has found and set up any wimax
interface it finds. Most of the code for this was there but
not previously hooked up.
Only fail an activated device if it's actually activated, and
only fail an activating device if the timeout triggers or if
the connect callback indicates failure, not based on device state.
The SDK internally use wchar_t for NSP names even though the
names are actually UTF-8 (since the driver uses UTF-8/ASCII). So
work around that by using the full network name buffer in case
the NSP name is an odd number of characters and thus widechar
comparison functions like wcscmp() would fail when given ASCII.