aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng/prism2sta.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2021-08-19 10:45:36 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-26 10:41:16 +0200
commit6277fbfdd29ca2fbf5da33e3931087b5356c770b (patch)
treeae2aab3e4f16773bcff260a8b1c9aa09f67d4ee6 /drivers/staging/wlan-ng/prism2sta.c
parentstaging: r8188eu: use GFP_ATOMIC under spinlock (diff)
downloadlinux-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/prism2sta.c')
-rw-r--r--drivers/staging/wlan-ng/prism2sta.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index e6dcb687e7a1..1f9ba26f1f36 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -103,7 +103,7 @@ static int prism2sta_open(struct wlandevice *wlandev);
static int prism2sta_close(struct wlandevice *wlandev);
static void prism2sta_reset(struct wlandevice *wlandev);
static int prism2sta_txframe(struct wlandevice *wlandev, struct sk_buff *skb,
- union p80211_hdr *p80211_hdr,
+ struct p80211_hdr *p80211_hdr,
struct p80211_metawep *p80211_wep);
static int prism2sta_mlmerequest(struct wlandevice *wlandev,
struct p80211msg *msg);
@@ -242,7 +242,7 @@ static void prism2sta_reset(struct wlandevice *wlandev)
* process thread
*/
static int prism2sta_txframe(struct wlandevice *wlandev, struct sk_buff *skb,
- union p80211_hdr *p80211_hdr,
+ struct p80211_hdr *p80211_hdr,
struct p80211_metawep *p80211_wep)
{
struct hfa384x *hw = wlandev->priv;
@@ -250,7 +250,7 @@ static int prism2sta_txframe(struct wlandevice *wlandev, struct sk_buff *skb,
/* If necessary, set the 802.11 WEP bit */
if ((wlandev->hostwep & (HOSTWEP_PRIVACYINVOKED | HOSTWEP_ENCRYPT)) ==
HOSTWEP_PRIVACYINVOKED) {
- p80211_hdr->a3.fc |= cpu_to_le16(WLAN_SET_FC_ISWEP(1));
+ p80211_hdr->fc |= cpu_to_le16(WLAN_SET_FC_ISWEP(1));
}
return hfa384x_drvr_txframe(hw, skb, p80211_hdr, p80211_wep);