mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-05-03 23:27:33 +02:00
netdev: ensure DISCONNECT_BY_SME uses a reason_code
Station callbacks expect a reason code (as opposed to status codes) with this event type.
This commit is contained in:
parent
dfe57b8bb0
commit
e8eb05feea
@ -771,10 +771,15 @@ static void netdev_connect_failed(struct netdev *netdev,
|
|||||||
|
|
||||||
if (connect_cb)
|
if (connect_cb)
|
||||||
connect_cb(netdev, result, &status_or_reason, connect_data);
|
connect_cb(netdev, result, &status_or_reason, connect_data);
|
||||||
else if (event_filter)
|
else if (event_filter) {
|
||||||
|
/* NETDEV_EVENT_DISCONNECT_BY_SME expects a reason code */
|
||||||
|
if (result != NETDEV_RESULT_HANDSHAKE_FAILED)
|
||||||
|
status_or_reason = MMPDU_REASON_CODE_UNSPECIFIED;
|
||||||
|
|
||||||
event_filter(netdev, NETDEV_EVENT_DISCONNECT_BY_SME,
|
event_filter(netdev, NETDEV_EVENT_DISCONNECT_BY_SME,
|
||||||
&status_or_reason,
|
&status_or_reason,
|
||||||
connect_data);
|
connect_data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void netdev_disconnect_cb(struct l_genl_msg *msg, void *user_data)
|
static void netdev_disconnect_cb(struct l_genl_msg *msg, void *user_data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user