Staging: wlan-ng: fix most of the style issues in hfa384x.h
This patch fixes all the errors and the majority of the warnings found with checkpatch.pl script in hfa384x.h, following Gábor Stefanik hints Signed-off-by: Alessandro Ghedini <al3xbio@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
49c9b5c7bd
commit
71508ee489
@@ -115,8 +115,8 @@
|
||||
|
||||
/* Make a 32-bit flat address from AUX format 16-bit page and offset */
|
||||
#define HFA384x_ADDR_AUX_MKFLAT(p, o) \
|
||||
(((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
|
||||
((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK))
|
||||
((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
|
||||
((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)))
|
||||
|
||||
/* Make CMD format offset and page from a 32-bit flat address */
|
||||
#define HFA384x_ADDR_CMD_MKPAGE(f) \
|
||||
@@ -135,12 +135,21 @@
|
||||
#define HFA384x_DLSTATE_FLASHENABLED 2
|
||||
|
||||
/*--- Register Field Masks --------------------------*/
|
||||
#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8)))
|
||||
#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
|
||||
#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) \
|
||||
| BIT(12) | BIT(11) \
|
||||
| BIT(10) | BIT(9) \
|
||||
| BIT(8)))
|
||||
#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | \
|
||||
BIT(8)))
|
||||
#define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8)))
|
||||
#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0)))
|
||||
#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | \
|
||||
BIT(3) | BIT(2) | \
|
||||
BIT(1) | BIT(0)))
|
||||
|
||||
#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8)))
|
||||
#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) \
|
||||
| BIT(12) | BIT(11) \
|
||||
| BIT(10) | BIT(9) \
|
||||
| BIT(8)))
|
||||
|
||||
/*--- Command Code Constants --------------------------*/
|
||||
/*--- Controller Commands --------------------------*/
|
||||
@@ -244,8 +253,10 @@ Information RID Lengths: MAC Information
|
||||
This is the length of JUST the DATA part of the RID (does not
|
||||
include the len or code fields)
|
||||
--------------------------------------------------------------------*/
|
||||
#define HFA384x_RID_DBMCOMMSQUALITY_LEN ((u16)sizeof(hfa384x_dbmcommsquality_t))
|
||||
#define HFA384x_RID_JOINREQUEST_LEN ((u16)sizeof(hfa384x_JoinRequest_data_t))
|
||||
#define HFA384x_RID_DBMCOMMSQUALITY_LEN \
|
||||
((u16) sizeof(hfa384x_dbmcommsquality_t))
|
||||
#define HFA384x_RID_JOINREQUEST_LEN \
|
||||
((u16)sizeof(hfa384x_JoinRequest_data_t))
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Information RIDs: Modem Information
|
||||
@@ -323,8 +334,10 @@ PD Record codes
|
||||
/*--- Register Test/Get/Set Field macros ------------------------*/
|
||||
|
||||
#define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8))
|
||||
#define HFA384x_CMD_MACPORT_SET(value) ((u16)HFA384x_CMD_AINFO_SET(value))
|
||||
#define HFA384x_CMD_PROGMODE_SET(value) ((u16)HFA384x_CMD_AINFO_SET((u16)value))
|
||||
#define HFA384x_CMD_MACPORT_SET(value) \
|
||||
((u16)HFA384x_CMD_AINFO_SET(value))
|
||||
#define HFA384x_CMD_PROGMODE_SET(value) \
|
||||
((u16)HFA384x_CMD_AINFO_SET((u16)value))
|
||||
#define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value))
|
||||
|
||||
#define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8)
|
||||
@@ -402,7 +415,7 @@ typedef struct hfa384x_authenticateStation_data {
|
||||
/*-- Configuration Record: WPAData (data portion only) --*/
|
||||
typedef struct hfa384x_WPAData {
|
||||
u16 datalen;
|
||||
u8 data[0]; // max 80
|
||||
u8 data[0]; /* max 80 */
|
||||
} __attribute__ ((packed)) hfa384x_WPAData_t;
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
@@ -479,7 +492,8 @@ Communication Frames: Field Masks for Transmit Frames
|
||||
#define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1))
|
||||
#define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0))
|
||||
/*-- Transmit Control Field --*/
|
||||
#define HFA384x_TX_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
|
||||
#define HFA384x_TX_MACPORT ((u16)(BIT(10) | \
|
||||
BIT(9) | BIT(8)))
|
||||
#define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3)))
|
||||
#define HFA384x_TX_TXEX ((u16)BIT(2))
|
||||
#define HFA384x_TX_TXOK ((u16)BIT(1))
|
||||
@@ -496,7 +510,8 @@ Communication Frames: Test/Get/Set Field Values for Transmit Frames
|
||||
#define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m)))
|
||||
|
||||
#define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
|
||||
#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, HFA384x_TX_STRUCTYPE, 3)
|
||||
#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \
|
||||
HFA384x_TX_STRUCTYPE, 3)
|
||||
#define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
|
||||
#define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
|
||||
/*--------------------------------------------------------------------
|
||||
@@ -534,13 +549,17 @@ Communication Frames: Field Masks for Receive Frames
|
||||
--------------------------------------------------------------------*/
|
||||
|
||||
/*-- Status Fields --*/
|
||||
#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8)))
|
||||
#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | \
|
||||
BIT(9) | \
|
||||
BIT(8)))
|
||||
#define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0))
|
||||
/*--------------------------------------------------------------------
|
||||
Communication Frames: Test/Get/Set Field Values for Receive Frames
|
||||
--------------------------------------------------------------------*/
|
||||
#define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) & HFA384x_RXSTATUS_MACPORT) >> 8))
|
||||
#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) & HFA384x_RXSTATUS_FCSERR))
|
||||
#define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) \
|
||||
& HFA384x_RXSTATUS_MACPORT) >> 8))
|
||||
#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \
|
||||
& HFA384x_RXSTATUS_FCSERR))
|
||||
/*--------------------------------------------------------------------
|
||||
FRAME STRUCTURES: Information Types and Information Frame Structures
|
||||
----------------------------------------------------------------------
|
||||
@@ -1294,10 +1313,23 @@ typedef struct hfa384x {
|
||||
hfa384x_caplevel_t cap_sup_ap;
|
||||
|
||||
/* Actor compatibility ranges */
|
||||
hfa384x_caplevel_t cap_act_pri_cfi; /* pri f/w to controller interface */
|
||||
hfa384x_caplevel_t cap_act_sta_cfi; /* sta f/w to controller interface */
|
||||
hfa384x_caplevel_t cap_act_pri_cfi; /*
|
||||
* pri f/w to controller
|
||||
* interface
|
||||
*/
|
||||
|
||||
hfa384x_caplevel_t cap_act_sta_cfi; /*
|
||||
* sta f/w to controller
|
||||
* interface
|
||||
*/
|
||||
|
||||
hfa384x_caplevel_t cap_act_sta_mfi; /* sta f/w to modem interface */
|
||||
hfa384x_caplevel_t cap_act_ap_cfi; /* ap f/w to controller interface */
|
||||
|
||||
hfa384x_caplevel_t cap_act_ap_cfi; /*
|
||||
* ap f/w to controller
|
||||
* interface
|
||||
*/
|
||||
|
||||
hfa384x_caplevel_t cap_act_ap_mfi; /* ap f/w to modem interface */
|
||||
|
||||
u32 psusercount; /* Power save user count. */
|
||||
|
Reference in New Issue
Block a user