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

station: Convert to use IWD_MODULE

This commit is contained in:
Denis Kenzior 2019-05-22 10:05:45 -05:00
parent 23b278ef52
commit 978e538f81
3 changed files with 4 additions and 8 deletions

View File

@ -36,9 +36,6 @@ void netdev_shutdown(void);
bool device_init(void);
void device_exit(void);
bool station_init(void);
void station_exit(void);
bool manager_init(struct l_genl_family *in,
const char *if_whitelist, const char *if_blacklist);
void manager_exit(void);

View File

@ -524,8 +524,6 @@ int main(int argc, char *argv[])
if (!device_init())
goto fail_device;
station_init();
if (iwd_modules_init() < 0)
goto fail_modules;
@ -536,7 +534,6 @@ int main(int argc, char *argv[])
fail_modules:
iwd_modules_exit();
station_exit();
device_exit();
fail_device:
netdev_exit();

View File

@ -2792,7 +2792,7 @@ static void station_netdev_watch(struct netdev *netdev,
}
}
bool station_init(void)
static int station_init(void)
{
station_list = l_queue_new();
netdev_watch = netdev_watch_add(station_netdev_watch, NULL, NULL);
@ -2802,10 +2802,12 @@ bool station_init(void)
return true;
}
void station_exit(void)
static void station_exit(void)
{
l_dbus_unregister_interface(dbus_get_bus(), IWD_STATION_INTERFACE);
netdev_watch_remove(netdev_watch);
l_queue_destroy(station_list, NULL);
station_list = NULL;
}
IWD_MODULE(station, station_init, station_exit)