Staging: wlan-ng: fix checkpatch warnings in hfa384x.h
PATCH 1/2 Staging: wlan-ng: fix checkpatch warnings in hfa384x.h
Fixed spaces before tabs, removed unused variables and all typedefs.
--- drivers/staging/wlan-ng/hfa384x.h | 651 ++++++++++++++++----------------- drivers/staging/wlan-ng/hfa384x_usb.c | 316 ++++++++-------- drivers/staging/wlan-ng/p80211wext.c | 3 - drivers/staging/wlan-ng/prism2fw.c | 22 +- drivers/staging/wlan-ng/prism2mgmt.c | 30 +- drivers/staging/wlan-ng/prism2mgmt.h | 10 +- drivers/staging/wlan-ng/prism2mib.c | 42 +- drivers/staging/wlan-ng/prism2sta.c | 140 ++++---- drivers/staging/wlan-ng/prism2usb.c | 16 +- 9 files changed, 612 insertions(+), 618 deletions(-)
drivers/staging/wlan-ng/hfa384x.h +324 -327
@@ -81,8 +81,8 @@#define HFA384x_WEPFLAGS_EXCLUDE ((u16)BIT(1))#define HFA384x_WEPFLAGS_DISABLE_TXCRYPT ((u16)BIT(4))#define HFA384x_WEPFLAGS_DISABLE_RXCRYPT ((u16)BIT(7)) -#define HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM ((u16)3) -#define HFA384x_PORTSTATUS_DISABLED ((u16)1) +#define HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM ((u16)3) +#define HFA384x_PORTSTATUS_DISABLED ((u16)1)#define HFA384x_RATEBIT_1 ((u16)1)#define HFA384x_RATEBIT_2 ((u16)2)#define HFA384x_RATEBIT_5dot5 ((u16)4)
@@ -164,7 +164,7 @@#define HFA384x_CMDCODE_DOWNLD ((u16)0x22)/*--- Debugging Commands -----------------------------*/ -#define HFA384x_CMDCODE_MONITOR ((u16)(0x38)) +#define HFA384x_CMDCODE_MONITOR ((u16)(0x38))#define HFA384x_MONITOR_ENABLE ((u16)(0x0b))#define HFA384x_MONITOR_DISABLE ((u16)(0x0f))
@@ -254,9 +254,9 @@ Information RID Lengths: MAC Informationinclude 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
@@ -275,15 +275,15 @@ API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)#define HFA384x_RID_CNFAUTHENTICATION ((u16)0xFC2A)#define HFA384x_RID_CNFROAMINGMODE ((u16)0xFC2D)#define HFA384x_RID_CNFAPBCNint ((u16)0xFC33) -#define HFA384x_RID_CNFDBMADJUST ((u16)0xFC46) -#define HFA384x_RID_CNFWPADATA ((u16)0xFC48) +#define HFA384x_RID_CNFDBMADJUST ((u16)0xFC46) +#define HFA384x_RID_CNFWPADATA ((u16)0xFC48)#define HFA384x_RID_CNFBASICRATES ((u16)0xFCB3)#define HFA384x_RID_CNFSUPPRATES ((u16)0xFCB4)#define HFA384x_RID_CNFPASSIVESCANCTRL ((u16)0xFCBA) -#define HFA384x_RID_TXPOWERMAX ((u16)0xFCBE) +#define HFA384x_RID_TXPOWERMAX ((u16)0xFCBE)#define HFA384x_RID_JOINREQUEST ((u16)0xFCE2)#define HFA384x_RID_AUTHENTICATESTA ((u16)0xFCE3) -#define HFA384x_RID_HOSTSCAN ((u16)0xFCE5) +#define HFA384x_RID_HOSTSCAN ((u16)0xFCE5)#define HFA384x_RID_CNFWEPDEFAULTKEY_LEN ((u16)6)#define HFA384x_RID_CNFWEP128DEFAULTKEY_LEN ((u16)14)
@@ -311,7 +311,7 @@ PD Record codes#define HFA384x_PDR_HFA3861_IFRF ((u16)0x0204)#define HFA384x_PDR_HFA3861_CHCALSP ((u16)0x0300)#define HFA384x_PDR_HFA3861_CHCALI ((u16)0x0301) -#define HFA384x_PDR_MAX_TX_POWER ((u16)0x0302) +#define HFA384x_PDR_MAX_TX_POWER ((u16)0x0302)#define HFA384x_PDR_MASTER_CHAN_LIST ((u16)0x0303)#define HFA384x_PDR_3842_NIC_CONFIG ((u16)0x0400)#define HFA384x_PDR_USB_ID ((u16)0x0401)
@@ -322,10 +322,10 @@ PD Record codes#define HFA384x_PDR_USB_POWER_TYPE ((u16)0x0407)#define HFA384x_PDR_USB_MAX_POWER ((u16)0x0409)#define HFA384x_PDR_USB_MANUFACTURER ((u16)0x0410) -#define HFA384x_PDR_USB_PRODUCT ((u16)0x0411) -#define HFA384x_PDR_ANT_DIVERSITY ((u16)0x0412) -#define HFA384x_PDR_HFO_DELAY ((u16)0x0413) -#define HFA384x_PDR_SCALE_THRESH ((u16)0x0414) +#define HFA384x_PDR_USB_PRODUCT ((u16)0x0411) +#define HFA384x_PDR_ANT_DIVERSITY ((u16)0x0412) +#define HFA384x_PDR_HFO_DELAY ((u16)0x0413) +#define HFA384x_PDR_SCALE_THRESH ((u16)0x0414)#define HFA384x_PDR_HFA3861_MANF_TESTSP ((u16)0x0900)#define HFA384x_PDR_HFA3861_MANF_TESTI ((u16)0x0901)
@@ -349,15 +349,15 @@ PD Record codes/*-------------------------------------------------------------*/ /* Commonly used basic types */ -typedef struct hfa384x_bytestr { +struct hfa384x_bytestr {u16 len;u8 data[0 ]; -} __attribute__ ((packed))hfa384x_bytestr_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_bytestr32 { +struct hfa384x_bytestr32 {u16 len;u8 data[32 ]; -} __attribute__ ((packed))hfa384x_bytestr32_t ; +} __attribute__ ((packed));/*-------------------------------------------------------------------- Configuration Record Structures:
@@ -365,25 +365,25 @@ Configuration Record Structures:--------------------------------------------------------------------*/ /*-- Hardware/Firmware Component Information ----------*/ -typedef struct hfa384x_compident { +struct hfa384x_compident {u16 id;u16 variant;u16 major;u16 minor; -} __attribute__ ((packed))hfa384x_compident_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_caplevel { +struct hfa384x_caplevel {u16 role;u16 id;u16 variant;u16 bottom;u16 top; -} __attribute__ ((packed))hfa384x_caplevel_t ; +} __attribute__ ((packed));/*-- Configuration Record: cnfAuthentication --*/ #define HFA384x_CNFAUTHENTICATION_OPENSYSTEM 0x0001#define HFA384x_CNFAUTHENTICATION_SHAREDKEY 0x0002 -#define HFA384x_CNFAUTHENTICATION_LEAP 0x0004 +#define HFA384x_CNFAUTHENTICATION_LEAP 0x0004/*-------------------------------------------------------------------- Configuration Record Structures:
@@ -393,30 +393,30 @@ Configuration Record Structures:#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; -} __attribute__ ((packed))hfa384x_HostScanRequest_data_t ; +struct hfa384x_bytestr32 ssid; +} __attribute__ ((packed));/*-- Configuration Record: JoinRequest (data portion only) --*/ -typedef struct hfa384x_JoinRequest_data { +struct hfa384x_JoinRequest_data {u8 bssid[WLAN_BSSID_LEN ];u16 channel; -} __attribute__ ((packed))hfa384x_JoinRequest_data_t ; +} __attribute__ ((packed));/*-- Configuration Record: authenticateStation (data portion only) --*/ -typedef struct hfa384x_authenticateStation_data { +struct hfa384x_authenticateStation_data {u8 address[ETH_ALEN ];u16 status;u16 algorithm; -} __attribute__ ((packed))hfa384x_authenticateStation_data_t ; +} __attribute__ ((packed));/*-- Configuration Record: WPAData (data portion only) --*/ -typedef struct hfa384x_WPAData { +struct hfa384x_WPAData {u16 datalen;u8 data[0 ];/* max 80 */ -} __attribute__ ((packed))hfa384x_WPAData_t ; +} __attribute__ ((packed));/*-------------------------------------------------------------------- Information Record Structures: NIC Information
@@ -424,11 +424,11 @@ 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; -} __attribute__ ((packed))hfa384x_downloadbuffer_t ; +} __attribute__ ((packed));/*-------------------------------------------------------------------- Information Record Structures: NIC Information
@@ -437,18 +437,18 @@ 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; -} __attribute__ ((packed))hfa384x_commsquality_t ; +} __attribute__ ((packed));/*-- Information Record: dmbcommsquality --*/ -typedef struct hfa384x_dbmcommsquality { +struct hfa384x_dbmcommsquality {u16 CQdbm_currBSS;u16 ASLdbm_currBSS;u16 ANLdbm_currFC; -} __attribute__ ((packed))hfa384x_dbmcommsquality_t ; +} __attribute__ ((packed));/*-------------------------------------------------------------------- FRAME STRUCTURES: Communication Frames
@@ -456,7 +456,7 @@ FRAME STRUCTURES: Communication FramesCommunication Frames: Transmit Frames --------------------------------------------------------------------*/ /*-- Communication Frame: Transmit Frame Structure --*/ -typedef struct hfa384x_tx_frame { +struct hfa384x_tx_frame {u16 status;u16 reserved1;u16 reserved2;
@@ -481,7 +481,7 @@ typedef struct hfa384x_tx_frame {u8 dest_addr[6 ];u8 src_addr[6 ];u16 data_length;/* big endian format */ -} __attribute__ ((packed)) hfa384x_tx_frame_t; +} __attribute__ ((packed));/*-------------------------------------------------------------------- Communication Frames: Field Masks for Transmit Frames --------------------------------------------------------------------*/
@@ -518,7 +518,7 @@ Communication Frames: Test/Get/Set Field Values for Transmit FramesCommunication 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;
@@ -543,7 +543,7 @@ typedef struct hfa384x_rx_frame {u8 dest_addr[6 ];u8 src_addr[6 ];u16 data_length;/* IEEE? (big endian) format */ -} __attribute__ ((packed)) hfa384x_rx_frame_t; +} __attribute__ ((packed));/*-------------------------------------------------------------------- Communication Frames: Field Masks for Receive Frames --------------------------------------------------------------------*/
@@ -575,8 +575,8 @@ Information Types#define HFA384x_IT_AUTHREQ ((u16)0xF202UL)#define HFA384x_IT_PSUSERCNT ((u16)0xF203UL)#define HFA384x_IT_KEYIDCHANGED ((u16)0xF204UL) -#define HFA384x_IT_ASSOCREQ ((u16)0xF205UL) -#define HFA384x_IT_MICFAILURE ((u16)0xF206UL) +#define HFA384x_IT_ASSOCREQ ((u16)0xF205UL) +#define HFA384x_IT_MICFAILURE ((u16)0xF206UL)/*-------------------------------------------------------------------- Information Frames Structures
@@ -585,7 +585,7 @@ Information Frames: Notification Frame Structures--------------------------------------------------------------------*/ /*-- Inquiry Frame, Diagnose: Communication Tallies --*/ -typedef struct hfa384x_CommTallies16 { +struct hfa384x_CommTallies16 {u16 txunicastframes;u16 txmulticastframes;u16 txfragments;
@@ -607,9 +607,9 @@ typedef struct hfa384x_CommTallies16 {u16 rxdiscardswepundecr;u16 rxmsginmsgfrag;u16 rxmsginbadmsgfrag; -} __attribute__ ((packed)) hfa384x_CommTallies16_t; +} __attribute__ ((packed)); -typedef struct hfa384x_CommTallies32 { +struct hfa384x_CommTallies32 {u32 txunicastframes;u32 txmulticastframes;u32 txfragments;
@@ -631,62 +631,62 @@ typedef struct hfa384x_CommTallies32 {u32 rxdiscardswepundecr;u32 rxmsginmsgfrag;u32 rxmsginbadmsgfrag; -} __attribute__ ((packed)) hfa384x_CommTallies32_t; +} __attribute__ ((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; -} __attribute__ ((packed))hfa384x_ScanResultSub_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_ScanResult { +struct hfa384x_ScanResult {u16 rsvd;u16 scanreason; -hfa384x_ScanResultSub_t result[HFA384x_SCANRESULT_MAX]; -} __attribute__ ((packed))hfa384x_ScanResult_t ; +struct hfa384x_ScanResultSub result[HFA384x_SCANRESULT_MAX]; +} __attribute__ ((packed));/*-- Inquiry Frame, Diagnose: ChInfo Results & Subfields--*/ -typedef struct hfa384x_ChInfoResultSub { +struct hfa384x_ChInfoResultSub {u16 chid;u16 anl;u16 pnl;u16 active; -} __attribute__ ((packed))hfa384x_ChInfoResultSub_t ; +} __attribute__ ((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]; -} __attribute__ ((packed))hfa384x_ChInfoResult_t ; +struct hfa384x_ChInfoResultSub result[HFA384x_CHINFORESULT_MAX]; +} __attribute__ ((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; -} __attribute__ ((packed))hfa384x_HScanResultSub_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_HScanResult { +struct hfa384x_HScanResult {u16 nresult;u16 rsvd; -hfa384x_HScanResultSub_t result[HFA384x_HSCANRESULT_MAX]; -} __attribute__ ((packed))hfa384x_HScanResult_t ; +struct hfa384x_HScanResultSub result[HFA384x_HSCANRESULT_MAX]; +} __attribute__ ((packed));/*-- Unsolicited Frame, MAC Mgmt: LinkStatus --*/
@@ -698,9 +698,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; -} __attribute__ ((packed))hfa384x_LinkStatus_t ; +} __attribute__ ((packed));/*-- Unsolicited Frame, MAC Mgmt: AssociationStatus (--*/
@@ -708,52 +708,52 @@ 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; -} __attribute__ ((packed))hfa384x_AssocStatus_t ; +} __attribute__ ((packed));/*-- Unsolicited Frame, MAC Mgmt: AuthRequest (AP Only) --*/ -typedef struct hfa384x_AuthRequest { +struct hfa384x_AuthRequest {u8 sta_addr[ETH_ALEN ];u16 algorithm; -} __attribute__ ((packed))hfa384x_AuthReq_t ; +} __attribute__ ((packed));/*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/ -typedef struct hfa384x_PSUserCount { +struct hfa384x_PSUserCount {u16 usercnt; -} __attribute__ ((packed))hfa384x_PSUserCount_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_KeyIDChanged { +struct hfa384x_KeyIDChanged {u8 sta_addr[ETH_ALEN ];u16 keyid; -} __attribute__ ((packed))hfa384x_KeyIDChanged_t ; +} __attribute__ ((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; -} __attribute__ ((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; +} __attribute__ ((packed)); + +struct hfa384x_InfFrame {u16 framelen;u16 infotype; -hfa384x_infodata_t info; -} __attribute__ ((packed))hfa384x_InfFrame_t ; +union hfa384x_infodata info; +} __attribute__ ((packed));/*-------------------------------------------------------------------- USB Packet structures and constants.
@@ -782,143 +782,139 @@ 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 ]; -} __attribute__ ((packed))hfa384x_usb_txfrm_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_cmdreq { +struct hfa384x_usb_cmdreq {u16 type;u16 cmd;u16 parm0;u16 parm1;u16 parm2;u8 pad[54 ]; -} __attribute__ ((packed))hfa384x_usb_cmdreq_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_wridreq { +struct hfa384x_usb_wridreq {u16 type;u16 frmlen;u16 rid;u8 data[HFA384x_RIDDATA_MAXLEN]; -} __attribute__ ((packed))hfa384x_usb_wridreq_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_rridreq { +struct hfa384x_usb_rridreq {u16 type;u16 frmlen;u16 rid;u8 pad[58 ]; -} __attribute__ ((packed))hfa384x_usb_rridreq_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_wmemreq { +struct hfa384x_usb_wmemreq {u16 type;u16 frmlen;u16 offset;u16 page;u8 data[HFA384x_USB_RWMEM_MAXLEN]; -} __attribute__ ((packed))hfa384x_usb_wmemreq_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_rmemreq { +struct hfa384x_usb_rmemreq {u16 type;u16 frmlen;u16 offset;u16 page;u8 pad[56 ]; -} __attribute__ ((packed))hfa384x_usb_rmemreq_t ; +} __attribute__ ((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 ]; -} __attribute__ ((packed))hfa384x_usb_rxfrm_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_infofrm { +struct hfa384x_usb_infofrm {u16 type; -hfa384x_InfFrame_t info; -} __attribute__ ((packed))hfa384x_usb_infofrm_t ; +struct hfa384x_InfFrame info; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_statusresp { +struct hfa384x_usb_statusresp {u16 type;u16 status;u16 resp0;u16 resp1;u16 resp2; -} __attribute__ ((packed))hfa384x_usb_cmdresp_t ; +} __attribute__ ((packed)); -typedef hfa384x_usb_cmdresp_t hfa384x_usb_wridresp_t ; - -typedef struct hfa384x_usb_rridresp { +struct hfa384x_usb_rridresp {u16 type;u16 frmlen;u16 rid;u8 data[HFA384x_RIDDATA_MAXLEN]; -} __attribute__ ((packed))hfa384x_usb_rridresp_t ; - -typedef hfa384x_usb_cmdresp_t hfa384x_usb_wmemresp_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_rmemresp { +struct hfa384x_usb_rmemresp {u16 type;u16 frmlen;u8 data[HFA384x_USB_RWMEM_MAXLEN]; -} __attribute__ ((packed))hfa384x_usb_rmemresp_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_bufavail { +struct hfa384x_usb_bufavail {u16 type;u16 frmlen; -} __attribute__ ((packed))hfa384x_usb_bufavail_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_usb_error { +struct hfa384x_usb_error {u16 type;u16 errortype; -} __attribute__ ((packed))hfa384x_usb_error_t ; +} __attribute__ ((packed));/*----------------------------------------------------------*/ /* Unions for packaging all the known packet types together */ -typedef union hfa384x_usbout { +union hfa384x_usbout {u16 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; -} __attribute__ ((packed))hfa384x_usbout_t ; - -typedef union hfa384x_usbin { +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; +} __attribute__ ((packed)); + +union hfa384x_usbin {u16 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 ]; -} __attribute__ ((packed))hfa384x_usbin_t ; +} __attribute__ ((packed));/*-------------------------------------------------------------------- PD record structures. --------------------------------------------------------------------*/ -typedef struct hfa384x_pdr_pcb_partnum { +struct hfa384x_pdr_pcb_partnum {u8 num[8 ]; -} __attribute__ ((packed))hfa384x_pdr_pcb_partnum_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_pcb_tracenum { +struct hfa384x_pdr_pcb_tracenum {u8 num[8 ]; -} __attribute__ ((packed))hfa384x_pdr_pcb_tracenum_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_nic_serial { +struct hfa384x_pdr_nic_serial {u8 num[12 ]; -} __attribute__ ((packed))hfa384x_pdr_nic_serial_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_mkk_measurements { +struct hfa384x_pdr_mkk_measurements {double carrier_freq;double occupied_band;double power_density;
@@ -934,192 +930,192 @@ typedef struct hfa384x_pdr_mkk_measurements {double rx_spur_f2;double rx_spur_l1;double rx_spur_l2; -} __attribute__ ((packed)) hfa384x_pdr_mkk_measurements_t; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_nic_ramsize { +struct hfa384x_pdr_nic_ramsize {u8 size[12 ];/* units of KB */ -} __attribute__ ((packed))hfa384x_pdr_nic_ramsize_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_mfisuprange { +struct hfa384x_pdr_mfisuprange {u16 id;u16 variant;u16 bottom;u16 top; -} __attribute__ ((packed))hfa384x_pdr_mfisuprange_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_cfisuprange { +struct hfa384x_pdr_cfisuprange {u16 id;u16 variant;u16 bottom;u16 top; -} __attribute__ ((packed))hfa384x_pdr_cfisuprange_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_nicid { +struct hfa384x_pdr_nicid {u16 id;u16 variant;u16 major;u16 minor; -} __attribute__ ((packed))hfa384x_pdr_nicid_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_refdac_measurements { +struct hfa384x_pdr_refdac_measurements {u16 value[0 ]; -} __attribute__ ((packed))hfa384x_pdr_refdac_measurements_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_vgdac_measurements { +struct hfa384x_pdr_vgdac_measurements {u16 value[0 ]; -} __attribute__ ((packed))hfa384x_pdr_vgdac_measurements_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_level_comp_measurements { +struct hfa384x_pdr_level_comp_measurements {u16 value[0 ]; -} __attribute__ ((packed))hfa384x_pdr_level_compc_measurements_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_mac_address { +struct hfa384x_pdr_mac_address {u8 addr[6 ]; -} __attribute__ ((packed))hfa384x_pdr_mac_address_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_mkk_callname { +struct hfa384x_pdr_mkk_callname {u8 callname[8 ]; -} __attribute__ ((packed))hfa384x_pdr_mkk_callname_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_regdomain { +struct hfa384x_pdr_regdomain {u16 numdomains;u16 domain[5 ]; -} __attribute__ ((packed))hfa384x_pdr_regdomain_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_allowed_channel { +struct hfa384x_pdr_allowed_channel {u16 ch_bitmap; -} __attribute__ ((packed))hfa384x_pdr_allowed_channel_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_default_channel { +struct hfa384x_pdr_default_channel {u16 channel; -} __attribute__ ((packed))hfa384x_pdr_default_channel_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_privacy_option { +struct hfa384x_pdr_privacy_option {u16 available; -} __attribute__ ((packed))hfa384x_pdr_privacy_option_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_temptype { +struct hfa384x_pdr_temptype {u16 type; -} __attribute__ ((packed))hfa384x_pdr_temptype_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_refdac_setup { +struct hfa384x_pdr_refdac_setup {u16 ch_value[14 ]; -} __attribute__ ((packed))hfa384x_pdr_refdac_setup_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_vgdac_setup { +struct hfa384x_pdr_vgdac_setup {u16 ch_value[14 ]; -} __attribute__ ((packed))hfa384x_pdr_vgdac_setup_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_level_comp_setup { +struct hfa384x_pdr_level_comp_setup {u16 ch_value[14 ]; -} __attribute__ ((packed))hfa384x_pdr_level_comp_setup_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_trimdac_setup { +struct hfa384x_pdr_trimdac_setup {u16 trimidac;u16 trimqdac; -} __attribute__ ((packed))hfa384x_pdr_trimdac_setup_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_ifr_setting { +struct hfa384x_pdr_ifr_setting {u16 value[3 ]; -} __attribute__ ((packed))hfa384x_pdr_ifr_setting_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_rfr_setting { +struct hfa384x_pdr_rfr_setting {u16 value[3 ]; -} __attribute__ ((packed))hfa384x_pdr_rfr_setting_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_hfa3861_baseline { +struct hfa384x_pdr_hfa3861_baseline {u16 value[50 ]; -} __attribute__ ((packed))hfa384x_pdr_hfa3861_baseline_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_hfa3861_shadow { +struct hfa384x_pdr_hfa3861_shadow {u32 value[32 ]; -} __attribute__ ((packed))hfa384x_pdr_hfa3861_shadow_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_hfa3861_ifrf { +struct hfa384x_pdr_hfa3861_ifrf {u32 value[20 ]; -} __attribute__ ((packed))hfa384x_pdr_hfa3861_ifrf_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_hfa3861_chcalsp { +struct hfa384x_pdr_hfa3861_chcalsp {u16 value[14 ]; -} __attribute__ ((packed))hfa384x_pdr_hfa3861_chcalsp_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_hfa3861_chcali { +struct hfa384x_pdr_hfa3861_chcali {u16 value[17 ]; -} __attribute__ ((packed))hfa384x_pdr_hfa3861_chcali_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_hfa3861_nic_config { +struct hfa384x_pdr_hfa3861_nic_config {u16 config_bitmap; -} __attribute__ ((packed))hfa384x_pdr_nic_config_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_hfo_delay { +struct hfa384x_pdr_hfo_delay {u8 hfo_delay; -} __attribute__ ((packed))hfa384x_hfo_delay_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_hfa3861_manf_testsp { +struct hfa384x_pdr_hfa3861_manf_testsp {u16 value[30 ]; -} __attribute__ ((packed))hfa384x_pdr_hfa3861_manf_testsp_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdr_hfa3861_manf_testi { +struct hfa384x_pdr_hfa3861_manf_testi {u16 value[30 ]; -} __attribute__ ((packed))hfa384x_pdr_hfa3861_manf_testi_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_end_of_pda { +struct hfa384x_end_of_pda {u16 crc; -} __attribute__ ((packed))hfa384x_pdr_end_of_pda_t ; +} __attribute__ ((packed)); -typedef struct hfa384x_pdrec { +struct hfa384x_pdrec {u16 len;/* in words */ u16 code;union pdr { -hfa384x_pdr_pcb_partnum_t pcb_partnum; -hfa384x_pdr_pcb_tracenum_t pcb_tracenum; -hfa384x_pdr_nic_serial_t nic_serial; -hfa384x_pdr_mkk_measurements_t mkk_measurements; -hfa384x_pdr_nic_ramsize_t nic_ramsize; -hfa384x_pdr_mfisuprange_t mfisuprange; -hfa384x_pdr_cfisuprange_t cfisuprange; -hfa384x_pdr_nicid_t nicid; -hfa384x_pdr_refdac_measurements_t refdac_measurements; -hfa384x_pdr_vgdac_measurements_t vgdac_measurements; -hfa384x_pdr_level_compc_measurements_t level_compc_measurements; -hfa384x_pdr_mac_address_t mac_address; -hfa384x_pdr_mkk_callname_t mkk_callname; -hfa384x_pdr_regdomain_t regdomain; -hfa384x_pdr_allowed_channel_t allowed_channel; -hfa384x_pdr_default_channel_t default_channel; -hfa384x_pdr_privacy_option_t privacy_option; -hfa384x_pdr_temptype_t temptype; -hfa384x_pdr_refdac_setup_t refdac_setup; -hfa384x_pdr_vgdac_setup_t vgdac_setup; -hfa384x_pdr_level_comp_setup_t level_comp_setup; -hfa384x_pdr_trimdac_setup_t trimdac_setup; -hfa384x_pdr_ifr_setting_t ifr_setting; -hfa384x_pdr_rfr_setting_t rfr_setting; -hfa384x_pdr_hfa3861_baseline_t hfa3861_baseline; -hfa384x_pdr_hfa3861_shadow_t hfa3861_shadow; -hfa384x_pdr_hfa3861_ifrf_t hfa3861_ifrf; -hfa384x_pdr_hfa3861_chcalsp_t hfa3861_chcalsp; -hfa384x_pdr_hfa3861_chcali_t hfa3861_chcali; -hfa384x_pdr_nic_config_t nic_config; -hfa384x_hfo_delay_t hfo_delay; -hfa384x_pdr_hfa3861_manf_testsp_t hfa3861_manf_testsp; -hfa384x_pdr_hfa3861_manf_testi_t hfa3861_manf_testi; -hfa384x_pdr_end_of_pda_t end_of_pda; +struct hfa384x_pdr_pcb_partnum pcb_partnum; +struct hfa384x_pdr_pcb_tracenum pcb_tracenum; +struct hfa384x_pdr_nic_serial nic_serial; +struct hfa384x_pdr_mkk_measurements mkk_measurements; +struct hfa384x_pdr_nic_ramsize nic_ramsize; +struct hfa384x_pdr_mfisuprange mfisuprange; +struct hfa384x_pdr_cfisuprange cfisuprange; +struct hfa384x_pdr_nicid nicid; +struct hfa384x_pdr_refdac_measurements refdac_measurements; +struct hfa384x_pdr_vgdac_measurements vgdac_measurements; +struct hfa384x_pdr_level_comp_measurements level_compc_measurements; +struct hfa384x_pdr_mac_address mac_address; +struct hfa384x_pdr_mkk_callname mkk_callname; +struct hfa384x_pdr_regdomain regdomain; +struct hfa384x_pdr_allowed_channel allowed_channel; +struct hfa384x_pdr_default_channel default_channel; +struct hfa384x_pdr_privacy_option privacy_option; +struct hfa384x_pdr_temptype temptype; +struct hfa384x_pdr_refdac_setup refdac_setup; +struct hfa384x_pdr_vgdac_setup vgdac_setup; +struct hfa384x_pdr_level_comp_setup level_comp_setup; +struct hfa384x_pdr_trimdac_setup trimdac_setup; +struct hfa384x_pdr_ifr_setting ifr_setting; +struct hfa384x_pdr_rfr_setting rfr_setting; +struct hfa384x_pdr_hfa3861_baseline hfa3861_baseline; +struct hfa384x_pdr_hfa3861_shadow hfa3861_shadow; +struct hfa384x_pdr_hfa3861_ifrf hfa3861_ifrf; +struct hfa384x_pdr_hfa3861_chcalsp hfa3861_chcalsp; +struct hfa384x_pdr_hfa3861_chcali hfa3861_chcali; +struct hfa384x_pdr_hfa3861_nic_config nic_config; +struct hfa384x_pdr_hfo_delay hfo_delay; +struct hfa384x_pdr_hfa3861_manf_testsp hfa3861_manf_testsp; +struct hfa384x_pdr_hfa3861_manf_testi hfa3861_manf_testi; +struct hfa384x_end_of_pda end_of_pda; } data; -} __attribute__ ((packed))hfa384x_pdrec_t ; +} __attribute__ ((packed));#ifdef __KERNEL__/*-------------------------------------------------------------------- --- MAC state structure, argument to all functions -- --- Also, a collection of support types -- --------------------------------------------------------------------*/ -typedef struct hfa384x_statusresult { +struct hfa384x_statusresult {u16 status;u16 resp0;u16 resp1;u16 resp2; -}hfa384x_cmdresult_t ; +};/* USB Control Exchange (CTLX): * A queue of the structure below is maintained for all of the
@@ -1128,11 +1124,11 @@ typedef struct hfa384x_statusresult {/* The following hfa384x_* structures are arguments to * the usercb() for the different CTLX types. */ -typedef struct hfa384x_rridresult { +struct hfa384x_rridresult {u16 rid;const void *riddata;unsigned int riddata_len; -}hfa384x_rridresult_t ; +};enum ctlx_state {CTLX_START =0 ,/* Start state, not queued */
@@ -1145,7 +1141,6 @@ enum ctlx_state {CTLX_REQ_COMPLETE ,/* OUT URB complete */ CTLX_RESP_COMPLETE /* IN URB received */ }; -typedef enum ctlx_state CTLX_STATE ;struct hfa384x_usbctlx ;struct hfa384x ;
@@ -1155,14 +1150,14 @@ typedef void (*ctlx_cmdcb_t) (struct hfa384x *, const struct hfa384x_usbctlx *);typedef void (*ctlx_usercb_t ) (struct hfa384x *hw,void *ctlxresult,void *usercb_data); -typedef struct hfa384x_usbctlx { +struct hfa384x_usbctlx {struct list_head list;size_t outbufsize; - hfa384x_usbout_t outbuf; /* pkt buf for OUT */ - hfa384x_usbin_t inbuf; /* pkt buf for IN(a copy) */ +union hfa384x_usbout outbuf;/* pkt buf for OUT */ +union hfa384x_usbin inbuf;/* pkt buf for IN(a copy) */ - CTLX_STATE state; /* Tracks running state */ +enum ctlx_state state;/* Tracks running state */ struct completion done;volatile int reapable;/* Food for the reaper task */
@@ -1172,25 +1167,25 @@ typedef struct hfa384x_usbctlx {void *usercb_data;/* at CTLX completion */ int variant;/* Identifies cmd variant */ -} hfa384x_usbctlx_t; +}; -typedef struct hfa384x_usbctlxq { +struct hfa384x_usbctlxq {spinlock_t lock;struct list_head pending;struct list_head active;struct list_head completing;struct list_head reapable; -}hfa384x_usbctlxq_t ; +}; -typedef struct hfa484x_metacmd { +struct hfa384x_metacmd {u16 cmd;u16 parm0;u16 parm1;u16 parm2; -hfa384x_cmdresult_t result; -}hfa384x_metacmd_t ; +struct hfa384x_statusresult result; +};#define MAX_GRP_ADDR 32#define WLAN_COMMENT_MAX 80/* Max. length of user comment string. */
@@ -1203,29 +1198,29 @@ typedef struct hfa484x_metacmd {#define WLAN_ACCESS_DENY 3/* Do not authenticate "denied" stations. */ /* XXX These are going away ASAP */ -typedef struct prism2sta_authlist { +struct prism2sta_authlist {unsigned int cnt;u8 addr[WLAN_AUTH_MAX ][ETH_ALEN ];u8 assoc[WLAN_AUTH_MAX ]; -}prism2sta_authlist_t ; +}; -typedef struct prism2sta_accesslist { +struct prism2sta_accesslist {unsigned int modify;unsigned int cnt;u8 addr[WLAN_ACCESS_MAX ][ETH_ALEN ];unsigned int cnt1;u8 addr1[WLAN_ACCESS_MAX ][ETH_ALEN ]; -}prism2sta_accesslist_t ; +}; -typedef struct hfa384x { +struct hfa384x {/* USB support data */ struct usb_device *usb;struct urb rx_urb;struct sk_buff *rx_urb_skb;struct urb tx_urb;struct urb ctlx_urb; - hfa384x_usbout_t txbuff; - hfa384x_usbctlxq_t ctlxq; +union hfa384x_usbout txbuff; +struct hfa384x_usbctlxq ctlxq;struct timer_list reqtimer;struct timer_list resptimer;
@@ -1264,20 +1259,20 @@ typedef struct hfa384x {/* Download support */ unsigned int dlstate; -hfa384x_downloadbuffer_t bufinfo; +struct hfa384x_downloadbuffer bufinfo;u16 dltimeout;int scanflag;/* to signal scan comlete */ 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;/* 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;
@@ -1299,78 +1294,80 @@ typedef struct hfa384x {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; -prism2sta_authlist_t authlist;/* Authenticated station list. */ +struct prism2sta_authlist authlist;/* Authenticated station list. */ unsigned int accessmode;/* Access mode. */ -prism2sta_accesslist_t allow;/* Allowed station list. */ -prism2sta_accesslist_t deny;/* Denied station list. */ +struct prism2sta_accesslist allow;/* Allowed station list. */ +struct prism2sta_accesslist deny;/* Denied station list. */ -} hfa384x_t; - -void hfa384x_create (hfa384x_t *hw,struct usb_device *usb); -void hfa384x_destroy (hfa384x_t *hw); +}; -int -hfa384x_corereset (hfa384x_t *hw,int holdtime,int settletime,int genesis); -int hfa384x_drvr_commtallies (hfa384x_t *hw); -int hfa384x_drvr_disable (hfa384x_t *hw,u16 macport); -int hfa384x_drvr_enable (hfa384x_t *hw,u16 macport); -int hfa384x_drvr_flashdl_enable (hfa384x_t *hw); -int hfa384x_drvr_flashdl_disable (hfa384x_t *hw); -int hfa384x_drvr_flashdl_write (hfa384x_t *hw,u32 daddr,void *buf,u32 len); -int hfa384x_drvr_getconfig (hfa384x_t *hw,u16 rid,void *buf,u16 len); -int hfa384x_drvr_ramdl_enable (hfa384x_t *hw,u32 exeaddr); -int hfa384x_drvr_ramdl_disable (hfa384x_t *hw); -int hfa384x_drvr_ramdl_write (hfa384x_t *hw,u32 daddr,void *buf,u32 len); -int hfa384x_drvr_readpda (hfa384x_t *hw,void *buf,unsigned int len); -int hfa384x_drvr_setconfig (hfa384x_t *hw,u16 rid,void *buf,u16 len); - -static inline int hfa384x_drvr_getconfig16 (hfa384x_t *hw,u16 rid,void *val) +void hfa384x_create (struct hfa384x *hw,struct usb_device *usb); +void hfa384x_destroy (struct hfa384x *hw); + +int hfa384x_corereset (struct hfa384x *hw,int holdtime,int settletime, +int genesis); +int hfa384x_drvr_commtallies (struct hfa384x *hw); +int hfa384x_drvr_disable (struct hfa384x *hw,u16 macport); +int hfa384x_drvr_enable (struct hfa384x *hw,u16 macport); +int hfa384x_drvr_flashdl_enable (struct hfa384x *hw); +int hfa384x_drvr_flashdl_disable (struct hfa384x *hw); +int hfa384x_drvr_flashdl_write (struct hfa384x *hw,u32 daddr,void *buf, +u32 len); +int hfa384x_drvr_getconfig (struct hfa384x *hw,u16 rid,void *buf,u16 len); +int hfa384x_drvr_ramdl_enable (struct hfa384x *hw,u32 exeaddr); +int hfa384x_drvr_ramdl_disable (struct hfa384x *hw); +int hfa384x_drvr_ramdl_write (struct hfa384x *hw,u32 daddr,void *buf,u32 len); +int hfa384x_drvr_readpda (struct hfa384x *hw,void *buf,unsigned int len); +int hfa384x_drvr_setconfig (struct hfa384x *hw,u16 rid,void *buf,u16 len); + +static inline int hfa384x_drvr_getconfig16 (struct hfa384x *hw,u16 rid, +void *val) {int result =0 ; result =hfa384x_drvr_getconfig (hw, rid, val,sizeof (u16));
@@ -1379,44 +1376,44 @@ static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val)return result; } -static inline int hfa384x_drvr_setconfig16 (hfa384x_t *hw,u16 rid,u16 val) +static inline int hfa384x_drvr_setconfig16 (struct hfa384x *hw,u16 rid,u16 val) {u16 value =cpu_to_le16 (val);return hfa384x_drvr_setconfig (hw, rid, &value,sizeof (value)); }int -hfa384x_drvr_getconfig_async (hfa384x_t *hw, +hfa384x_drvr_getconfig_async (struct hfa384x *hw,u16 rid,ctlx_usercb_t usercb,void *usercb_data);int -hfa384x_drvr_setconfig_async (hfa384x_t *hw, +hfa384x_drvr_setconfig_async (struct hfa384x *hw,u16 rid,void *buf,u16 len,ctlx_usercb_t usercb,void *usercb_data);static inline int -hfa384x_drvr_setconfig16_async (hfa384x_t *hw,u16 rid,u16 val) +hfa384x_drvr_setconfig16_async (struct hfa384x *hw,u16 rid,u16 val) {u16 value =cpu_to_le16 (val);return hfa384x_drvr_setconfig_async (hw, rid, &value,sizeof (value),NULL ,NULL ); } -int hfa384x_drvr_start (hfa384x_t *hw); -int hfa384x_drvr_stop (hfa384x_t *hw); +int hfa384x_drvr_start (struct hfa384x *hw); +int hfa384x_drvr_stop (struct hfa384x *hw);int -hfa384x_drvr_txframe (hfa384x_t *hw,struct sk_buff *skb, +hfa384x_drvr_txframe (struct hfa384x *hw,struct sk_buff *skb,p80211_hdr_t *p80211_hdr,p80211_metawep_t *p80211_wep);void hfa384x_tx_timeout (wlandevice_t *wlandev); -int hfa384x_cmd_initialize (hfa384x_t *hw); -int hfa384x_cmd_enable (hfa384x_t *hw,u16 macport); -int hfa384x_cmd_disable (hfa384x_t *hw,u16 macport); -int hfa384x_cmd_allocate (hfa384x_t *hw,u16 len); -int hfa384x_cmd_monitor (hfa384x_t *hw,u16 enable); +int hfa384x_cmd_initialize (struct hfa384x *hw); +int hfa384x_cmd_enable (struct hfa384x *hw,u16 macport); +int hfa384x_cmd_disable (struct hfa384x *hw,u16 macport); +int hfa384x_cmd_allocate (struct hfa384x *hw,u16 len); +int hfa384x_cmd_monitor (struct hfa384x *hw,u16 enable);int -hfa384x_cmd_download (hfa384x_t *hw, +hfa384x_cmd_download (struct hfa384x *hw,u16 mode,u16 lowaddr,u16 highaddr,u16 codelen);#endif /*__KERNEL__ */
drivers/staging/wlan-ng/hfa384x_usb.c +158 -158
1,050 lines not on this page · raw message
drivers/staging/wlan-ng/p80211wext.c +0 -3
@@ -995,7 +995,6 @@ static int p80211wext_siwretry(netdevice_t *dev, struct iw_param *rrq, char *extra) { wlandevice_t *wlandev = dev->ml_priv; -p80211item_uint32_t mibitem;p80211msg_dot11req_mibset_t msg;int result;int err =0 ;
@@ -1057,8 +1056,6 @@ static int p80211wext_siwtxpow(netdevice_t *dev, struct iw_param *rrq, char *extra) { wlandevice_t *wlandev = dev->ml_priv; -p80211item_uint32_t mibitem; -p80211msg_dot11req_mibset_t msg;int result;int err =0 ;unsigned int value;
drivers/staging/wlan-ng/prism2fw.c +11 -11
@@ -96,16 +96,16 @@ typedef struct s3inforec {u16 len;u16 type;union { -hfa384x_compident_t version; -hfa384x_caplevel_t compat; +struct hfa384x_compident version; +struct hfa384x_caplevel compat;u16 buildseq; -hfa384x_compident_t platform; +struct hfa384x_compident platform; } info; } s3inforec_t;typedef struct pda {u8 buf[HFA384x_PDA_LEN_MAX]; -hfa384x_pdrec_t *rec[HFA384x_PDA_RECS_MAX]; +struct hfa384x_pdrec *rec[HFA384x_PDA_RECS_MAX];unsigned int nrec; }pda_t ;
@@ -152,10 +152,10 @@ imgchunk_t fchunk[CHUNKS_MAX];/* PDA, built from [card|newfile]+[addfile1+addfile2...] */ pda_t pda; -hfa384x_compident_t nicid; -hfa384x_caplevel_t rfid; -hfa384x_caplevel_t macid; -hfa384x_caplevel_t priid; +struct hfa384x_compident nicid; +struct hfa384x_caplevel rfid; +struct hfa384x_caplevel macid; +struct hfa384x_caplevel priid;/*================================================================*/ /* Local Function Declarations */
@@ -263,7 +263,7 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)/* clear the pda and add an initial END record */ memset (&pda,0 ,sizeof (pda)); - pda.rec[0 ] = (hfa384x_pdrec_t *) pda.buf; + pda.rec[0 ] = (struct hfa384x_pdrec *) pda.buf; pda.rec[0 ]->len =cpu_to_le16 (2 );/* len in words */ pda.rec[0 ]->code =cpu_to_le16 (HFA384x_PDR_END_OF_PDA); pda.nrec =1 ;
@@ -593,7 +593,7 @@ int mkpdrlist(pda_t *pda) curroff =0 ;while (curroff < (HFA384x_PDA_LEN_MAX /2 ) &&le16_to_cpu (pda16[curroff +1 ]) != HFA384x_PDR_END_OF_PDA) { - pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); + pda->rec[pda->nrec] = (struct hfa384x_pdrec *) &(pda16[curroff]);if (le16_to_cpu (pda->rec[pda->nrec]->code) == HFA384x_PDR_NICID) { memcpy(&nicid, &pda->rec[pda->nrec]->data.nicid,
@@ -633,7 +633,7 @@ int mkpdrlist(pda_t *pda)return 1 ; }if (le16_to_cpu (pda16[curroff +1 ]) == HFA384x_PDR_END_OF_PDA) { - pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); + pda->rec[pda->nrec] = (struct hfa384x_pdrec *) &(pda16[curroff]); (pda->nrec)++; }return result;
drivers/staging/wlan-ng/prism2mgmt.c +15 -15
@@ -116,13 +116,13 @@int prism2mgmt_scan (wlandevice_t *wlandev,void *msgp) {int result =0 ; -hfa384x_t *hw = wlandev->priv; +struct hfa384x *hw = wlandev->priv;p80211msg_dot11req_scan_t *msg = msgp;u16 roamingmode, word;int i, timeout;int istmpenable =0 ; -hfa384x_HostScanRequest_data_t scanreq; +struct hfa384x_HostScanRequest_data scanreq;/* gatekeeper check */ if (HFA384x_FIRMWARE_VERSION(hw->ident_sta_fw.major,
@@ -286,7 +286,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) result =hfa384x_drvr_setconfig (hw, HFA384x_RID_HOSTSCAN, &scanreq, -sizeof (hfa384x_HostScanRequest_data_t)); +sizeof (struct hfa384x_HostScanRequest_data ));if (result) {printk (KERN_ERR "setconfig(SCANREQUEST) failed. result=%d\n" , result);
@@ -362,8 +362,8 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp) {int result =0 ;p80211msg_dot11req_scan_results_t *req; -hfa384x_t *hw = wlandev->priv; -hfa384x_HScanResultSub_t *item =NULL ; +struct hfa384x *hw = wlandev->priv; +struct hfa384x_HScanResultSub *item =NULL ;int count;
@@ -510,12 +510,12 @@ exit:int prism2mgmt_start (wlandevice_t *wlandev,void *msgp) {int result =0 ; -hfa384x_t *hw = wlandev->priv; +struct hfa384x *hw = wlandev->priv;p80211msg_dot11req_start_t *msg = msgp;p80211pstrd_t *pstr;u8 bytebuf[80 ]; -hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t *) bytebuf; +struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf;u16 word; wlandev->macmode =WLAN_MACMODE_NONE ;
@@ -686,7 +686,7 @@ done:----------------------------------------------------------------*/ int prism2mgmt_readpda (wlandevice_t *wlandev,void *msgp) { -hfa384x_t *hw = wlandev->priv; +struct hfa384x *hw = wlandev->priv;p80211msg_p2req_readpda_t *msg = msgp;int result;
@@ -752,7 +752,7 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp)----------------------------------------------------------------*/ int prism2mgmt_ramdl_state (wlandevice_t *wlandev,void *msgp) { -hfa384x_t *hw = wlandev->priv; +struct hfa384x *hw = wlandev->priv;p80211msg_p2req_ramdl_state_t *msg = msgp;if (wlandev->msdstate !=WLAN_MSD_FWLOAD ) {
@@ -808,7 +808,7 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp)----------------------------------------------------------------*/ int prism2mgmt_ramdl_write (wlandevice_t *wlandev,void *msgp) { -hfa384x_t *hw = wlandev->priv; +struct hfa384x *hw = wlandev->priv;p80211msg_p2req_ramdl_write_t *msg = msgp;u32 addr;u32 len;
@@ -871,7 +871,7 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp)int prism2mgmt_flashdl_state (wlandevice_t *wlandev,void *msgp) {int result =0 ; -hfa384x_t *hw = wlandev->priv; +struct hfa384x *hw = wlandev->priv;p80211msg_p2req_flashdl_state_t *msg = msgp;if (wlandev->msdstate !=WLAN_MSD_FWLOAD ) {
@@ -941,7 +941,7 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)----------------------------------------------------------------*/ int prism2mgmt_flashdl_write (wlandevice_t *wlandev,void *msgp) { -hfa384x_t *hw = wlandev->priv; +struct hfa384x *hw = wlandev->priv;p80211msg_p2req_flashdl_write_t *msg = msgp;u32 addr;u32 len;
@@ -1002,14 +1002,14 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp)----------------------------------------------------------------*/ int prism2mgmt_autojoin (wlandevice_t *wlandev,void *msgp) { -hfa384x_t *hw = wlandev->priv; +struct hfa384x *hw = wlandev->priv;int result =0 ;u16 reg;u16 port_type;p80211msg_lnxreq_autojoin_t *msg = msgp;p80211pstrd_t *pstr;u8 bytebuf[256 ]; -hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t *) bytebuf; +struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf; wlandev->macmode =WLAN_MACMODE_NONE ;
@@ -1076,7 +1076,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)int result =0 ;p80211msg_lnxreq_wlansniff_t *msg = msgp; -hfa384x_t *hw = wlandev->priv; +struct hfa384x *hw = wlandev->priv;u16 word; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
drivers/staging/wlan-ng/prism2mgmt.h +5 -5
@@ -65,7 +65,7 @@ extern int prism2_reset_settletime;u32 prism2sta_ifstate (wlandevice_t *wlandev,u32 ifstate); -void prism2sta_ev_info (wlandevice_t *wlandev,hfa384x_InfFrame_t *inf); +void prism2sta_ev_info (wlandevice_t *wlandev,struct hfa384x_InfFrame *inf);void prism2sta_ev_txexc (wlandevice_t *wlandev,u16 status);void prism2sta_ev_tx (wlandevice_t *wlandev,u16 status);void prism2sta_ev_rx (wlandevice_t *wlandev,struct sk_buff *skb);
@@ -92,14 +92,14 @@ void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr);void prism2mgmt_bytearea2pstr (u8 *bytearea,p80211pstrd_t *pstr,int len);/* byte string conversion functions*/ -void prism2mgmt_pstr2bytestr (hfa384x_bytestr_t *bytestr,p80211pstrd_t *pstr); -void prism2mgmt_bytestr2pstr (hfa384x_bytestr_t *bytestr,p80211pstrd_t *pstr); +void prism2mgmt_pstr2bytestr (struct hfa384x_bytestr *bytestr,p80211pstrd_t *pstr); +void prism2mgmt_bytestr2pstr (struct hfa384x_bytestr *bytestr,p80211pstrd_t *pstr);/* functions to convert Group Addresses */ -void prism2mgmt_get_grpaddr (u32 did,p80211pstrd_t *pstr,hfa384x_t *priv); +void prism2mgmt_get_grpaddr (u32 did,p80211pstrd_t *pstr,struct hfa384x *priv);int prism2mgmt_set_grpaddr (u32 did,u8 *prism2buf,p80211pstrd_t *pstr, -hfa384x_t *priv); +struct hfa384x *priv);int prism2mgmt_get_grpaddr_index (u32 did);void prism2sta_processing_defer (struct work_struct *data);
drivers/staging/wlan-ng/prism2mib.c +21 -21
166 lines not on this page · raw message
drivers/staging/wlan-ng/prism2sta.c +70 -70
357 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.6.3.3
Part of the diff is not shown here. View the raw message.
PATCH 2/2 Staging: wlan-ng: fix checkpatch warnings.
Fixed long lines, removed typedef and NULL check.
--- drivers/staging/wlan-ng/hfa384x_usb.c | 99 +++++++++++++++++---------------- drivers/staging/wlan-ng/prism2fw.c | 10 ++- 2 files changed, 57 insertions(+), 52 deletions(-)
drivers/staging/wlan-ng/hfa384x_usb.c +51 -48
@@ -175,7 +175,8 @@ hfa384x_usbin_txcompl(wlandevice_t *wlandev, union hfa384x_usbin * usbin);static void hfa384x_usbin_rx (wlandevice_t *wlandev,struct sk_buff *skb); -static void hfa384x_usbin_info (wlandevice_t *wlandev,union hfa384x_usbin * usbin); +static void hfa384x_usbin_info (wlandevice_t *wlandev, +union hfa384x_usbin *usbin);static void hfa384x_usbout_tx (wlandevice_t *wlandev,union hfa384x_usbout *usbout);
@@ -198,9 +199,11 @@ static void hfa384x_usbctlx_completion_task(unsigned long data);static void hfa384x_usbctlx_reaper_task (unsigned long data); -static int hfa384x_usbctlx_submit (struct hfa384x *hw,struct hfa384x_usbctlx *ctlx); +static int hfa384x_usbctlx_submit (struct hfa384x *hw, +struct hfa384x_usbctlx *ctlx); -static void unlocked_usbctlx_complete (struct hfa384x *hw,struct hfa384x_usbctlx *ctlx); +static void unlocked_usbctlx_complete (struct hfa384x *hw, +struct hfa384x_usbctlx *ctlx);struct usbctlx_completor {int (*complete) (struct usbctlx_completor *);
@@ -214,9 +217,11 @@ hfa384x_usbctlx_complete_sync(struct hfa384x *hw,static int unlocked_usbctlx_cancel_async (struct hfa384x *hw,struct hfa384x_usbctlx *ctlx); -static void hfa384x_cb_status (struct hfa384x *hw,const struct hfa384x_usbctlx *ctlx); +static void hfa384x_cb_status (struct hfa384x *hw, +const struct hfa384x_usbctlx *ctlx); -static void hfa384x_cb_rrid (struct hfa384x *hw,const struct hfa384x_usbctlx *ctlx); +static void hfa384x_cb_rrid (struct hfa384x *hw, +const struct hfa384x_usbctlx *ctlx); static int usbctlx_get_status(const struct hfa384x_usb_statusresp *cmdresp,
@@ -612,10 +617,8 @@ void hfa384x_destroy(struct hfa384x *hw)hfa384x_drvr_stop (hw); hw->state = HFA384x_STATE_PREINIT; -if (hw->scanresults) { -kfree (hw->scanresults); - hw->scanresults =NULL ; - } +kfree (hw->scanresults); + hw->scanresults =NULL ;/* Now to clean out the auth queue */ while ((skb =skb_dequeue (&hw->authq)))
@@ -681,12 +684,13 @@ static inline int usbctlx_cmd_completor_fn(struct usbctlx_completor *head)return usbctlx_get_status (complete->cmdresp, complete->result); } -static inline struct usbctlx_completor *init_cmd_completor ( -struct usbctlx_cmd_completor - *completor, -const struct hfa384x_usb_statusresp - *cmdresp, -struct hfa384x_statusresult *result) +static inline +struct usbctlx_completor *init_cmd_completor (struct usbctlx_cmd_completor + *completor, +const struct hfa384x_usb_statusresp + *cmdresp, +struct hfa384x_statusresult + *result) { completor->head.complete = usbctlx_cmd_completor_fn; completor->cmdresp = cmdresp;
@@ -728,13 +732,13 @@ static int usbctlx_rrid_completor_fn(struct usbctlx_completor *head)return 0 ; } -static inline struct usbctlx_completor *init_rrid_completor ( -struct usbctlx_rrid_completor - *completor, -const struct hfa384x_usb_rridresp - *rridresp, -void *riddata, -unsigned int riddatalen) +static inline +struct usbctlx_completor *init_rrid_completor (struct usbctlx_rrid_completor + *completor, +const struct hfa384x_usb_rridresp + *rridresp, +void *riddata, +unsigned int riddatalen) { completor->head.complete = usbctlx_rrid_completor_fn; completor->rridresp = rridresp;
@@ -743,18 +747,8 @@ static inline struct usbctlx_completor *init_rrid_completor(return &(completor->head); } -/*---------------------------------------------------------------- -* Completor object: -* Interprets the results of a synchronous RID-write -----------------------------------------------------------------*/ -typedef struct usbctlx_cmd_completor usbctlx_wrid_completor_t ;#define init_wrid_completor init_cmd_completor -/*---------------------------------------------------------------- -* Completor object: -* Interprets the results of a synchronous memory-write -----------------------------------------------------------------*/ -typedef struct usbctlx_cmd_completor usbctlx_wmem_completor_t ;#define init_wmem_completor init_cmd_completor/*----------------------------------------------------------------
@@ -768,11 +762,10 @@ struct usbctlx_rmem_completor {void *data;unsigned int len; }; -typedef struct usbctlx_rmem_completor usbctlx_rmem_completor_t ;static int usbctlx_rmem_completor_fn (struct usbctlx_completor *head) { -usbctlx_rmem_completor_t *complete = (usbctlx_rmem_completor_t *) head; +struct usbctlx_rmem_completor *complete = (struct usbctlx_rmem_completor *) head;pr_debug ("rmemresp:len=%d\n" , complete->rmemresp->frmlen);memcpy (complete->data, complete->rmemresp->data, complete->len);
@@ -780,7 +773,7 @@ static int usbctlx_rmem_completor_fn(struct usbctlx_completor *head) } static inline struct usbctlx_completor *init_rmem_completor( - usbctlx_rmem_completor_t + struct usbctlx_rmem_completor *completor, struct hfa384x_usb_rmemresp *rmemresp,
@@ -815,7 +808,8 @@ static inline struct usbctlx_completor *init_rmem_completor(* Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_cb_status (struct hfa384x *hw,const struct hfa384x_usbctlx *ctlx) +static void hfa384x_cb_status (struct hfa384x *hw, +const struct hfa384x_usbctlx *ctlx) {if (ctlx->usercb !=NULL ) {struct hfa384x_statusresult cmdresult;
@@ -852,7 +846,8 @@ static void hfa384x_cb_status(struct hfa384x *hw, const struct hfa384x_usbctlx ** Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_cb_rrid (struct hfa384x *hw,const struct hfa384x_usbctlx *ctlx) +static void hfa384x_cb_rrid (struct hfa384x *hw, +const struct hfa384x_usbctlx *ctlx) {if (ctlx->usercb !=NULL ) {struct hfa384x_rridresult rridresult;
@@ -869,7 +864,8 @@ static void hfa384x_cb_rrid(struct hfa384x *hw, const struct hfa384x_usbctlx *ct } } -static inline int hfa384x_docmd_wait (struct hfa384x *hw,struct hfa384x_metacmd *cmd) +static inline int hfa384x_docmd_wait (struct hfa384x *hw, +struct hfa384x_metacmd *cmd) {return hfa384x_docmd (hw,DOWAIT , cmd,NULL ,NULL ,NULL ); }
@@ -1207,7 +1203,8 @@ int hfa384x_cmd_download(struct hfa384x *hw, u16 mode, u16 lowaddr,* Call context: * process ----------------------------------------------------------------*/ -int hfa384x_corereset (struct hfa384x *hw,int holdtime,int settletime,int genesis) +int hfa384x_corereset (struct hfa384x *hw,int holdtime,int settletime, +int genesis) {int result =0 ;
@@ -1568,7 +1565,7 @@ hfa384x_dowrid(struct hfa384x *hw,if (result !=0 ) {kfree (ctlx); }else if (mode ==DOWAIT ) { -usbctlx_wrid_completor_t completor; +struct usbctlx_cmd_completor completor;struct hfa384x_statusresult wridresult; result = hfa384x_usbctlx_complete_sync(hw,
@@ -1660,7 +1657,7 @@ hfa384x_dormem(struct hfa384x *hw,if (result !=0 ) {kfree (ctlx); }else if (mode ==DOWAIT ) { -usbctlx_rmem_completor_t completor; +struct usbctlx_rmem_completor completor; result = hfa384x_usbctlx_complete_sync(hw, ctlx,
@@ -1750,7 +1747,7 @@ hfa384x_dowmem(struct hfa384x *hw,if (result !=0 ) {kfree (ctlx); }else if (mode ==DOWAIT ) { -usbctlx_wmem_completor_t completor; +struct usbctlx_cmd_completor completor;struct hfa384x_statusresult wmemresult; result = hfa384x_usbctlx_complete_sync(hw,
@@ -1997,7 +1994,8 @@ int hfa384x_drvr_flashdl_disable(struct hfa384x *hw)* Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_flashdl_write (struct hfa384x *hw,u32 daddr,void *buf,u32 len) +int hfa384x_drvr_flashdl_write (struct hfa384x *hw,u32 daddr,void *buf, +u32 len) {int result =0 ;u32 dlbufaddr;
@@ -2622,7 +2620,8 @@ int hfa384x_drvr_start(struct hfa384x *hw)pr_debug ("but second attempt succeeded. All should be ok\n" ); } }else if (result2 !=0 ) { -printk (KERN_WARNING "First cmd_initialize() succeeded, but second attempt failed (result=%d)\n" , +printk (KERN_WARNING +"First cmd_initialize() succeeded, but second attempt failed (result=%d)\n" , result2);printk (KERN_WARNING "Most likely the card will be functional\n" );
@@ -2997,7 +2996,8 @@ static int unlocked_usbctlx_cancel_async(struct hfa384x *hw,* Call context: * Either, assume interrupt ----------------------------------------------------------------*/ -static void unlocked_usbctlx_complete (struct hfa384x *hw,struct hfa384x_usbctlx *ctlx) +static void unlocked_usbctlx_complete (struct hfa384x *hw, +struct hfa384x_usbctlx *ctlx) {/* Timers have been stopped, and ctlx should be in * a terminal state. Retire it from the "active"
@@ -3676,7 +3676,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,* Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_usbin_info (wlandevice_t *wlandev,union hfa384x_usbin *usbin) +static void hfa384x_usbin_info (wlandevice_t *wlandev, +union hfa384x_usbin *usbin) { usbin->infofrm.info.framelen =le16_to_cpu (usbin->infofrm.info.framelen);
@@ -4054,7 +4055,8 @@ static void hfa384x_usb_throttlefn(unsigned long data)* Call context: * process or interrupt ----------------------------------------------------------------*/ -static int hfa384x_usbctlx_submit (struct hfa384x *hw,struct hfa384x_usbctlx *ctlx) +static int hfa384x_usbctlx_submit (struct hfa384x *hw, +struct hfa384x_usbctlx *ctlx) {unsigned long flags;int ret;
@@ -4095,7 +4097,8 @@ static int hfa384x_usbctlx_submit(struct hfa384x *hw, struct hfa384x_usbctlx *ct* Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_usbout_tx (wlandevice_t *wlandev,union hfa384x_usbout *usbout) +static void hfa384x_usbout_tx (wlandevice_t *wlandev, +union hfa384x_usbout *usbout) {prism2sta_ev_alloc (wlandev); }
drivers/staging/wlan-ng/prism2fw.c +6 -4
@@ -402,7 +402,7 @@ int crcimage(imgchunk_t *fchunk, unsigned int nfchunks, s3crcrec_t *s3crc,/* some crc records don't match with the length of */ /* the actual data, so we're not checking right */ /* now */ -/* if ( crcstart-2 >= cstart && crcend <= cend ) break; */ +/* if (crcstart-2 >= cstart && crcend <= cend) break; */ /* note the -2 below, it's to make sure the chunk has */ /* space for the CRC value */
@@ -675,7 +675,7 @@ int plugimage(imgchunk_t *fchunk, unsigned int nfchunks, pstart = s3plug[i].addr; pend = s3plug[i].addr + s3plug[i].len;/* find the matching PDR (or filename) */ -if (s3plug[i].itemcode !=0xffffffffUL ) {/* not filename */ +if (s3plug[i].itemcode !=0xffffffffUL ) {/* not filename */ for (j =0 ; j < pda->nrec; j++) {if (s3plug[i].itemcode ==le16_to_cpu (pda->rec[j]->code))
@@ -684,7 +684,7 @@ int plugimage(imgchunk_t *fchunk, unsigned int nfchunks, }else { j =-1 ; } -if (j >= pda->nrec && j !=-1 ) {/* if no matching PDR, fail */ +if (j >= pda->nrec && j !=-1 ) {/* if no matching PDR, fail */ printk (KERN_WARNING "warning: Failed to find PDR for " "plugrec 0x%04x.\n" , s3plug[i].itemcode);
@@ -712,7 +712,9 @@ int plugimage(imgchunk_t *fchunk, unsigned int nfchunks,continue ; } -/* Validate plug address against chunk data and identify chunk */ +/* Validate plug address against chunk data +* and identify chunk +*/ for (c =0 ; c < nfchunks; c++) { cstart = fchunk[c].addr; cend = fchunk[c].addr + fchunk[c].len;
Signature · 1 line
1.6.3.3
Quoted 3 lines · Edgardo Hames
Fixed spaces before tabs, removed unused variables and all typedefs.
Signed-off-by Edgardo Hames <[email protected]>
This doesn't apply against the latest linux-next tree, care to respin it and resend both of these?
thanks,
greg k-h
Quoted 7 lines · Greg KH
Quoted 3 lines · Edgardo Hames
Fixed spaces before tabs, removed unused variables and all typedefs.
Signed-off-by Edgardo Hames <[email protected]>This doesn't apply against the latest linux-next tree, care to respin it and resend both of these?
Shall I use linux-next/stable to respin the patch? I tried building linux-next/master and the module doesn't even build.
Thanks,
Edgardo
Signature · 3 lines
The mere formulation of a problem is far more essential than its solution, which may be merely a matter of mathematical or experimental skills. -- Albert Einstein
Quoted 11 lines · Edgardo Hames
Quoted 7 lines · Greg KH
Quoted 3 lines · Edgardo Hames
Fixed spaces before tabs, removed unused variables and all typedefs.
Signed-off-by Edgardo Hames <[email protected]>This doesn't apply against the latest linux-next tree, care to respin it and resend both of these?
Shall I use linux-next/stable to respin the patch? I tried building linux-next/master and the module doesn't even build.
Yes please do. There are patches on the list to get it to build, or you can just work on the staging-next branch in there to have a buildable driver.
thanks,
greg k-h