3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

eap: utilize IWD_MODULE

Converts eap into an IWD module.
This commit is contained in:
James Prestwood 2019-10-11 12:29:33 -07:00 committed by Denis Kenzior
parent f71a28ce38
commit fe179f96fd
3 changed files with 7 additions and 6 deletions

View File

@ -33,6 +33,7 @@
#include "src/missing.h" #include "src/missing.h"
#include "src/eap.h" #include "src/eap.h"
#include "src/eap-private.h" #include "src/eap-private.h"
#include "src/iwd.h"
static uint32_t default_mtu; static uint32_t default_mtu;
static struct l_queue *eap_methods; 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 __start___eap[];
extern struct eap_method_desc __stop___eap[]; extern struct eap_method_desc __stop___eap[];
void eap_init(void) int eap_init(void)
{ {
eap_methods = l_queue_new(); eap_methods = l_queue_new();
__eap_method_enable(__start___eap, __stop___eap); __eap_method_enable(__start___eap, __stop___eap);
@ -733,6 +734,8 @@ void eap_init(void)
*/ */
if (default_mtu == 0) if (default_mtu == 0)
default_mtu = 1020; default_mtu = 1020;
return 0;
} }
void eap_exit(void) void eap_exit(void)
@ -740,3 +743,5 @@ void eap_exit(void)
__eap_method_disable(__start___eap, __stop___eap); __eap_method_disable(__start___eap, __stop___eap);
l_queue_destroy(eap_methods, NULL); l_queue_destroy(eap_methods, NULL);
} }
IWD_MODULE(eap, eap_init, eap_exit);

View File

@ -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_set_config(struct l_settings *config);
void eap_init(void); int eap_init(void);
void eap_exit(void); void eap_exit(void);

View File

@ -493,15 +493,11 @@ int main(int argc, char *argv[])
l_dbus_set_disconnect_handler(dbus, dbus_disconnected, NULL, NULL); l_dbus_set_disconnect_handler(dbus, dbus_disconnected, NULL, NULL);
dbus_init(dbus); dbus_init(dbus);
eap_init();
exit_status = l_main_run_with_signal(signal_handler, NULL); exit_status = l_main_run_with_signal(signal_handler, NULL);
plugin_exit(); plugin_exit();
iwd_modules_exit(); iwd_modules_exit();
eap_exit();
dbus_exit(); dbus_exit();
l_dbus_destroy(dbus); l_dbus_destroy(dbus);
storage_cleanup_dirs(); storage_cleanup_dirs();