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.
This commit is contained in:
Andrew Zaborowski 2019-05-02 12:55:20 +02:00 committed by Denis Kenzior
parent 922f4a30dd
commit 06eb3bbf6a
1 changed files with 10 additions and 10 deletions

View File

@ -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;