mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-23 07:29:28 +01:00
station: Simplify logic
This commit is contained in:
parent
a2354f88a6
commit
d51c3db4ce
@ -1821,20 +1821,16 @@ static void station_disconnect_reconnect_cb(struct netdev *netdev, bool success,
|
|||||||
{
|
{
|
||||||
struct station *station = user_data;
|
struct station *station = user_data;
|
||||||
struct handshake_state *hs;
|
struct handshake_state *hs;
|
||||||
int r;
|
|
||||||
|
|
||||||
hs = station_handshake_setup(station, station->connected_network,
|
hs = station_handshake_setup(station, station->connected_network,
|
||||||
station->connected_bss);
|
station->connected_bss);
|
||||||
if (!hs)
|
if (!hs)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
r = netdev_connect(station->netdev, station->connected_bss, hs,
|
if (netdev_connect(station->netdev, station->connected_bss, hs,
|
||||||
station_netdev_event, station_connect_cb,
|
station_netdev_event, station_connect_cb,
|
||||||
station);
|
station) > 0)
|
||||||
if (r < 0)
|
return;
|
||||||
goto error;
|
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
error:
|
error:
|
||||||
station_disconnect(station);
|
station_disconnect(station);
|
||||||
|
Loading…
Reference in New Issue
Block a user