mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-04-12 11:27:51 +02:00
wsc: Convert to use IWD_MODULE
This commit is contained in:
parent
4cfcb9c88d
commit
23b278ef52
@ -33,9 +33,6 @@ void netdev_exit(void);
|
|||||||
void netdev_set_nl80211(struct l_genl_family *nl80211);
|
void netdev_set_nl80211(struct l_genl_family *nl80211);
|
||||||
void netdev_shutdown(void);
|
void netdev_shutdown(void);
|
||||||
|
|
||||||
bool wsc_init(void);
|
|
||||||
bool wsc_exit();
|
|
||||||
|
|
||||||
bool device_init(void);
|
bool device_init(void);
|
||||||
void device_exit(void);
|
void device_exit(void);
|
||||||
|
|
||||||
|
@ -525,7 +525,6 @@ int main(int argc, char *argv[])
|
|||||||
goto fail_device;
|
goto fail_device;
|
||||||
|
|
||||||
station_init();
|
station_init();
|
||||||
wsc_init();
|
|
||||||
|
|
||||||
if (iwd_modules_init() < 0)
|
if (iwd_modules_init() < 0)
|
||||||
goto fail_modules;
|
goto fail_modules;
|
||||||
@ -537,7 +536,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
fail_modules:
|
fail_modules:
|
||||||
iwd_modules_exit();
|
iwd_modules_exit();
|
||||||
wsc_exit();
|
|
||||||
station_exit();
|
station_exit();
|
||||||
device_exit();
|
device_exit();
|
||||||
fail_device:
|
fail_device:
|
||||||
|
10
src/wsc.c
10
src/wsc.c
@ -1100,21 +1100,21 @@ static void wsc_netdev_watch(struct netdev *netdev,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wsc_init(void)
|
static int wsc_init(void)
|
||||||
{
|
{
|
||||||
l_debug("");
|
l_debug("");
|
||||||
netdev_watch = netdev_watch_add(wsc_netdev_watch, NULL, NULL);
|
netdev_watch = netdev_watch_add(wsc_netdev_watch, NULL, NULL);
|
||||||
l_dbus_register_interface(dbus_get_bus(), IWD_WSC_INTERFACE,
|
l_dbus_register_interface(dbus_get_bus(), IWD_WSC_INTERFACE,
|
||||||
setup_wsc_interface,
|
setup_wsc_interface,
|
||||||
wsc_free, false);
|
wsc_free, false);
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wsc_exit()
|
static void wsc_exit(void)
|
||||||
{
|
{
|
||||||
l_debug("");
|
l_debug("");
|
||||||
l_dbus_unregister_interface(dbus_get_bus(), IWD_WSC_INTERFACE);
|
l_dbus_unregister_interface(dbus_get_bus(), IWD_WSC_INTERFACE);
|
||||||
netdev_watch_remove(netdev_watch);
|
netdev_watch_remove(netdev_watch);
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IWD_MODULE(wsc, wsc_init, wsc_exit)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user