mirror_ubuntu-kernels/drivers/net/wireless/ath/carl9170
Arnd Bergmann ca9ad549e4 carl9170: fix struct alignment conflict
Multiple structures in the carl9170 driver have alignment
impossible alignment constraints that gcc warns about when
building with 'make W=1':

drivers/net/wireless/ath/carl9170/fwcmd.h:243:2: warning: alignment 1 of 'union <anonymous>' is less than 4 [-Wpacked-not-aligned]
drivers/net/wireless/ath/carl9170/wlan.h:373:1: warning: alignment 1 of 'struct ar9170_rx_frame_single' is less than 2 [-Wpacked-not-aligned]

In the carl9170_cmd structure, multiple members that have an explicit
alignment requirement of four bytes are added into a union with explicit
byte alignment, but this in turn is part of a structure that also has
four-byte alignment.

In the wlan.h header, multiple structures contain a ieee80211_hdr member
that is required to be two-byte aligned to avoid alignmnet faults when
processing network headers, but all members are forced to be byte-aligned
using the __packed tag at the end of the struct definition.

In both cases, leaving out the packing does not change the internal
layout of the structure but changes the alignment constraint of the
structure itself.

Change all affected structures to only apply packing where it does
not violate the alignment requirement of the contained structure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210204162926.3262598-1-arnd@kernel.org
2021-02-09 09:24:20 +02:00
..
carl9170.h carl9170: Convert 'ar9170_qmap' to inline function 2020-08-31 18:19:26 +03:00
cmd.c
cmd.h
debug.c carl9170: remove trailing semicolon in macro definition 2020-12-08 09:45:36 +02:00
debug.h
eeprom.h
fw.c carl9170: remove P2P_GO support 2020-05-06 09:14:20 +03:00
fwcmd.h carl9170: fix struct alignment conflict 2021-02-09 09:24:20 +02:00
fwdesc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 325 2019-06-05 17:37:06 +02:00
hw.h carl9170: Replace zero-length array with flexible-array 2020-05-12 10:31:49 +03:00
Kconfig ath: fix wiki website url 2020-06-09 09:25:25 +03:00
led.c
mac.c carl9170: remove WDS code 2020-11-11 08:39:13 +01:00
main.c carl9170: remove WDS code 2020-11-11 08:39:13 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
phy.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
phy.h
rx.c carl9170: Use fallthrough pseudo-keyword 2020-08-27 13:20:26 +03:00
tx.c carl9170: Fix fall-through warnings for Clang 2020-12-09 09:01:29 +02:00
usb.c carl9170: convert tasklets to use new tasklet_setup() API 2020-08-27 13:21:34 +03:00
version.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wlan.h carl9170: fix struct alignment conflict 2021-02-09 09:24:20 +02:00