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
|
@ -167,8 +167,6 @@ 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
|
||||||
|
@ -329,7 +327,7 @@ 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);
|
||||||
|
|
||||||
|
@ -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 */
|
||||||
|
|
||||||
|
|
|
@ -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) \
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
@ -506,11 +468,9 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
|
||||||
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))
|
||||||
|
|
Loading…
Reference in a new issue