3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-06 12:09:23 +01:00
Commit Graph

403 Commits

Author SHA1 Message Date
Andrew Zaborowski
19fa024bd8 netdev: Reset interface state on init and exit
Take any managed interface down when iwd detects it and bring it back
up to start with a clean state.  On exit take interfaces down.
2016-07-13 12:36:35 -05:00
Andrew Zaborowski
6f51950f46 netdev: Add netdev_set_powered 2016-07-13 10:27:41 -05:00
Andrew Zaborowski
9c99166e7a netdev: Fix command length passed to l_netlink_send
Quiet the following dmesg warning:
netlink: 16 bytes leftover after parsing attributes in process `iwd'.
2016-07-06 10:38:55 -05:00
Denis Kenzior
e421af2a58 netdev: React to removed netdevs 2016-07-01 14:49:34 -05:00
Denis Kenzior
005213a3d4 netdev: Implement new_wiphy hint
When a new wiphy is added, the kernel usually adds a default STA
interface as well.  This interface is currently not signaled over
nl80211 in any way.

This implements a selective dump of the wiphy interfaces in order to
obtain the newly added netdev.  Selective dump is currently not
supported by the kernel, so all netdevs will be returned.  A patch on
linux-wireless is pending that implements the selective dump
functionality.
2016-07-01 14:39:25 -05:00
Denis Kenzior
943acddb49 eapol: Refactor eapol tx path 2016-06-28 18:45:49 -05:00
Denis Kenzior
de84aff10b netdev: Cleanup EAPoL state machine
In case of disconnection by AP or lost beacon, cancel EAPoL state
machine
2016-06-28 18:28:39 -05:00
Denis Kenzior
45dabb9e44 netdev: Call eapol_cancel if operstate fails 2016-06-28 18:24:53 -05:00
Denis Kenzior
830af391e2 netdev: Fix memory leak
==24934== 16 bytes in 1 blocks are definitely lost in loss record 1 of 1
==24934==    at 0x4C2C970: malloc (vg_replace_malloc.c:296)
==24934==    by 0x41675D: l_malloc (util.c:62)
==24934==    by 0x4033B3: netdev_set_linkmode_and_operstate
(netdev.c:149)
==24934==    by 0x4042B9: netdev_free (netdev.c:221)
==24934==    by 0x41735D: l_queue_clear (queue.c:107)
==24934==    by 0x4173A8: l_queue_destroy (queue.c:82)
==24934==    by 0x40543D: netdev_exit (netdev.c:1459)
==24934==    by 0x402D6F: nl80211_vanished (main.c:126)
==24934==    by 0x41E607: l_genl_family_unref (genl.c:1057)
==24934==    by 0x402B50: main (main.c:237)
2016-06-28 18:18:50 -05:00
Denis Kenzior
efe5bed7c5 netdev: Move eapol_read to eapol.c 2016-06-28 18:18:47 -05:00
Denis Kenzior
746b0e5cb1 netdev: Free sm if connect fails 2016-06-28 17:26:03 -05:00
Denis Kenzior
5c6024185d netdev: Use CMD_CONNECT 2016-06-27 18:55:56 -05:00
Denis Kenzior
49abd4556f netdev: Remove device when netdev is freed 2016-06-24 23:17:06 -05:00
Denis Kenzior
105f5f8d8e netdev: Rearrange netdev structure
Keep flags co-located
2016-06-24 23:17:06 -05:00
Denis Kenzior
e76daf224c netdev: Implement interface filtering 2016-06-23 17:34:47 -05:00
Denis Kenzior
0eee94a264 netdev: Fix some uninitialized warnings 2016-06-23 17:34:11 -05:00
Denis Kenzior
cda2026b23 netdev: Actually set rekey_offload into eapol 2016-06-22 19:18:38 -05:00
Rahul Rahul
5853440dfa netdev: support for REKEY_OFFLOAD and its event handling 2016-06-22 18:44:46 -05:00
Denis Kenzior
dc721a6ae2 netdev: Set callbacks for operstate
When setting operstate to dormant or down, give it a callback for debug
purposes.  It looks like that operstate down message does not have a
chance to go out currently.
2016-06-21 15:18:50 -05:00
Andrew Zaborowski
b6c22fc1b9 netdev: netdev watch support 2016-06-21 14:08:21 -05:00
Andrew Zaborowski
aa7a6a4619 netdev: Track interface UP flag 2016-06-21 14:08:19 -05:00
Denis Kenzior
0fe815f870 netdev: Move deauthenticate handling 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
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
d297fbb215 netdev: Add stubs for netdev_disconnect 2016-06-14 19:57:21 -05:00
Denis Kenzior
51f89e34e9 netdev: Add initial netdev_connect logic 2016-06-14 19:57:18 -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
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
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
e48ca5a5a6 wiphy: Rename netdev to device 2016-06-01 13:06:59 -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
08decb340e netdev: Move rta_add_u8
Move closer to where it is used
2016-05-05 11:32:11 -05:00
Denis Kenzior
e1bdd7ce1e netdev: Add netdev watch infrastructure 2015-09-28 20:37:08 -05:00
Jukka Rissanen
6dbd544a55 netdev: Add function to set the linkmode and operstate of the link
This is needed after connecting successfully to AP.
2015-03-27 13:13:33 -05:00
Marcel Holtmann
b7a421673c core: Add sanity check to sync RTNL link deletion with nl80211 2014-08-06 23:52:42 -07:00
Marcel Holtmann
af2bb68e07 core: Only enable RTNL debugging when IWD_RTNL_DEBUG is set 2014-08-07 05:28:58 +02:00
Marcel Holtmann
188917cc29 core: Add missing include for network interface tracking 2014-06-21 20:54:58 +02:00
Marcel Holtmann
37cba460a8 core: Add tracking of network interfaces via RTNL 2014-06-21 13:41:40 +02:00