Commit Graph

123 Commits

Author SHA1 Message Date
Denis Kenzior 19b0d0f2e2 main: Rework kernel option detection logic
This logic was using l_hashmap_insert, which supports duplicates.  Since
some entries were inserted multiple times, they ended up being printed
multiple times.  Fix that by introducing a macro that uses
l_hashmap_replace instead.
2020-06-22 10:12:34 -05:00
Tim Kourt 104e6898ca main: Fix freeing invalid pointer 2020-04-08 21:47:46 -05:00
Rosen Penev a47609acbe iwd: remove unnecessary semicolons
Found with clang's -Wextra-semi-stmt
2020-04-08 21:02:15 -05:00
Tim Kourt a074f30edc main: Simplify config file search logic 2020-04-08 16:19:52 -05:00
Denis Kenzior 98e4f84348 main: pretty up formatting 2020-04-08 16:19:37 -05:00
Tim Kourt 19a5250b34 main: Fix failure cleanup sequence 2020-04-08 16:18:05 -05:00
Denis Kenzior 5ea86c98fc main: Add iwd_get_rtnl 2020-04-08 12:27:57 -05:00
Marcel Holtmann ab5742bb32 module: Move declarations into separate header file 2019-11-07 23:40:13 +01:00
Denis Kenzior 480d678a85 main: Update to the new ell API 2019-10-28 15:48:36 -05:00
Marcel Holtmann 152b56a12a treewide: Move the Intel copyright forward to 2019 2019-10-25 00:43:08 +02:00
James Prestwood fe179f96fd eap: utilize IWD_MODULE
Converts eap into an IWD module.
2019-10-11 15:45:26 -05:00
James Prestwood 8f600ee1b5 eap: remove mtu argument from eap_init
This was refactored to set the mtu via __eap_set_config rather than
passing the MTU into eap_init. This makes eap work in a similar fashion
as eapol (i.e. __eapol_set_config).

If __eap_set_config is not used, the MTU will be set to 1020, which is
the same as previously passing 0 to eap_init.
2019-10-11 15:44:38 -05:00
James Prestwood d53dcf2334 wiphy: utilize IWD_MODULE
This converts wiphy into an IWD module. nl80211 was completely removed
from main.c as it is no longer passed with manager or wiphy.
2019-10-11 15:42:13 -05:00
James Prestwood 97bac236c8 wiphy: remove white/blacklist from wiphy_init
wiphy will now use getters for the phy white/black list.
2019-10-11 15:41:54 -05:00
James Prestwood 2d8d47c9dd manager: utilize IWD_MODULE
Converts manager into an IWD module.
2019-10-11 15:38:25 -05:00
James Prestwood 87c42bccf1 manager: remove white/black list from argument
Instead we add getters for these lists that manager_init can use.
2019-10-11 15:37:58 -05:00
James Prestwood 2ab8d4bbed anqp: utilize IWD_MODULE
This converts anqp into an IWD module.
2019-10-11 15:37:33 -05:00
James Prestwood 369c5fbd0b eapol: utilize IWD_MODULE
This converts eapol to using IWD modules. The init/exit APIs did need
to remain exposed for unit tests.

Netdev was updated to depend on eapol.
2019-10-11 15:36:45 -05:00
James Prestwood d42c4a57b8 netdev: utilize IWD_MODULE
Since iwd_modules_init is now defered until nl80211_appeared, we can
assume the nl80211 object is available. This removes the need for
netdev_set_nl80211 completely.
2019-10-11 15:30:28 -05:00
James Prestwood df8fc5f918 main: move module init into nl80211_appeared
In preparation for integrating IWD_MODULE into modules which require
nl80211 we move the module init into the nl80211_appeared callback.
This will guarentee that the nl80211 is available during module init
and allow modules to get their own copy of nl80211 rather than needing
a set function (e.g. netdev_set_nl80211).

Since the dbus name request callback happens before this as well any
dbus module can also use IWD_MODULE and simply assume the dbus object
is ready.

