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

station: Move netconfig_reset() to common path

To avoid repetition, call netconfig_reset in
station_reset_connection_state.
This commit is contained in:
Andrew Zaborowski 2022-06-16 02:02:19 +02:00 committed by Denis Kenzior
parent e88a0757ab
commit 032a3d1473

View File

@ -1623,6 +1623,9 @@ static void station_reset_connection_state(struct station *station)
station_roam_state_clear(station);
if (station->netconfig)
netconfig_reset(station->netconfig);
/* Refresh the ordered network list */
network_rank_update(station->connected_network, false);
l_queue_remove(station->networks_sorted, station->connected_network);
@ -1655,9 +1658,6 @@ static void station_disassociated(struct station *station)
{
l_debug("%u", netdev_get_ifindex(station->netdev));
if (station->netconfig)
netconfig_reset(station->netconfig);
station_reset_connection_state(station);
station_enter_state(station, STATION_STATE_DISCONNECTED);
@ -3096,9 +3096,6 @@ static void station_disconnect_onconnect(struct station *station,
return;
}
if (station->netconfig)
netconfig_reset(station->netconfig);
station_reset_connection_state(station);
station_enter_state(station, STATION_STATE_DISCONNECTING);
@ -3402,9 +3399,6 @@ int station_disconnect(struct station *station)
if (!station->connected_bss)
return -ENOTCONN;
if (station->netconfig)
netconfig_reset(station->netconfig);
/*
* If the disconnect somehow fails we won't know if we're still
* connected so we may as well indicate now that we're no longer