]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: wlan-ng: fix invalid assignment warning
authorAakash Hemadri <aakashhemadri123@gmail.com>
Sat, 28 Aug 2021 04:29:49 +0000 (09:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Aug 2021 06:33:09 +0000 (08:33 +0200)
p80211_hdr->frame_control is u16, change to __le16
to satisfy sparse warning:

wlan-ng/prism2sta.c:253:43: warning: invalid assignment: |=
wlan-ng/prism2sta.c:253:43:    left side has type unsigned short
wlan-ng/prism2sta.c:253:43:    right side has type restricted __le16

Fixes: 6277fbfdd29c ("staging: wlan-ng: Remove pointless a3/a4 union")
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Link: https://lore.kernel.org/r/20210828042949.2276341-1-aakashhemadri123@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/p80211hdr.h

index dd1fb99bf340a6abd224fc071e6bec5645a3aaa8..5871a55e4a61ba423b97a5ae322ec8683b83c97a 100644 (file)
 /* Generic 802.11 Header types */
 
 struct p80211_hdr {
-       u16     frame_control;
+       __le16  frame_control;
        u16     duration_id;
        u8      address1[ETH_ALEN];
        u8      address2[ETH_ALEN];