mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: fix mt7996_mcu_all_sta_info_event struct packing
The internal struct and union inside mt7996_mcu_all_sta_info_event is
marked as being aligned, which conflicts with it being unaligned
within that structure:
drivers/net/wireless/mediatek/mt76/mt7996/mcu.h:165:2: error: field within 'struct mt7996_mcu_all_sta_info_event' is less aligned than 'union mt7996_mcu_all_sta_info_event::(anonymous at ../drivers/net/wireless/mediatek/mt76/mt7996/mcu.h:165:2)' and is usually due to 'struct mt7996_mcu_all_sta_info_event' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
Mark all three as being packed as well to ensure byte packing for
the entire thing.
Fixes: adde3eed4a75 ("wifi: mt76: mt7996: Add mcu commands for getting sta tx statistic")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
17297c97b7
commit
eeb48c0810
+3
-3
@@ -212,15 +212,15 @@ struct mt7996_mcu_all_sta_info_event {
|
||||
u8 rsv[2];
|
||||
__le32 tx_bytes[IEEE80211_NUM_ACS];
|
||||
__le32 rx_bytes[IEEE80211_NUM_ACS];
|
||||
} adm_stat[0];
|
||||
} adm_stat[0] __packed;
|
||||
|
||||
struct {
|
||||
__le16 wlan_idx;
|
||||
u8 rsv[2];
|
||||
__le32 tx_msdu_cnt;
|
||||
__le32 rx_msdu_cnt;
|
||||
} msdu_cnt[0];
|
||||
};
|
||||
} msdu_cnt[0] __packed;
|
||||
} __packed;
|
||||
} __packed;
|
||||
|
||||
struct mt7996_mcu_wed_rro_event {
|
||||
|
||||
Reference in New Issue
Block a user