[PATCH 3/4] staging: wlan-ng: prism2sta: Use endian type in 'hfa384x_ps_user_count' struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'usercnt' field from struct 'hfa384x_ps_user_count' 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:1727:27: warning: cast to restricted __le16

Signed-off-by: Ricardo Silva <rjpdasilva@xxxxxxxxx>
---
 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 b61ace1d1e66..f5a3a1ce21ce 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -739,7 +739,7 @@ struct hfa384x_auth_request {
 /*--  Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/
 
 struct hfa384x_ps_user_count {
-	u16 usercnt;
+	__le16 usercnt;
 } __packed;
 
 struct hfa384x_key_id_changed {
-- 
2.13.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux