From b94cc57fa4ee29cb70415b699a1efc5f66eb41c7 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Wed, 2 May 2018 19:12:51 +0200 Subject: [PATCH] carl9170 firmware: fix [-Wpacked-not-aligned] warnings Mark certain structs/union aligned(4) to fix -Wpacked-not-aligned warnings on gcc 8+. Signed-off-by: Christian Lamparter --- carlfw/include/dma.h | 4 ++-- include/shared/fwcmd.h | 2 +- include/shared/wlan.h | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/carlfw/include/dma.h b/carlfw/include/dma.h index 477c2a2..8141b1c 100644 --- a/carlfw/include/dma.h +++ b/carlfw/include/dma.h @@ -73,12 +73,12 @@ struct carl9170_tx_ba_superframe { struct ar9170_tx_null_frame { struct ar9170_tx_hwdesc hdr; struct ieee80211_hdr null; -} __packed; +} __packed __aligned(4); struct carl9170_tx_null_superframe { struct carl9170_tx_superdesc s; struct ar9170_tx_null_frame f; -} __packed; +} __packed __aligned(4); #define CARL9170_BA_BUFFER_LEN (__roundup(sizeof(struct carl9170_tx_ba_superframe), 16)) #define CARL9170_RSP_BUFFER_LEN AR9170_BLOCK_SIZE diff --git a/include/shared/fwcmd.h b/include/shared/fwcmd.h index ea1d80f..2a58dd8 100644 --- a/include/shared/fwcmd.h +++ b/include/shared/fwcmd.h @@ -240,7 +240,7 @@ struct carl9170_cmd { struct carl9170_bcn_ctrl_cmd bcn_ctrl; struct carl9170_rx_filter_cmd rx_filter; u8 data[CARL9170_MAX_CMD_PAYLOAD_LEN]; - } __packed; + } __packed __aligned(4); } __packed __aligned(4); #define CARL9170_TX_STATUS_QUEUE 3 diff --git a/include/shared/wlan.h b/include/shared/wlan.h index ea17995..9c6b7ff 100644 --- a/include/shared/wlan.h +++ b/include/shared/wlan.h @@ -370,24 +370,24 @@ struct ar9170_rx_frame_single { struct ieee80211_hdr i3e; struct ar9170_rx_phystatus phy_tail; struct ar9170_rx_macstatus macstatus; -} __packed; +} __packed __aligned(4); struct ar9170_rx_frame_head { struct ar9170_rx_head phy_head; struct ieee80211_hdr i3e; struct ar9170_rx_macstatus macstatus; -} __packed; +} __packed __aligned(4); struct ar9170_rx_frame_middle { struct ieee80211_hdr i3e; struct ar9170_rx_macstatus macstatus; -} __packed; +} __packed __aligned(4); struct ar9170_rx_frame_tail { struct ieee80211_hdr i3e; struct ar9170_rx_phystatus phy_tail; struct ar9170_rx_macstatus macstatus; -} __packed; +} __packed __aligned(4); struct ar9170_rx_frame { union { @@ -395,8 +395,8 @@ struct ar9170_rx_frame { struct ar9170_rx_frame_head head; struct ar9170_rx_frame_middle middle; struct ar9170_rx_frame_tail tail; - } __packed; -} __packed; + } __packed __aligned(4); +} __packed __aligned(4); static inline u8 ar9170_get_decrypt_type(struct ar9170_rx_macstatus *t) { -- 2.31.1