3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-23 06:02:37 +01:00

manager: remove white/black list from argument

Instead we add getters for these lists that manager_init can use.
This commit is contained in:
James Prestwood 2019-10-11 12:29:26 -07:00 committed by Denis Kenzior
parent 2ab8d4bbed
commit 87c42bccf1
3 changed files with 18 additions and 5 deletions

View File

@ -30,10 +30,12 @@ struct l_genl *iwd_get_genl(void);
void netdev_shutdown(void); void netdev_shutdown(void);
bool manager_init(struct l_genl_family *in, bool manager_init(struct l_genl_family *in);
const char *if_whitelist, const char *if_blacklist);
void manager_exit(void); void manager_exit(void);
const char *iwd_get_iface_whitelist(void);
const char *iwd_get_iface_blacklist(void);
struct iwd_module_desc { struct iwd_module_desc {
const char *name; const char *name;
int (*init)(void); int (*init)(void);

View File

@ -102,6 +102,16 @@ struct l_genl *iwd_get_genl(void)
return genl; return genl;
} }
const char *iwd_get_iface_whitelist(void)
{
return interfaces;
}
const char *iwd_get_iface_blacklist(void)
{
return nointerfaces;
}
static void usage(void) static void usage(void)
{ {
printf("iwd - Wireless daemon\n" printf("iwd - Wireless daemon\n"
@ -154,7 +164,7 @@ static void nl80211_appeared(const struct l_genl_family_info *info,
plugin_init(plugins, noplugins); plugin_init(plugins, noplugins);
manager_init(nl80211, interfaces, nointerfaces); manager_init(nl80211);
if (!wiphy_init(nl80211, phys, nophys)) if (!wiphy_init(nl80211, phys, nophys))
l_error("Unable to init wiphy functionality"); l_error("Unable to init wiphy functionality");

View File

@ -584,14 +584,15 @@ static void manager_config_notify(struct l_genl_msg *msg, void *user_data)
} }
} }
bool manager_init(struct l_genl_family *in, bool manager_init(struct l_genl_family *in)
const char *if_whitelist, const char *if_blacklist)
{ {
const struct l_settings *config = iwd_get_config(); const struct l_settings *config = iwd_get_config();
struct l_genl_msg *msg; struct l_genl_msg *msg;
unsigned int wiphy_dump; unsigned int wiphy_dump;
unsigned int interface_dump; unsigned int interface_dump;
const char *randomize_str; const char *randomize_str;
const char *if_whitelist = iwd_get_iface_whitelist();
const char *if_blacklist = iwd_get_iface_blacklist();
nl80211 = in; nl80211 = in;