3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 02:19:26 +01:00

erp: Convert to using IWD_MODULE

This commit is contained in:
Denis Kenzior 2019-05-19 12:58:12 -05:00
parent 2386fa7938
commit a1d9c07f2f
3 changed files with 7 additions and 8 deletions

View File

@ -31,6 +31,7 @@
#include <ell/ell.h> #include <ell/ell.h>
#include "src/missing.h" #include "src/missing.h"
#include "src/iwd.h"
#include "src/eap-private.h" #include "src/eap-private.h"
#include "src/erp.h" #include "src/erp.h"
#include "src/crypto.h" #include "src/crypto.h"
@ -525,12 +526,16 @@ const void *erp_get_rmsk(struct erp_state *erp, size_t *rmsk_len)
return erp->rmsk; return erp->rmsk;
} }
void erp_init(void) static int erp_init(void)
{ {
key_cache = l_queue_new(); key_cache = l_queue_new();
return 0;
} }
void erp_exit(void) static void erp_exit(void)
{ {
l_queue_destroy(key_cache, erp_cache_entry_destroy); l_queue_destroy(key_cache, erp_cache_entry_destroy);
} }
IWD_MODULE(erp, erp_init, erp_exit)

View File

@ -51,6 +51,3 @@ struct erp_cache_entry *erp_cache_get(const char *ssid);
void erp_cache_put(struct erp_cache_entry *cache); void erp_cache_put(struct erp_cache_entry *cache);
const char *erp_cache_entry_get_identity(struct erp_cache_entry *cache); const char *erp_cache_entry_get_identity(struct erp_cache_entry *cache);
void erp_init(void);
void erp_exit(void);

View File

@ -46,7 +46,6 @@
#include "src/adhoc.h" #include "src/adhoc.h"
#include "src/blacklist.h" #include "src/blacklist.h"
#include "src/storage.h" #include "src/storage.h"
#include "src/erp.h"
#include "src/backtrace.h" #include "src/backtrace.h"
@ -533,7 +532,6 @@ int main(int argc, char *argv[])
known_networks_init(); known_networks_init();
sim_auth_init(); sim_auth_init();
blacklist_init(); blacklist_init();
erp_init();
if (iwd_modules_init() < 0) if (iwd_modules_init() < 0)
goto fail_modules; goto fail_modules;
@ -545,7 +543,6 @@ int main(int argc, char *argv[])
fail_modules: fail_modules:
iwd_modules_exit(); iwd_modules_exit();
erp_exit();
blacklist_exit(); blacklist_exit();
sim_auth_exit(); sim_auth_exit();
known_networks_exit(); known_networks_exit();