commit d7c52b8280ae0a0de08799d142567db92312a540
parent fb65b5f92c1aa2b7e160e95e3bd56a1beee5e450
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date: Mon, 30 Sep 2019 09:35:52 -0700
station: netconfig devices based on station state
Diffstat:
1 file changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/station.c b/src/station.c
@@ -1158,8 +1158,23 @@ static void station_enter_state(struct station *station,
IWD_NETWORK_INTERFACE, "Connected");
/* fall through */
case STATION_STATE_DISCONNECTED:
+ periodic_scan_stop(station);
+
+ break;
case STATION_STATE_CONNECTED:
periodic_scan_stop(station);
+
+ if (station->state == STATION_STATE_ROAMING) {
+ netconfig_reconfigure(station->netconfig);
+
+ break;
+ }
+
+ netconfig_configure(station->netconfig,
+ network_get_settings(
+ station->connected_network),
+ netdev_get_address(
+ station->netdev));
break;
case STATION_STATE_DISCONNECTING:
case STATION_STATE_ROAMING:
@@ -1247,6 +1262,8 @@ static void station_disassociated(struct station *station)
{
l_debug("%u", netdev_get_ifindex(station->netdev));
+ netconfig_reset(station->netconfig);
+
station_reset_connection_state(station);
station_enter_state(station, STATION_STATE_DISCONNECTED);
@@ -2327,6 +2344,8 @@ static void station_disconnect_onconnect(struct station *station,
return;
}
+ netconfig_reset(station->netconfig);
+
station_reset_connection_state(station);
station_enter_state(station, STATION_STATE_DISCONNECTING);
@@ -2562,6 +2581,8 @@ int station_disconnect(struct station *station)
station_disconnect_cb, station) < 0)
return -EIO;
+ 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