staging: wlan-ng: hfa384x.h: Use endian type in 'hfa384x_link_status' struct
authorRicardo Silva <rjpdasilva@gmail.com>
Wed, 16 Aug 2017 10:58:02 +0000 (11:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Aug 2017 22:57:17 +0000 (15:57 -0700)
The 'linkstatus' field from struct 'hfa384x_link_status' represents a
16-bit little-endian integer, so declare it as such to avoid the
following sparse warning when accessing it through the 'le16_to_cpu()'
function:

 prism2sta.c:1450:31: warning: cast to restricted __le16

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/hfa384x.h

index cb5afeffb234613b669805807b0ffbdf021938cb..f5a3a1ce21ce8f27eec3b28c4ee2aa8c874e9a04 100644 (file)
@@ -711,7 +711,7 @@ struct hfa384x_hscan_result {
 #define HFA384x_LINK_ASSOCFAIL         ((u16)6)
 
 struct hfa384x_link_status {
-       u16 linkstatus;
+       __le16 linkstatus;
 } __packed;
 
 /*--  Unsolicited Frame, MAC Mgmt: AssociationStatus (--*/