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.
Heavily modify Inaky's Intel WiMAX SDK glue (originally from connman)
to be more generic and more thread-safe, and suitable for use with
NetworkManager instead of rolling our own client code. Rewrite the
NMDeviceWimax code to mostly work.
Still to be done: actual connection logic, DHCP handling, spawning
wimaxd if it's not started yet
We're just going to quit here anyway, so we don't need to
make sure the property filter is unregistered. Fixes a
crash on exit if D-Bus has quit before NM has.
It's a leftover from when /etc/hosts got fixed up, and since that
isn't being done anymore, there's no reason to touch the hostname
on exit. It will already have been updated in response to device
deactivation (if the hostname was DHCP-provided for example) so
it shouldn't need to be touched on exit.
This also removes a potential crash on shutdown when systemd or
another startup manager kills D-Bus before NetworkManager, which
made the dispatcher code angry (which got executed on hostname
change).