mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-07 05:53:06 +00:00
rtl8188eu: Fix more sparse warnings
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e36aed3385
commit
7c7b83836e
43 changed files with 677 additions and 862 deletions
|
@ -108,43 +108,43 @@
|
|||
/*
|
||||
* Read LE data from memory to host byte order
|
||||
*/
|
||||
#define ReadLE4Byte(_ptr) le32_to_cpu(*((u32 *)(_ptr)))
|
||||
#define ReadLE2Byte(_ptr) le16_to_cpu(*((u16 *)(_ptr)))
|
||||
#define ReadLE4Byte(_ptr) le32_to_cpu(*((__le32 *)(_ptr)))
|
||||
#define ReadLE2Byte(_ptr) le16_to_cpu(*((__le16 *)(_ptr)))
|
||||
#define ReadLE1Byte(_ptr) (*((u8 *)(_ptr)))
|
||||
|
||||
/*
|
||||
* Read BE data from memory to host byte order
|
||||
*/
|
||||
#define ReadBEE4Byte(_ptr) be32_to_cpu(*((u32 *)(_ptr)))
|
||||
#define ReadBE2Byte(_ptr) be16_to_cpu(*((u16 *)(_ptr)))
|
||||
#define ReadBEE4Byte(_ptr) be32_to_cpu(*((__be32 *)(_ptr)))
|
||||
#define ReadBE2Byte(_ptr) be16_to_cpu(*((__be16 *)(_ptr)))
|
||||
#define ReadBE1Byte(_ptr) (*((u8 *)(_ptr)))
|
||||
|
||||
/*
|
||||
* Write host byte order data to memory in LE order
|
||||
*/
|
||||
#define WriteLE4Byte(_ptr, _val) ((*((u32 *)(_ptr))) = cpu_to_le32(_val))
|
||||
#define WriteLE2Byte(_ptr, _val) ((*((u16 *)(_ptr))) = cpu_to_le16(_val))
|
||||
#define WriteLE4Byte(_ptr, _val) ((*((__le32 *)(_ptr))) = cpu_to_le32(_val))
|
||||
#define WriteLE2Byte(_ptr, _val) ((*((i__le16 *)(_ptr))) = cpu_to_le16(_val))
|
||||
#define WriteLE1Byte(_ptr, _val) ((*((u8 *)(_ptr))) = ((u8)(_val)))
|
||||
|
||||
/*
|
||||
* Write host byte order data to memory in BE order
|
||||
*/
|
||||
#define WriteBE4Byte(_ptr, _val) ((*((u32 *)(_ptr))) = cpu_to_be32(_val))
|
||||
#define WriteBE2Byte(_ptr, _val) ((*((u16 *)(_ptr))) = cpu_to_be16(_val))
|
||||
#define WriteBE4Byte(_ptr, _val) ((*((__be32 *)(_ptr))) = cpu_to_be32(_val))
|
||||
#define WriteBE2Byte(_ptr, _val) ((*((__be16 *)(_ptr))) = cpu_to_be16(_val))
|
||||
#define WriteBE1Byte(_ptr, _val) ((*((u8 *)(_ptr))) = ((u8)(_val)))
|
||||
|
||||
/*
|
||||
* Return 4-byte value in host byte ordering from 4-byte pointer in litten-endian system.
|
||||
*/
|
||||
#define LE_P4BYTE_TO_HOST_4BYTE(__pStart) (le32_to_cpu(*((u32 *)(__pStart))))
|
||||
#define LE_P2BYTE_TO_HOST_2BYTE(__pStart) (le16_to_cpu(*((u16 *)(__pStart))))
|
||||
#define LE_P4BYTE_TO_HOST_4BYTE(__pStart) (le32_to_cpu(*((__le32 *)(__pStart))))
|
||||
#define LE_P2BYTE_TO_HOST_2BYTE(__pStart) (le16_to_cpu(*((__le16 *)(__pStart))))
|
||||
#define LE_P1BYTE_TO_HOST_1BYTE(__pStart) ((*((u8 *)(__pStart))))
|
||||
|
||||
/*
|
||||
* Return 4-byte value in host byte ordering from 4-byte pointer in big-endian system.
|
||||
*/
|
||||
#define BE_P4BYTE_TO_HOST_4BYTE(__pStart) (be32_to_cpu(*((u32 *)(__pStart))))
|
||||
#define BE_P2BYTE_TO_HOST_2BYTE(__pStart) (be16_to_cpu(*((u16 *)(__pStart))))
|
||||
#define BE_P4BYTE_TO_HOST_4BYTE(__pStart) (be32_to_cpu(*((__be32 *)(__pStart))))
|
||||
#define BE_P2BYTE_TO_HOST_2BYTE(__pStart) (be16_to_cpu(*((__be16 *)(__pStart))))
|
||||
#define BE_P1BYTE_TO_HOST_1BYTE(__pStart) ((*((u8 *)(__pStart))))
|
||||
|
||||
/*
|
||||
|
|
|
@ -1473,7 +1473,12 @@ int rtw_dev_pno_set(struct net_device *net, pno_ssid_t *ssid, int num,
|
|||
#endif /* CONFIG_PNO_SET_DEBUG */
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
|
||||
void *scdb_findEntry(_adapter *priv, unsigned char *macAddr,
|
||||
unsigned char *ipAddr);
|
||||
void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb);
|
||||
int rtw_suspend_free_assoc_resource(_adapter *padapter);
|
||||
int recvbuf2recvframe(PADAPTER padapter, void *ptr);
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
int rtw_suspend_wow(_adapter *padapter);
|
||||
int rtw_resume_process_wow(_adapter *padapter);
|
||||
|
|
|
@ -1040,11 +1040,11 @@ int rtw_halmac_deinit_adapter(struct dvobj_priv *);
|
|||
#define rf_mode_table_data0 RF_ModeTableData0
|
||||
#define rf_mode_table_data1 RF_ModeTableData1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define RX_SMOOTH_FACTOR Rx_Smooth_Factor
|
||||
|
||||
extern int new_bcn_max;
|
||||
extern u8 REALTEK_96B_IE[];
|
||||
extern unsigned char WPA_TKIP_CIPHER[4];
|
||||
extern unsigned char RSN_TKIP_CIPHER[4];
|
||||
|
||||
#endif /* __HAL_DATA_H__ */
|
||||
|
|
|
@ -1230,7 +1230,7 @@ enum rtw_h2c_cmd {
|
|||
#define _SetRFReg_CMD_ _Write_RFREG_CMD_
|
||||
|
||||
#ifdef _RTW_CMD_C_
|
||||
struct _cmd_callback rtw_cmd_callback[] = {
|
||||
static struct _cmd_callback rtw_cmd_callback[] = {
|
||||
{GEN_CMD_CODE(_Read_MACREG), &rtw_getmacreg_cmdrsp_callback}, /*0*/
|
||||
{GEN_CMD_CODE(_Write_MACREG), NULL},
|
||||
{GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback},
|
||||
|
|
|
@ -186,7 +186,7 @@ typedef enum _RT_HT_INF1_CAP {
|
|||
/* HT Operation element */
|
||||
|
||||
#define GET_HT_OP_ELE_PRI_CHL(_pEleStart) LE_BITS_TO_1BYTE(((u8 *)(_pEleStart)), 0, 8)
|
||||
#define SET_HT_OP_ELE_PRI_CHL(_pEleStart, _val) SET_BITS_TO_LE_1BYTE(((u8 *)(_pEleStart)), 0, 8, _val)
|
||||
#define SET_HT_OP_ELE_PRI_CHL(_pEleStart, _val) SET_BITS_TO_LE_1BYTE(((u8 *)(_pEleStart)), 0, 8, _val)
|
||||
|
||||
/* HT Operation Info field */
|
||||
#define HT_OP_ELE_OP_INFO(_pEleStart) (((u8 *)(_pEleStart)) + 1)
|
||||
|
|
|
@ -91,17 +91,17 @@ struct io_queue;
|
|||
|
||||
struct _io_ops {
|
||||
u8(*_read8)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u16(*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u32(*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
__le16(*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
__le32(*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
|
||||
int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, __le16 val);
|
||||
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, __le32 val);
|
||||
int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
|
||||
|
||||
int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||
int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, __le16 val);
|
||||
int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, __le32 val);
|
||||
|
||||
void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
|
|
|
@ -1108,7 +1108,7 @@ u8 rtw_getmacreg_hdl(_adapter *padapter, u8 *pbuf);
|
|||
|
||||
#ifdef _RTW_CMD_C_
|
||||
|
||||
struct cmd_hdl wlancmds[] = {
|
||||
static struct cmd_hdl wlancmds[] = {
|
||||
GEN_DRV_CMD_HANDLER(sizeof(struct readMAC_parm), rtw_getmacreg) /*0*/
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
|
|
|
@ -94,27 +94,8 @@ struct recv_reorder_ctrl {
|
|||
struct stainfo_rxcache {
|
||||
u16 tid_rxseq[16];
|
||||
u8 iv[16][8];
|
||||
#if 0
|
||||
unsigned short tid0_rxseq;
|
||||
unsigned short tid1_rxseq;
|
||||
unsigned short tid2_rxseq;
|
||||
unsigned short tid3_rxseq;
|
||||
unsigned short tid4_rxseq;
|
||||
unsigned short tid5_rxseq;
|
||||
unsigned short tid6_rxseq;
|
||||
unsigned short tid7_rxseq;
|
||||
unsigned short tid8_rxseq;
|
||||
unsigned short tid9_rxseq;
|
||||
unsigned short tid10_rxseq;
|
||||
unsigned short tid11_rxseq;
|
||||
unsigned short tid12_rxseq;
|
||||
unsigned short tid13_rxseq;
|
||||
unsigned short tid14_rxseq;
|
||||
unsigned short tid15_rxseq;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
struct smooth_rssi_data {
|
||||
u32 elements[100]; /* array to store values */
|
||||
u32 index; /* index to current array to store */
|
||||
|
@ -170,9 +151,8 @@ struct rx_raw_rssi {
|
|||
u8 ofdm_snr[4];
|
||||
};
|
||||
|
||||
|
||||
struct rx_pkt_attrib {
|
||||
u16 pkt_len;
|
||||
__le16 pkt_len;
|
||||
u8 physt;
|
||||
u8 drvinfo_sz;
|
||||
u8 shift_sz;
|
||||
|
@ -183,7 +163,7 @@ struct rx_pkt_attrib {
|
|||
u8 priority;
|
||||
u8 pw_save;
|
||||
u8 mdata;
|
||||
u16 seq_num;
|
||||
__le16 seq_num;
|
||||
u8 frag_num;
|
||||
u8 mfrag;
|
||||
u8 order;
|
||||
|
@ -195,7 +175,7 @@ struct rx_pkt_attrib {
|
|||
u8 crc_err;
|
||||
u8 icv_err;
|
||||
|
||||
u16 eth_type;
|
||||
__le16 eth_type;
|
||||
|
||||
u8 dst[ETH_ALEN];
|
||||
u8 src[ETH_ALEN];
|
||||
|
@ -219,16 +199,9 @@ struct rx_pkt_attrib {
|
|||
u8 ldpc;
|
||||
u8 sgi;
|
||||
u8 pkt_rpt_type;
|
||||
u32 tsfl;
|
||||
u32 MacIDValidEntry[2]; /* 64 bits present 64 entry. */
|
||||
__le32 tsfl;
|
||||
__le32 MacIDValidEntry[2]; /* 64 bits present 64 entry. */
|
||||
|
||||
#if 0
|
||||
u8 signal_qual;
|
||||
s8 rx_mimo_signal_qual[2];
|
||||
u8 signal_strength;
|
||||
u32 RxPWDBAll;
|
||||
s32 RecvSignalPower;
|
||||
#endif
|
||||
struct phy_info phy_info;
|
||||
};
|
||||
|
||||
|
@ -266,26 +239,21 @@ struct recv_stat {
|
|||
};
|
||||
#else
|
||||
struct recv_stat {
|
||||
unsigned int rxdw0;
|
||||
__le32 rxdw0;
|
||||
|
||||
unsigned int rxdw1;
|
||||
__le32 rxdw1;
|
||||
|
||||
#if !((defined(CONFIG_RTL8192E) || defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C)) && defined(CONFIG_PCI_HCI)) /* exclude 8192ee, 8814ae, 8822be, 8821ce */
|
||||
unsigned int rxdw2;
|
||||
__le32 rxdw2;
|
||||
|
||||
unsigned int rxdw3;
|
||||
__le32 rxdw3;
|
||||
#endif
|
||||
|
||||
#ifndef BUF_DESC_ARCH
|
||||
unsigned int rxdw4;
|
||||
__le32 rxdw4;
|
||||
|
||||
unsigned int rxdw5;
|
||||
__le32 rxdw5;
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
unsigned int rxdw6;
|
||||
|
||||
unsigned int rxdw7;
|
||||
#endif
|
||||
#endif /* if BUF_DESC_ARCH is defined, rx_buf_desc occupy 4 double words */
|
||||
};
|
||||
#endif
|
||||
|
|
108
include/wifi.h
108
include/wifi.h
|
@ -273,26 +273,26 @@ enum WIFI_REG_DOMAIN {
|
|||
|
||||
#define SetToDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_TO_DS_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_); \
|
||||
} while (0)
|
||||
|
||||
#define GetToDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_TO_DS_)) != 0)
|
||||
#define GetToDs(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf)) & (_TO_DS_)) != 0)
|
||||
|
||||
#define ClearToDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
|
||||
} while (0)
|
||||
|
||||
#define SetFrDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
|
||||
} while (0)
|
||||
|
||||
#define GetFrDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_FROM_DS_)) != 0)
|
||||
#define GetFrDs(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf)) & (_FROM_DS_)) != 0)
|
||||
|
||||
#define ClearFrDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
|
||||
} while (0)
|
||||
|
||||
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
|
||||
|
@ -300,76 +300,76 @@ enum WIFI_REG_DOMAIN {
|
|||
|
||||
#define SetMFrag(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
|
||||
} while (0)
|
||||
|
||||
#define GetMFrag(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_MORE_FRAG_)) != 0)
|
||||
|
||||
#define ClearMFrag(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
|
||||
} while (0)
|
||||
|
||||
#define SetRetry(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_RETRY_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_); \
|
||||
} while (0)
|
||||
|
||||
#define GetRetry(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_RETRY_)) != 0)
|
||||
#define GetRetry(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf)) & (_RETRY_)) != 0)
|
||||
|
||||
#define ClearRetry(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
|
||||
} while (0)
|
||||
|
||||
#define SetPwrMgt(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
|
||||
} while (0)
|
||||
|
||||
#define GetPwrMgt(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_PWRMGT_)) != 0)
|
||||
|
||||
#define ClearPwrMgt(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
|
||||
} while (0)
|
||||
|
||||
#define SetMData(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
|
||||
} while (0)
|
||||
|
||||
#define GetMData(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_MORE_DATA_)) != 0)
|
||||
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & le16_to_cpu(_MORE_DATA_)) != 0)
|
||||
|
||||
#define ClearMData(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
|
||||
} while (0)
|
||||
|
||||
#define SetPrivacy(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
|
||||
} while (0)
|
||||
|
||||
#define GetPrivacy(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_PRIVACY_)) != 0)
|
||||
#define GetPrivacy(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf)) & (_PRIVACY_)) != 0)
|
||||
|
||||
#define ClearPrivacy(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define GetOrder(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)
|
||||
#define GetOrder(pbuf) (((*(__le16 *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)
|
||||
|
||||
#define GetFrameType(pbuf) (le16_to_cpu(*(unsigned short *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
#define GetFrameType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
|
||||
#define SetFrameType(pbuf, type) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
|
||||
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
|
||||
*(__le16 *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
|
||||
*(__le16 *)(pbuf) |= __constant_cpu_to_le16(type); \
|
||||
} while (0)
|
||||
|
||||
#define get_frame_sub_type(pbuf) (cpu_to_le16(*(unsigned short *)(pbuf)) & (BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
|
||||
#define get_frame_sub_type(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
|
||||
|
||||
|
||||
#define set_frame_sub_type(pbuf, type) \
|
||||
|
@ -379,47 +379,47 @@ enum WIFI_REG_DOMAIN {
|
|||
} while (0)
|
||||
|
||||
|
||||
#define GetSequence(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) >> 4)
|
||||
#define GetSequence(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)) >> 4)
|
||||
|
||||
#define GetFragNum(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & 0x0f)
|
||||
#define GetFragNum(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)) & 0x0f)
|
||||
|
||||
#define GetTupleCache(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)))
|
||||
#define GetTupleCache(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)))
|
||||
|
||||
#define SetFragNum(pbuf, num) \
|
||||
do { \
|
||||
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \
|
||||
*(__le16 *)((SIZE_PTR)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & cpu_to_le16(~(0x000f))) | \
|
||||
cpu_to_le16(0x0f & (num)); \
|
||||
} while (0)
|
||||
|
||||
#define SetSeqNum(pbuf, num) \
|
||||
do { \
|
||||
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu((unsigned short)~0xfff0)) | \
|
||||
le16_to_cpu((unsigned short)(0xfff0 & (num << 4))); \
|
||||
*(__le16 *)((SIZE_PTR)(pbuf) + 22) = \
|
||||
cpu_to_le16((le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)) & 0x000f) | \
|
||||
(0xfff0 & (num << 4))); \
|
||||
} while (0)
|
||||
|
||||
#define set_duration(pbuf, dur) \
|
||||
do { \
|
||||
*(unsigned short *)((SIZE_PTR)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
|
||||
*(__le16 *)((SIZE_PTR)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define SetPriority(pbuf, tid) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(tid & 0xf); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf); \
|
||||
} while (0)
|
||||
|
||||
#define GetPriority(pbuf) ((le16_to_cpu(*(unsigned short *)(pbuf))) & 0xf)
|
||||
|
||||
#define SetEOSP(pbuf, eosp) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16((eosp & 1) << 4); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4); \
|
||||
} while (0)
|
||||
|
||||
#define SetAckpolicy(pbuf, ack) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16((ack & 3) << 5); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5); \
|
||||
} while (0)
|
||||
|
||||
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(unsigned short *)pbuf)) >> 5) & 0x3)
|
||||
|
@ -428,7 +428,7 @@ enum WIFI_REG_DOMAIN {
|
|||
|
||||
#define SetAMsdu(pbuf, amsdu) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7); \
|
||||
} while (0)
|
||||
|
||||
#define GetAid(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 2)) & 0x3fff)
|
||||
|
@ -760,7 +760,7 @@ typedef enum _ELEMENT_ID {
|
|||
|
||||
#define set_order_bit(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_ORDER_); \
|
||||
} while (0)
|
||||
|
||||
|
||||
|
@ -776,12 +776,12 @@ typedef enum _ELEMENT_ID {
|
|||
* described in 802.11n draft section 7.2.1.7.1
|
||||
*/
|
||||
struct rtw_ieee80211_bar {
|
||||
unsigned short frame_control;
|
||||
unsigned short duration;
|
||||
__le16 frame_control;
|
||||
__le16 duration;
|
||||
unsigned char ra[6];
|
||||
unsigned char ta[6];
|
||||
unsigned short control;
|
||||
unsigned short start_seq_num;
|
||||
__le16 control;
|
||||
__le16 start_seq_num;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* 802.11 BAR control masks */
|
||||
|
@ -796,11 +796,11 @@ struct rtw_ieee80211_bar {
|
|||
*/
|
||||
|
||||
struct rtw_ieee80211_ht_cap {
|
||||
unsigned short cap_info;
|
||||
__le16 cap_info;
|
||||
unsigned char ampdu_params_info;
|
||||
unsigned char supp_mcs_set[16];
|
||||
unsigned short extended_ht_cap_info;
|
||||
unsigned int tx_BF_cap_info;
|
||||
__le16 extended_ht_cap_info;
|
||||
__le32 tx_BF_cap_info;
|
||||
unsigned char antenna_selection_info;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
@ -813,8 +813,8 @@ struct rtw_ieee80211_ht_cap {
|
|||
struct ieee80211_ht_addt_info {
|
||||
unsigned char control_chan;
|
||||
unsigned char ht_param;
|
||||
unsigned short operation_mode;
|
||||
unsigned short stbc_param;
|
||||
__le16 operation_mode;
|
||||
__le16 stbc_param;
|
||||
unsigned char basic_set[16];
|
||||
} __attribute__((packed));
|
||||
|
||||
|
@ -822,11 +822,11 @@ struct ieee80211_ht_addt_info {
|
|||
struct HT_caps_element {
|
||||
union {
|
||||
struct {
|
||||
unsigned short HT_caps_info;
|
||||
__le16 HT_caps_info;
|
||||
unsigned char AMPDU_para;
|
||||
unsigned char MCS_rate[16];
|
||||
unsigned short HT_ext_caps;
|
||||
unsigned int Beamforming_caps;
|
||||
__le16 HT_ext_caps;
|
||||
__le32 Beamforming_caps;
|
||||
unsigned char ASEL_caps;
|
||||
} HT_cap_element;
|
||||
unsigned char HT_cap[26];
|
||||
|
@ -842,7 +842,7 @@ struct HT_info_element {
|
|||
struct AC_param {
|
||||
unsigned char ACI_AIFSN;
|
||||
unsigned char CW;
|
||||
unsigned short TXOP_limit;
|
||||
__le16 TXOP_limit;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct WMM_para_element {
|
||||
|
@ -853,9 +853,9 @@ struct WMM_para_element {
|
|||
|
||||
struct ADDBA_request {
|
||||
unsigned char dialog_token;
|
||||
unsigned short BA_para_set;
|
||||
unsigned short BA_timeout_value;
|
||||
unsigned short BA_starting_seqctrl;
|
||||
__le16 BA_para_set;
|
||||
__le16 BA_timeout_value;
|
||||
__le16 BA_starting_seqctrl;
|
||||
} __attribute__((packed));
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_FACTOR {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue