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
1 changed files with 1 additions and 2 deletions

View File

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