|
@@ -61,17 +61,17 @@
|
|
|
#include <linux/if_ether.h>
|
|
|
|
|
|
/*--- Mins & Maxs -----------------------------------*/
|
|
|
-#define HFA384x_PORTID_MAX ((u16)7)
|
|
|
-#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1))
|
|
|
-#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */
|
|
|
-#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */
|
|
|
-#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK */
|
|
|
-#define HFA384x_SCANRESULT_MAX ((u16)31)
|
|
|
-#define HFA384x_HSCANRESULT_MAX ((u16)31)
|
|
|
-#define HFA384x_CHINFORESULT_MAX ((u16)16)
|
|
|
-#define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */
|
|
|
-#define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN
|
|
|
-#define HFA384x_USB_RWMEM_MAXLEN 2048
|
|
|
+#define HFA384x_PORTID_MAX ((u16)7)
|
|
|
+#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1))
|
|
|
+#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */
|
|
|
+#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */
|
|
|
+#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK*/
|
|
|
+#define HFA384x_SCANRESULT_MAX ((u16)31)
|
|
|
+#define HFA384x_HSCANRESULT_MAX ((u16)31)
|
|
|
+#define HFA384x_CHINFORESULT_MAX ((u16)16)
|
|
|
+#define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */
|
|
|
+#define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN
|
|
|
+#define HFA384x_USB_RWMEM_MAXLEN 2048
|
|
|
|
|
|
/*--- Support Constants -----------------------------*/
|
|
|
#define HFA384x_PORTTYPE_IBSS ((u16)0)
|
|
@@ -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
|
|
@@ -322,9 +333,11 @@ 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_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_CMDCODE_SET(value) ((u16)(value))
|
|
|
|
|
|
#define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8)
|
|
@@ -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
|
|
|
----------------------------------------------------------------------
|
|
@@ -1174,14 +1193,14 @@ typedef struct hfa484x_metacmd {
|
|
|
} hfa384x_metacmd_t;
|
|
|
|
|
|
#define MAX_GRP_ADDR 32
|
|
|
-#define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */
|
|
|
+#define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */
|
|
|
|
|
|
-#define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */
|
|
|
-#define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */
|
|
|
-#define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */
|
|
|
-#define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */
|
|
|
-#define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */
|
|
|
-#define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */
|
|
|
+#define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */
|
|
|
+#define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */
|
|
|
+#define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */
|
|
|
+#define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */
|
|
|
+#define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */
|
|
|
+#define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */
|
|
|
|
|
|
/* XXX These are going away ASAP */
|
|
|
typedef struct prism2sta_authlist {
|
|
@@ -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. */
|
|
@@ -1387,6 +1419,6 @@ int
|
|
|
hfa384x_cmd_download(hfa384x_t *hw,
|
|
|
u16 mode, u16 lowaddr, u16 highaddr, u16 codelen);
|
|
|
|
|
|
-#endif /* __KERNEL__ */
|
|
|
+#endif /*__KERNEL__ */
|
|
|
|
|
|
-#endif /* _HFA384x_H */
|
|
|
+#endif /*_HFA384x_H */
|