From: Jason Self Date: Sun, 6 May 2018 14:47:30 +0000 (-0700) Subject: carl9170 firmware: fix [-Wpacked-not-aligned] warnings X-Git-Tag: v1.2.1^0 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=295a097b10964de3ebcecfead6387225a5f39591;p=librecmc%2Flinux-libre-firmware.git carl9170 firmware: fix [-Wpacked-not-aligned] warnings Mark certain structs/union aligned(4) to fix -Wpacked-not-aligned warnings on gcc 8+. This is a backport of commit b94cc57fa4ee29cb70415b699a1efc5f66eb41c7 dated May 2 2018 from upstream. --- diff --git a/carl9170fw/carlfw/include/dma.h b/carl9170fw/carlfw/include/dma.h index 477c2a2..8141b1c 100644 --- a/carl9170fw/carlfw/include/dma.h +++ b/carl9170fw/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/carl9170fw/include/shared/fwcmd.h b/carl9170fw/include/shared/fwcmd.h index ea1d80f..2a58dd8 100644 --- a/carl9170fw/include/shared/fwcmd.h +++ b/carl9170fw/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/carl9170fw/include/shared/wlan.h b/carl9170fw/include/shared/wlan.h index ea17995..9c6b7ff 100644 --- a/carl9170fw/include/shared/wlan.h +++ b/carl9170fw/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) {