station: tie diagnostic interface cleanup to DISCONNECTING
PATCH v4 1/2 station: tie diagnostic interface cleanup to DISCONNECTING
Prior to this the diagnostic interface was taken down when station transitioned to DISCONNECTED. This worked but once station is in a DISCONNECTING state it then calls netdev_disconnect(). Trying to get any diagnostic data during this time may not work as its unknown what state exactly the kernel is in. To be safe take the interface down when station is DISCONNECTING.
--- src/station.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
v4:
* Added this patch since the diagnostic data really only is relavant when station is connected.
src/station.c +4 -3
@@ -1229,9 +1229,6 @@ static void station_enter_state(struct station *station,periodic_scan_stop (station);break ;case STATION_STATE_DISCONNECTED : -l_dbus_object_remove_interface (dbus_get_bus (), -netdev_get_path (station->netdev), -IWD_STATION_DIAGNOSTIC_INTERFACE );periodic_scan_stop (station);break ;case STATION_STATE_CONNECTED :
@@ -1242,6 +1239,10 @@ static void station_enter_state(struct station *station,periodic_scan_stop (station);break ;case STATION_STATE_DISCONNECTING : +l_dbus_object_remove_interface (dbus_get_bus (), +netdev_get_path (station->netdev), +IWD_STATION_DIAGNOSTIC_INTERFACE ); +break ;case STATION_STATE_ROAMING :break ; }
Signature · 1 line
2.26.2
PATCH v4 2/2 station: transition to disconnecting on station_free
This allows station to gracefully clean up things like the diagnostic interface which is directly tied to stations CONNECTED/DISCONNECTING states.
--- src/station.c | 2 ++ 1 file changed, 2 insertions(+)
v4:
* Changed to DISCONNECTING due to new patch.
src/station.c +2 -0
@@ -3487,6 +3487,8 @@ static void station_free(struct station *station)if (station->connected_bss)netdev_disconnect (station->netdev,NULL ,NULL ); +station_enter_state (station,STATION_STATE_DISCONNECTING ); +if (station->netconfig) {netconfig_destroy (station->netconfig); station->netconfig =NULL ;
Signature · 1 line
2.26.2
Re: [PATCH v4 2/2] station: transition to disconnecting on station_free
Hi James,
Quoted 15 lines · James Prestwood
This allows station to gracefully clean up things like the diagnostic interface which is directly tied to stations CONNECTED/DISCONNECTING states.
--- src/station.c | 2 ++ 1 file changed, 2 insertions(+)v4:
* Changed to DISCONNECTING due to new patch.src/station.c +0
-0
src/station.c static void station_free(struct station *station) · line 3491
Quoted 5 lines
src/station.c +2
-0@@ -3487,6 +3487,8 @@ static void station_free(struct station *station)if (station->connected_bss)netdev_disconnect (station->netdev,NULL ,NULL ); +station_enter_state (station,STATION_STATE_DISCONNECTING ); +
I keep going back and forth on this, but I think it would be safer if we invoked unregister_interface directly.
src/station.c static void station_free(struct station *station) · line 3494
Quoted 4 lines
src/station.c +0
-0if (station->netconfig) {netconfig_destroy (station->netconfig); station->netconfig =NULL ;
Regards,
-Denis
Denis Kenzior
AppliedHi James,
Quoted 6 lines · James Prestwood
Prior to this the diagnostic interface was taken down when station transitioned to DISCONNECTED. This worked but once station is in a DISCONNECTING state it then calls
netdev_disconnect(). Trying to get any diagnostic data during this time may not work as its unknown what state exactly the kernel is in. To be safe take the interface down when station is DISCONNECTING.
Quoted 8 lines
--- src/station.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)v4:
* Added this patch since the diagnostic data really only is relavant when station is connected.
Applied, thanks.
Regards,
-Denis