From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v2 01/12] main: move module init into nl80211_appeared
Date: Fri, 11 Oct 2019 12:29:22 -0700 [thread overview]
Message-ID: <20191011192933.13550-1-prestwoj@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1579 bytes --]
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.
---
src/main.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
-v2:
* Moved plugin_init after iwd_modules_init
diff --git a/src/main.c b/src/main.c
index b34da3d0..0e6fad14 100644
--- a/src/main.c
+++ b/src/main.c
@@ -147,6 +147,13 @@ static void nl80211_appeared(const struct l_genl_family_info *info,
l_debug("Found nl80211 interface");
nl80211 = l_genl_family_new(genl, NL80211_GENL_NAME);
+ if (iwd_modules_init() < 0) {
+ l_main_quit();
+ return;
+ }
+
+ plugin_init(plugins, noplugins);
+
manager_init(nl80211, interfaces, nointerfaces);
anqp_init(nl80211);
@@ -482,14 +489,9 @@ int main(int argc, char *argv[])
if (!netdev_init())
goto fail_netdev;
- if (iwd_modules_init() < 0)
- goto fail_modules;
-
- plugin_init(plugins, noplugins);
exit_status = l_main_run_with_signal(signal_handler, NULL);
plugin_exit();
-fail_modules:
iwd_modules_exit();
netdev_exit();
fail_netdev:
--
2.17.1
next reply other threads:[~2019-10-11 19:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 19:29 James Prestwood [this message]
2019-10-11 19:29 ` [PATCH v2 02/12] netdev: utilize IWD_MODULE James Prestwood
2019-10-11 19:29 ` [PATCH v2 03/12] eapol: " James Prestwood
2019-10-11 19:29 ` [PATCH v2 04/12] anqp: " James Prestwood
2019-10-11 19:29 ` [PATCH v2 05/12] manager: remove white/black list from argument James Prestwood
2019-10-11 19:29 ` [PATCH v2 06/12] manager: utilize IWD_MODULE James Prestwood
2019-10-11 19:29 ` [PATCH v2 07/12] wiphy: remove white/blacklist from wiphy_init James Prestwood
2019-10-11 19:29 ` [PATCH v2 08/12] wiphy: utilize IWD_MODULE James Prestwood
2019-10-11 19:29 ` [PATCH v2 09/12] eap: remove mtu argument from eap_init James Prestwood
2019-10-11 19:29 ` [PATCH v2 10/12] wired: update with new eap_init James Prestwood
2019-10-11 19:29 ` [PATCH v2 11/12] unit: update wsc/eapol " James Prestwood
2019-10-11 19:29 ` [PATCH v2 12/12] eap: utilize IWD_MODULE James Prestwood
2019-10-11 20:49 ` [PATCH v2 01/12] main: move module init into nl80211_appeared Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191011192933.13550-1-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox