Skip to contentSkip to conversation

wifi: mt76: mt7928: makes struct beacon_tlv 4-byte aligned.

PATCH New Anthony Liu 1 participant 1 message Oct 5

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: mt76: mt7928: makes struct beacon_tlv 4-byte aligned.

mt76 fails when offloading beacon to MT7928 FW.

This is caused by newly added 4-byte alignment check in MT7928 FW and works when beacon_tlv is 4-byte aligned. MT7925 is not affected because it accepts same struct with or without extra padding bytes.

---
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +5 -1
index 376cc4833242..ff51d8189b46 100644
@@ -2392,10 +2392,13 @@ mt7925_mcu_uni_add_beacon_offload(struct mt792x_dev *dev,
 			u8 pad[3];
 		} __packed hdr;
 		struct bcn_content_tlv {
+			/* DW 0 */
 			__le16 tag;
 			__le16 len;
+			/* DW 1 */
 			__le16 tim_ie_pos;
 			__le16 csa_ie_pos;
+			/* DW 2 */
 			__le16 bcc_ie_pos;
 			/* 0: disable beacon offload
 			 * 1: enable beacon offload
@@ -2406,8 +2409,9 @@ mt7925_mcu_uni_add_beacon_offload(struct mt792x_dev *dev,
 			 * 1: only cap field IE
 			 */
 			u8 type;
+			/* DW 3~130 */
 			__le16 pkt_len;
-			u8 pkt[512];
+			u8 pkt[510];
 		} __packed beacon_tlv;
 	} req = {
 		.hdr = {
Signature · 1 line
2.45.2