3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-23 06:02:37 +01:00

netdev: sa_query: Fix reason code handling

The reason code field was being obtained as a uint8_t value, while it is
actually a uint16_t in little-endian byte order.

Fixes: f3cc96499c ("netdev: added support for SA Query")
This commit is contained in:
Denis Kenzior 2023-11-13 17:05:13 -06:00
parent bef70275f7
commit e1c2706674

View File

@ -4956,8 +4956,7 @@ static void netdev_unprot_disconnect_event(struct l_genl_msg *msg,
if (!hdr) if (!hdr)
return; return;
/* get reason code, first byte of frame */ reason_code = l_get_le16(mmpdu_body(hdr));
reason_code = l_get_u8(mmpdu_body(hdr));
l_info("disconnect event, src="MAC" dest="MAC" bssid="MAC" reason=%u", l_info("disconnect event, src="MAC" dest="MAC" bssid="MAC" reason=%u",
MAC_STR(hdr->address_2), MAC_STR(hdr->address_1), MAC_STR(hdr->address_2), MAC_STR(hdr->address_1),