staging: wlang-ng: avoid new typedef: hfa384x_usb_error_t
[cascardo/linux.git] / drivers / staging / wlan-ng / hfa384x.h
index cec6d0b..58b1ac5 100644 (file)
@@ -63,7 +63,7 @@
 
 /*--- Mins & Maxs -----------------------------------*/
 #define        HFA384x_PORTID_MAX              ((u16)7)
-#define        HFA384x_NUMPORTS_MAX            ((u16)(HFA384x_PORTID_MAX+1))
+#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_ADDR_FLAT_CMD_OFF_MASK  (0x0000ffff)
 
 /* Mask bits for discarding unwanted pieces in AUX format
-   16-bit address parts */
+ * 16-bit address parts
+ */
 #define                HFA384x_ADDR_AUX_PAGE_MASK      (0xffff)
 #define                HFA384x_ADDR_AUX_OFF_MASK       (0x007f)
 
 /* 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) \
-               ((u16)((((u32)(f))&HFA384x_ADDR_FLAT_CMD_PAGE_MASK)>>16))
+               ((u16)((((u32)(f)) & HFA384x_ADDR_FLAT_CMD_PAGE_MASK) >> 16))
 #define                HFA384x_ADDR_CMD_MKOFF(f) \
-               ((u16)(((u32)(f))&HFA384x_ADDR_FLAT_CMD_OFF_MASK))
+               ((u16)(((u32)(f)) & HFA384x_ADDR_FLAT_CMD_OFF_MASK))
 
 /*--- Controller Memory addresses -------------------*/
 #define                HFA3842_PDA_BASE        (0x007f0000UL)
 #define                HFA384x_CMD_ERR                 ((u16)(0x7F))
 
 /*--- Programming Modes --------------------------
-       MODE 0: Disable programming
-       MODE 1: Enable volatile memory programming
-       MODE 2: Enable non-volatile memory programming
-       MODE 3: Program non-volatile memory section
---------------------------------------------------*/
+ *     MODE 0: Disable programming
+ *     MODE 1: Enable volatile memory programming
+ *     MODE 2: Enable non-volatile memory programming
+ *     MODE 3: Program non-volatile memory section
+ *-------------------------------------------------
+ */
 #define                HFA384x_PROGMODE_DISABLE        ((u16)0x00)
 #define                HFA384x_PROGMODE_RAM            ((u16)0x01)
 #define                HFA384x_PROGMODE_NV             ((u16)0x02)
 
 /*--- Record ID Constants --------------------------*/
 /*--------------------------------------------------------------------
-Configuration RIDs: Network Parameters, Static Configuration Entities
---------------------------------------------------------------------*/
+ * Configuration RIDs: Network Parameters, Static Configuration Entities
+ *--------------------------------------------------------------------
+ */
 #define                HFA384x_RID_CNFPORTTYPE         ((u16)0xFC00)
 #define                HFA384x_RID_CNFOWNMACADDR       ((u16)0xFC01)
 #define                HFA384x_RID_CNFDESIREDSSID      ((u16)0xFC02)
@@ -195,17 +198,19 @@ Configuration RIDs: Network Parameters, Static Configuration Entities
 #define                HFA384x_RID_CNFMAXDATALEN       ((u16)0xFC07)
 
 /*--------------------------------------------------------------------
-Configuration RID lengths: Network Params, Static Config Entities
-  This is the length of JUST the DATA part of the RID (does not
-  include the len or code fields)
---------------------------------------------------------------------*/
+ * Configuration RID lengths: Network Params, Static Config Entities
+ * This is the length of JUST the DATA part of the RID (does not
+ * include the len or code fields)
+ *--------------------------------------------------------------------
+ */
 #define                HFA384x_RID_CNFOWNMACADDR_LEN   ((u16)6)
 #define                HFA384x_RID_CNFDESIREDSSID_LEN  ((u16)34)
 #define                HFA384x_RID_CNFOWNSSID_LEN      ((u16)34)
 
 /*--------------------------------------------------------------------
-Configuration RIDs: Network Parameters, Dynamic Configuration Entities
---------------------------------------------------------------------*/
+ * Configuration RIDs: Network Parameters, Dynamic Configuration Entities
+ *--------------------------------------------------------------------
+ */
 #define                HFA384x_RID_CREATEIBSS          ((u16)0xFC81)
 #define                HFA384x_RID_FRAGTHRESH          ((u16)0xFC82)
 #define                HFA384x_RID_RTSTHRESH           ((u16)0xFC83)
@@ -213,8 +218,9 @@ Configuration RIDs: Network Parameters, Dynamic Configuration Entities
 #define                HFA384x_RID_PROMISCMODE         ((u16)0xFC85)
 
 /*----------------------------------------------------------------------
-Information RIDs: NIC Information
---------------------------------------------------------------------*/
+ * Information RIDs: NIC Information
+ *----------------------------------------------------------------------
+ */
 #define                HFA384x_RID_MAXLOADTIME         ((u16)0xFD00)
 #define                HFA384x_RID_DOWNLOADBUFFER      ((u16)0xFD01)
 #define                HFA384x_RID_PRIIDENTITY         ((u16)0xFD02)
@@ -230,15 +236,17 @@ Information RIDs: NIC Information
 #define                HFA384x_RID_STA_CFIACTRANGES    ((u16)0xFD23)
 
 /*----------------------------------------------------------------------
-Information RID Lengths: NIC Information
-  This is the length of JUST the DATA part of the RID (does not
-  include the len or code fields)
---------------------------------------------------------------------*/
+ * Information RID Lengths: NIC Information
+ * This is the length of JUST the DATA part of the RID (does not
+ * include the len or code fields)
+ *---------------------------------------------------------------------
+ */
 #define                HFA384x_RID_NICSERIALNUMBER_LEN         ((u16)12)
 
 /*--------------------------------------------------------------------
-Information RIDs:  MAC Information
---------------------------------------------------------------------*/
+ * Information RIDs:  MAC Information
+ *--------------------------------------------------------------------
+ */
 #define                HFA384x_RID_PORTSTATUS          ((u16)0xFD40)
 #define                HFA384x_RID_CURRENTSSID         ((u16)0xFD41)
 #define                HFA384x_RID_CURRENTBSSID        ((u16)0xFD42)
@@ -250,23 +258,26 @@ Information RIDs:  MAC Information
 #define                HFA384x_RID_DBMCOMMSQUALITY     ((u16)0xFD51)
 
 /*--------------------------------------------------------------------
-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)
---------------------------------------------------------------------*/
+ * 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))
+       ((u16)sizeof(struct hfa384x_dbmcommsquality))
 #define                HFA384x_RID_JOINREQUEST_LEN \
-       ((u16)sizeof(hfa384x_JoinRequest_data_t))
+       ((u16)sizeof(struct hfa384x_JoinRequest_data))
 
 /*--------------------------------------------------------------------
-Information RIDs:  Modem Information
---------------------------------------------------------------------*/
+ * Information RIDs:  Modem Information
+ *--------------------------------------------------------------------
+ */
 #define                HFA384x_RID_CURRENTCHANNEL      ((u16)0xFDC1)
 
 /*--------------------------------------------------------------------
-API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
---------------------------------------------------------------------*/
+ * API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
+ *--------------------------------------------------------------------
+ */
 #define                HFA384x_RID_CNFWEPDEFAULTKEYID  ((u16)0xFC23)
 #define                HFA384x_RID_CNFWEPDEFAULTKEY0   ((u16)0xFC24)
 #define                HFA384x_RID_CNFWEPDEFAULTKEY1   ((u16)0xFC25)
@@ -290,8 +301,9 @@ API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
 #define                HFA384x_RID_CNFWEP128DEFAULTKEY_LEN     ((u16)14)
 
 /*--------------------------------------------------------------------
-PD Record codes
---------------------------------------------------------------------*/
+ * PD Record codes
+ *--------------------------------------------------------------------
+ */
 #define HFA384x_PDR_PCB_PARTNUM                ((u16)0x0001)
 #define HFA384x_PDR_PDAVER             ((u16)0x0002)
 #define HFA384x_PDR_NIC_SERIAL         ((u16)0x0003)
@@ -355,31 +367,32 @@ struct hfa384x_bytestr {
        u8 data[0];
 } __packed;
 
-typedef struct hfa384x_bytestr32 {
+struct hfa384x_bytestr32 {
        u16 len;
        u8 data[32];
-} __packed hfa384x_bytestr32_t;
+} __packed;
 
 /*--------------------------------------------------------------------
-Configuration Record Structures:
-       Network Parameters, Static Configuration Entities
---------------------------------------------------------------------*/
+ * Configuration Record Structures:
+ *     Network Parameters, Static Configuration Entities
+ *--------------------------------------------------------------------
+ */
 
 /*-- Hardware/Firmware Component Information ----------*/
-typedef struct hfa384x_compident {
+struct hfa384x_compident {
        u16 id;
        u16 variant;
        u16 major;
        u16 minor;
-} __packed hfa384x_compident_t;
+} __packed;
 
-typedef struct hfa384x_caplevel {
+struct hfa384x_caplevel {
        u16 role;
        u16 id;
        u16 variant;
        u16 bottom;
        u16 top;
-} __packed hfa384x_caplevel_t;
+} __packed;
 
 /*-- Configuration Record: cnfAuthentication --*/
 #define HFA384x_CNFAUTHENTICATION_OPENSYSTEM   0x0001
@@ -387,77 +400,81 @@ typedef struct hfa384x_caplevel {
 #define HFA384x_CNFAUTHENTICATION_LEAP         0x0004
 
 /*--------------------------------------------------------------------
-Configuration Record Structures:
-       Network Parameters, Dynamic Configuration Entities
---------------------------------------------------------------------*/
+ * Configuration Record Structures:
+ *     Network Parameters, Dynamic Configuration Entities
+ *--------------------------------------------------------------------
+ */
 
 #define HFA384x_CREATEIBSS_JOINCREATEIBSS          0
 
 /*-- Configuration Record: HostScanRequest (data portion only) --*/
-typedef struct hfa384x_HostScanRequest_data {
+struct hfa384x_HostScanRequest_data {
        u16 channelList;
        u16 txRate;
-       hfa384x_bytestr32_t ssid;
-} __packed hfa384x_HostScanRequest_data_t;
+       struct hfa384x_bytestr32 ssid;
+} __packed;
 
 /*-- Configuration Record: JoinRequest (data portion only) --*/
-typedef struct hfa384x_JoinRequest_data {
+struct hfa384x_JoinRequest_data {
        u8 bssid[WLAN_BSSID_LEN];
        u16 channel;
-} __packed hfa384x_JoinRequest_data_t;
+} __packed;
 
 /*-- Configuration Record: authenticateStation (data portion only) --*/
-typedef struct hfa384x_authenticateStation_data {
+struct hfa384x_authenticateStation_data {
        u8 address[ETH_ALEN];
        u16 status;
        u16 algorithm;
-} __packed hfa384x_authenticateStation_data_t;
+} __packed;
 
 /*-- Configuration Record: WPAData       (data portion only) --*/
-typedef struct hfa384x_WPAData {
+struct hfa384x_WPAData {
        u16 datalen;
        u8 data[0];             /* max 80 */
-} __packed hfa384x_WPAData_t;
+} __packed;
 
 /*--------------------------------------------------------------------
-Information Record Structures: NIC Information
---------------------------------------------------------------------*/
+ * Information Record Structures: NIC Information
+ *--------------------------------------------------------------------
+ */
 
 /*-- Information Record: DownLoadBuffer --*/
 /* NOTE: The page and offset are in AUX format */
-typedef struct hfa384x_downloadbuffer {
+struct hfa384x_downloadbuffer {
        u16 page;
        u16 offset;
        u16 len;
-} __packed hfa384x_downloadbuffer_t;
+} __packed;
 
 /*--------------------------------------------------------------------
-Information Record Structures: NIC Information
---------------------------------------------------------------------*/
+ * Information Record Structures: NIC Information
+ *--------------------------------------------------------------------
+ */
 
 #define HFA384x_PSTATUS_CONN_IBSS      ((u16)3)
 
 /*-- Information Record: commsquality --*/
-typedef struct hfa384x_commsquality {
+struct hfa384x_commsquality {
        u16 CQ_currBSS;
        u16 ASL_currBSS;
        u16 ANL_currFC;
-} __packed hfa384x_commsquality_t;
+} __packed;
 
 /*-- Information Record: dmbcommsquality --*/
-typedef struct hfa384x_dbmcommsquality {
+struct hfa384x_dbmcommsquality {
        u16 CQdbm_currBSS;
        u16 ASLdbm_currBSS;
        u16 ANLdbm_currFC;
-} __packed hfa384x_dbmcommsquality_t;
+} __packed;
 
 /*--------------------------------------------------------------------
-FRAME STRUCTURES: Communication Frames
-----------------------------------------------------------------------
-Communication Frames: Transmit Frames
---------------------------------------------------------------------*/
+ * FRAME STRUCTURES: Communication Frames
+ *--------------------------------------------------------------------
+ * Communication Frames: Transmit Frames
+ *--------------------------------------------------------------------
+ */
 /*-- Communication Frame: Transmit Frame Structure --*/
-typedef struct hfa384x_tx_frame {
+struct hfa384x_tx_frame {
        u16 status;
        u16 reserved1;
        u16 reserved2;
@@ -482,10 +499,11 @@ typedef struct hfa384x_tx_frame {
        u8 dest_addr[6];
        u8 src_addr[6];
        u16 data_length;        /* big endian format */
-} __packed hfa384x_tx_frame_t;
+} __packed;
 /*--------------------------------------------------------------------
-Communication Frames: Field Masks for Transmit Frames
---------------------------------------------------------------------*/
+ * Communication Frames: Field Masks for Transmit Frames
+ *--------------------------------------------------------------------
+ */
 /*-- Status Field --*/
 #define                HFA384x_TXSTATUS_ACKERR                 ((u16)BIT(5))
 #define                HFA384x_TXSTATUS_FORMERR                ((u16)BIT(3))
@@ -499,16 +517,17 @@ Communication Frames: Field Masks for Transmit Frames
 #define                HFA384x_TX_TXEX                         ((u16)BIT(2))
 #define                HFA384x_TX_TXOK                         ((u16)BIT(1))
 /*--------------------------------------------------------------------
-Communication Frames: Test/Get/Set Field Values for Transmit Frames
---------------------------------------------------------------------*/
+ * Communication Frames: Test/Get/Set Field Values for Transmit Frames
+ *--------------------------------------------------------------------
+ */
 /*-- Status Field --*/
 #define HFA384x_TXSTATUS_ISERROR(v)    \
-       (((u16)(v))&\
-       (HFA384x_TXSTATUS_ACKERR|HFA384x_TXSTATUS_FORMERR|\
-       HFA384x_TXSTATUS_DISCON|HFA384x_TXSTATUS_AGEDERR|\
+       (((u16)(v)) & \
+       (HFA384x_TXSTATUS_ACKERR | HFA384x_TXSTATUS_FORMERR | \
+       HFA384x_TXSTATUS_DISCON | HFA384x_TXSTATUS_AGEDERR | \
        HFA384x_TXSTATUS_RETRYERR))
 
-#define        HFA384x_TX_SET(v, m, s)         ((((u16)(v))<<((u16)(s)))&((u16)(m)))
+#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, \
@@ -516,10 +535,11 @@ Communication Frames: Test/Get/Set Field Values for Transmit Frames
 #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)
 /*--------------------------------------------------------------------
-Communication Frames: Receive Frames
---------------------------------------------------------------------*/
+ * Communication Frames: Receive Frames
+ *--------------------------------------------------------------------
+ */
 /*-- Communication Frame: Receive Frame Structure --*/
-typedef struct hfa384x_rx_frame {
+struct hfa384x_rx_frame {
        /*-- MAC rx descriptor (hfa384x byte order) --*/
        u16 status;
        u32 time;
@@ -544,10 +564,11 @@ typedef struct hfa384x_rx_frame {
        u8 dest_addr[6];
        u8 src_addr[6];
        u16 data_length;        /* IEEE? (big endian) format */
-} __packed hfa384x_rx_frame_t;
+} __packed;
 /*--------------------------------------------------------------------
-Communication Frames: Field Masks for Receive Frames
---------------------------------------------------------------------*/
+ * Communication Frames: Field Masks for Receive Frames
+ *--------------------------------------------------------------------
+ */
 
 /*-- Status Fields --*/
 #define                HFA384x_RXSTATUS_MACPORT                ((u16)(BIT(10) | \
@@ -555,17 +576,19 @@ Communication Frames: Field Masks for Receive Frames
                                                                BIT(8)))
 #define                HFA384x_RXSTATUS_FCSERR                 ((u16)BIT(0))
 /*--------------------------------------------------------------------
-Communication Frames: Test/Get/Set Field Values for Receive Frames
---------------------------------------------------------------------*/
+ * 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))
 /*--------------------------------------------------------------------
- FRAME STRUCTURES: Information Types and Information Frame Structures
-----------------------------------------------------------------------
-Information Types
---------------------------------------------------------------------*/
+ * FRAME STRUCTURES: Information Types and Information Frame Structures
+ *--------------------------------------------------------------------
+ * Information Types
+ *--------------------------------------------------------------------
+ */
 #define                HFA384x_IT_HANDOVERADDR                 ((u16)0xF000UL)
 #define                HFA384x_IT_COMMTALLIES                  ((u16)0xF100UL)
 #define                HFA384x_IT_SCANRESULTS                  ((u16)0xF101UL)
@@ -580,13 +603,14 @@ Information Types
 #define                HFA384x_IT_MICFAILURE                   ((u16)0xF206UL)
 
 /*--------------------------------------------------------------------
-Information Frames Structures
-----------------------------------------------------------------------
-Information Frames: Notification Frame Structures
---------------------------------------------------------------------*/
+ * Information Frames Structures
+ *--------------------------------------------------------------------
+ * Information Frames: Notification Frame Structures
+ *--------------------------------------------------------------------
+ */
 
 /*--  Inquiry Frame, Diagnose: Communication Tallies --*/
-typedef struct hfa384x_CommTallies16 {
+struct hfa384x_CommTallies16 {
        u16 txunicastframes;
        u16 txmulticastframes;
        u16 txfragments;
@@ -608,9 +632,9 @@ typedef struct hfa384x_CommTallies16 {
        u16 rxdiscardswepundecr;
        u16 rxmsginmsgfrag;
        u16 rxmsginbadmsgfrag;
-} __packed hfa384x_CommTallies16_t;
+} __packed;
 
-typedef struct hfa384x_CommTallies32 {
+struct hfa384x_CommTallies32 {
        u32 txunicastframes;
        u32 txmulticastframes;
        u32 txfragments;
@@ -632,62 +656,62 @@ typedef struct hfa384x_CommTallies32 {
        u32 rxdiscardswepundecr;
        u32 rxmsginmsgfrag;
        u32 rxmsginbadmsgfrag;
-} __packed hfa384x_CommTallies32_t;
+} __packed;
 
 /*--  Inquiry Frame, Diagnose: Scan Results & Subfields--*/
-typedef struct hfa384x_ScanResultSub {
+struct hfa384x_ScanResultSub {
        u16 chid;
        u16 anl;
        u16 sl;
        u8 bssid[WLAN_BSSID_LEN];
        u16 bcnint;
        u16 capinfo;
-       hfa384x_bytestr32_t ssid;
+       struct hfa384x_bytestr32 ssid;
        u8 supprates[10];       /* 802.11 info element */
        u16 proberesp_rate;
-} __packed hfa384x_ScanResultSub_t;
+} __packed;
 
-typedef struct hfa384x_ScanResult {
+struct hfa384x_ScanResult {
        u16 rsvd;
        u16 scanreason;
-       hfa384x_ScanResultSub_t result[HFA384x_SCANRESULT_MAX];
-} __packed hfa384x_ScanResult_t;
+       struct hfa384x_ScanResultSub result[HFA384x_SCANRESULT_MAX];
+} __packed;
 
 /*--  Inquiry Frame, Diagnose: ChInfo Results & Subfields--*/
-typedef struct hfa384x_ChInfoResultSub {
+struct hfa384x_ChInfoResultSub {
        u16 chid;
        u16 anl;
        u16 pnl;
        u16 active;
-} __packed hfa384x_ChInfoResultSub_t;
+} __packed;
 
 #define HFA384x_CHINFORESULT_BSSACTIVE BIT(0)
 #define HFA384x_CHINFORESULT_PCFACTIVE BIT(1)
 
-typedef struct hfa384x_ChInfoResult {
+struct hfa384x_ChInfoResult {
        u16 scanchannels;
-       hfa384x_ChInfoResultSub_t result[HFA384x_CHINFORESULT_MAX];
-} __packed hfa384x_ChInfoResult_t;
+       struct hfa384x_ChInfoResultSub result[HFA384x_CHINFORESULT_MAX];
+} __packed;
 
 /*--  Inquiry Frame, Diagnose: Host Scan Results & Subfields--*/
-typedef struct hfa384x_HScanResultSub {
+struct hfa384x_HScanResultSub {
        u16 chid;
        u16 anl;
        u16 sl;
        u8 bssid[WLAN_BSSID_LEN];
        u16 bcnint;
        u16 capinfo;
-       hfa384x_bytestr32_t ssid;
+       struct hfa384x_bytestr32 ssid;
        u8 supprates[10];       /* 802.11 info element */
        u16 proberesp_rate;
        u16 atim;
-} __packed hfa384x_HScanResultSub_t;
+} __packed;
 
-typedef struct hfa384x_HScanResult {
+struct hfa384x_HScanResult {
        u16 nresult;
        u16 rsvd;
-       hfa384x_HScanResultSub_t result[HFA384x_HSCANRESULT_MAX];
-} __packed hfa384x_HScanResult_t;
+       struct hfa384x_HScanResultSub result[HFA384x_HSCANRESULT_MAX];
+} __packed;
 
 /*--  Unsolicited Frame, MAC Mgmt: LinkStatus --*/
 
@@ -699,9 +723,9 @@ typedef struct hfa384x_HScanResult {
 #define HFA384x_LINK_AP_INRANGE                ((u16)5)
 #define HFA384x_LINK_ASSOCFAIL         ((u16)6)
 
-typedef struct hfa384x_LinkStatus {
+struct hfa384x_LinkStatus {
        u16 linkstatus;
-} __packed hfa384x_LinkStatus_t;
+} __packed;
 
 /*--  Unsolicited Frame, MAC Mgmt: AssociationStatus (--*/
 
@@ -709,56 +733,57 @@ typedef struct hfa384x_LinkStatus {
 #define HFA384x_ASSOCSTATUS_REASSOC    ((u16)2)
 #define HFA384x_ASSOCSTATUS_AUTHFAIL   ((u16)5)
 
-typedef struct hfa384x_AssocStatus {
+struct hfa384x_AssocStatus {
        u16 assocstatus;
        u8 sta_addr[ETH_ALEN];
        /* old_ap_addr is only valid if assocstatus == 2 */
        u8 old_ap_addr[ETH_ALEN];
        u16 reason;
        u16 reserved;
-} __packed hfa384x_AssocStatus_t;
+} __packed;
 
 /*--  Unsolicited Frame, MAC Mgmt: AuthRequest (AP Only) --*/
 
-typedef struct hfa384x_AuthRequest {
+struct hfa384x_AuthRequest {
        u8 sta_addr[ETH_ALEN];
        u16 algorithm;
-} __packed hfa384x_AuthReq_t;
+} __packed;
 
 /*--  Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/
 
-typedef struct hfa384x_PSUserCount {
+struct hfa384x_PSUserCount {
        u16 usercnt;
-} __packed hfa384x_PSUserCount_t;
+} __packed;
 
-typedef struct hfa384x_KeyIDChanged {
+struct hfa384x_KeyIDChanged {
        u8 sta_addr[ETH_ALEN];
        u16 keyid;
-} __packed hfa384x_KeyIDChanged_t;
+} __packed;
 
 /*--  Collection of all Inf frames ---------------*/
-typedef union hfa384x_infodata {
-       hfa384x_CommTallies16_t commtallies16;
-       hfa384x_CommTallies32_t commtallies32;
-       hfa384x_ScanResult_t scanresult;
-       hfa384x_ChInfoResult_t chinforesult;
-       hfa384x_HScanResult_t hscanresult;
-       hfa384x_LinkStatus_t linkstatus;
-       hfa384x_AssocStatus_t assocstatus;
-       hfa384x_AuthReq_t authreq;
-       hfa384x_PSUserCount_t psusercnt;
-       hfa384x_KeyIDChanged_t keyidchanged;
-} __packed hfa384x_infodata_t;
-
-typedef struct hfa384x_InfFrame {
+union hfa384x_infodata {
+       struct hfa384x_CommTallies16 commtallies16;
+       struct hfa384x_CommTallies32 commtallies32;
+       struct hfa384x_ScanResult scanresult;
+       struct hfa384x_ChInfoResult chinforesult;
+       struct hfa384x_HScanResult hscanresult;
+       struct hfa384x_LinkStatus linkstatus;
+       struct hfa384x_AssocStatus assocstatus;
+       struct hfa384x_AuthRequest authreq;
+       struct hfa384x_PSUserCount psusercnt;
+       struct hfa384x_KeyIDChanged keyidchanged;
+} __packed;
+
+struct hfa384x_InfFrame {
        u16 framelen;
        u16 infotype;
-       hfa384x_infodata_t info;
-} __packed hfa384x_InfFrame_t;
+       union hfa384x_infodata info;
+} __packed;
 
 /*--------------------------------------------------------------------
-USB Packet structures and constants.
---------------------------------------------------------------------*/
+ * USB Packet structures and constants.
+ *--------------------------------------------------------------------
+ */
 
 /* Should be sent to the bulkout endpoint */
 #define HFA384x_USB_TXFRM      0
@@ -783,129 +808,126 @@ USB Packet structures and constants.
 /*------------------------------------*/
 /* Request (bulk OUT) packet contents */
 
-typedef struct hfa384x_usb_txfrm {
-       hfa384x_tx_frame_t desc;
+struct hfa384x_usb_txfrm {
+       struct hfa384x_tx_frame desc;
        u8 data[WLAN_DATA_MAXLEN];
-} __packed hfa384x_usb_txfrm_t;
+} __packed;
 
-typedef struct hfa384x_usb_cmdreq {
+struct hfa384x_usb_cmdreq {
        u16 type;
        u16 cmd;
        u16 parm0;
        u16 parm1;
        u16 parm2;
        u8 pad[54];
-} __packed hfa384x_usb_cmdreq_t;
+} __packed;
 
-typedef struct hfa384x_usb_wridreq {
+struct hfa384x_usb_wridreq {
        u16 type;
        u16 frmlen;
        u16 rid;
        u8 data[HFA384x_RIDDATA_MAXLEN];
-} __packed hfa384x_usb_wridreq_t;
+} __packed;
 
-typedef struct hfa384x_usb_rridreq {
+struct hfa384x_usb_rridreq {
        u16 type;
        u16 frmlen;
        u16 rid;
        u8 pad[58];
-} __packed hfa384x_usb_rridreq_t;
+} __packed;
 
-typedef struct hfa384x_usb_wmemreq {
+struct hfa384x_usb_wmemreq {
        u16 type;
        u16 frmlen;
        u16 offset;
        u16 page;
        u8 data[HFA384x_USB_RWMEM_MAXLEN];
-} __packed hfa384x_usb_wmemreq_t;
+} __packed;
 
-typedef struct hfa384x_usb_rmemreq {
+struct hfa384x_usb_rmemreq {
        u16 type;
        u16 frmlen;
        u16 offset;
        u16 page;
        u8 pad[56];
-} __packed hfa384x_usb_rmemreq_t;
+} __packed;
 
 /*------------------------------------*/
 /* Response (bulk IN) packet contents */
 
-typedef struct hfa384x_usb_rxfrm {
-       hfa384x_rx_frame_t desc;
+struct hfa384x_usb_rxfrm {
+       struct hfa384x_rx_frame desc;
        u8 data[WLAN_DATA_MAXLEN];
-} __packed hfa384x_usb_rxfrm_t;
+} __packed;
 
-typedef struct hfa384x_usb_infofrm {
+struct hfa384x_usb_infofrm {
        u16 type;
-       hfa384x_InfFrame_t info;
-} __packed hfa384x_usb_infofrm_t;
+       struct hfa384x_InfFrame info;
+} __packed;
 
-typedef struct hfa384x_usb_statusresp {
+struct hfa384x_usb_statusresp {
        u16 type;
        u16 status;
        u16 resp0;
        u16 resp1;
        u16 resp2;
-} __packed hfa384x_usb_cmdresp_t;
-
-typedef hfa384x_usb_cmdresp_t hfa384x_usb_wridresp_t;
+} __packed;
 
-typedef struct hfa384x_usb_rridresp {
+struct hfa384x_usb_rridresp {
        u16 type;
        u16 frmlen;
        u16 rid;
        u8 data[HFA384x_RIDDATA_MAXLEN];
-} __packed hfa384x_usb_rridresp_t;
-
-typedef hfa384x_usb_cmdresp_t hfa384x_usb_wmemresp_t;
+} __packed;
 
-typedef struct hfa384x_usb_rmemresp {
+struct hfa384x_usb_rmemresp {
        u16 type;
        u16 frmlen;
        u8 data[HFA384x_USB_RWMEM_MAXLEN];
-} __packed hfa384x_usb_rmemresp_t;
+} __packed;
 
-typedef struct hfa384x_usb_bufavail {
+struct hfa384x_usb_bufavail {
        u16 type;
        u16 frmlen;
-} __packed hfa384x_usb_bufavail_t;
+} __packed;
 
-typedef struct hfa384x_usb_error {
+struct hfa384x_usb_error {
        u16 type;
        u16 errortype;
-} __packed hfa384x_usb_error_t;
+} __packed;
 
 /*----------------------------------------------------------*/
 /* Unions for packaging all the known packet types together */
 
 typedef union hfa384x_usbout {
        __le16 type;
-       hfa384x_usb_txfrm_t txfrm;
-       hfa384x_usb_cmdreq_t cmdreq;
-       hfa384x_usb_wridreq_t wridreq;
-       hfa384x_usb_rridreq_t rridreq;
-       hfa384x_usb_wmemreq_t wmemreq;
-       hfa384x_usb_rmemreq_t rmemreq;
+       struct hfa384x_usb_txfrm txfrm;
+       struct hfa384x_usb_cmdreq cmdreq;
+       struct hfa384x_usb_wridreq wridreq;
+       struct hfa384x_usb_rridreq rridreq;
+       struct hfa384x_usb_wmemreq wmemreq;
+       struct hfa384x_usb_rmemreq rmemreq;
 } __packed hfa384x_usbout_t;
 
 typedef union hfa384x_usbin {
        __le16 type;
-       hfa384x_usb_rxfrm_t rxfrm;
-       hfa384x_usb_txfrm_t txfrm;
-       hfa384x_usb_infofrm_t infofrm;
-       hfa384x_usb_cmdresp_t cmdresp;
-       hfa384x_usb_wridresp_t wridresp;
-       hfa384x_usb_rridresp_t rridresp;
-       hfa384x_usb_wmemresp_t wmemresp;
-       hfa384x_usb_rmemresp_t rmemresp;
-       hfa384x_usb_bufavail_t bufavail;
-       hfa384x_usb_error_t usberror;
+       struct hfa384x_usb_rxfrm rxfrm;
+       struct hfa384x_usb_txfrm txfrm;
+       struct hfa384x_usb_infofrm infofrm;
+       struct hfa384x_usb_statusresp cmdresp;
+       struct hfa384x_usb_statusresp wridresp;
+       struct hfa384x_usb_rridresp rridresp;
+       struct hfa384x_usb_statusresp wmemresp;
+       struct hfa384x_usb_rmemresp rmemresp;
+       struct hfa384x_usb_bufavail bufavail;
+       struct hfa384x_usb_error usberror;
        u8 boguspad[3000];
 } __packed hfa384x_usbin_t;
 
 /*--------------------------------------------------------------------
-PD record structures.
---------------------------------------------------------------------*/
+ * PD record structures.
+ *--------------------------------------------------------------------
+ */
 
 typedef struct hfa384x_pdr_pcb_partnum {
        u8 num[8];
@@ -1112,9 +1134,10 @@ typedef struct hfa384x_pdrec {
 
 #ifdef __KERNEL__
 /*--------------------------------------------------------------------
----  MAC state structure, argument to all functions --
----  Also, a collection of support types --
---------------------------------------------------------------------*/
+ * ---  MAC state structure, argument to all functions --
+ * ---  Also, a collection of support types --
+ *--------------------------------------------------------------------
+ */
 typedef struct hfa384x_statusresult {
        u16 status;
        u16 resp0;
@@ -1265,20 +1288,20 @@ typedef struct hfa384x {
 
        /* Download support */
        unsigned int dlstate;
-       hfa384x_downloadbuffer_t bufinfo;
+       struct hfa384x_downloadbuffer bufinfo;
        u16 dltimeout;
 
        int scanflag;           /* to signal scan complete */
        int join_ap;            /* are we joined to a specific ap */
        int join_retries;       /* number of join retries till we fail */
-       hfa384x_JoinRequest_data_t joinreq;     /* join request saved data */
+       struct hfa384x_JoinRequest_data joinreq;        /* join request saved data */
 
-       wlandevice_t *wlandev;
+       struct wlandevice *wlandev;
        /* Timer to allow for the deferred processing of linkstatus messages */
        struct work_struct link_bh;
 
        struct work_struct commsqual_bh;
-       hfa384x_commsquality_t qual;
+       struct hfa384x_commsquality qual;
        struct timer_list commsqual_timer;
 
        u16 link_status;
@@ -1297,56 +1320,57 @@ typedef struct hfa384x {
        int dbmadjust;
 
        /* Group Addresses - right now, there are up to a total
-          of MAX_GRP_ADDR group addresses */
+        * of MAX_GRP_ADDR group addresses
+        */
        u8 dot11_grp_addr[MAX_GRP_ADDR][ETH_ALEN];
        unsigned int dot11_grpcnt;
 
        /* Component Identities */
-       hfa384x_compident_t ident_nic;
-       hfa384x_compident_t ident_pri_fw;
-       hfa384x_compident_t ident_sta_fw;
-       hfa384x_compident_t ident_ap_fw;
+       struct hfa384x_compident ident_nic;
+       struct hfa384x_compident ident_pri_fw;
+       struct hfa384x_compident ident_sta_fw;
+       struct hfa384x_compident ident_ap_fw;
        u16 mm_mods;
 
        /* Supplier compatibility ranges */
-       hfa384x_caplevel_t cap_sup_mfi;
-       hfa384x_caplevel_t cap_sup_cfi;
-       hfa384x_caplevel_t cap_sup_pri;
-       hfa384x_caplevel_t cap_sup_sta;
-       hfa384x_caplevel_t cap_sup_ap;
+       struct hfa384x_caplevel cap_sup_mfi;
+       struct hfa384x_caplevel cap_sup_cfi;
+       struct hfa384x_caplevel cap_sup_pri;
+       struct hfa384x_caplevel cap_sup_sta;
+       struct hfa384x_caplevel cap_sup_ap;
 
        /* Actor compatibility ranges */
-       hfa384x_caplevel_t cap_act_pri_cfi;     /*
+       struct hfa384x_caplevel cap_act_pri_cfi;        /*
                                                 * pri f/w to controller
                                                 * interface
                                                 */
 
-       hfa384x_caplevel_t cap_act_sta_cfi;     /*
+       struct hfa384x_caplevel cap_act_sta_cfi;        /*
                                                 * sta f/w to controller
                                                 * interface
                                                 */
 
-       hfa384x_caplevel_t cap_act_sta_mfi;     /* sta f/w to modem interface */
+       struct hfa384x_caplevel cap_act_sta_mfi;        /* sta f/w to modem interface */
 
-       hfa384x_caplevel_t cap_act_ap_cfi;      /*
+       struct hfa384x_caplevel cap_act_ap_cfi; /*
                                                 * ap f/w to controller
                                                 * interface
                                                 */
 
-       hfa384x_caplevel_t cap_act_ap_mfi;      /* ap f/w to modem interface */
+       struct hfa384x_caplevel cap_act_ap_mfi; /* ap f/w to modem interface */
 
        u32 psusercount;        /* Power save user count. */
-       hfa384x_CommTallies32_t tallies;        /* Communication tallies. */
+       struct hfa384x_CommTallies32 tallies;   /* Communication tallies. */
        u8 comment[WLAN_COMMENT_MAX + 1];       /* User comment */
 
        /* Channel Info request results (AP only) */
        struct {
                atomic_t done;
                u8 count;
-               hfa384x_ChInfoResult_t results;
+               struct hfa384x_ChInfoResult results;
        } channel_info;
 
-       hfa384x_InfFrame_t *scanresults;
+       struct hfa384x_InfFrame *scanresults;
 
        struct prism2sta_authlist authlist;     /* Authenticated station list. */
        unsigned int accessmode;                /* Access mode. */
@@ -1378,7 +1402,7 @@ static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val)
 
        result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
        if (result == 0)
-               *((u16 *) val) = le16_to_cpu(*((u16 *) val));
+               *((u16 *)val) = le16_to_cpu(*((u16 *)val));
        return result;
 }
 
@@ -1410,7 +1434,7 @@ int
 hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb,
                     union p80211_hdr *p80211_hdr,
                     struct p80211_metawep *p80211_wep);
-void hfa384x_tx_timeout(wlandevice_t *wlandev);
+void hfa384x_tx_timeout(struct wlandevice *wlandev);
 
 int hfa384x_cmd_initialize(hfa384x_t *hw);
 int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport);