mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 22:43:04 +00:00
rtl8188eu: Replace several local size defines/typedefs with kernel header version
These include the following: SIZE_T => size_t SSIZE_T => ssize_t SIZE_PTR => size_t Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
41ad3e27c6
commit
2685b52404
18 changed files with 58 additions and 63 deletions
|
@ -350,29 +350,29 @@ enum WIFI_REG_DOMAIN {
|
|||
*(__le16 *)(pbuf) |= cpu_to_le16(type); \
|
||||
} while (0)
|
||||
|
||||
#define GetSequence(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)) >> 4)
|
||||
#define GetSequence(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) >> 4)
|
||||
|
||||
#define GetFragNum(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)) & 0x0f)
|
||||
#define GetFragNum(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
|
||||
|
||||
#define GetTupleCache(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)))
|
||||
#define GetTupleCache(pbuf) (cpu_to_le16(*(unsigned short *)((size_t)(pbuf) + 22)))
|
||||
|
||||
#define SetFragNum(pbuf, num) \
|
||||
do { \
|
||||
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \
|
||||
*(unsigned short *)((size_t)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((size_t)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \
|
||||
cpu_to_le16(0x0f & (num)); \
|
||||
} while (0)
|
||||
|
||||
#define SetSeqNum(pbuf, num) \
|
||||
do { \
|
||||
*(__le16 *)((SIZE_PTR)(pbuf) + 22) = \
|
||||
((*(__le16 *)((SIZE_PTR)(pbuf) + 22)) & cpu_to_le16((unsigned short)0x000f)) | \
|
||||
*(__le16 *)((size_t)(pbuf) + 22) = \
|
||||
((*(__le16 *)((size_t)(pbuf) + 22)) & cpu_to_le16((unsigned short)0x000f)) | \
|
||||
cpu_to_le16((unsigned short)(0xfff0 & (num << 4))); \
|
||||
} while (0)
|
||||
|
||||
#define SetDuration(pbuf, dur) \
|
||||
do { \
|
||||
*(__le16 *)((SIZE_PTR)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
|
||||
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
|
@ -402,19 +402,19 @@ enum WIFI_REG_DOMAIN {
|
|||
*(__le16 *)(pbuf) |= cpu_to_le16( (amsdu & 1) << 7); \
|
||||
} while (0)
|
||||
|
||||
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 2)) & 0x3fff)
|
||||
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
|
||||
|
||||
#define GetTid(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + \
|
||||
#define GetTid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + \
|
||||
(((GetToDs(pbuf)<<1) | GetFrDs(pbuf)) == 3 ? \
|
||||
30 : 24))) & 0x000f)
|
||||
|
||||
#define GetAddr1Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 4))
|
||||
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
|
||||
|
||||
#define GetAddr2Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 10))
|
||||
#define GetAddr2Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
|
||||
|
||||
#define GetAddr3Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 16))
|
||||
#define GetAddr3Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
|
||||
|
||||
#define GetAddr4Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 24))
|
||||
#define GetAddr4Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24))
|
||||
|
||||
#define MacAddr_isBcst(addr) \
|
||||
( \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue