mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: Fix checkpatch errors in include/*.h - part 4
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
8a46c9e7a5
commit
168faff726
8 changed files with 175 additions and 216 deletions
|
@ -44,7 +44,7 @@ static u8 SNAP_ETH_TYPE_TDLS[2] = {0x89, 0x0d};
|
||||||
static u8 SNAP_HDR_APPLETALK_DDP[3] = {0x08, 0x00, 0x07};
|
static u8 SNAP_HDR_APPLETALK_DDP[3] = {0x08, 0x00, 0x07};
|
||||||
|
|
||||||
static u8 oui_8021h[] = {0x00, 0x00, 0xf8};
|
static u8 oui_8021h[] = {0x00, 0x00, 0xf8};
|
||||||
static u8 oui_rfc1042[] = {0x00,0x00,0x00};
|
static u8 oui_rfc1042[] = {0x00, 0x00, 0x00};
|
||||||
|
|
||||||
#define MAX_SUBFRAME_COUNT 64
|
#define MAX_SUBFRAME_COUNT 64
|
||||||
static u8 rtw_rfc1042_header[] = {
|
static u8 rtw_rfc1042_header[] = {
|
||||||
|
@ -165,10 +165,8 @@ struct rx_pkt_attrib {
|
||||||
|
|
||||||
|
|
||||||
/* These definition is used for Rx packet reordering. */
|
/* These definition is used for Rx packet reordering. */
|
||||||
#define SN_LESS(a, b) (((a-b)&0x800)!=0)
|
#define SN_LESS(a, b) (((a - b) & 0x800) != 0)
|
||||||
#define SN_EQUAL(a, b) (a == b)
|
#define SN_EQUAL(a, b) (a == b)
|
||||||
/* define REORDER_WIN_SIZE 128 */
|
|
||||||
/* define REORDER_ENTRY_NUM 128 */
|
|
||||||
#define REORDER_WAIT_TIME (50) /* (ms) */
|
#define REORDER_WAIT_TIME (50) /* (ms) */
|
||||||
|
|
||||||
#define RECVBUFF_ALIGN_SZ 8
|
#define RECVBUFF_ALIGN_SZ 8
|
||||||
|
@ -317,8 +315,8 @@ union recv_frame {
|
||||||
} u;
|
} u;
|
||||||
};
|
};
|
||||||
|
|
||||||
union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue);
|
union recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue);
|
||||||
union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue);
|
union recv_frame *rtw_alloc_recvframe(struct __queue *pfree_recv_queue);
|
||||||
void rtw_init_recvframe(union recv_frame *precvframe,
|
void rtw_init_recvframe(union recv_frame *precvframe,
|
||||||
struct recv_priv *precvpriv);
|
struct recv_priv *precvpriv);
|
||||||
int rtw_free_recvframe(union recv_frame *precvframe,
|
int rtw_free_recvframe(union recv_frame *precvframe,
|
||||||
|
@ -329,9 +327,9 @@ int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
|
||||||
void rtw_free_recvframe_queue(struct __queue *pframequeue,
|
void rtw_free_recvframe_queue(struct __queue *pframequeue,
|
||||||
struct __queue *pfree_recv_queue);
|
struct __queue *pfree_recv_queue);
|
||||||
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
|
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
|
||||||
int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue);
|
int rtw_enqueue_recvbuf_to_head(struct recv_buf *buf, struct __queue *queue);
|
||||||
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
|
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
|
||||||
struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue);
|
struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue);
|
||||||
|
|
||||||
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
|
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
|
||||||
|
|
||||||
|
@ -369,11 +367,11 @@ static inline u8 *recvframe_push(union recv_frame *precvframe, int sz)
|
||||||
if (precvframe == NULL)
|
if (precvframe == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
precvframe->u.hdr.rx_data -= sz ;
|
precvframe->u.hdr.rx_data -= sz ;
|
||||||
if ( precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head) {
|
if (precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head) {
|
||||||
precvframe->u.hdr.rx_data += sz ;
|
precvframe->u.hdr.rx_data += sz;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
precvframe->u.hdr.len +=sz;
|
precvframe->u.hdr.len += sz;
|
||||||
return precvframe->u.hdr.rx_data;
|
return precvframe->u.hdr.rx_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,7 +408,7 @@ static inline u8 *recvframe_put(union recv_frame *precvframe, int sz)
|
||||||
precvframe->u.hdr.rx_tail -= sz;
|
precvframe->u.hdr.rx_tail -= sz;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
precvframe->u.hdr.len +=sz;
|
precvframe->u.hdr.len += sz;
|
||||||
return precvframe->u.hdr.rx_tail;
|
return precvframe->u.hdr.rx_tail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +442,8 @@ static inline unsigned char *get_rxbuf_desc(union recv_frame *precvframe)
|
||||||
|
|
||||||
static inline union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
static inline union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
||||||
{
|
{
|
||||||
/* due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame */
|
/* due to the design of 2048 bytes alignment of recv_frame,
|
||||||
|
* we can reference the union recv_frame */
|
||||||
/* from any given member of recv_frame. */
|
/* from any given member of recv_frame. */
|
||||||
/* rxmem indicates the any member/address in recv_frame */
|
/* rxmem indicates the any member/address in recv_frame */
|
||||||
|
|
||||||
|
@ -473,7 +472,7 @@ static inline u8 *pkt_to_recvdata(struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
/* return the rx_data */
|
/* return the rx_data */
|
||||||
|
|
||||||
union recv_frame *precv_frame =pkt_to_recvframe(pkt);
|
union recv_frame *precv_frame = pkt_to_recvframe(pkt);
|
||||||
|
|
||||||
return precv_frame->u.hdr.rx_data;
|
return precv_frame->u.hdr.rx_data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ enum _REG_PREAMBLE_MODE {
|
||||||
PREAMBLE_SHORT = 3,
|
PREAMBLE_SHORT = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum _RTL8712_RF_MIMO_CONFIG_{
|
enum _RTL8712_RF_MIMO_CONFIG_ {
|
||||||
RTL8712_RFCONFIG_1T = 0x10,
|
RTL8712_RFCONFIG_1T = 0x10,
|
||||||
RTL8712_RFCONFIG_2T = 0x20,
|
RTL8712_RFCONFIG_2T = 0x20,
|
||||||
RTL8712_RFCONFIG_1R = 0x01,
|
RTL8712_RFCONFIG_1R = 0x01,
|
||||||
|
|
|
@ -99,7 +99,7 @@ struct rt_pmkid_list {
|
||||||
u8 Bssid[6];
|
u8 Bssid[6];
|
||||||
u8 PMKID[16];
|
u8 PMKID[16];
|
||||||
u8 SsidBuf[33];
|
u8 SsidBuf[33];
|
||||||
u8* ssid_octet;
|
u8 *ssid_octet;
|
||||||
u16 ssid_length;
|
u16 ssid_length;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -175,62 +175,62 @@ struct sha256_state {
|
||||||
u8 buf[64];
|
u8 buf[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
|
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst) \
|
||||||
do {\
|
do { \
|
||||||
switch (psecuritypriv->dot11AuthAlgrthm) {\
|
switch (psecuritypriv->dot11AuthAlgrthm) { \
|
||||||
case dot11AuthAlgrthm_Open:\
|
case dot11AuthAlgrthm_Open: \
|
||||||
case dot11AuthAlgrthm_Shared:\
|
case dot11AuthAlgrthm_Shared: \
|
||||||
case dot11AuthAlgrthm_Auto:\
|
case dot11AuthAlgrthm_Auto: \
|
||||||
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\
|
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm; \
|
||||||
break;\
|
break; \
|
||||||
case dot11AuthAlgrthm_8021X:\
|
case dot11AuthAlgrthm_8021X: \
|
||||||
if (bmcst)\
|
if (bmcst) \
|
||||||
encry_algo = (u8)psecuritypriv->dot118021XGrpPrivacy;\
|
encry_algo = (u8)psecuritypriv->dot118021XGrpPrivacy;\
|
||||||
else\
|
else \
|
||||||
encry_algo =(u8) psta->dot118021XPrivacy;\
|
encry_algo = (u8)psta->dot118021XPrivacy; \
|
||||||
break;\
|
break; \
|
||||||
case dot11AuthAlgrthm_WAPI:\
|
case dot11AuthAlgrthm_WAPI: \
|
||||||
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\
|
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm; \
|
||||||
break;\
|
break; \
|
||||||
}\
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define SET_ICE_IV_LEN(iv_len, icv_len, encrypt)\
|
#define SET_ICE_IV_LEN(iv_len, icv_len, encrypt) \
|
||||||
do {\
|
do { \
|
||||||
switch (encrypt) {\
|
switch (encrypt) { \
|
||||||
case _WEP40_:\
|
case _WEP40_: \
|
||||||
case _WEP104_:\
|
case _WEP104_: \
|
||||||
iv_len = 4;\
|
iv_len = 4; \
|
||||||
icv_len = 4;\
|
icv_len = 4; \
|
||||||
break;\
|
break; \
|
||||||
case _TKIP_:\
|
case _TKIP_: \
|
||||||
iv_len = 8;\
|
iv_len = 8; \
|
||||||
icv_len = 4;\
|
icv_len = 4; \
|
||||||
break;\
|
break; \
|
||||||
case _AES_:\
|
case _AES_: \
|
||||||
iv_len = 8;\
|
iv_len = 8; \
|
||||||
icv_len = 8;\
|
icv_len = 8; \
|
||||||
break;\
|
break; \
|
||||||
case _SMS4_:\
|
case _SMS4_: \
|
||||||
iv_len = 18;\
|
iv_len = 18; \
|
||||||
icv_len = 16;\
|
icv_len = 16; \
|
||||||
break;\
|
break; \
|
||||||
default:\
|
default: \
|
||||||
iv_len = 0;\
|
iv_len = 0; \
|
||||||
icv_len = 0;\
|
icv_len = 0; \
|
||||||
break;\
|
break; \
|
||||||
}\
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
#define GET_TKIP_PN(iv,dot11txpn)\
|
#define GET_TKIP_PN(iv, dot11txpn) \
|
||||||
do {\
|
do { \
|
||||||
dot11txpn._byte_.TSC0=iv[2];\
|
dot11txpn._byte_.TSC0 = iv[2]; \
|
||||||
dot11txpn._byte_.TSC1=iv[0];\
|
dot11txpn._byte_.TSC1 = iv[0]; \
|
||||||
dot11txpn._byte_.TSC2=iv[4];\
|
dot11txpn._byte_.TSC2 = iv[4]; \
|
||||||
dot11txpn._byte_.TSC3=iv[5];\
|
dot11txpn._byte_.TSC3 = iv[5]; \
|
||||||
dot11txpn._byte_.TSC4=iv[6];\
|
dot11txpn._byte_.TSC4 = iv[6]; \
|
||||||
dot11txpn._byte_.TSC5=iv[7];\
|
dot11txpn._byte_.TSC5 = iv[7]; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
@ -352,10 +352,10 @@ static const unsigned long K[64] = {
|
||||||
|
|
||||||
/* Various logical functions */
|
/* Various logical functions */
|
||||||
#define RORc(x, y) \
|
#define RORc(x, y) \
|
||||||
(((((unsigned long) (x) & 0xFFFFFFFFUL) >> (unsigned long) ((y) & 31)) | \
|
(((((unsigned long)(x) & 0xFFFFFFFFUL) >> (unsigned long)((y)&31)) | \
|
||||||
((unsigned long) (x) << (unsigned long) (32 - ((y) & 31)))) & 0xFFFFFFFFUL)
|
((unsigned long)(x) << (unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||||
#define Ch(x,y,z) (z ^ (x & (y ^ z)))
|
#define Ch(x, y ,z) (z ^ (x & (y ^ z)))
|
||||||
#define Maj(x,y,z) (((x | y) & z) | (x & y))
|
#define Maj(x, y, z) (((x | y) & z) | (x & y))
|
||||||
#define S(x, n) RORc((x), (n))
|
#define S(x, n) RORc((x), (n))
|
||||||
#define R(x, n) (((x)&0xFFFFFFFFUL)>>(n))
|
#define R(x, n) (((x)&0xFFFFFFFFUL)>>(n))
|
||||||
#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22))
|
#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22))
|
||||||
|
|
|
@ -345,7 +345,7 @@ struct tx_servq *rtw_get_sta_pending(struct adapter *padapter,
|
||||||
struct sta_info *psta, int up, u8 *ac);
|
struct sta_info *psta, int up, u8 *ac);
|
||||||
s32 rtw_xmitframe_enqueue(struct adapter *padapter,
|
s32 rtw_xmitframe_enqueue(struct adapter *padapter,
|
||||||
struct xmit_frame *pxmitframe);
|
struct xmit_frame *pxmitframe);
|
||||||
struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv,
|
struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv,
|
||||||
struct hw_xmit *phwxmit_i, int entry);
|
struct hw_xmit *phwxmit_i, int entry);
|
||||||
|
|
||||||
s32 rtw_xmit_classifier(struct adapter *padapter,
|
s32 rtw_xmit_classifier(struct adapter *padapter,
|
||||||
|
|
|
@ -380,7 +380,7 @@ extern struct sta_info *rtw_alloc_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
|
||||||
extern u32 rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
|
extern u32 rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
|
||||||
extern void rtw_free_all_stainfo(struct adapter *adapt);
|
extern void rtw_free_all_stainfo(struct adapter *adapt);
|
||||||
extern struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
|
extern struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
|
||||||
extern u32 rtw_init_bcmc_stainfo(struct adapter* adapt);
|
extern u32 rtw_init_bcmc_stainfo(struct adapter *adapt);
|
||||||
extern struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter);
|
extern struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter);
|
||||||
extern u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr);
|
extern u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr);
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,9 @@ enum{
|
||||||
};
|
};
|
||||||
#define ALIGNMENT_UNIT 16
|
#define ALIGNMENT_UNIT 16
|
||||||
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
||||||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE +ALIGNMENT_UNIT)
|
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12))
|
||||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
||||||
value, index, data, size, timeout_ms) \
|
value, index, data, size, timeout_ms) \
|
||||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value),\
|
usb_control_msg((dev), (pipe), (request), (requesttype), (value),\
|
||||||
|
@ -47,7 +47,7 @@ enum{
|
||||||
(actual_length), (timeout_ms))
|
(actual_length), (timeout_ms))
|
||||||
#else
|
#else
|
||||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
||||||
value, index, data, size,timeout_ms) \
|
value, index, data, size, timeout_ms) \
|
||||||
usb_control_msg((dev), (pipe), (request), (requesttype), \
|
usb_control_msg((dev), (pipe), (request), (requesttype), \
|
||||||
(value), (index), (data), (size), \
|
(value), (index), (data), (size), \
|
||||||
((timeout_ms) == 0) || \
|
((timeout_ms) == 0) || \
|
||||||
|
@ -56,7 +56,7 @@ enum{
|
||||||
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, \
|
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, \
|
||||||
actual_length, timeout_ms) \
|
actual_length, timeout_ms) \
|
||||||
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), \
|
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), \
|
||||||
((timeout_ms) == 0) | |((timeout_ms)*HZ/1000 > 0) ?\
|
((timeout_ms) == 0) || ((timeout_ms)*HZ/1000 > 0) ?\
|
||||||
((timeout_ms)*HZ/1000) : 1)
|
((timeout_ms)*HZ/1000) : 1)
|
||||||
#endif
|
#endif
|
||||||
#include <usb_ops_linux.h>
|
#include <usb_ops_linux.h>
|
||||||
|
|
|
@ -245,92 +245,64 @@ enum WIFI_REG_DOMAIN {
|
||||||
#define _ORDER_ BIT(15)
|
#define _ORDER_ BIT(15)
|
||||||
|
|
||||||
#define SetToDs(pbuf) \
|
#define SetToDs(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
|
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
|
||||||
|
|
||||||
#define ClearToDs(pbuf) \
|
#define ClearToDs(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))
|
||||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define SetFrDs(pbuf) \
|
#define SetFrDs(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
|
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
|
||||||
|
|
||||||
#define ClearFrDs(pbuf) \
|
#define ClearFrDs(pbuf) \
|
||||||
do { \
|
*(__le16 *)(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))
|
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
|
||||||
|
|
||||||
|
|
||||||
#define SetMFrag(pbuf) \
|
#define SetMFrag(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
|
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
|
||||||
|
|
||||||
#define ClearMFrag(pbuf) \
|
#define ClearMFrag(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
|
||||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define SetRetry(pbuf) \
|
#define SetRetry(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
|
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
|
||||||
|
|
||||||
#define ClearRetry(pbuf) \
|
#define ClearRetry(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
|
||||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define SetPwrMgt(pbuf) \
|
#define SetPwrMgt(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
|
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
|
||||||
|
|
||||||
#define ClearPwrMgt(pbuf) \
|
#define ClearPwrMgt(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
|
||||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define SetMData(pbuf) \
|
#define SetMData(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
|
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
|
||||||
|
|
||||||
#define ClearMData(pbuf) \
|
#define ClearMData(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
|
||||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define SetPrivacy(pbuf) \
|
#define SetPrivacy(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetPrivacy(pbuf) \
|
#define GetPrivacy(pbuf) \
|
||||||
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
|
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
|
||||||
|
|
||||||
#define ClearPrivacy(pbuf) \
|
#define ClearPrivacy(pbuf) \
|
||||||
do { \
|
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_))
|
||||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
|
|
||||||
#define GetOrder(pbuf) \
|
#define GetOrder(pbuf) \
|
||||||
|
@ -339,16 +311,16 @@ enum WIFI_REG_DOMAIN {
|
||||||
#define GetFrameType(pbuf) \
|
#define GetFrameType(pbuf) \
|
||||||
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
|
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||||
|
|
||||||
#define SetFrameType(pbuf,type) \
|
#define SetFrameType(pbuf, type) \
|
||||||
do { \
|
do { \
|
||||||
*(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
|
*(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
|
||||||
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
|
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) | \
|
#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
|
||||||
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
|
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
|
||||||
|
|
||||||
#define SetFrameSubType(pbuf,type) \
|
#define SetFrameSubType(pbuf, type) \
|
||||||
do { \
|
do { \
|
||||||
*(__le16 *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | \
|
*(__le16 *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | \
|
||||||
BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
|
BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
|
||||||
|
@ -380,36 +352,26 @@ enum WIFI_REG_DOMAIN {
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define SetDuration(pbuf, dur) \
|
#define SetDuration(pbuf, dur) \
|
||||||
do { \
|
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
|
||||||
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
|
|
||||||
#define SetPriority(pbuf, tid) \
|
#define SetPriority(pbuf, tid) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
|
#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
|
||||||
|
|
||||||
#define SetEOSP(pbuf, eosp) \
|
#define SetEOSP(pbuf, eosp) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16( (eosp & 1) << 4); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define SetAckpolicy(pbuf, ack) \
|
#define SetAckpolicy(pbuf, ack) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16( (ack & 3) << 5); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
|
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
|
||||||
|
|
||||||
#define GetAMsdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
|
#define GetAMsdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
|
||||||
|
|
||||||
#define SetAMsdu(pbuf, amsdu) \
|
#define SetAMsdu(pbuf, amsdu) \
|
||||||
do { \
|
*(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)
|
||||||
*(__le16 *)(pbuf) |= cpu_to_le16( (amsdu & 1) << 7); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
|
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
|
||||||
|
|
||||||
|
@ -503,14 +465,12 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
|
||||||
sa = GetAddr1Ptr(pframe);
|
sa = GetAddr1Ptr(pframe);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sa =NULL; /* */
|
sa = NULL; /* */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return sa;
|
return sa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int IsFrameTypeCtrl(unsigned char *pframe)
|
static inline int IsFrameTypeCtrl(unsigned char *pframe)
|
||||||
{
|
{
|
||||||
if (WIFI_CTRL_TYPE == GetFrameType(pframe))
|
if (WIFI_CTRL_TYPE == GetFrameType(pframe))
|
||||||
|
@ -983,7 +943,7 @@ enum ht_cap_ampdu_factor {
|
||||||
#define P2P_GRPCAP_PERSISTENT_RECONN BIT(5)
|
#define P2P_GRPCAP_PERSISTENT_RECONN BIT(5)
|
||||||
#define P2P_GRPCAP_GROUP_FORMATION BIT(6)
|
#define P2P_GRPCAP_GROUP_FORMATION BIT(6)
|
||||||
|
|
||||||
/* P2P Public Action Frame ( Management Frame ) */
|
/* P2P Public Action Frame (Management Frame) */
|
||||||
#define P2P_PUB_ACTION_ACTION 0x09
|
#define P2P_PUB_ACTION_ACTION 0x09
|
||||||
|
|
||||||
/* P2P Public Action Frame Type */
|
/* P2P Public Action Frame Type */
|
||||||
|
@ -1034,7 +994,7 @@ enum ht_cap_ampdu_factor {
|
||||||
#define P2P_INVITE_TIMEOUT 5000
|
#define P2P_INVITE_TIMEOUT 5000
|
||||||
/* 3 seconds timeout for sending the invitation request under concurrent mode */
|
/* 3 seconds timeout for sending the invitation request under concurrent mode */
|
||||||
#define P2P_CONCURRENT_INVITE_TIME 3000
|
#define P2P_CONCURRENT_INVITE_TIME 3000
|
||||||
/* 25 seconds timeout to reset the scan channel ( based on channel plan ) */
|
/* 25 seconds timeout to reset the scan channel (based on channel plan) */
|
||||||
#define P2P_RESET_SCAN_CH 25000
|
#define P2P_RESET_SCAN_CH 25000
|
||||||
#define P2P_MAX_INTENT 15
|
#define P2P_MAX_INTENT 15
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue