3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-02-15 06:00:48 +01:00

netdev: Use CMD_DISCONNECT if OCI fails

If netdev_get_oci fails, a goto deauth is invoked in order to terminate
the current connection and return an error to the caller.  Unfortunately
the deauth label builds CMD_DEAUTHENTICATE in order to terminate the
connection.  This was fine because it used to handle authentication
protocols that ran over CMD_AUTHENTICATE and CMD_ASSOCIATE.  However,
OCI can also be used on FullMAC hardware that does not support them.
Use CMD_DISCONNECT instead which works everywhere.

Fixes: 06482b811626 ("netdev: Obtain operating channel info")
This commit is contained in:
Denis Kenzior 2023-11-13 21:15:59 -06:00
parent e1c2706674
commit afc8f53fd3

View File

@ -2989,7 +2989,7 @@ error:
deauth: deauth:
netdev->result = NETDEV_RESULT_ASSOCIATION_FAILED; netdev->result = NETDEV_RESULT_ASSOCIATION_FAILED;
netdev->last_code = MMPDU_STATUS_CODE_UNSPECIFIED; netdev->last_code = MMPDU_STATUS_CODE_UNSPECIFIED;
msg = netdev_build_cmd_deauthenticate(netdev, msg = netdev_build_cmd_disconnect(netdev,
MMPDU_REASON_CODE_UNSPECIFIED); MMPDU_REASON_CODE_UNSPECIFIED);
netdev->disconnect_cmd_id = l_genl_family_send(nl80211, netdev->disconnect_cmd_id = l_genl_family_send(nl80211,
msg, msg,