[PATCH 2/4] staging: wlan-ng: prism2sta: Use endian type in 'hfa384x_link_status' struct
Ricardo Silva
rjpdasilva at gmail.com
Tue Jul 18 13:09:16 UTC 2017
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 at gmail.com>
---
drivers/staging/wlan-ng/hfa384x.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 0fe316b5ab5d..b61ace1d1e66 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -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 (--*/
--
2.13.2
More information about the devel
mailing list