rtl8188eu: Fix checkpatch errors in include/*.h - part 4

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-08-15 20:04:25 -05:00
parent 8a46c9e7a5
commit 168faff726
8 changed files with 175 additions and 216 deletions

View file

@ -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 oui_8021h[] = {0x00, 0x00, 0xf8};
static u8 oui_rfc1042[] = {0x00,0x00,0x00};
static u8 oui_rfc1042[] = {0x00, 0x00, 0x00};
#define MAX_SUBFRAME_COUNT 64
static u8 rtw_rfc1042_header[] = {
@ -165,10 +165,8 @@ struct rx_pkt_attrib {
/* 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 REORDER_WIN_SIZE 128 */
/* define REORDER_ENTRY_NUM 128 */
#define REORDER_WAIT_TIME (50) /* (ms) */
#define RECVBUFF_ALIGN_SZ 8
@ -317,8 +315,8 @@ union recv_frame {
} 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,
struct recv_priv *precvpriv);
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,
struct __queue *pfree_recv_queue);
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);
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);
@ -369,11 +367,11 @@ static inline u8 *recvframe_push(union recv_frame *precvframe, int sz)
if (precvframe == NULL)
return NULL;
precvframe->u.hdr.rx_data -= sz ;
if ( precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head) {
precvframe->u.hdr.rx_data += sz ;
if (precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head) {
precvframe->u.hdr.rx_data += sz;
return NULL;
}
precvframe->u.hdr.len +=sz;
precvframe->u.hdr.len += sz;
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;
return NULL;
}
precvframe->u.hdr.len +=sz;
precvframe->u.hdr.len += sz;
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)
{
/* 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. */
/* 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 */
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;
}

View file

