Commit Graph

576 Commits

Author SHA1 Message Date
Andrew Zaborowski 11f23d500c network: Add network_get_signal_strength 2016-06-09 14:40:18 -05:00
Andrew Zaborowski dae897854b network: return boolean from network_rankmod
Since the rankmod value only makes sense for autoconnectable networks,
change network_rankmod to return an indication of whether the rankmod is
valid as a boolean instead of as a double, as discussed before.
2016-06-09 14:16:06 -05:00
Andrew Zaborowski e07b24e5d8 wiphy: Move NULL check to device_disassociated
Do nothing in device_disassociated if device->connected_network
indicates we are not associated.  This may happen if the device was
connected since before iwd was started, this should possibly be fixed
separately by querying device state when device is detected.
2016-06-09 14:14:20 -05:00
Andrew Zaborowski 3fa9a21a39 network: Add network_disconnected
Let network handle anything that needs to be done on a disconnection,
this way keep the settings opening and closing logic in network.c.
2016-06-09 14:13:58 -05:00
Denis Kenzior 454f7d7867 iwd: Update to the new l_main api 2016-06-09 09:56:40 -05:00
Andrew Zaborowski ab15413294 storage: Add storage_network_remove 2016-06-08 11:33:57 -05:00
Andrew Zaborowski 8be78588e2 common: Add security_from_str
The reverse operation of security_to_str.
2016-06-08 11:08:10 -05:00
Andrew Zaborowski 0cb233cdde agent: Drop unused declaration 2016-06-08 11:06:28 -05:00
Andrew Zaborowski 2285ad24ab network: Create a settings file on connection
Make sure networks of all 4 security types have a settings file created
or updated with a new modification time on a successful connect so that
autoconnect and network sorting works for networks other than PSK too.

By doing this on storage_network_touch failure we make sure we don't
overwrite anything dropped into the settings directory while we were
connecting.
2016-06-08 11:03:53 -05:00
Andrew Zaborowski 33d2ae60e9 network: Use security_to_str instead of switch(security)
Convert switch (network->security) statements to security_to_str to be
consistent across network.c in how the settings file name ending is
obtained.
2016-06-08 11:01:35 -05:00
Denis Kenzior b2bcf97373 scan: Remove unused scan_bss_address_to_string 2016-06-06 18:25:12 -05:00
Denis Kenzior c96d43a6da wiphy: Use util_address_to_string 2016-06-06 18:25:00 -05:00
Denis Kenzior 22e1c2f592 wsc: Use util_address_to_string 2016-06-06 18:24:49 -05:00
Denis Kenzior 64c388fe76 wiphy: Fix crash in device address property getter
Address is being returned as a string, even though it is actually an
array of 6 uint8_t elements
2016-06-06 18:23:53 -05:00
Denis Kenzior 92c943998f util: Add util_address_to_string 2016-06-06 18:23:17 -05:00
Denis Kenzior dcfbc74326 wiphy: Remove addr from device struct 2016-06-06 12:05:24 -05:00
Denis Kenzior cedb980f92 wiphy: Remove name from device struct 2016-06-06 12:05:20 -05:00
Denis Kenzior d6c6e4acda netdev: Move netdev enumeration to netdev.c 2016-06-06 12:03:23 -05:00
Denis Kenzior 833ed20b9a netdev: Add netdev_get_name 2016-06-03 09:53:47 -05:00
Denis Kenzior 1573bf7d99 netdev: Add netdev_get_iftype 2016-06-03 09:53:47 -05:00
Denis Kenzior 1bd7baf44b netdev: Add netdev_find 2016-06-03 09:53:46 -05:00
Denis Kenzior 8e7829e1ab netdev: Add netdev_get_address 2016-06-03 09:53:46 -05:00
Denis Kenzior 7a3f823d26 netdev: Add netdev_get_ifindex 2016-06-03 09:53:46 -05:00
Denis Kenzior 7c359ee2c2 netdev: Add netdev struct definition 2016-06-03 09:53:46 -05:00
Denis Kenzior 8113f4c64e wiphy: Add wiphy_find 2016-06-03 09:53:46 -05:00
Denis Kenzior 61b50cf81f netdev: Parse NEW_INTERFACE and DEL_INTERFACE 2016-06-03 09:53:46 -05:00
Denis Kenzior e5821f6ade netdev: Remove unneeded comment 2016-06-03 09:53:46 -05:00
Denis Kenzior 280f2d40ad netdev: Make netdev_init accept nl80211 2016-06-03 09:53:46 -05:00
Denis Kenzior 7b929181ca wiphy: Remove unused wiphy_notify_dellink 2016-06-01 13:07:04 -05:00
Denis Kenzior 3563c65111 netdev: Don't track NEWLINK & DELLINK
The plan is to use the much more reliable NEW_WIPHY, DEL_WIPHY,
NEW_INTERFACE, DEL_INTERFACE events.
2016-06-01 13:07:04 -05:00
Denis Kenzior 0b0fd5639f wiphy: Parse NEW_WIPHY and DEL_WIPHY events 2016-06-01 13:07:04 -05:00
Denis Kenzior e48ca5a5a6 wiphy: Rename netdev to device 2016-06-01 13:06:59 -05:00
Denis Kenzior af9ca22360 wiphy: Remove extraneous return 2016-05-31 11:29:48 -05:00
Andrew Zaborowski 1ba2630216 networks: Simplify parameters
for network_seen and network_connected

