diff options
author | Kees Cook <keescook@chromium.org> | 2021-08-19 10:45:36 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-26 10:41:16 +0200 |
commit | 6277fbfdd29ca2fbf5da33e3931087b5356c770b (patch) | |
tree | ae2aab3e4f16773bcff260a8b1c9aa09f67d4ee6 /drivers/staging/wlan-ng/hfa384x_usb.c | |
parent | staging: r8188eu: use GFP_ATOMIC under spinlock (diff) | |
download | linux-dev-6277fbfdd29ca2fbf5da33e3931087b5356c770b.tar.xz linux-dev-6277fbfdd29ca2fbf5da33e3931087b5356c770b.zip |
staging: wlan-ng: Remove pointless a3/a4 union
There is no need for the a3/a4 union. The two structs are identical
except for the addition of a4. Excepting one place, the structs are
only ever used in the union, and the union is always allocated at full
size. The one instance of the a3-specific struct can be replaced with
the full version, as no sizing information is used. Replace the union
with the a4 version of the struct. "diffoscope" reports there are no
object code differences after this change.
Cc: Allen Pais <apais@linux.microsoft.com>
Cc: Romain Perier <romain.perier@gmail.com>
Cc: Chen Lin <chen.lin5@zte.com.cn>
Cc: Ivan Safonov <insafonov@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210819174537.3499227-2-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng/hfa384x_usb.c')
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index f2a0e16b0318..0bf71f395b37 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -2472,7 +2472,7 @@ int hfa384x_drvr_stop(struct hfa384x *hw) *---------------------------------------------------------------- */ int hfa384x_drvr_txframe(struct hfa384x *hw, struct sk_buff *skb, - union p80211_hdr *p80211_hdr, + struct p80211_hdr *p80211_hdr, struct p80211_metawep *p80211_wep) { int usbpktlen = sizeof(struct hfa384x_tx_frame); @@ -2517,7 +2517,7 @@ int hfa384x_drvr_txframe(struct hfa384x *hw, struct sk_buff *skb, /* copy the header over to the txdesc */ memcpy(&hw->txbuff.txfrm.desc.frame_control, p80211_hdr, - sizeof(union p80211_hdr)); + sizeof(struct p80211_hdr)); /* if we're using host WEP, increase size by IV+ICV */ if (p80211_wep->data) { |