Andrew Zaborowski
99e58db152
wiphy: Add utility to check if bss ciphers compatible
...
Move the BSS's supported ciphers checks from network_bss_select to a new
function in wiphy.c so we can reuse it in device.c.
2017-01-20 15:42:31 -06:00
Markus Ongyerth
139c8af210
wiphy: Remove useless null check on array
2016-12-19 11:02:55 -06:00
Denis Kenzior
bdd676a23a
wiphy: Add support for BIP in wiphy_select_cipher
2016-10-24 21:29:37 -05:00
Denis Kenzior
2899315828
wiphy: Rename pairwise_ciphers to supported_ciphers
...
Since the ciphers stored here are not only for pairwise, but also group
and management ciphers.
2016-10-24 21:29:03 -05:00
Denis Kenzior
13f83fda81
wiphy: Also print whether we support BIP
2016-10-24 21:25:04 -05:00
Andrew Zaborowski
0ffec2e481
dbus: Switch to using org.freedesktop.DBus.Properties
...
Use the org.freedesktop.DBus.Properties interfaces on objects with
properties and drop the old style GetProperty/SetProperty methods on
individual interfaces. Agent and KnownNetworks have no properties at
this time so don't add org.freedesktop.DBus.Properties interfaces.
2016-09-21 16:46:34 -05:00
Denis Kenzior
c60d34cd8d
wiphy: Add wiphy_get_supported_bands
2016-09-13 14:36:46 -05:00
Andrew Zaborowski
c0b81662e4
wiphy: Add a Model and Vendor properties
...
Use the ell hwdb api to find the device model and vendor and expose
these as DBus properties.
2016-08-04 12:35:20 -05:00
Denis Kenzior
37ea99d09e
netdev: Remove netdev_new_wiphy_hint
2016-07-19 15:49:22 -05:00
Andrew Zaborowski
2e845b5ee2
wiphy: Powered property setter
2016-07-13 12:33:30 -05:00
Andrew Zaborowski
bafafbf080
wiphy: Add a read-only Powered property
2016-07-13 10:34:23 -05:00
Andrew Zaborowski
4ebdf4e2ca
wiphy: Add Adapter objects above Device
...
Change the path for net.connman.iwd.Device objects to /phyX/Y and
register net.connman.iwd.Adapter at /phyX grouping devices of the same
wiphy.
Turns out no changes to the test/* scripts are needed.
2016-07-13 10:32:49 -05:00
Denis Kenzior
0cffac45d4
wiphy: Notify netdev when a new wiphy has been added
2016-07-01 14:42:18 -05:00
Denis Kenzior
e81af82313
wiphy: React to new_wiphy events
2016-06-24 23:32:15 -05:00
Denis Kenzior
3bd0c9ae13
wiphy: React to del_wiphy events
2016-06-24 23:31:58 -05:00
Denis Kenzior
1500756144
wiphy: Print wiphy id
2016-06-24 23:31:02 -05:00
Denis Kenzior
ed18ab4fc0
wiphy: Rework wiphy dump parser
2016-06-24 23:30:05 -05:00
Denis Kenzior
0d9ec3b5ed
wiphy: Rework printing basic wiphy info
2016-06-24 23:30:05 -05:00
Denis Kenzior
74add19057
device: Move the rest of device specific code
...
.. out of wiphy.c
2016-06-16 16:37:14 -05:00
Denis Kenzior
0fe815f870
netdev: Move deauthenticate handling out of wiphy.c
2016-06-16 16:37:14 -05:00
Denis Kenzior
48c0a216d7
wiphy: Rearrange / remove #includes
2016-06-16 16:37:14 -05:00
Denis Kenzior
c28e652570
device: Move device_list management out of wiphy.c
2016-06-16 16:37:14 -05:00
Denis Kenzior
49c7515ac1
netdev: Move eapol_io handling
2016-06-16 16:37:12 -05:00
Denis Kenzior
75ce550de9
netdev: Move operstate operations out of wiphy.c
...
Also make netdev_set_linkmode_and_operstate static
2016-06-16 15:13:43 -05:00
Denis Kenzior
dd4b0dc3d3
netdev: Move key setting logic out of wiphy.c
2016-06-16 15:13:43 -05:00
Denis Kenzior
c714b20102
wiphy: Move handshake_failed handler out of wiphy.c
2016-06-16 15:13:43 -05:00
Denis Kenzior
64d382cc89
netdev: Move disconnect event handling
...
.. out of wiphy.c
2016-06-16 15:13:43 -05:00
Denis Kenzior
0eeb71e4eb
netdev: Move CQM event handling out of wiphy.c
2016-06-16 15:13:43 -05:00
Denis Kenzior
d526dbc175
netdev: Move associate event handling
...
.. out of wiphy.c
2016-06-16 15:13:39 -05:00
Denis Kenzior
d82754636b
netdev: Move deauthenticate event handling
...
.. out of wiphy.c
2016-06-15 14:02:24 -05:00
Denis Kenzior
f5a7e204e7
device: Fix valgrind warning
...
Device removal should probably be managed by netdev objects going away,
but for now, silence the warning
2016-06-15 11:01:44 -05:00
Denis Kenzior
31a0e42772
wiphy: Move association logic out of wiphy.c
...
The eapol state machine parameters are now built inside device.c when
the network connection is attempted. The reason is that the device
object knows about network settings, wiphy constraints and should
contain the main 'management' logic.
netdev now manages the actual low-level process of building association
messages, detecting authentication events, etc.
2016-06-15 10:54:13 -05:00
Denis Kenzior
b2d8616ca4
device: Move device_get_address out of wiphy.c
2016-06-14 19:57:21 -05:00
Denis Kenzior
c18cf173c3
device: Move device_get_ifindex out of wiphy.c
2016-06-14 19:57:21 -05:00
Denis Kenzior
74c8af9180
device: Move device_get_wiphy out of wiphy.c
2016-06-14 19:57:21 -05:00
Denis Kenzior
e23ea59f95
device: Move device_is_busy out of wiphy.c
2016-06-14 19:57:21 -05:00
Denis Kenzior
6e57e4a00c
device: Move device_get_path out of wiphy.c
2016-06-14 19:57:21 -05:00
Denis Kenzior
e0c27a2ca8
device: Move device_get_connected_network
...
out of wiphy.c
2016-06-14 19:57:21 -05:00
Denis Kenzior
aedbdd01ae
device: Migrate authentication to netdev api
...
This also moves device_connect_network to device.c where it belongs
2016-06-14 19:57:21 -05:00
Denis Kenzior
6bd71066ff
device: Move device_disassociated out of wiphy.c
2016-06-14 11:16:07 -05:00
Denis Kenzior
64604ed59c
device: Expose device_enter_state
2016-06-14 11:13:34 -05:00
Denis Kenzior
9d4baab8bd
device: Move device structure definition
...
Temporarily move device structure definition into device.h and out of
wiphy.c. Eventually the device structure should be opaque to device.c
2016-06-14 11:11:06 -05:00
Andrew Zaborowski
9cef1490c5
network: Basic last seen time tracking
2016-06-10 09:33:54 -05:00
Andrew Zaborowski
a0468fb9be
device: Implement GetOrderedNetworks()
...
Keep an updated sorted list of networks in addition to the "networks"
hashmap. The list can be queried through the GetOrderedNetworks dbus
method.
We also take advantage of that list to get rid of a single
l_hashmap_foreach in new_scan_results.
2016-06-10 09:33:13 -05:00
Andrew Zaborowski
99f99e0bc0
agent: Add reason parameter to Cancel
...
Add a parameter the UI can use to show user an explanation of why a
password prompt is disappearing.
2016-06-10 09:26:56 -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
c96d43a6da
wiphy: Use util_address_to_string
2016-06-06 18:25:00 -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
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
8113f4c64e
wiphy: Add wiphy_find
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
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
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
Denis Kenzior
0e106d8534
wiphy: Use network_bss_* api
2016-05-16 16:14:15 -05:00
Denis Kenzior
cefba4d735
wiphy: Use network_connect_failed
2016-05-16 16:03:17 -05:00
Denis Kenzior
dcadf4d2f8
wiphy: Use network_autoconnect
2016-05-16 16:00:21 -05:00
Denis Kenzior
c619a71652
wiphy: Use network accessor methods
2016-05-16 15:44:27 -05:00
Denis Kenzior
9bfa0aa768
merge: device_connect_network
2016-05-16 13:48:10 -05:00
Denis Kenzior
d4feeebdc1
network: Move network related code into network.c
...
away from wiphy.c
2016-05-16 12:37:48 -05:00
Denis Kenzior
5e4c675175
network: Use device_get_wiphy
2016-05-16 12:32:44 -05:00
Denis Kenzior
66610f1248
device: Add device_get_wiphy()
2016-05-16 12:26:00 -05:00
Denis Kenzior
68a79b23fb
device: Add device_is_busy()
2016-05-16 12:24:41 -05:00
Denis Kenzior
a9e9be469c
wiphy: Expose wiphy_select_cipher
2016-05-16 12:21:26 -05:00
Denis Kenzior
bcb2ef3e40
network: Rework connect logic
2016-05-16 12:05:28 -05:00
Denis Kenzior
2fe80a8f86
device: Add device_connect_network
2016-05-16 12:04:45 -05:00
Denis Kenzior
a789703f6f
wiphy: Use network_create, register & remove
2016-05-15 21:41:37 -05:00
Denis Kenzior
54e7cced8e
network: Move PSK sync to network.c
2016-05-15 21:04:02 -05:00
Denis Kenzior
24366efb32
wiphy: Use network_settings_load & _close
2016-05-15 21:01:46 -05:00
Denis Kenzior
49df40fdff
network: Move network_emit_removed to network.c
2016-05-12 09:52:52 -05:00
Denis Kenzior
5dc3a892db
network: Move network_emit_added to network.c
2016-05-12 09:51:02 -05:00
Denis Kenzior
3ca8dfb5ad
wiphy: move & rename iwd_device_get_path
...
Move declaration to device.h and rename to device_get_path
2016-05-12 09:49:07 -05:00
Denis Kenzior
ae1dc10c0c
wiphy: Move __iwd_network_append_properties
...
to network.c
2016-05-11 22:32:25 -05:00
Denis Kenzior
23fe106cc5
device: Add device_get_connected_network()
2016-05-11 22:27:31 -05:00
Denis Kenzior
0c7504b5fb
wiphy: Use network_get_security()
2016-05-11 22:12:25 -05:00
Denis Kenzior
f3ad1492c9
wiphy: Use network_get_path()
2016-05-11 22:12:25 -05:00
Denis Kenzior
2ccbf65519
wiphy: Use network_get_netdev
2016-05-11 22:04:09 -05:00
Denis Kenzior
0847e31542
wiphy: Use network_get_ssid
2016-05-11 22:01:44 -05:00
Denis Kenzior
414bc3198d
wiphy: Move network object definition
2016-05-11 21:59:32 -05:00
Denis Kenzior
17a8460835
scan: Move scan_ssid_security to iwd.h
...
Security type is used all over the place, so move it out to a more
common place.
2016-05-11 15:54:14 -05:00
Denis Kenzior
c2c4039e79
wiphy: Rename netdev_state to device_state
2016-05-05 12:25:45 -05:00
Denis Kenzior
f3fc0ea1f9
device: Refactor netdev watches
...
Turn netdev watches into device watches. The intent is to refactor out
netdev specific details into its own class and move device specific
logic into device.c away from wiphy.c
2016-05-05 12:14:59 -05:00
Denis Kenzior
0e3495488f
wiphy: Move netdev_state enum
2016-05-05 11:40:54 -05:00
Andrew Zaborowski
692bfa23fe
wiphy: Sanity check before netdev_disassociated
...
The lost beacon event can be received when iwd thinks netdev is
diconnected if it was connected before iwd started, and then
netdev_disassociated will segfault.
2016-04-11 14:39:06 -05:00
Rahul Rahul
971d93a9e6
wiphy: Add ConnectedNetwork property to Device
...
This property is optional. If the device is connected, it holds the
object path of the connected network.
2016-03-09 16:46:07 -06:00
Rahul Rahul
492f25c4f6
wiphy: Add Connected property to Network interface
...
Added a property that will allow one to figure out whether this Network
is currently connected.
2016-03-04 10:20:41 -06:00
Mat Martineau
96e7be28bd
wiphy: Removed unused function
2016-02-18 18:21:22 -06:00
Denis Kenzior
e2de4423db
dbus: Update to the new ell D-Bus APIs
2016-02-11 16:19:55 -06:00
Denis Kenzior
ad7bbbb920
wiphy: Record network last-connected time
2016-02-11 16:19:44 -06:00
Denis Kenzior
962e2e8b2c
wiphy: Use SHA256 AKM if available
2016-02-10 13:20:46 -06:00
Denis Kenzior
76c62b0843
scan: Keep track of SHA256 support over PSK/8021X
2016-02-10 12:56:11 -06:00