Only accept a struct network pointer instead of separately the ssid and
security type.  This is needed so we can do some more simplification in
the next patch by having access to the network struct.
2016-05-30 21:46:45 -05:00
Andrew Zaborowski 9fbdba0957 network: Add "const" to the getter argument types 2016-05-30 21:46:08 -05:00
Andrew Zaborowski 2e4848673a network: Check for duplicates in network_seen
It looks like with multiple netdev seeing the same networks we'd create
multiple network_info structures for each network.  Since the
"networks" list (of network_info structs) is global that's probbaly not
the intention here.
2016-05-30 21:45:52 -05:00
Andrew Zaborowski 2901cb1169 main: Restore agent_exit call before main loop exit 2016-05-25 09:57:58 -05:00
Andrew Zaborowski 176a5bcf76 storage: Encode SSIDs in file names if necessary
SSIDs with characters other than A-Z0-9_- and space are encoded with
l_util_hexstring and prefixed with a = sign to differentiate them.
2016-05-24 11:14:33 -05:00
Rahul Rahul fc7ca17558 wiphy: added hw address property to device 2016-05-23 14:54:27 -05:00
Andrew Zaborowski 7950e2d5d3 wiphy: Emit PropertyChanged signals
for Device and Network
2016-05-23 11:55:06 -05:00
Andrew Zaborowski ab1319a9d5 wiphy: Drop Device.GetNetworks and related signals
Drop the Device interface methods and properties made redundant by
the ObjectManager.
2016-05-23 11:48:41 -05:00
Andrew Zaborowski 15bab067fc dbus: Remove Manager interface, add AgentManager
Move the Agent-related methods to a new interface, AgentManager, and
drop the remaining methods and signals made redundant by the
ObjectManager.
2016-05-23 11:46:59 -05:00
Andrew Zaborowski 3e2562a5a8 dbus: Enable the ObjectManager interface 2016-05-23 11:43:13 -05:00
Denis Kenzior 74689303df network: Make network object opaque 2016-05-16 16:14:26 -05:00
Denis Kenzior 0e106d8534 wiphy: Use network_bss_* api 2016-05-16 16:14:15 -05:00
Denis Kenzior 44d9746e5f network: Add network_bss_list_clear 2016-05-16 16:13:52 -05:00
Denis Kenzior b4cebf918a network: Add network_bss_list_isempty 2016-05-16 16:13:36 -05:00
Denis Kenzior f177f75f92 network: Add network_bss_add 2016-05-16 16:06:41 -05:00
Denis Kenzior cefba4d735 wiphy: Use network_connect_failed 2016-05-16 16:03:17 -05:00
Denis Kenzior ad722cf004 network: Add network_connect_failed 2016-05-16 16:03:14 -05:00