git: 6cbf8a04b186 - main - LinuxKPI: 802.11: mark struct ieee80211_ht_cap __packed
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 26 May 2025 23:33:56 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6cbf8a04b1864d933506301cabe213a9c918d968 commit 6cbf8a04b1864d933506301cabe213a9c918d968 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-05-26 23:20:20 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-05-26 23:33:08 +0000 LinuxKPI: 802.11: mark struct ieee80211_ht_cap __packed In lkpi_sta_sync_ht_from_ni() we are casting the information element (IE) data to this struct as net80211 does not save the mcs/rx_mask. Not marking the structs packed results in the mcs information not being copied correctly and rx_nss calculations possibly being off. Even worse, at a later stage iwlwifi mvm/rs.c would extract the mcs values from the same field to pass to the firmware which will than crash in an assert as we would want to do HT with an empty MCS set. Sponsored by: The FreeBSD Foundation MFC after: sunrise Discovered: while testing other features on arm64. --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 396204c3c484..fe2055f05969 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -304,7 +304,7 @@ struct ieee80211_mcs_info { uint16_t rx_highest; uint8_t tx_params; uint8_t __reserved[3]; -}; +} __packed; /* 802.11-2020, 9.4.2.55.1 HT Capabilities element structure */ struct ieee80211_ht_cap { @@ -314,7 +314,7 @@ struct ieee80211_ht_cap { uint16_t extended_ht_cap_info; uint32_t tx_BF_cap_info; uint8_t antenna_selection_info; -}; +} __packed; #define IEEE80211_HT_MAX_AMPDU_FACTOR 13 #define IEEE80211_HE_HT_MAX_AMPDU_FACTOR 16