mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-02 01:02:34 +01:00
netdev: Fix crash on netdev_disconnect
This commit is contained in:
parent
adde4e2db9
commit
cec1546fce
@ -1463,6 +1463,10 @@ int netdev_disconnect(struct netdev *netdev,
|
|||||||
if (netdev->disconnect_cmd_id)
|
if (netdev->disconnect_cmd_id)
|
||||||
return -EINPROGRESS;
|
return -EINPROGRESS;
|
||||||
|
|
||||||
|
/* Build deauthenticate prior to handshake_state being cleared */
|
||||||
|
deauthenticate = netdev_build_cmd_deauthenticate(netdev,
|
||||||
|
MPDU_REASON_CODE_DEAUTH_LEAVING);
|
||||||
|
|
||||||
/* Only perform this if we haven't successfully fully associated yet */
|
/* Only perform this if we haven't successfully fully associated yet */
|
||||||
if (!netdev->operational) {
|
if (!netdev->operational) {
|
||||||
netdev->result = NETDEV_RESULT_ABORTED;
|
netdev->result = NETDEV_RESULT_ABORTED;
|
||||||
@ -1471,8 +1475,6 @@ int netdev_disconnect(struct netdev *netdev,
|
|||||||
netdev_connect_free(netdev);
|
netdev_connect_free(netdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
deauthenticate = netdev_build_cmd_deauthenticate(netdev,
|
|
||||||
MPDU_REASON_CODE_DEAUTH_LEAVING);
|
|
||||||
netdev->disconnect_cmd_id = l_genl_family_send(nl80211, deauthenticate,
|
netdev->disconnect_cmd_id = l_genl_family_send(nl80211, deauthenticate,
|
||||||
netdev_cmd_deauthenticate_cb, netdev, NULL);
|
netdev_cmd_deauthenticate_cb, netdev, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user