mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 09:39:25 +01:00
main: Make rfkill an IWD_MODULE
This commit is contained in:
parent
4f58c557f3
commit
3b040f5c27
@ -478,7 +478,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
eap_init(eap_mtu);
|
eap_init(eap_mtu);
|
||||||
eapol_init();
|
eapol_init();
|
||||||
rfkill_init();
|
|
||||||
|
|
||||||
if (!netdev_init())
|
if (!netdev_init())
|
||||||
goto fail_netdev;
|
goto fail_netdev;
|
||||||
@ -494,7 +493,6 @@ fail_modules:
|
|||||||
iwd_modules_exit();
|
iwd_modules_exit();
|
||||||
netdev_exit();
|
netdev_exit();
|
||||||
fail_netdev:
|
fail_netdev:
|
||||||
rfkill_exit();
|
|
||||||
eapol_exit();
|
eapol_exit();
|
||||||
eap_exit();
|
eap_exit();
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ bool rfkill_get_hard_state(unsigned int wiphy_id)
|
|||||||
return entry ? entry->hard_state : false;
|
return entry ? entry->hard_state : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rfkill_init(void)
|
static int rfkill_init(void)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@ -289,7 +289,6 @@ int rfkill_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
l_io_set_close_on_destroy(rfkill_io, true);
|
l_io_set_close_on_destroy(rfkill_io, true);
|
||||||
|
|
||||||
l_io_set_read_handler(rfkill_io, rfkill_read, NULL, NULL);
|
l_io_set_read_handler(rfkill_io, rfkill_read, NULL, NULL);
|
||||||
|
|
||||||
rfkill_map = l_queue_new();
|
rfkill_map = l_queue_new();
|
||||||
@ -297,11 +296,11 @@ int rfkill_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rfkill_exit(void)
|
static void rfkill_exit(void)
|
||||||
{
|
{
|
||||||
l_io_destroy(rfkill_io);
|
l_io_destroy(rfkill_io);
|
||||||
|
|
||||||
l_queue_destroy(rfkill_map, l_free);
|
l_queue_destroy(rfkill_map, l_free);
|
||||||
|
|
||||||
l_queue_destroy(rfkill_watches, l_free);
|
l_queue_destroy(rfkill_watches, l_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IWD_MODULE(rfkill, rfkill_init, rfkill_exit)
|
||||||
|
@ -29,6 +29,3 @@ bool rfkill_watch_remove(uint32_t watch_id);
|
|||||||
bool rfkill_get_soft_state(unsigned int wiphy_id);
|
bool rfkill_get_soft_state(unsigned int wiphy_id);
|
||||||
bool rfkill_set_soft_state(unsigned int wiphy_id, bool state);
|
bool rfkill_set_soft_state(unsigned int wiphy_id, bool state);
|
||||||
bool rfkill_get_hard_state(unsigned int wiphy_id);
|
bool rfkill_get_hard_state(unsigned int wiphy_id);
|
||||||
|
|
||||||
int rfkill_init(void);
|
|
||||||
void rfkill_exit(void);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user