mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
knownnetworks: Add UPDATED event
If a known network is modified on disk known networks does not have any way of notifying other modules. This will be needed to support a corner case in DPP if a profile exists but is overwritten after DPP configuration. Add this event to known networks and handle it in network.c (though nothing needs to be done in that case).
This commit is contained in:
parent
688d277008
commit
7a76385ec9
@ -468,6 +468,10 @@ void known_network_update(struct network_info *network,
|
||||
known_network_set_autoconnect(network, new->is_autoconnectable);
|
||||
|
||||
memcpy(&network->config, new, sizeof(struct network_config));
|
||||
|
||||
WATCHLIST_NOTIFY(&known_network_watches,
|
||||
known_networks_watch_func_t,
|
||||
KNOWN_NETWORKS_EVENT_UPDATED, network);
|
||||
}
|
||||
|
||||
bool known_networks_foreach(known_networks_foreach_func_t function,
|
||||
|
@ -35,6 +35,7 @@ struct network_info;
|
||||
enum known_networks_event {
|
||||
KNOWN_NETWORKS_EVENT_ADDED,
|
||||
KNOWN_NETWORKS_EVENT_REMOVED,
|
||||
KNOWN_NETWORKS_EVENT_UPDATED,
|
||||
};
|
||||
|
||||
struct network_info_ops {
|
||||
|
@ -2033,6 +2033,8 @@ static void known_networks_changed(enum known_networks_event event,
|
||||
case KNOWN_NETWORKS_EVENT_REMOVED:
|
||||
station_foreach(emit_known_network_removed, (void *) info);
|
||||
break;
|
||||
case KNOWN_NETWORKS_EVENT_UPDATED:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user