plugin_init was also deferred to nl80211_appeared since some plugins
depend on modules being initialized.
2019-10-11 15:21:32 -05:00
Denis Kenzior 3b040f5c27 main: Make rfkill an IWD_MODULE 2019-09-24 10:07:40 -05:00
Marcel Holtmann 8706be6698 storage: Add support for utilizing STATE_DIRECTORY environment 2019-09-08 19:19:34 +02:00
Marcel Holtmann 45d5c67cb4 main: Move storage directory creation into storage functionality 2019-09-08 18:24:23 +02:00
Marcel Holtmann 7e5ddb15d7 main: Remove --config command line option 2019-09-08 18:18:06 +02:00
Marcel Holtmann 4c841edfb5 main: Add support for CONFIGURATION_DIRECTORY environment variable 2019-09-08 10:22:36 +02:00
Denis Kenzior 2d65a0030e module: Introduce a basic module dependency framework 2019-08-07 16:33:19 -05:00
Denis Kenzior e7f16775ac main: Don't try to queue if name request fails
This in fact allows multiple instances of iwd to run.
2019-08-04 04:49:24 -05:00
James Prestwood 85131f4827 hotspot: make hotspot dir not hidden 2019-07-15 11:13:55 -05:00
Eduardo Abinader 094a9ecdfa main: print version arg 2019-07-12 09:36:34 -05:00
James Prestwood 3979785703 main: add anqp_init/exit 2019-06-26 23:09:47 -05:00
James Prestwood 3d1f1eb21c main: create .hotspot directory if it does not exist 2019-06-26 14:29:48 -05:00
Denis Kenzior c80d32a162 ap: Convert to IWD_MODULE 2019-05-28 14:43:42 -05:00
Denis Kenzior eeac3e8f40 adhoc: Convert to IWD_MODULE 2019-05-28 14:24:37 -05:00
Denis Kenzior a9e3b3e906 scan: Convert to IWD_MODULE 2019-05-28 14:12:25 -05:00
Denis Kenzior 03ff5ef7d0 device: Convert to using IWD_MODULE 2019-05-22 10:20:10 -05:00
Denis Kenzior 978e538f81 station: Convert to use IWD_MODULE 2019-05-22 10:20:10 -05:00
Denis Kenzior 23b278ef52 wsc: Convert to use IWD_MODULE 2019-05-22 10:20:10 -05:00
Denis Kenzior 4cfcb9c88d network: Convert to use IWD_MODULE 2019-05-22 10:20:10 -05:00
Denis Kenzior 800d57d095 knownnetworks: Convert to IWD_MODULE 2019-05-22 10:20:10 -05:00
Denis Kenzior 546c3c26d3 simauth: Convert to use IWD_MODULE 2019-05-22 10:20:08 -05:00
Denis Kenzior b8f6899f40 blacklist: Convert to use IWD_MODULE 2019-05-22 09:58:04 -05:00
Denis Kenzior a1d9c07f2f erp: Convert to using IWD_MODULE 2019-05-19 13:07:13 -05:00
Denis Kenzior 2386fa7938 main: Add IWD_MODULE macro 2019-05-19 13:05:06 -05:00
Denis Kenzior 8dced8b7f7 main: Update to the new genl api 2019-05-17 17:10:18 -05:00
Andrew Zaborowski 925095f835 netdev: Drop remaining whitelist/blacklist code 2019-05-13 14:10:49 -05:00
James Prestwood 7f502ff16f main: initialize erp 2019-04-17 17:06:25 -05:00
Andrew Zaborowski 467b6341d8 manager: Handle interface white/blacklists
Mirror netdev.c white/blacklist logic.  If either or both the whitelist
and the blacklist are given also fall back to not touching the existing
interface setup on the wiphy.
2019-04-16 17:51:00 -05:00
Denis Kenzior 72158e66da main: Move manager initialization
The order of wiphy / netdev dumps matters.  So to preserve the old
behavior, move manager initialization up.
2019-04-11 12:09:07 -05:00
Andrew Zaborowski 530a449337 manager: Add new file for wiphy/interface management
Add manager.c, a new file where the wiphy and interface creation/removal
will be handled and interface use policies will be implemented.  Since
not all kernel-side nl80211 interfaces are tied to kernel-side netdevs,
netdev.c can't manage all of the interfaces that we will be using, so
the logic is being moved to a common place where all interfaces on a
wiphy will be managed according to the policy, device support for things
like P2P and user enabling/disabling/connecting with P2P which require
interfaces to be dynamically added and removed.
2019-04-11 11:17:52 -05:00
Tim Kourt 22318ebbd5 main: Ensure existence of the storage dir at startup
Previously, the storage dir has only been created after a successful
network connection, causing removal of Known Network interface from
Dbus and failure to register dir watcher until daemon is restarted.
2019-02-07 11:07:43 -06:00