From 06eb3bbf6a556ea0c3eb1c928d133346f1d1853b Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Thu, 2 May 2019 12:55:20 +0200 Subject: [PATCH] manager: Set state->use_default in manager_rx_cmd_new_wiphy Make sure this gets set both when we discover a wiphy through a netlink event in runtime, and when we dump all wiphys on startup. --- src/manager.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/manager.c b/src/manager.c index 132ac188..3ef8b59a 100644 --- a/src/manager.c +++ b/src/manager.c @@ -369,16 +369,6 @@ static void manager_wiphy_dump_interfaces(struct wiphy_setup_state *state) l_debug(""); state->pending_cmd_count++; - - /* - * If whitelist/blacklist were given only try to use existing - * interfaces same as when the driver does not support NEW_INTERFACE - * or DEL_INTERFACE, otherwise the interface names will become - * meaningless after we've created our own interface(s). Optimally - * phy name white/blacklists should be used. - */ - if (whitelist_filter || blacklist_filter) - state->use_default = true; } static struct wiphy_setup_state *manager_rx_cmd_new_wiphy( @@ -425,6 +415,16 @@ static struct wiphy_setup_state *manager_rx_cmd_new_wiphy( state->wiphy = wiphy; l_queue_push_tail(pending_wiphys, state); + /* + * If whitelist/blacklist were given only try to use existing + * interfaces same as when the driver does not support NEW_INTERFACE + * or DEL_INTERFACE, otherwise the interface names will become + * meaningless after we've created our own interface(s). Optimally + * phy name white/blacklists should be used. + */ + if (whitelist_filter || blacklist_filter) + state->use_default = true; + done: wiphy_update_from_genl(wiphy, msg); return state;