diff --git a/src/wsc.c b/src/wsc.c index 10dc3ff5..c883a698 100644 --- a/src/wsc.c +++ b/src/wsc.c @@ -34,6 +34,8 @@ #define WALK_TIME 120 +static struct l_genl_family *nl80211 = NULL; + struct wsc_sm { uint8_t *wsc_ies; size_t wsc_ies_size; @@ -98,3 +100,21 @@ void wsc_sm_free(struct wsc_sm *sm) { l_free(sm); } + +bool wsc_init(struct l_genl_family *in) +{ + nl80211 = in; + return true; +} + +bool wsc_exit() +{ + l_debug(""); + + if (!nl80211) + return false; + + nl80211 = 0; + + return true; +} diff --git a/src/wsc.h b/src/wsc.h index efec1eca..b3cff423 100644 --- a/src/wsc.h +++ b/src/wsc.h @@ -28,3 +28,6 @@ struct wsc_sm; struct wsc_sm *wsc_sm_new_pushbutton(uint32_t ifindex, const uint8_t *addr, uint32_t bands); void wsc_sm_free(struct wsc_sm *wsc_sm); + +bool wsc_init(struct l_genl_family *in); +bool wsc_exit();