@ -90,7 +90,7 @@ enum _REG_PREAMBLE_MODE {
PREAMBLE_SHORT = 3,
};
enum _RTL8712_RF_MIMO_CONFIG_{
enum _RTL8712_RF_MIMO_CONFIG_ {
RTL8712_RFCONFIG_1T = 0x10,
RTL8712_RFCONFIG_2T = 0x20,
RTL8712_RFCONFIG_1R = 0x01,

View file

@ -99,7 +99,7 @@ struct rt_pmkid_list {
u8 Bssid[6];
u8 PMKID[16];
u8 SsidBuf[33];
u8* ssid_octet;
u8 *ssid_octet;
u16 ssid_length;
};
@ -175,62 +175,62 @@ struct sha256_state {
u8 buf[64];
};
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
do {\
switch (psecuritypriv->dot11AuthAlgrthm) {\
case dot11AuthAlgrthm_Open:\
case dot11AuthAlgrthm_Shared:\
case dot11AuthAlgrthm_Auto:\
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\
break;\
case dot11AuthAlgrthm_8021X:\
if (bmcst)\
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst) \
do { \
switch (psecuritypriv->dot11AuthAlgrthm) { \
case dot11AuthAlgrthm_Open: \
case dot11AuthAlgrthm_Shared: \
case dot11AuthAlgrthm_Auto: \
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm; \
break; \
case dot11AuthAlgrthm_8021X: \
if (bmcst) \
encry_algo = (u8)psecuritypriv->dot118021XGrpPrivacy;\
else\
encry_algo =(u8) psta->dot118021XPrivacy;\
break;\
case dot11AuthAlgrthm_WAPI:\
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\
break;\
}\
else \
encry_algo = (u8)psta->dot118021XPrivacy; \
break; \
case dot11AuthAlgrthm_WAPI: \
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm; \
break; \
} \
} while (0)
#define SET_ICE_IV_LEN(iv_len, icv_len, encrypt)\
do {\
switch (encrypt) {\
case _WEP40_:\
case _WEP104_:\
iv_len = 4;\
icv_len = 4;\
break;\
case _TKIP_:\
iv_len = 8;\
icv_len = 4;\
break;\
case _AES_:\
iv_len = 8;\
icv_len = 8;\
break;\
case _SMS4_:\
iv_len = 18;\
icv_len = 16;\
break;\
default:\
iv_len = 0;\
icv_len = 0;\
break;\
}\
#define SET_ICE_IV_LEN(iv_len, icv_len, encrypt) \
do { \
switch (encrypt) { \
case _WEP40_: \
case _WEP104_: \
iv_len = 4; \
icv_len = 4; \
break; \
case _TKIP_: \
iv_len = 8; \
icv_len = 4; \
break; \
case _AES_: \
iv_len = 8; \
icv_len = 8; \
break; \
case _SMS4_: \
iv_len = 18; \
icv_len = 16; \
break; \
default: \
iv_len = 0; \
icv_len = 0; \
break; \
} \
} while (0)
#define GET_TKIP_PN(iv,dot11txpn)\
do {\
dot11txpn._byte_.TSC0=iv[2];\
dot11txpn._byte_.TSC1=iv[0];\
dot11txpn._byte_.TSC2=iv[4];\
dot11txpn._byte_.TSC3=iv[5];\
dot11txpn._byte_.TSC4=iv[6];\
dot11txpn._byte_.TSC5=iv[7];\
#define GET_TKIP_PN(iv, dot11txpn) \
do { \
dot11txpn._byte_.TSC0 = iv[2]; \
dot11txpn._byte_.TSC1 = iv[0]; \
dot11txpn._byte_.TSC2 = iv[4]; \
dot11txpn._byte_.TSC3 = iv[5]; \
dot11txpn._byte_.TSC4 = iv[6]; \
dot11txpn._byte_.TSC5 = iv[7]; \
} while (0)
@ -352,10 +352,10 @@ static const unsigned long K[64] = {
/* Various logical functions */
#define RORc(x, y) \
(((((unsigned long) (x) & 0xFFFFFFFFUL) >> (unsigned long) ((y) & 31)) | \
((unsigned long) (x) << (unsigned long) (32 - ((y) & 31)))) & 0xFFFFFFFFUL)
#define Ch(x,y,z) (z ^ (x & (y ^ z)))
#define Maj(x,y,z) (((x | y) & z) | (x & y))
(((((unsigned long)(x) & 0xFFFFFFFFUL) >> (unsigned long)((y)&31)) | \
((unsigned long)(x) << (unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
#define Ch(x, y ,z) (z ^ (x & (y ^ z)))
#define Maj(x, y, z) (((x | y) & z) | (x & y))
#define S(x, n) RORc((x), (n))
#define R(x, n) (((x)&0xFFFFFFFFUL)>>(n))
#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22))

View file

@ -345,7 +345,7 @@ struct tx_servq *rtw_get_sta_pending(struct adapter *padapter,
struct sta_info *psta, int up, u8 *ac);
s32 rtw_xmitframe_enqueue(struct adapter *padapter,
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);
s32 rtw_xmit_classifier(struct adapter *padapter,

View file

@ -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 void rtw_free_all_stainfo(struct adapter *adapt);
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 u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr);

View file

@ -35,9 +35,9 @@ enum{
};
#define ALIGNMENT_UNIT 16
#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, \
value, index, data, size, timeout_ms) \
usb_control_msg((dev), (pipe), (request), (requesttype), (value),\
@ -47,7 +47,7 @@ enum{
(actual_length), (timeout_ms))
#else
#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), (index), (data), (size), \
((timeout_ms) == 0) || \
@ -56,7 +56,7 @@ enum{
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, \
actual_length, timeout_ms) \
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)
#endif
#include <usb_ops_linux.h>

View file

@ -245,92 +245,64 @@ enum WIFI_REG_DOMAIN {
#define _ORDER_ BIT(15)
#define SetToDs(pbuf) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
#define ClearToDs(pbuf) \
do { \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
} while (0)
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))
#define SetFrDs(pbuf) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
#define ClearFrDs(pbuf) \
do { \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
} while (0)
*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_))
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
#define SetMFrag(pbuf) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_)
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
#define ClearMFrag(pbuf) \
do { \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
} while (0)
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
#define SetRetry(pbuf) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define ClearRetry(pbuf) \
do { \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
} while (0)
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
#define SetPwrMgt(pbuf) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
#define ClearPwrMgt(pbuf) \
do { \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
} while (0)
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
#define SetMData(pbuf) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
#define ClearMData(pbuf) \
do { \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
} while (0)
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
#define SetPrivacy(pbuf) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
#define GetPrivacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
#define ClearPrivacy(pbuf) \
do { \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
} while (0)
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_))
#define GetOrder(pbuf) \
@ -339,16 +311,16 @@ enum WIFI_REG_DOMAIN {
#define GetFrameType(pbuf) \
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
#define SetFrameType(pbuf,type) \
#define SetFrameType(pbuf, type) \
do { \
*(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
} 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)))
#define SetFrameSubType(pbuf,type) \
#define SetFrameSubType(pbuf, type) \
do { \
*(__le16 *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | \
BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
@ -380,36 +352,26 @@ enum WIFI_REG_DOMAIN {
} while (0)
#define SetDuration(pbuf, dur) \
do { \
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
} while (0)
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
#define SetPriority(pbuf, tid) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
#define SetEOSP(pbuf, eosp) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16( (eosp & 1) << 4); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
#define SetAckpolicy(pbuf, ack) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16( (ack & 3) << 5); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
#define GetAMsdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
#define SetAMsdu(pbuf, amsdu) \
do { \
*(__le16 *)(pbuf) |= cpu_to_le16( (amsdu & 1) << 7); \
} while (0)
*(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)
#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);
break;
default:
sa =NULL; /* */
sa = NULL; /* */
break;
}
return sa;
}
static inline int IsFrameTypeCtrl(unsigned char *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_GROUP_FORMATION BIT(6)
/* P2P Public Action Frame ( Management Frame ) */
/* P2P Public Action Frame (Management Frame) */
#define P2P_PUB_ACTION_ACTION 0x09
/* P2P Public Action Frame Type */
@ -1034,7 +994,7 @@ enum ht_cap_ampdu_factor {
#define P2P_INVITE_TIMEOUT 5000
/* 3 seconds timeout for sending the invitation request under concurrent mode */
#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_MAX_INTENT 15