From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 11/11] eap: utilize IWD_MODULE
Date: Fri, 11 Oct 2019 10:24:17 -0700 [thread overview]
Message-ID: <20191011172417.23328-11-prestwoj@gmail.com> (raw)
In-Reply-To: <20191011172417.23328-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]
Converts eap into an IWD module.
---
src/eap.c | 7 ++++++-
src/eap.h | 2 +-
src/main.c | 4 ----
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/eap.c b/src/eap.c
index b0fa72cf..23868811 100644
--- a/src/eap.c
+++ b/src/eap.c
@@ -33,6 +33,7 @@
#include "src/missing.h"
#include "src/eap.h"
#include "src/eap-private.h"
+#include "src/iwd.h"
static uint32_t default_mtu;
static struct l_queue *eap_methods;
@@ -721,7 +722,7 @@ static void __eap_method_disable(struct eap_method_desc *start,
extern struct eap_method_desc __start___eap[];
extern struct eap_method_desc __stop___eap[];
-void eap_init(void)
+int eap_init(void)
{
eap_methods = l_queue_new();
__eap_method_enable(__start___eap, __stop___eap);
@@ -733,6 +734,8 @@ void eap_init(void)
*/
if (default_mtu == 0)
default_mtu = 1020;
+
+ return 0;
}
void eap_exit(void)
@@ -740,3 +743,5 @@ void eap_exit(void)
__eap_method_disable(__start___eap, __stop___eap);
l_queue_destroy(eap_methods, NULL);
}
+
+IWD_MODULE(eap, eap_init, eap_exit);
diff --git a/src/eap.h b/src/eap.h
index 8f128304..8b2de8c9 100644
--- a/src/eap.h
+++ b/src/eap.h
@@ -95,5 +95,5 @@ void eap_rx_packet(struct eap_state *eap, const uint8_t *pkt, size_t len);
void __eap_set_config(struct l_settings *config);
-void eap_init(void);
+int eap_init(void);
void eap_exit(void);
diff --git a/src/main.c b/src/main.c
index 7123f7a9..9c5ab9ac 100644
--- a/src/main.c
+++ b/src/main.c
@@ -491,16 +491,12 @@ int main(int argc, char *argv[])
l_dbus_set_disconnect_handler(dbus, dbus_disconnected, NULL, NULL);
dbus_init(dbus);
- eap_init();
-
plugin_init(plugins, noplugins);
exit_status = l_main_run_with_signal(signal_handler, NULL);
plugin_exit();
iwd_modules_exit();
- eap_exit();
-
dbus_exit();
l_dbus_destroy(dbus);
storage_cleanup_dirs();
--
2.17.1
prev parent reply other threads:[~2019-10-11 17:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 17:24 [PATCH 01/11] main: move module init into nl80211_appeared James Prestwood
2019-10-11 17:24 ` [PATCH 02/11] netdev: utilize IWD_MODULE James Prestwood
2019-10-11 17:24 ` [PATCH 03/11] eapol: " James Prestwood
2019-10-11 17:24 ` [PATCH 04/11] anqp: " James Prestwood
2019-10-11 17:24 ` [PATCH 05/11] agent: " James Prestwood
2019-10-11 18:53 ` Denis Kenzior
2019-10-11 17:24 ` [PATCH 06/11] manager: " James Prestwood
2019-10-11 18:57 ` Denis Kenzior
2019-10-11 17:24 ` [PATCH 07/11] wiphy: " James Prestwood
2019-10-11 17:24 ` [PATCH 08/11] eap: remove mtu argument from eap_init James Prestwood
2019-10-11 17:24 ` [PATCH 09/11] wired: update with new eap_init James Prestwood
2019-10-11 17:24 ` [PATCH 10/11] unit: update wsc/eapol " James Prestwood
2019-10-11 17:24 ` James Prestwood [this message]
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=20191011172417.23328-11-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