This patch suppress "do not add new typedefs" checkpatch.pl warnings. After this suppression some lines needs to be changed to avoid new checkpatch.pl complains (e.g. 80 chars per line checkpatch.pl warning) Signed-off-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxx> --- drivers/staging/wlan-ng/cfg80211.c | 52 +-- drivers/staging/wlan-ng/hfa384x.h | 623 +++++++++++++++-------------- drivers/staging/wlan-ng/hfa384x_usb.c | 336 ++++++++-------- drivers/staging/wlan-ng/p80211conv.c | 8 +- drivers/staging/wlan-ng/p80211metastruct.h | 248 ++++++------ drivers/staging/wlan-ng/p80211netdev.c | 87 ++-- drivers/staging/wlan-ng/p80211netdev.h | 43 +- drivers/staging/wlan-ng/p80211req.c | 27 +- drivers/staging/wlan-ng/p80211req.h | 2 +- drivers/staging/wlan-ng/p80211types.h | 126 +++--- drivers/staging/wlan-ng/p80211wep.c | 8 +- drivers/staging/wlan-ng/prism2fw.c | 44 +- drivers/staging/wlan-ng/prism2mgmt.c | 54 +-- drivers/staging/wlan-ng/prism2mgmt.h | 53 +-- drivers/staging/wlan-ng/prism2mib.c | 90 ++--- drivers/staging/wlan-ng/prism2sta.c | 241 +++++------ drivers/staging/wlan-ng/prism2usb.c | 24 +- 17 files changed, 1047 insertions(+), 1019 deletions(-) diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index f46dfe6..0015cdd 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -35,7 +35,7 @@ static const u32 prism2_cipher_suites[PRISM2_NUM_CIPHER_SUITES] = { /* prism2 device private data */ struct prism2_wiphy_private { - wlandevice_t *wlandev; + struct wlandevice *wlandev; struct ieee80211_supported_band band; struct ieee80211_channel channels[ARRAY_SIZE(prism2_channels)]; @@ -69,11 +69,12 @@ static int prism2_result2err(int prism2_result) return err; } -static int prism2_domibset_uint32(wlandevice_t *wlandev, u32 did, u32 data) +static int prism2_domibset_uint32(struct wlandevice *wlandev, u32 did, + u32 data) { struct p80211msg_dot11req_mibset msg; - p80211item_uint32_t *mibitem = - (p80211item_uint32_t *)&msg.mibattribute.data; + struct p80211item_uint32 *mibitem = + (struct p80211item_uint32 *)&msg.mibattribute.data; msg.msgcode = DIDmsg_dot11req_mibset; mibitem->did = did; @@ -82,12 +83,12 @@ static int prism2_domibset_uint32(wlandevice_t *wlandev, u32 did, u32 data) return p80211req_dorequest(wlandev, (u8 *)&msg); } -static int prism2_domibset_pstr32(wlandevice_t *wlandev, +static int prism2_domibset_pstr32(struct wlandevice *wlandev, u32 did, u8 len, const u8 *data) { struct p80211msg_dot11req_mibset msg; - p80211item_pstr32_t *mibitem = - (p80211item_pstr32_t *)&msg.mibattribute.data; + struct p80211item_pstr32 *mibitem = + (struct p80211item_pstr32 *)&msg.mibattribute.data; msg.msgcode = DIDmsg_dot11req_mibset; mibitem->did = did; @@ -103,7 +104,7 @@ static int prism2_change_virtual_intf(struct wiphy *wiphy, enum nl80211_iftype type, u32 *flags, struct vif_params *params) { - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; u32 data; int result; int err = 0; @@ -144,7 +145,7 @@ static int prism2_add_key(struct wiphy *wiphy, struct net_device *dev, u8 key_index, bool pairwise, const u8 *mac_addr, struct key_params *params) { - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; u32 did; int err = 0; @@ -205,7 +206,7 @@ static int prism2_get_key(struct wiphy *wiphy, struct net_device *dev, const u8 *mac_addr, void *cookie, void (*callback)(void *cookie, struct key_params*)) { - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; struct key_params params; int len; @@ -233,7 +234,7 @@ static int prism2_get_key(struct wiphy *wiphy, struct net_device *dev, static int prism2_del_key(struct wiphy *wiphy, struct net_device *dev, u8 key_index, bool pairwise, const u8 *mac_addr) { - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; u32 did; int err = 0; int result = 0; @@ -281,7 +282,7 @@ exit: static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev, u8 key_index, bool unicast, bool multicast) { - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; int err = 0; int result = 0; @@ -299,7 +300,7 @@ static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev, static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_info *sinfo) { - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; struct p80211msg_lnxreq_commsquality quality; int result; @@ -334,7 +335,7 @@ static int prism2_scan(struct wiphy *wiphy, { struct net_device *dev; struct prism2_wiphy_private *priv = wiphy_priv(wiphy); - wlandevice_t *wlandev; + struct wlandevice *wlandev; struct p80211msg_dot11req_scan msg1; struct p80211msg_dot11req_scan_results msg2; struct cfg80211_bss *bss; @@ -451,7 +452,7 @@ exit: static int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed) { struct prism2_wiphy_private *priv = wiphy_priv(wiphy); - wlandevice_t *wlandev = priv->wlandev; + struct wlandevice *wlandev = priv->wlandev; u32 data; int result; int err = 0; @@ -493,7 +494,7 @@ exit: static int prism2_connect(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_connect_params *sme) { - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; struct ieee80211_channel *channel = sme->channel; struct p80211msg_lnxreq_autojoin msg_join; u32 did; @@ -618,7 +619,7 @@ exit: static int prism2_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code) { - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; struct p80211msg_lnxreq_autojoin msg_join; int result; int err = 0; @@ -652,7 +653,7 @@ static int prism2_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, enum nl80211_tx_power_setting type, int mbm) { struct prism2_wiphy_private *priv = wiphy_priv(wiphy); - wlandevice_t *wlandev = priv->wlandev; + struct wlandevice *wlandev = priv->wlandev; u32 data; int result; int err = 0; @@ -679,13 +680,13 @@ static int prism2_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, int *dbm) { struct prism2_wiphy_private *priv = wiphy_priv(wiphy); - wlandevice_t *wlandev = priv->wlandev; + struct wlandevice *wlandev = priv->wlandev; struct p80211msg_dot11req_mibget msg; - p80211item_uint32_t *mibitem; + struct p80211item_uint32 *mibitem; int result; int err = 0; - mibitem = (p80211item_uint32_t *)&msg.mibattribute.data; + mibitem = (struct p80211item_uint32 *)&msg.mibattribute.data; msg.msgcode = DIDmsg_dot11req_mibget; mibitem->did = DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; @@ -704,7 +705,7 @@ exit: } /* Interface callback functions, passing data back up to the cfg80211 layer */ -void prism2_connect_result(wlandevice_t *wlandev, u8 failed) +void prism2_connect_result(struct wlandevice *wlandev, u8 failed) { u16 status = failed ? WLAN_STATUS_UNSPECIFIED_FAILURE : WLAN_STATUS_SUCCESS; @@ -713,13 +714,13 @@ void prism2_connect_result(wlandevice_t *wlandev, u8 failed) NULL, 0, NULL, 0, status, GFP_KERNEL); } -void prism2_disconnected(wlandevice_t *wlandev) +void prism2_disconnected(struct wlandevice *wlandev) { cfg80211_disconnected(wlandev->netdev, 0, NULL, 0, false, GFP_KERNEL); } -void prism2_roamed(wlandevice_t *wlandev) +void prism2_roamed(struct wlandevice *wlandev) { cfg80211_roamed(wlandev->netdev, NULL, wlandev->bssid, NULL, 0, NULL, 0, GFP_KERNEL); @@ -744,7 +745,8 @@ static const struct cfg80211_ops prism2_usb_cfg_ops = { }; /* Functions to create/free wiphy interface */ -static struct wiphy *wlan_create_wiphy(struct device *dev, wlandevice_t *wlandev) +static struct wiphy *wlan_create_wiphy(struct device *dev, + struct wlandevice *wlandev) { struct wiphy *wiphy; struct prism2_wiphy_private *priv; diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index cec6d0b..2294586 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -255,9 +255,9 @@ Information RID Lengths: MAC Information 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 @@ -355,10 +355,10 @@ 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: @@ -366,20 +366,20 @@ Configuration Record Structures: --------------------------------------------------------------------*/ /*-- 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 @@ -394,30 +394,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; -} __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 @@ -425,11 +425,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; -} __packed hfa384x_downloadbuffer_t; +} __packed; /*-------------------------------------------------------------------- Information Record Structures: NIC Information @@ -438,18 +438,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; -} __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 @@ -457,7 +457,7 @@ 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,7 +482,7 @@ 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 --------------------------------------------------------------------*/ @@ -519,7 +519,7 @@ Communication Frames: Test/Get/Set Field Values for Transmit 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,7 +544,7 @@ 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 --------------------------------------------------------------------*/ @@ -586,7 +586,7 @@ 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 +608,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 +632,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 +699,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,52 +709,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; -} __packed hfa384x_AssocStatus_t; +} __packed; /*-- Unsolicited Frame, MAC Mgmt: AuthRequest (AP Only) --*/ -typedef struct hfa384x_AuthRequest { +struct hfa384x_AuthReq { 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_AuthReq 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. @@ -783,143 +783,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]; -} __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 { +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; -} __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; +} __packed; + +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; +} __packed; /*-------------------------------------------------------------------- PD record structures. --------------------------------------------------------------------*/ -typedef struct hfa384x_pdr_pcb_partnum { +struct hfa384x_pdr_pcb_partnum { u8 num[8]; -} __packed hfa384x_pdr_pcb_partnum_t; +} __packed; -typedef struct hfa384x_pdr_pcb_tracenum { +struct hfa384x_pdr_pcb_tracenum { u8 num[8]; -} __packed hfa384x_pdr_pcb_tracenum_t; +} __packed; -typedef struct hfa384x_pdr_nic_serial { +struct hfa384x_pdr_nic_serial { u8 num[12]; -} __packed hfa384x_pdr_nic_serial_t; +} __packed; -typedef struct hfa384x_pdr_mkk_measurements { +struct hfa384x_pdr_mkk_measurements { double carrier_freq; double occupied_band; double power_density; @@ -935,192 +931,193 @@ typedef struct hfa384x_pdr_mkk_measurements { double rx_spur_f2; double rx_spur_l1; double rx_spur_l2; -} __packed hfa384x_pdr_mkk_measurements_t; +} __packed; -typedef struct hfa384x_pdr_nic_ramsize { +struct hfa384x_pdr_nic_ramsize { u8 size[12]; /* units of KB */ -} __packed hfa384x_pdr_nic_ramsize_t; +} __packed; -typedef struct hfa384x_pdr_mfisuprange { +struct hfa384x_pdr_mfisuprange { u16 id; u16 variant; u16 bottom; u16 top; -} __packed hfa384x_pdr_mfisuprange_t; +} __packed; -typedef struct hfa384x_pdr_cfisuprange { +struct hfa384x_pdr_cfisuprange { u16 id; u16 variant; u16 bottom; u16 top; -} __packed hfa384x_pdr_cfisuprange_t; +} __packed; -typedef struct hfa384x_pdr_nicid { +struct hfa384x_pdr_nicid { u16 id; u16 variant; u16 major; u16 minor; -} __packed hfa384x_pdr_nicid_t; +} __packed; -typedef struct hfa384x_pdr_refdac_measurements { +struct hfa384x_pdr_refdac_measurements { u16 value[0]; -} __packed hfa384x_pdr_refdac_measurements_t; +} __packed; -typedef struct hfa384x_pdr_vgdac_measurements { +struct hfa384x_pdr_vgdac_measurements { u16 value[0]; -} __packed hfa384x_pdr_vgdac_measurements_t; +} __packed; -typedef struct hfa384x_pdr_level_comp_measurements { +struct hfa384x_pdr_level_comp_measurements { u16 value[0]; -} __packed hfa384x_pdr_level_compc_measurements_t; +} __packed; -typedef struct hfa384x_pdr_mac_address { +struct hfa384x_pdr_mac_address { u8 addr[6]; -} __packed hfa384x_pdr_mac_address_t; +} __packed; -typedef struct hfa384x_pdr_mkk_callname { +struct hfa384x_pdr_mkk_callname { u8 callname[8]; -} __packed hfa384x_pdr_mkk_callname_t; +} __packed; -typedef struct hfa384x_pdr_regdomain { +struct hfa384x_pdr_regdomain { u16 numdomains; u16 domain[5]; -} __packed hfa384x_pdr_regdomain_t; +} __packed; -typedef struct hfa384x_pdr_allowed_channel { +struct hfa384x_pdr_allowed_channel { u16 ch_bitmap; -} __packed hfa384x_pdr_allowed_channel_t; +} __packed; -typedef struct hfa384x_pdr_default_channel { +struct hfa384x_pdr_default_channel { u16 channel; -} __packed hfa384x_pdr_default_channel_t; +} __packed; -typedef struct hfa384x_pdr_privacy_option { +struct hfa384x_pdr_privacy_option { u16 available; -} __packed hfa384x_pdr_privacy_option_t; +} __packed; -typedef struct hfa384x_pdr_temptype { +struct hfa384x_pdr_temptype { u16 type; -} __packed hfa384x_pdr_temptype_t; +} __packed; -typedef struct hfa384x_pdr_refdac_setup { +struct hfa384x_pdr_refdac_setup { u16 ch_value[14]; -} __packed hfa384x_pdr_refdac_setup_t; +} __packed; -typedef struct hfa384x_pdr_vgdac_setup { +struct hfa384x_pdr_vgdac_setup { u16 ch_value[14]; -} __packed hfa384x_pdr_vgdac_setup_t; +} __packed; -typedef struct hfa384x_pdr_level_comp_setup { +struct hfa384x_pdr_level_comp_setup { u16 ch_value[14]; -} __packed hfa384x_pdr_level_comp_setup_t; +} __packed; -typedef struct hfa384x_pdr_trimdac_setup { +struct hfa384x_pdr_trimdac_setup { u16 trimidac; u16 trimqdac; -} __packed hfa384x_pdr_trimdac_setup_t; +} __packed; -typedef struct hfa384x_pdr_ifr_setting { +struct hfa384x_pdr_ifr_setting { u16 value[3]; -} __packed hfa384x_pdr_ifr_setting_t; +} __packed; -typedef struct hfa384x_pdr_rfr_setting { +struct hfa384x_pdr_rfr_setting { u16 value[3]; -} __packed hfa384x_pdr_rfr_setting_t; +} __packed; -typedef struct hfa384x_pdr_hfa3861_baseline { +struct hfa384x_pdr_hfa3861_baseline { u16 value[50]; -} __packed hfa384x_pdr_hfa3861_baseline_t; +} __packed; -typedef struct hfa384x_pdr_hfa3861_shadow { +struct hfa384x_pdr_hfa3861_shadow { u32 value[32]; -} __packed hfa384x_pdr_hfa3861_shadow_t; +} __packed; -typedef struct hfa384x_pdr_hfa3861_ifrf { +struct hfa384x_pdr_hfa3861_ifrf { u32 value[20]; -} __packed hfa384x_pdr_hfa3861_ifrf_t; +} __packed; -typedef struct hfa384x_pdr_hfa3861_chcalsp { +struct hfa384x_pdr_hfa3861_chcalsp { u16 value[14]; -} __packed hfa384x_pdr_hfa3861_chcalsp_t; +} __packed; -typedef struct hfa384x_pdr_hfa3861_chcali { +struct hfa384x_pdr_hfa3861_chcali { u16 value[17]; -} __packed hfa384x_pdr_hfa3861_chcali_t; +} __packed; -typedef struct hfa384x_pdr_hfa3861_nic_config { +struct hfa384x_pdr_hfa3861_nic_config { u16 config_bitmap; -} __packed hfa384x_pdr_nic_config_t; +} __packed; -typedef struct hfa384x_pdr_hfo_delay { +struct hfa384x_pdr_hfo_delay { u8 hfo_delay; -} __packed hfa384x_hfo_delay_t; +} __packed; -typedef struct hfa384x_pdr_hfa3861_manf_testsp { +struct hfa384x_pdr_hfa3861_manf_testsp { u16 value[30]; -} __packed hfa384x_pdr_hfa3861_manf_testsp_t; +} __packed; -typedef struct hfa384x_pdr_hfa3861_manf_testi { +struct hfa384x_pdr_hfa3861_manf_testi { u16 value[30]; -} __packed hfa384x_pdr_hfa3861_manf_testi_t; +} __packed; -typedef struct hfa384x_end_of_pda { +struct hfa384x_pdr_end_of_pda { u16 crc; -} __packed hfa384x_pdr_end_of_pda_t; +} __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_pdr_end_of_pda end_of_pda; } data; -} __packed hfa384x_pdrec_t; +} __packed; #ifdef __KERNEL__ /*-------------------------------------------------------------------- --- MAC state structure, argument to all functions -- --- Also, a collection of support types -- --------------------------------------------------------------------*/ -typedef struct hfa384x_statusresult { +struct hfa384x_cmdresult { 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 @@ -1129,11 +1126,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 */ @@ -1146,7 +1143,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; @@ -1156,14 +1152,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 */ @@ -1173,25 +1169,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_cmdresult result; +}; #define MAX_GRP_ADDR 32 #define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */ @@ -1218,15 +1214,15 @@ struct prism2sta_accesslist { u8 addr1[WLAN_ACCESS_MAX][ETH_ALEN]; }; -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; @@ -1265,20 +1261,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; @@ -1302,77 +1298,83 @@ 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; /* - * sta f/w to controller - * interface - */ + 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 prism2sta_authlist authlist; /* Authenticated station list. */ - unsigned int accessmode; /* Access mode. */ - struct prism2sta_accesslist allow; /* Allowed station list. */ - struct prism2sta_accesslist deny; /* Denied station list. */ + struct hfa384x_InfFrame *scanresults; -} hfa384x_t; + struct prism2sta_authlist authlist; /* Authenticated station list.*/ + unsigned int accessmode; /* Access mode. */ + struct prism2sta_accesslist allow; /* Allowed station list. */ + struct prism2sta_accesslist deny; /* Denied station list. */ -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_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_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; @@ -1382,7 +1384,8 @@ 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); @@ -1390,13 +1393,13 @@ static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val) } 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); @@ -1404,21 +1407,21 @@ hfa384x_drvr_setconfig16_async(hfa384x_t *hw, u16 rid, u16 val) 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, 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); -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__ */ diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 3378107..4c6b654 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -154,13 +154,14 @@ static void dbprint_urb(struct urb *urb); #endif static void -hfa384x_int_rxmonitor(wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *rxfrm); +hfa384x_int_rxmonitor(struct wlandevice *wlandev, + struct hfa384x_usb_rxfrm *rxfrm); static void hfa384x_usb_defer(struct work_struct *data); -static int submit_rx_urb(hfa384x_t *hw, gfp_t flags); +static int submit_rx_urb(struct hfa384x *hw, gfp_t flags); -static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t flags); +static int submit_tx_urb(struct hfa384x *hw, struct urb *tx_urb, gfp_t flags); /*---------------------------------------------------*/ /* Callbacks */ @@ -169,19 +170,20 @@ static void hfa384x_ctlxout_callback(struct urb *urb); static void hfa384x_usbin_callback(struct urb *urb); static void -hfa384x_usbin_txcompl(wlandevice_t *wlandev, hfa384x_usbin_t *usbin); +hfa384x_usbin_txcompl(struct wlandevice *wlandev, union hfa384x_usbin *usbin); -static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb); +static void hfa384x_usbin_rx(struct wlandevice *wlandev, struct sk_buff *skb); -static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t *usbin); +static void hfa384x_usbin_info(struct wlandevice *wlandev, + union hfa384x_usbin *usbin); -static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin, +static void hfa384x_usbin_ctlx(struct hfa384x *hw, union hfa384x_usbin *usbin, int urb_status); /*---------------------------------------------------*/ /* Functions to support the prism2 usb command queue */ -static void hfa384x_usbctlxq_run(hfa384x_t *hw); +static void hfa384x_usbctlxq_run(struct hfa384x *hw); static void hfa384x_usbctlx_reqtimerfn(unsigned long data); @@ -193,42 +195,46 @@ static void hfa384x_usbctlx_completion_task(unsigned long data); static void hfa384x_usbctlx_reaper_task(unsigned long data); -static int hfa384x_usbctlx_submit(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx); +static int hfa384x_usbctlx_submit(struct hfa384x *hw, + struct hfa384x_usbctlx *ctlx); -static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx); +static void unlocked_usbctlx_complete(struct hfa384x *hw, + struct hfa384x_usbctlx *ctlx); struct usbctlx_completor { int (*complete)(struct usbctlx_completor *); }; static int -hfa384x_usbctlx_complete_sync(hfa384x_t *hw, - hfa384x_usbctlx_t *ctlx, +hfa384x_usbctlx_complete_sync(struct hfa384x *hw, + struct hfa384x_usbctlx *ctlx, struct usbctlx_completor *completor); static int -unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx); +unlocked_usbctlx_cancel_async(struct hfa384x *hw, + struct hfa384x_usbctlx *ctlx); -static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx); +static void hfa384x_cb_status(struct hfa384x *hw, + const struct hfa384x_usbctlx *ctlx); static int -usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp, - hfa384x_cmdresult_t *result); +usbctlx_get_status(const struct hfa384x_usb_statusresp *cmdresp, + struct hfa384x_cmdresult *result); static void -usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp, - hfa384x_rridresult_t *result); +usbctlx_get_rridresult(const struct hfa384x_usb_rridresp *rridresp, + struct hfa384x_rridresult *result); /*---------------------------------------------------*/ /* Low level req/resp CTLX formatters and submitters */ static int -hfa384x_docmd(hfa384x_t *hw, +hfa384x_docmd(struct hfa384x *hw, enum cmd_mode mode, - hfa384x_metacmd_t *cmd, + struct hfa384x_metacmd *cmd, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data); static int -hfa384x_dorrid(hfa384x_t *hw, +hfa384x_dorrid(struct hfa384x *hw, enum cmd_mode mode, u16 rid, void *riddata, @@ -236,7 +242,7 @@ hfa384x_dorrid(hfa384x_t *hw, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data); static int -hfa384x_dowrid(hfa384x_t *hw, +hfa384x_dowrid(struct hfa384x *hw, enum cmd_mode mode, u16 rid, void *riddata, @@ -244,7 +250,7 @@ hfa384x_dowrid(hfa384x_t *hw, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data); static int -hfa384x_dormem(hfa384x_t *hw, +hfa384x_dormem(struct hfa384x *hw, enum cmd_mode mode, u16 page, u16 offset, @@ -253,7 +259,7 @@ hfa384x_dormem(hfa384x_t *hw, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data); static int -hfa384x_dowmem(hfa384x_t *hw, +hfa384x_dowmem(struct hfa384x *hw, enum cmd_mode mode, u16 page, u16 offset, @@ -263,7 +269,7 @@ hfa384x_dowmem(hfa384x_t *hw, static int hfa384x_isgood_pdrcode(u16 pdrcode); -static inline const char *ctlxstr(CTLX_STATE s) +static inline const char *ctlxstr(enum ctlx_state s) { static const char * const ctlx_str[] = { "Initial state", @@ -278,9 +284,9 @@ static inline const char *ctlxstr(CTLX_STATE s) return ctlx_str[s]; }; -static inline hfa384x_usbctlx_t *get_active_ctlx(hfa384x_t *hw) +static inline struct hfa384x_usbctlx *get_active_ctlx(struct hfa384x *hw) { - return list_entry(hw->ctlxq.active.next, hfa384x_usbctlx_t, list); + return list_entry(hw->ctlxq.active.next, struct hfa384x_usbctlx, list); } #ifdef DEBUG_USB @@ -322,12 +328,12 @@ void dbprint_urb(struct urb *urb) * Call context: * Any ----------------------------------------------------------------*/ -static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags) +static int submit_rx_urb(struct hfa384x *hw, gfp_t memflags) { struct sk_buff *skb; int result; - skb = dev_alloc_skb(sizeof(hfa384x_usbin_t)); + skb = dev_alloc_skb(sizeof(union hfa384x_usbin)); if (!skb) { result = -ENOMEM; goto done; @@ -336,7 +342,7 @@ static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags) /* Post the IN urb */ usb_fill_bulk_urb(&hw->rx_urb, hw->usb, hw->endp_in, - skb->data, sizeof(hfa384x_usbin_t), + skb->data, sizeof(union hfa384x_usbin), hfa384x_usbin_callback, hw->wlandev); hw->rx_urb_skb = skb; @@ -384,7 +390,8 @@ done: * Call context: * Any ----------------------------------------------------------------*/ -static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) +static int submit_tx_urb(struct hfa384x *hw, struct urb *tx_urb, + gfp_t memflags) { struct net_device *netdev = hw->wlandev->netdev; int result; @@ -429,7 +436,7 @@ static int submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags) ----------------------------------------------------------------*/ static void hfa384x_usb_defer(struct work_struct *data) { - hfa384x_t *hw = container_of(data, struct hfa384x, usb_work); + struct hfa384x *hw = container_of(data, struct hfa384x, usb_work); struct net_device *netdev = hw->wlandev->netdev; /* Don't bother trying to reset anything if the plug @@ -503,7 +510,7 @@ static void hfa384x_usb_defer(struct work_struct *data) /*---------------------------------------------------------------- * hfa384x_create * -* Sets up the hfa384x_t data structure for use. Note this +* Sets up the struct hfa384x data structure for use. Note this * does _not_ initialize the actual hardware, just the data structures * we use to keep track of its state. * @@ -521,9 +528,9 @@ static void hfa384x_usb_defer(struct work_struct *data) * Call context: * process ----------------------------------------------------------------*/ -void hfa384x_create(hfa384x_t *hw, struct usb_device *usb) +void hfa384x_create(struct hfa384x *hw, struct usb_device *usb) { - memset(hw, 0, sizeof(hfa384x_t)); + memset(hw, 0, sizeof(struct hfa384x)); hw->usb = usb; /* set up the endpoints */ @@ -592,7 +599,7 @@ void hfa384x_create(hfa384x_t *hw, struct usb_device *usb) * Call context: * process ----------------------------------------------------------------*/ -void hfa384x_destroy(hfa384x_t *hw) +void hfa384x_destroy(struct hfa384x *hw) { struct sk_buff *skb; @@ -608,9 +615,9 @@ void hfa384x_destroy(hfa384x_t *hw) dev_kfree_skb(skb); } -static hfa384x_usbctlx_t *usbctlx_alloc(void) +static struct hfa384x_usbctlx *usbctlx_alloc(void) { - hfa384x_usbctlx_t *ctlx; + struct hfa384x_usbctlx *ctlx; ctlx = kzalloc(sizeof(*ctlx), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); @@ -621,8 +628,8 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void) } static int -usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp, - hfa384x_cmdresult_t *result) +usbctlx_get_status(const struct hfa384x_usb_statusresp *cmdresp, + struct hfa384x_cmdresult *result) { result->status = le16_to_cpu(cmdresp->status); result->resp0 = le16_to_cpu(cmdresp->resp0); @@ -636,8 +643,8 @@ usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp, } static void -usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp, - hfa384x_rridresult_t *result) +usbctlx_get_rridresult(const struct hfa384x_usb_rridresp *rridresp, + struct hfa384x_rridresult *result) { result->rid = le16_to_cpu(rridresp->rid); result->riddata = rridresp->data; @@ -647,13 +654,13 @@ usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp, /*---------------------------------------------------------------- * Completor object: * This completor must be passed to hfa384x_usbctlx_complete_sync() -* when processing a CTLX that returns a hfa384x_cmdresult_t structure. +* when processing a CTLX that returns a struct hfa384x_cmdresult structure. ----------------------------------------------------------------*/ struct usbctlx_cmd_completor { struct usbctlx_completor head; - const hfa384x_usb_cmdresp_t *cmdresp; - hfa384x_cmdresult_t *result; + const struct hfa384x_usb_statusresp *cmdresp; + struct hfa384x_cmdresult *result; }; static inline int usbctlx_cmd_completor_fn(struct usbctlx_completor *head) @@ -665,11 +672,9 @@ static inline int usbctlx_cmd_completor_fn(struct usbctlx_completor *head) } static inline struct usbctlx_completor *init_cmd_completor( - struct usbctlx_cmd_completor - *completor, - const hfa384x_usb_cmdresp_t - *cmdresp, - hfa384x_cmdresult_t *result) + struct usbctlx_cmd_completor *completor, + const struct hfa384x_usb_statusresp *cmdresp, + struct hfa384x_cmdresult *result) { completor->head.complete = usbctlx_cmd_completor_fn; completor->cmdresp = cmdresp; @@ -685,7 +690,7 @@ static inline struct usbctlx_completor *init_cmd_completor( struct usbctlx_rrid_completor { struct usbctlx_completor head; - const hfa384x_usb_rridresp_t *rridresp; + const struct hfa384x_usb_rridresp *rridresp; void *riddata; unsigned int riddatalen; }; @@ -693,7 +698,7 @@ struct usbctlx_rrid_completor { static int usbctlx_rrid_completor_fn(struct usbctlx_completor *head) { struct usbctlx_rrid_completor *complete; - hfa384x_rridresult_t rridresult; + struct hfa384x_rridresult rridresult; complete = (struct usbctlx_rrid_completor *)head; usbctlx_get_rridresult(complete->rridresp, &rridresult); @@ -711,12 +716,10 @@ static int usbctlx_rrid_completor_fn(struct usbctlx_completor *head) } static inline struct usbctlx_completor *init_rrid_completor( - struct usbctlx_rrid_completor - *completor, - const hfa384x_usb_rridresp_t - *rridresp, - void *riddata, - unsigned int riddatalen) + 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; @@ -744,7 +747,7 @@ static inline struct usbctlx_completor *init_rrid_completor( struct usbctlx_rmem_completor { struct usbctlx_completor head; - const hfa384x_usb_rmemresp_t *rmemresp; + const struct hfa384x_usb_rmemresp *rmemresp; void *data; unsigned int len; }; @@ -762,7 +765,7 @@ static int usbctlx_rmem_completor_fn(struct usbctlx_completor *head) static inline struct usbctlx_completor *init_rmem_completor( struct usbctlx_rmem_completor *completor, - hfa384x_usb_rmemresp_t + struct hfa384x_usb_rmemresp *rmemresp, void *data, unsigned int len) @@ -795,10 +798,11 @@ static inline struct usbctlx_completor *init_rmem_completor( * Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) +static void hfa384x_cb_status(struct hfa384x *hw, + const struct hfa384x_usbctlx *ctlx) { if (ctlx->usercb) { - hfa384x_cmdresult_t cmdresult; + struct hfa384x_cmdresult cmdresult; if (ctlx->state != CTLX_COMPLETE) { memset(&cmdresult, 0, sizeof(cmdresult)); @@ -812,21 +816,22 @@ static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) } } -static inline int hfa384x_docmd_wait(hfa384x_t *hw, hfa384x_metacmd_t *cmd) +static inline int hfa384x_docmd_wait(struct hfa384x *hw, + struct hfa384x_metacmd *cmd) { return hfa384x_docmd(hw, DOWAIT, cmd, NULL, NULL, NULL); } static inline int -hfa384x_docmd_async(hfa384x_t *hw, - hfa384x_metacmd_t *cmd, +hfa384x_docmd_async(struct hfa384x *hw, + struct hfa384x_metacmd *cmd, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) { return hfa384x_docmd(hw, DOASYNC, cmd, cmdcb, usercb, usercb_data); } static inline int -hfa384x_dorrid_wait(hfa384x_t *hw, u16 rid, void *riddata, +hfa384x_dorrid_wait(struct hfa384x *hw, u16 rid, void *riddata, unsigned int riddatalen) { return hfa384x_dorrid(hw, DOWAIT, @@ -834,7 +839,7 @@ hfa384x_dorrid_wait(hfa384x_t *hw, u16 rid, void *riddata, } static inline int -hfa384x_dorrid_async(hfa384x_t *hw, +hfa384x_dorrid_async(struct hfa384x *hw, u16 rid, void *riddata, unsigned int riddatalen, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) @@ -845,7 +850,7 @@ hfa384x_dorrid_async(hfa384x_t *hw, } static inline int -hfa384x_dowrid_wait(hfa384x_t *hw, u16 rid, void *riddata, +hfa384x_dowrid_wait(struct hfa384x *hw, u16 rid, void *riddata, unsigned int riddatalen) { return hfa384x_dowrid(hw, DOWAIT, @@ -853,7 +858,7 @@ hfa384x_dowrid_wait(hfa384x_t *hw, u16 rid, void *riddata, } static inline int -hfa384x_dowrid_async(hfa384x_t *hw, +hfa384x_dowrid_async(struct hfa384x *hw, u16 rid, void *riddata, unsigned int riddatalen, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) @@ -864,7 +869,7 @@ hfa384x_dowrid_async(hfa384x_t *hw, } static inline int -hfa384x_dormem_wait(hfa384x_t *hw, +hfa384x_dormem_wait(struct hfa384x *hw, u16 page, u16 offset, void *data, unsigned int len) { return hfa384x_dormem(hw, DOWAIT, @@ -872,7 +877,7 @@ hfa384x_dormem_wait(hfa384x_t *hw, } static inline int -hfa384x_dormem_async(hfa384x_t *hw, +hfa384x_dormem_async(struct hfa384x *hw, u16 page, u16 offset, void *data, unsigned int len, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) @@ -883,7 +888,7 @@ hfa384x_dormem_async(hfa384x_t *hw, } static inline int -hfa384x_dowmem_wait(hfa384x_t *hw, +hfa384x_dowmem_wait(struct hfa384x *hw, u16 page, u16 offset, void *data, unsigned int len) { return hfa384x_dowmem(hw, DOWAIT, @@ -891,7 +896,7 @@ hfa384x_dowmem_wait(hfa384x_t *hw, } static inline int -hfa384x_dowmem_async(hfa384x_t *hw, +hfa384x_dowmem_async(struct hfa384x *hw, u16 page, u16 offset, void *data, @@ -923,11 +928,11 @@ hfa384x_dowmem_async(hfa384x_t *hw, * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_cmd_initialize(hfa384x_t *hw) +int hfa384x_cmd_initialize(struct hfa384x *hw) { int result = 0; int i; - hfa384x_metacmd_t cmd; + struct hfa384x_metacmd cmd; cmd.cmd = HFA384x_CMDCODE_INIT; cmd.parm0 = 0; @@ -969,9 +974,9 @@ int hfa384x_cmd_initialize(hfa384x_t *hw) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) +int hfa384x_cmd_disable(struct hfa384x *hw, u16 macport) { - hfa384x_metacmd_t cmd; + struct hfa384x_metacmd cmd; cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) | HFA384x_CMD_MACPORT_SET(macport); @@ -1002,9 +1007,9 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) +int hfa384x_cmd_enable(struct hfa384x *hw, u16 macport) { - hfa384x_metacmd_t cmd; + struct hfa384x_metacmd cmd; cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) | HFA384x_CMD_MACPORT_SET(macport); @@ -1044,9 +1049,9 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) +int hfa384x_cmd_monitor(struct hfa384x *hw, u16 enable) { - hfa384x_metacmd_t cmd; + struct hfa384x_metacmd cmd; cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) | HFA384x_CMD_AINFO_SET(enable); @@ -1095,10 +1100,10 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, +int hfa384x_cmd_download(struct hfa384x *hw, u16 mode, u16 lowaddr, u16 highaddr, u16 codelen) { - hfa384x_metacmd_t cmd; + struct hfa384x_metacmd cmd; pr_debug("mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n", mode, lowaddr, highaddr, codelen); @@ -1136,7 +1141,8 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis) +int hfa384x_corereset(struct hfa384x *hw, int holdtime, int settletime, + int genesis) { int result; @@ -1173,8 +1179,8 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis) * Call context: * process ----------------------------------------------------------------*/ -static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw, - hfa384x_usbctlx_t *ctlx, +static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw, + struct hfa384x_usbctlx *ctlx, struct usbctlx_completor *completor) { unsigned long flags; @@ -1289,13 +1295,13 @@ cleanup: * process ----------------------------------------------------------------*/ static int -hfa384x_docmd(hfa384x_t *hw, +hfa384x_docmd(struct hfa384x *hw, enum cmd_mode mode, - hfa384x_metacmd_t *cmd, + struct hfa384x_metacmd *cmd, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) { int result; - hfa384x_usbctlx_t *ctlx; + struct hfa384x_usbctlx *ctlx; ctlx = usbctlx_alloc(); if (!ctlx) { @@ -1377,7 +1383,7 @@ done: * process (DOWAIT or DOASYNC) ----------------------------------------------------------------*/ static int -hfa384x_dorrid(hfa384x_t *hw, +hfa384x_dorrid(struct hfa384x *hw, enum cmd_mode mode, u16 rid, void *riddata, @@ -1385,7 +1391,7 @@ hfa384x_dorrid(hfa384x_t *hw, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) { int result; - hfa384x_usbctlx_t *ctlx; + struct hfa384x_usbctlx *ctlx; ctlx = usbctlx_alloc(); if (!ctlx) { @@ -1458,7 +1464,7 @@ done: * process (DOWAIT or DOASYNC) ----------------------------------------------------------------*/ static int -hfa384x_dowrid(hfa384x_t *hw, +hfa384x_dowrid(struct hfa384x *hw, enum cmd_mode mode, u16 rid, void *riddata, @@ -1466,7 +1472,7 @@ hfa384x_dowrid(hfa384x_t *hw, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) { int result; - hfa384x_usbctlx_t *ctlx; + struct hfa384x_usbctlx *ctlx; ctlx = usbctlx_alloc(); if (!ctlx) { @@ -1497,7 +1503,7 @@ hfa384x_dowrid(hfa384x_t *hw, kfree(ctlx); } else if (mode == DOWAIT) { struct usbctlx_cmd_completor completor; - hfa384x_cmdresult_t wridresult; + struct hfa384x_cmdresult wridresult; result = hfa384x_usbctlx_complete_sync(hw, ctlx, @@ -1545,7 +1551,7 @@ done: * process (DOWAIT or DOASYNC) ----------------------------------------------------------------*/ static int -hfa384x_dormem(hfa384x_t *hw, +hfa384x_dormem(struct hfa384x *hw, enum cmd_mode mode, u16 page, u16 offset, @@ -1554,7 +1560,7 @@ hfa384x_dormem(hfa384x_t *hw, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) { int result; - hfa384x_usbctlx_t *ctlx; + struct hfa384x_usbctlx *ctlx; ctlx = usbctlx_alloc(); if (!ctlx) { @@ -1636,7 +1642,7 @@ done: * process (DOWAIT or DOASYNC) ----------------------------------------------------------------*/ static int -hfa384x_dowmem(hfa384x_t *hw, +hfa384x_dowmem(struct hfa384x *hw, enum cmd_mode mode, u16 page, u16 offset, @@ -1645,7 +1651,7 @@ hfa384x_dowmem(hfa384x_t *hw, ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) { int result; - hfa384x_usbctlx_t *ctlx; + struct hfa384x_usbctlx *ctlx; pr_debug("page=0x%04x offset=0x%04x len=%d\n", page, offset, len); @@ -1679,7 +1685,7 @@ hfa384x_dowmem(hfa384x_t *hw, kfree(ctlx); } else if (mode == DOWAIT) { struct usbctlx_cmd_completor completor; - hfa384x_cmdresult_t wmemresult; + struct hfa384x_cmdresult wmemresult; result = hfa384x_usbctlx_complete_sync(hw, ctlx, @@ -1715,7 +1721,7 @@ done: * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport) +int hfa384x_drvr_disable(struct hfa384x *hw, u16 macport) { int result = 0; @@ -1753,7 +1759,7 @@ int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport) +int hfa384x_drvr_enable(struct hfa384x *hw, u16 macport) { int result = 0; @@ -1790,7 +1796,7 @@ int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) +int hfa384x_drvr_flashdl_enable(struct hfa384x *hw) { int result = 0; int i; @@ -1849,7 +1855,7 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_flashdl_disable(hfa384x_t *hw) +int hfa384x_drvr_flashdl_disable(struct hfa384x *hw) { /* Check that we're already in the download state */ if (hw->dlstate != HFA384x_DLSTATE_FLASHENABLED) @@ -1894,7 +1900,8 @@ int hfa384x_drvr_flashdl_disable(hfa384x_t *hw) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_flashdl_write(hfa384x_t *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; @@ -2032,7 +2039,7 @@ exit_proc: * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len) +int hfa384x_drvr_getconfig(struct hfa384x *hw, u16 rid, void *buf, u16 len) { return hfa384x_dorrid_wait(hw, rid, buf, len); } @@ -2061,7 +2068,7 @@ int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len) * process ----------------------------------------------------------------*/ 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) @@ -2088,7 +2095,7 @@ hfa384x_drvr_setconfig_async(hfa384x_t *hw, * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_ramdl_disable(hfa384x_t *hw) +int hfa384x_drvr_ramdl_disable(struct hfa384x *hw) { /* Check that we're already in the download state */ if (hw->dlstate != HFA384x_DLSTATE_RAMENABLED) @@ -2128,7 +2135,7 @@ int hfa384x_drvr_ramdl_disable(hfa384x_t *hw) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr) +int hfa384x_drvr_ramdl_enable(struct hfa384x *hw, u32 exeaddr) { int result = 0; u16 lowaddr; @@ -2196,7 +2203,8 @@ int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) +int hfa384x_drvr_ramdl_write(struct hfa384x *hw, u32 daddr, void *buf, + u32 len) { int result = 0; int nwrites; @@ -2276,7 +2284,7 @@ int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) * Call context: * process or non-card interrupt. ----------------------------------------------------------------*/ -int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) +int hfa384x_drvr_readpda(struct hfa384x *hw, void *buf, unsigned int len) { int result = 0; u16 *pda = buf; @@ -2386,7 +2394,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len) +int hfa384x_drvr_setconfig(struct hfa384x *hw, u16 rid, void *buf, u16 len) { return hfa384x_dowrid_wait(hw, rid, buf, len); } @@ -2411,7 +2419,7 @@ int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len) * process ----------------------------------------------------------------*/ -int hfa384x_drvr_start(hfa384x_t *hw) +int hfa384x_drvr_start(struct hfa384x *hw) { int result, result1, result2; u16 status; @@ -2512,7 +2520,7 @@ done: * Call context: * process ----------------------------------------------------------------*/ -int hfa384x_drvr_stop(hfa384x_t *hw) +int hfa384x_drvr_stop(struct hfa384x *hw) { int i; @@ -2562,11 +2570,11 @@ int hfa384x_drvr_stop(hfa384x_t *hw) * Call context: * interrupt ----------------------------------------------------------------*/ -int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, +int hfa384x_drvr_txframe(struct hfa384x *hw, struct sk_buff *skb, union p80211_hdr *p80211_hdr, struct p80211_metawep *p80211_wep) { - int usbpktlen = sizeof(hfa384x_tx_frame_t); + int usbpktlen = sizeof(struct hfa384x_tx_frame); int result; int ret; char *ptr; @@ -2656,9 +2664,9 @@ exit: return result; } -void hfa384x_tx_timeout(wlandevice_t *wlandev) +void hfa384x_tx_timeout(struct wlandevice *wlandev) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; unsigned long flags; spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -2681,7 +2689,7 @@ void hfa384x_tx_timeout(wlandevice_t *wlandev) * Tasklet to delete dead CTLX objects * * Arguments: -* data ptr to a hfa384x_t +* data ptr to a struct hfa384x * * Returns: * @@ -2690,8 +2698,8 @@ void hfa384x_tx_timeout(wlandevice_t *wlandev) ----------------------------------------------------------------*/ static void hfa384x_usbctlx_reaper_task(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *)data; - hfa384x_usbctlx_t *ctlx, *temp; + struct hfa384x *hw = (struct hfa384x *)data; + struct hfa384x_usbctlx *ctlx, *temp; unsigned long flags; spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -2713,7 +2721,7 @@ static void hfa384x_usbctlx_reaper_task(unsigned long data) * Tasklet to call completion handlers for returned CTLXs * * Arguments: -* data ptr to hfa384x_t +* data ptr to struct hfa384x * * Returns: * Nothing @@ -2723,8 +2731,8 @@ static void hfa384x_usbctlx_reaper_task(unsigned long data) ----------------------------------------------------------------*/ static void hfa384x_usbctlx_completion_task(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *)data; - hfa384x_usbctlx_t *ctlx, *temp; + struct hfa384x *hw = (struct hfa384x *)data; + struct hfa384x_usbctlx *ctlx, *temp; unsigned long flags; int reap = 0; @@ -2787,7 +2795,7 @@ static void hfa384x_usbctlx_completion_task(unsigned long data) * next command on the queue is run afterwards. * * Arguments: -* hw ptr to the hfa384x_t structure +* hw ptr to the struct hfa384x structure * ctlx ptr to a CTLX structure * * Returns: @@ -2797,8 +2805,8 @@ static void hfa384x_usbctlx_completion_task(unsigned long data) * Call context: * Either process or interrupt, but presumably interrupt ----------------------------------------------------------------*/ -static int unlocked_usbctlx_cancel_async(hfa384x_t *hw, - hfa384x_usbctlx_t *ctlx) +static int unlocked_usbctlx_cancel_async(struct hfa384x *hw, + struct hfa384x_usbctlx *ctlx) { int ret; @@ -2836,7 +2844,7 @@ static int unlocked_usbctlx_cancel_async(hfa384x_t *hw, * tasklet is scheduled. * * Arguments: -* hw ptr to a hfa384x_t structure +* hw ptr to a struct hfa384x structure * ctlx ptr to a ctlx structure * * Returns: @@ -2847,7 +2855,8 @@ static int unlocked_usbctlx_cancel_async(hfa384x_t *hw, * Call context: * Either, assume interrupt ----------------------------------------------------------------*/ -static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *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" @@ -2876,7 +2885,7 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) * Checks to see if the head item is running. If not, starts it. * * Arguments: -* hw ptr to hfa384x_t +* hw ptr to struct hfa384x * * Returns: * nothing @@ -2886,7 +2895,7 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) * Call context: * any ----------------------------------------------------------------*/ -static void hfa384x_usbctlxq_run(hfa384x_t *hw) +static void hfa384x_usbctlxq_run(struct hfa384x *hw) { unsigned long flags; @@ -2905,12 +2914,12 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw) goto unlock; while (!list_empty(&hw->ctlxq.pending)) { - hfa384x_usbctlx_t *head; + struct hfa384x_usbctlx *head; int result; /* This is the first pending command */ head = list_entry(hw->ctlxq.pending.next, - hfa384x_usbctlx_t, list); + struct hfa384x_usbctlx, list); /* We need to split this off to avoid a race condition */ list_move_tail(&head->list, &hw->ctlxq.active); @@ -2988,9 +2997,10 @@ unlock: ----------------------------------------------------------------*/ static void hfa384x_usbin_callback(struct urb *urb) { - wlandevice_t *wlandev = urb->context; - hfa384x_t *hw; - hfa384x_usbin_t *usbin = (hfa384x_usbin_t *)urb->transfer_buffer; + struct wlandevice *wlandev = urb->context; + struct hfa384x *hw; + union hfa384x_usbin *usbin = + (union hfa384x_usbin *)urb->transfer_buffer; struct sk_buff *skb = NULL; int result; int urb_status; @@ -3154,7 +3164,7 @@ exit: * queue and our state updated accordingly. * * Arguments: -* hw ptr to hfa384x_t +* hw ptr to struct hfa384x * usbin ptr to USB IN packet * urb_status status of this Bulk-In URB * @@ -3166,10 +3176,10 @@ exit: * Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin, +static void hfa384x_usbin_ctlx(struct hfa384x *hw, union hfa384x_usbin *usbin, int urb_status) { - hfa384x_usbctlx_t *ctlx; + struct hfa384x_usbctlx *ctlx; int run_queue = 0; unsigned long flags; @@ -3285,8 +3295,8 @@ unlock: * Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_usbin_txcompl(wlandevice_t *wlandev, - hfa384x_usbin_t *usbin) +static void hfa384x_usbin_txcompl(struct wlandevice *wlandev, + union hfa384x_usbin *usbin) { u16 status; @@ -3316,10 +3326,10 @@ static void hfa384x_usbin_txcompl(wlandevice_t *wlandev, * Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) +static void hfa384x_usbin_rx(struct wlandevice *wlandev, struct sk_buff *skb) { - hfa384x_usbin_t *usbin = (hfa384x_usbin_t *)skb->data; - hfa384x_t *hw = wlandev->priv; + union hfa384x_usbin *usbin = (union hfa384x_usbin *)skb->data; + struct hfa384x *hw = wlandev->priv; int hdrlen; struct p80211_rxmeta *rxmeta; u16 data_len; @@ -3346,7 +3356,7 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) hdrlen = p80211_headerlen(fc); /* Pull off the descriptor */ - skb_pull(skb, sizeof(hfa384x_rx_frame_t)); + skb_pull(skb, sizeof(struct hfa384x_rx_frame)); /* Now shunt the header block up against the data block * with an "overlapping" copy @@ -3416,17 +3426,17 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb) * Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, - hfa384x_usb_rxfrm_t *rxfrm) +static void hfa384x_int_rxmonitor(struct wlandevice *wlandev, + struct hfa384x_usb_rxfrm *rxfrm) { - hfa384x_rx_frame_t *rxdesc = &(rxfrm->desc); + struct hfa384x_rx_frame *rxdesc = &rxfrm->desc; unsigned int hdrlen = 0; unsigned int datalen = 0; unsigned int skblen = 0; u8 *datap; u16 fc; struct sk_buff *skb; - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; /* Remember the status, time, and data_len fields are in host order */ /* Figure out how big the frame is */ @@ -3517,7 +3527,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, * Call context: * interrupt ----------------------------------------------------------------*/ -static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t *usbin) +static void hfa384x_usbin_info(struct wlandevice *wlandev, + union hfa384x_usbin *usbin) { usbin->infofrm.info.framelen = le16_to_cpu(usbin->infofrm.info.framelen); @@ -3542,7 +3553,7 @@ static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t *usbin) ----------------------------------------------------------------*/ static void hfa384x_usbout_callback(struct urb *urb) { - wlandevice_t *wlandev = urb->context; + struct wlandevice *wlandev = urb->context; #ifdef DEBUG_USB dbprint_urb(urb); @@ -3556,7 +3567,7 @@ static void hfa384x_usbout_callback(struct urb *urb) case -EPIPE: { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; netdev_warn(hw->wlandev->netdev, "%s tx pipe stalled: requesting reset\n", @@ -3572,7 +3583,7 @@ static void hfa384x_usbout_callback(struct urb *urb) case -ETIMEDOUT: case -EILSEQ: { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; if (!test_and_set_bit (THROTTLE_TX, &hw->usb_flags) && @@ -3617,11 +3628,11 @@ static void hfa384x_usbout_callback(struct urb *urb) ----------------------------------------------------------------*/ static void hfa384x_ctlxout_callback(struct urb *urb) { - hfa384x_t *hw = urb->context; + struct hfa384x *hw = urb->context; int delete_resptimer = 0; int timer_ok = 1; int run_queue = 0; - hfa384x_usbctlx_t *ctlx; + struct hfa384x_usbctlx *ctlx; unsigned long flags; pr_debug("urb->status=%d\n", urb->status); @@ -3736,7 +3747,7 @@ delresp: * URB containing a Prism2.x XXX_Request was never called. * * Arguments: -* data a ptr to the hfa384x_t +* data a ptr to the struct hfa384x * * Returns: * nothing @@ -3748,7 +3759,7 @@ delresp: ----------------------------------------------------------------*/ static void hfa384x_usbctlx_reqtimerfn(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *)data; + struct hfa384x *hw = (struct hfa384x *)data; unsigned long flags; spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -3765,7 +3776,7 @@ static void hfa384x_usbctlx_reqtimerfn(unsigned long data) */ hw->ctlx_urb.transfer_flags |= URB_ASYNC_UNLINK; if (usb_unlink_urb(&hw->ctlx_urb) == -EINPROGRESS) { - hfa384x_usbctlx_t *ctlx = get_active_ctlx(hw); + struct hfa384x_usbctlx *ctlx = get_active_ctlx(hw); ctlx->state = CTLX_REQ_FAILED; @@ -3794,7 +3805,7 @@ static void hfa384x_usbctlx_reqtimerfn(unsigned long data) * URB containing a Prism2.x XXX_Response was never called. * * Arguments: -* data a ptr to the hfa384x_t +* data a ptr to the struct hfa384x * * Returns: * nothing @@ -3806,7 +3817,7 @@ static void hfa384x_usbctlx_reqtimerfn(unsigned long data) ----------------------------------------------------------------*/ static void hfa384x_usbctlx_resptimerfn(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *)data; + struct hfa384x *hw = (struct hfa384x *)data; unsigned long flags; spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -3817,7 +3828,7 @@ static void hfa384x_usbctlx_resptimerfn(unsigned long data) * adapter has been unplugged ... */ if (!list_empty(&hw->ctlxq.active)) { - hfa384x_usbctlx_t *ctlx = get_active_ctlx(hw); + struct hfa384x_usbctlx *ctlx = get_active_ctlx(hw); if (unlocked_usbctlx_cancel_async(hw, ctlx) == 0) { spin_unlock_irqrestore(&hw->ctlxq.lock, flags); @@ -3845,7 +3856,7 @@ static void hfa384x_usbctlx_resptimerfn(unsigned long data) ----------------------------------------------------------------*/ static void hfa384x_usb_throttlefn(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *)data; + struct hfa384x *hw = (struct hfa384x *)data; unsigned long flags; spin_lock_irqsave(&hw->ctlxq.lock, flags); @@ -3885,7 +3896,8 @@ static void hfa384x_usb_throttlefn(unsigned long data) * Call context: * process or interrupt ----------------------------------------------------------------*/ -static int hfa384x_usbctlx_submit(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) +static int hfa384x_usbctlx_submit(struct hfa384x *hw, + struct hfa384x_usbctlx *ctlx) { unsigned long flags; diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 6354036..0247cbc 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -104,7 +104,7 @@ static const u8 oui_8021h[] = { 0x00, 0x00, 0xf8 }; * May be called in interrupt or non-interrupt context *---------------------------------------------------------------- */ -int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv, +int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv, struct sk_buff *skb, union p80211_hdr *p80211_hdr, struct p80211_metawep *p80211_wep) { @@ -232,7 +232,7 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv, } /* jkriegl: from orinoco, modified */ -static void orinoco_spy_gather(wlandevice_t *wlandev, char *mac, +static void orinoco_spy_gather(struct wlandevice *wlandev, char *mac, struct p80211_rxmeta *rxmeta) { int i; @@ -274,10 +274,10 @@ static void orinoco_spy_gather(wlandevice_t *wlandev, char *mac, * May be called in interrupt or non-interrupt context *---------------------------------------------------------------- */ -int skb_p80211_to_ether(wlandevice_t *wlandev, u32 ethconv, +int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, struct sk_buff *skb) { - netdevice_t *netdev = wlandev->netdev; + struct net_device *netdev = wlandev->netdev; u16 fc; unsigned int payload_length; unsigned int payload_offset; diff --git a/drivers/staging/wlan-ng/p80211metastruct.h b/drivers/staging/wlan-ng/p80211metastruct.h index c501162..850d897 100644 --- a/drivers/staging/wlan-ng/p80211metastruct.h +++ b/drivers/staging/wlan-ng/p80211metastruct.h @@ -51,221 +51,221 @@ struct p80211msg_dot11req_mibget { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_unk392_t mibattribute; - p80211item_uint32_t resultcode; + struct p80211item_unk392 mibattribute; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_dot11req_mibset { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_unk392_t mibattribute; - p80211item_uint32_t resultcode; + struct p80211item_unk392 mibattribute; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_dot11req_scan { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t bsstype; - p80211item_pstr6_t bssid; + struct p80211item_uint32 bsstype; + struct p80211item_pstr6 bssid; u8 pad_0C[1]; - p80211item_pstr32_t ssid; + struct p80211item_pstr32 ssid; u8 pad_1D[3]; - p80211item_uint32_t scantype; - p80211item_uint32_t probedelay; - p80211item_pstr14_t channellist; + struct p80211item_uint32 scantype; + struct p80211item_uint32 probedelay; + struct p80211item_pstr14 channellist; u8 pad_2C[1]; - p80211item_uint32_t minchanneltime; - p80211item_uint32_t maxchanneltime; - p80211item_uint32_t resultcode; - p80211item_uint32_t numbss; - p80211item_uint32_t append; + struct p80211item_uint32 minchanneltime; + struct p80211item_uint32 maxchanneltime; + struct p80211item_uint32 resultcode; + struct p80211item_uint32 numbss; + struct p80211item_uint32 append; } __packed; struct p80211msg_dot11req_scan_results { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t bssindex; - p80211item_uint32_t resultcode; - p80211item_uint32_t signal; - p80211item_uint32_t noise; - p80211item_pstr6_t bssid; + struct p80211item_uint32 bssindex; + struct p80211item_uint32 resultcode; + struct p80211item_uint32 signal; + struct p80211item_uint32 noise; + struct p80211item_pstr6 bssid; u8 pad_3C[1]; - p80211item_pstr32_t ssid; + struct p80211item_pstr32 ssid; u8 pad_4D[3]; - p80211item_uint32_t bsstype; - p80211item_uint32_t beaconperiod; - p80211item_uint32_t dtimperiod; - p80211item_uint32_t timestamp; - p80211item_uint32_t localtime; - p80211item_uint32_t fhdwelltime; - p80211item_uint32_t fhhopset; - p80211item_uint32_t fhhoppattern; - p80211item_uint32_t fhhopindex; - p80211item_uint32_t dschannel; - p80211item_uint32_t cfpcount; - p80211item_uint32_t cfpperiod; - p80211item_uint32_t cfpmaxduration; - p80211item_uint32_t cfpdurremaining; - p80211item_uint32_t ibssatimwindow; - p80211item_uint32_t cfpollable; - p80211item_uint32_t cfpollreq; - p80211item_uint32_t privacy; - p80211item_uint32_t capinfo; - p80211item_uint32_t basicrate1; - p80211item_uint32_t basicrate2; - p80211item_uint32_t basicrate3; - p80211item_uint32_t basicrate4; - p80211item_uint32_t basicrate5; - p80211item_uint32_t basicrate6; - p80211item_uint32_t basicrate7; - p80211item_uint32_t basicrate8; - p80211item_uint32_t supprate1; - p80211item_uint32_t supprate2; - p80211item_uint32_t supprate3; - p80211item_uint32_t supprate4; - p80211item_uint32_t supprate5; - p80211item_uint32_t supprate6; - p80211item_uint32_t supprate7; - p80211item_uint32_t supprate8; + struct p80211item_uint32 bsstype; + struct p80211item_uint32 beaconperiod; + struct p80211item_uint32 dtimperiod; + struct p80211item_uint32 timestamp; + struct p80211item_uint32 localtime; + struct p80211item_uint32 fhdwelltime; + struct p80211item_uint32 fhhopset; + struct p80211item_uint32 fhhoppattern; + struct p80211item_uint32 fhhopindex; + struct p80211item_uint32 dschannel; + struct p80211item_uint32 cfpcount; + struct p80211item_uint32 cfpperiod; + struct p80211item_uint32 cfpmaxduration; + struct p80211item_uint32 cfpdurremaining; + struct p80211item_uint32 ibssatimwindow; + struct p80211item_uint32 cfpollable; + struct p80211item_uint32 cfpollreq; + struct p80211item_uint32 privacy; + struct p80211item_uint32 capinfo; + struct p80211item_uint32 basicrate1; + struct p80211item_uint32 basicrate2; + struct p80211item_uint32 basicrate3; + struct p80211item_uint32 basicrate4; + struct p80211item_uint32 basicrate5; + struct p80211item_uint32 basicrate6; + struct p80211item_uint32 basicrate7; + struct p80211item_uint32 basicrate8; + struct p80211item_uint32 supprate1; + struct p80211item_uint32 supprate2; + struct p80211item_uint32 supprate3; + struct p80211item_uint32 supprate4; + struct p80211item_uint32 supprate5; + struct p80211item_uint32 supprate6; + struct p80211item_uint32 supprate7; + struct p80211item_uint32 supprate8; } __packed; struct p80211msg_dot11req_start { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_pstr32_t ssid; + struct p80211item_pstr32 ssid; u8 pad_12D[3]; - p80211item_uint32_t bsstype; - p80211item_uint32_t beaconperiod; - p80211item_uint32_t dtimperiod; - p80211item_uint32_t cfpperiod; - p80211item_uint32_t cfpmaxduration; - p80211item_uint32_t fhdwelltime; - p80211item_uint32_t fhhopset; - p80211item_uint32_t fhhoppattern; - p80211item_uint32_t dschannel; - p80211item_uint32_t ibssatimwindow; - p80211item_uint32_t probedelay; - p80211item_uint32_t cfpollable; - p80211item_uint32_t cfpollreq; - p80211item_uint32_t basicrate1; - p80211item_uint32_t basicrate2; - p80211item_uint32_t basicrate3; - p80211item_uint32_t basicrate4; - p80211item_uint32_t basicrate5; - p80211item_uint32_t basicrate6; - p80211item_uint32_t basicrate7; - p80211item_uint32_t basicrate8; - p80211item_uint32_t operationalrate1; - p80211item_uint32_t operationalrate2; - p80211item_uint32_t operationalrate3; - p80211item_uint32_t operationalrate4; - p80211item_uint32_t operationalrate5; - p80211item_uint32_t operationalrate6; - p80211item_uint32_t operationalrate7; - p80211item_uint32_t operationalrate8; - p80211item_uint32_t resultcode; + struct p80211item_uint32 bsstype; + struct p80211item_uint32 beaconperiod; + struct p80211item_uint32 dtimperiod; + struct p80211item_uint32 cfpperiod; + struct p80211item_uint32 cfpmaxduration; + struct p80211item_uint32 fhdwelltime; + struct p80211item_uint32 fhhopset; + struct p80211item_uint32 fhhoppattern; + struct p80211item_uint32 dschannel; + struct p80211item_uint32 ibssatimwindow; + struct p80211item_uint32 probedelay; + struct p80211item_uint32 cfpollable; + struct p80211item_uint32 cfpollreq; + struct p80211item_uint32 basicrate1; + struct p80211item_uint32 basicrate2; + struct p80211item_uint32 basicrate3; + struct p80211item_uint32 basicrate4; + struct p80211item_uint32 basicrate5; + struct p80211item_uint32 basicrate6; + struct p80211item_uint32 basicrate7; + struct p80211item_uint32 basicrate8; + struct p80211item_uint32 operationalrate1; + struct p80211item_uint32 operationalrate2; + struct p80211item_uint32 operationalrate3; + struct p80211item_uint32 operationalrate4; + struct p80211item_uint32 operationalrate5; + struct p80211item_uint32 operationalrate6; + struct p80211item_uint32 operationalrate7; + struct p80211item_uint32 operationalrate8; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_lnxreq_ifstate { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t ifstate; - p80211item_uint32_t resultcode; + struct p80211item_uint32 ifstate; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_lnxreq_wlansniff { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t enable; - p80211item_uint32_t channel; - p80211item_uint32_t prismheader; - p80211item_uint32_t wlanheader; - p80211item_uint32_t keepwepflags; - p80211item_uint32_t stripfcs; - p80211item_uint32_t packet_trunc; - p80211item_uint32_t resultcode; + struct p80211item_uint32 enable; + struct p80211item_uint32 channel; + struct p80211item_uint32 prismheader; + struct p80211item_uint32 wlanheader; + struct p80211item_uint32 keepwepflags; + struct p80211item_uint32 stripfcs; + struct p80211item_uint32 packet_trunc; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_lnxreq_hostwep { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t resultcode; - p80211item_uint32_t decrypt; - p80211item_uint32_t encrypt; + struct p80211item_uint32 resultcode; + struct p80211item_uint32 decrypt; + struct p80211item_uint32 encrypt; } __packed; struct p80211msg_lnxreq_commsquality { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t resultcode; - p80211item_uint32_t dbm; - p80211item_uint32_t link; - p80211item_uint32_t level; - p80211item_uint32_t noise; - p80211item_uint32_t txrate; + struct p80211item_uint32 resultcode; + struct p80211item_uint32 dbm; + struct p80211item_uint32 link; + struct p80211item_uint32 level; + struct p80211item_uint32 noise; + struct p80211item_uint32 txrate; } __packed; struct p80211msg_lnxreq_autojoin { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_pstr32_t ssid; + struct p80211item_pstr32 ssid; u8 pad_19D[3]; - p80211item_uint32_t authtype; - p80211item_uint32_t resultcode; + struct p80211item_uint32 authtype; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_p2req_readpda { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_unk1024_t pda; - p80211item_uint32_t resultcode; + struct p80211item_unk1024 pda; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_p2req_ramdl_state { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t enable; - p80211item_uint32_t exeaddr; - p80211item_uint32_t resultcode; + struct p80211item_uint32 enable; + struct p80211item_uint32 exeaddr; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_p2req_ramdl_write { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t addr; - p80211item_uint32_t len; - p80211item_unk4096_t data; - p80211item_uint32_t resultcode; + struct p80211item_uint32 addr; + struct p80211item_uint32 len; + struct p80211item_unk4096 data; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_p2req_flashdl_state { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t enable; - p80211item_uint32_t resultcode; + struct p80211item_uint32 enable; + struct p80211item_uint32 resultcode; } __packed; struct p80211msg_p2req_flashdl_write { u32 msgcode; u32 msglen; u8 devname[WLAN_DEVNAMELEN_MAX]; - p80211item_uint32_t addr; - p80211item_uint32_t len; - p80211item_unk4096_t data; - p80211item_uint32_t resultcode; + struct p80211item_uint32 addr; + struct p80211item_uint32 len; + struct p80211item_unk4096 data; + struct p80211item_uint32 resultcode; } __packed; #endif diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 90cc8cd..f62abd5 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -91,17 +91,17 @@ #include "cfg80211.c" /* netdevice method functions */ -static int p80211knetdev_init(netdevice_t *netdev); -static int p80211knetdev_open(netdevice_t *netdev); -static int p80211knetdev_stop(netdevice_t *netdev); +static int p80211knetdev_init(struct net_device *netdev); +static int p80211knetdev_open(struct net_device *netdev); +static int p80211knetdev_stop(struct net_device *netdev); static int p80211knetdev_hard_start_xmit(struct sk_buff *skb, - netdevice_t *netdev); -static void p80211knetdev_set_multicast_list(netdevice_t *dev); -static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, + struct net_device *netdev); +static void p80211knetdev_set_multicast_list(struct net_device *dev); +static int p80211knetdev_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); -static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr); -static void p80211knetdev_tx_timeout(netdevice_t *netdev); -static int p80211_rx_typedrop(wlandevice_t *wlandev, u16 fc); +static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr); +static void p80211knetdev_tx_timeout(struct net_device *netdev); +static int p80211_rx_typedrop(struct wlandevice *wlandev, u16 fc); int wlan_watchdog = 5000; module_param(wlan_watchdog, int, 0644); @@ -123,7 +123,7 @@ MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions"); * Returns: * nothing ----------------------------------------------------------------*/ -static int p80211knetdev_init(netdevice_t *netdev) +static int p80211knetdev_init(struct net_device *netdev) { /* Called in response to register_netdev */ /* This is usually the probe function, but the probe has */ @@ -146,10 +146,10 @@ static int p80211knetdev_init(netdevice_t *netdev) * Returns: * zero on success, non-zero otherwise ----------------------------------------------------------------*/ -static int p80211knetdev_open(netdevice_t *netdev) +static int p80211knetdev_open(struct net_device *netdev) { int result = 0; /* success */ - wlandevice_t *wlandev = netdev->ml_priv; + struct wlandevice *wlandev = netdev->ml_priv; /* Check to make sure the MSD is running */ if (wlandev->msdstate != WLAN_MSD_RUNNING) @@ -181,10 +181,10 @@ static int p80211knetdev_open(netdevice_t *netdev) * Returns: * zero on success, non-zero otherwise ----------------------------------------------------------------*/ -static int p80211knetdev_stop(netdevice_t *netdev) +static int p80211knetdev_stop(struct net_device *netdev) { int result = 0; - wlandevice_t *wlandev = netdev->ml_priv; + struct wlandevice *wlandev = netdev->ml_priv; if (wlandev->close) result = wlandev->close(wlandev); @@ -208,7 +208,7 @@ static int p80211knetdev_stop(netdevice_t *netdev) * Side effects: * ----------------------------------------------------------------*/ -void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb) +void p80211netdev_rx(struct wlandevice *wlandev, struct sk_buff *skb) { /* Enqueue for post-irq processing */ skb_queue_tail(&wlandev->nsd_rxq, skb); @@ -227,7 +227,8 @@ void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb) * CONV_TO_ETHER_FAILED if conversion failed * CONV_TO_ETHER_SKIPPED if frame is ignored */ -static int p80211_convert_to_ether(wlandevice_t *wlandev, struct sk_buff *skb) +static int p80211_convert_to_ether(struct wlandevice *wlandev, + struct sk_buff *skb) { struct p80211_hdr_a3 *hdr; @@ -265,9 +266,9 @@ static int p80211_convert_to_ether(wlandevice_t *wlandev, struct sk_buff *skb) */ static void p80211netdev_rx_bh(unsigned long arg) { - wlandevice_t *wlandev = (wlandevice_t *) arg; + struct wlandevice *wlandev = (struct wlandevice *)arg; struct sk_buff *skb = NULL; - netdevice_t *dev = wlandev->netdev; + struct net_device *dev = wlandev->netdev; /* Let's empty our our queue */ while ((skb = skb_dequeue(&wlandev->nsd_rxq))) { @@ -318,11 +319,11 @@ static void p80211netdev_rx_bh(unsigned long arg) * zero on success, non-zero on failure. ----------------------------------------------------------------*/ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb, - netdevice_t *netdev) + struct net_device *netdev) { int result = 0; int txresult = -1; - wlandevice_t *wlandev = netdev->ml_priv; + struct wlandevice *wlandev = netdev->ml_priv; union p80211_hdr p80211_hdr; struct p80211_metawep p80211_wep; @@ -446,9 +447,9 @@ failed: * Returns: * nothing ----------------------------------------------------------------*/ -static void p80211knetdev_set_multicast_list(netdevice_t *dev) +static void p80211knetdev_set_multicast_list(struct net_device *dev) { - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; /* TODO: real multicast support as well */ @@ -459,7 +460,8 @@ static void p80211knetdev_set_multicast_list(netdevice_t *dev) #ifdef SIOCETHTOOL -static int p80211netdev_ethtool(wlandevice_t *wlandev, void __user *useraddr) +static int p80211netdev_ethtool(struct wlandevice *wlandev, + void __user *useraddr) { u32 ethcmd; struct ethtool_drvinfo info; @@ -531,11 +533,12 @@ static int p80211netdev_ethtool(wlandevice_t *wlandev, void __user *useraddr) * Process thread (ioctl caller). TODO: SMP support may require * locks. ----------------------------------------------------------------*/ -static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd) +static int p80211knetdev_do_ioctl(struct net_device *dev, struct ifreq *ifr, + int cmd) { int result = 0; struct p80211ioctl_req *req = (struct p80211ioctl_req *) ifr; - wlandevice_t *wlandev = dev->ml_priv; + struct wlandevice *wlandev = dev->ml_priv; u8 *msgbuf; netdev_dbg(dev, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len); @@ -610,13 +613,13 @@ bail: * * by: Collin R. Mulliner <collin@xxxxxxxxxxxx> ----------------------------------------------------------------*/ -static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) +static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr) { struct sockaddr *new_addr = addr; struct p80211msg_dot11req_mibset dot11req; - p80211item_unk392_t *mibattr; - p80211item_pstr6_t *macaddr; - p80211item_uint32_t *resultcode; + struct p80211item_unk392 *mibattr; + struct p80211item_pstr6 *macaddr; + struct p80211item_uint32 *resultcode; int result; /* If we're running, we don't allow MAC address changes */ @@ -625,15 +628,15 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) /* Set up some convenience pointers. */ mibattr = &dot11req.mibattribute; - macaddr = (p80211item_pstr6_t *) &mibattr->data; + macaddr = (struct p80211item_pstr6 *)&mibattr->data; resultcode = &dot11req.resultcode; /* Set up a dot11req_mibset */ memset(&dot11req, 0, sizeof(struct p80211msg_dot11req_mibset)); dot11req.msgcode = DIDmsg_dot11req_mibset; dot11req.msglen = sizeof(struct p80211msg_dot11req_mibset); - memcpy(dot11req.devname, - ((wlandevice_t *) dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1); + memcpy(dot11req.devname, ((struct wlandevice *)dev->ml_priv)->name, + WLAN_DEVNAMELEN_MAX - 1); /* Set up the mibattribute argument */ mibattr->did = DIDmsg_dot11req_mibset_mibattribute; @@ -669,7 +672,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) return result; } -static int wlan_change_mtu(netdevice_t *dev, int new_mtu) +static int wlan_change_mtu(struct net_device *dev, int new_mtu) { /* 2312 is max 802.11 payload, 20 is overhead, (ether + llc +snap) and another 8 for wep. */ @@ -717,10 +720,10 @@ static const struct net_device_ops p80211_netdev_ops = { * compiled drivers, this function will be called in the * context of the kernel startup code. ----------------------------------------------------------------*/ -int wlan_setup(wlandevice_t *wlandev, struct device *physdev) +int wlan_setup(struct wlandevice *wlandev, struct device *physdev) { int result = 0; - netdevice_t *netdev; + struct net_device *netdev; struct wiphy *wiphy; struct wireless_dev *wdev; @@ -783,7 +786,7 @@ int wlan_setup(wlandevice_t *wlandev, struct device *physdev) * compiled drivers, this function will be called in the * context of the kernel startup code. ----------------------------------------------------------------*/ -void wlan_unsetup(wlandevice_t *wlandev) +void wlan_unsetup(struct wlandevice *wlandev) { struct wireless_dev *wdev; @@ -817,7 +820,7 @@ void wlan_unsetup(wlandevice_t *wlandev) * Call Context: * Can be either interrupt or not. ----------------------------------------------------------------*/ -int register_wlandev(wlandevice_t *wlandev) +int register_wlandev(struct wlandevice *wlandev) { return register_netdev(wlandev->netdev); } @@ -839,7 +842,7 @@ int register_wlandev(wlandevice_t *wlandev) * Call Context: * Can be either interrupt or not. ----------------------------------------------------------------*/ -int unregister_wlandev(wlandevice_t *wlandev) +int unregister_wlandev(struct wlandevice *wlandev) { struct sk_buff *skb; @@ -882,7 +885,7 @@ int unregister_wlandev(wlandevice_t *wlandev) * Call context: * Usually interrupt. ----------------------------------------------------------------*/ -void p80211netdev_hwremoved(wlandevice_t *wlandev) +void p80211netdev_hwremoved(struct wlandevice *wlandev) { wlandev->hwremoved = 1; if (wlandev->state == WLAN_DEVICE_OPEN) @@ -912,7 +915,7 @@ void p80211netdev_hwremoved(wlandevice_t *wlandev) * Call context: * interrupt ----------------------------------------------------------------*/ -static int p80211_rx_typedrop(wlandevice_t *wlandev, u16 fc) +static int p80211_rx_typedrop(struct wlandevice *wlandev, u16 fc) { u16 ftype; u16 fstype; @@ -1071,9 +1074,9 @@ static int p80211_rx_typedrop(wlandevice_t *wlandev, u16 fc) return drop; } -static void p80211knetdev_tx_timeout(netdevice_t *netdev) +static void p80211knetdev_tx_timeout(struct net_device *netdev) { - wlandevice_t *wlandev = netdev->ml_priv; + struct wlandevice *wlandev = netdev->ml_priv; if (wlandev->tx_timeout) { wlandev->tx_timeout(wlandev); diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h index 820a0e2..1e6a774 100644 --- a/drivers/staging/wlan-ng/p80211netdev.h +++ b/drivers/staging/wlan-ng/p80211netdev.h @@ -57,9 +57,6 @@ #include <linux/wireless.h> #include <linux/netdevice.h> -#undef netdevice_t -typedef struct net_device netdevice_t; - #define WLAN_RELEASE "0.3.0-staging" #define WLAN_DEVICE_CLOSED 0 @@ -101,7 +98,7 @@ typedef struct net_device netdevice_t; #define P80211_NSDCAP_NOSCAN 0x200 /* nsd can scan */ /* Received frame statistics */ -typedef struct p80211_frmrx_t { +struct p80211_frmrx { u32 mgmt; u32 assocreq; u32 assocresp; @@ -135,10 +132,10 @@ typedef struct p80211_frmrx_t { u32 data_unknown; u32 decrypt; u32 decrypt_err; -} p80211_frmrx_t; +}; /* called by /proc/net/wireless */ -struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t *dev); +struct iw_statistics *p80211wext_get_wireless_stats(struct net_device *dev); /* wireless extensions' ioctls */ extern struct iw_handler_def p80211wext_handler_def; @@ -157,7 +154,7 @@ extern int wlan_watchdog; extern int wlan_wext_write; /* WLAN device type */ -typedef struct wlandevice { +struct wlandevice { void *priv; /* private data for MSD */ /* Subsystem State */ @@ -186,12 +183,12 @@ typedef struct wlandevice { struct p80211_metawep *p80211_wep); int (*mlmerequest)(struct wlandevice *wlandev, struct p80211msg *msg); int (*set_multicast_list)(struct wlandevice *wlandev, - netdevice_t *dev); + struct net_device *dev); void (*tx_timeout)(struct wlandevice *wlandev); /* 802.11 State */ u8 bssid[WLAN_BSSID_LEN]; - p80211pstr32_t ssid; + struct p80211pstr32 ssid; u32 macmode; int linkstatus; @@ -206,7 +203,7 @@ typedef struct wlandevice { /* netlink socket */ /* queue for indications waiting for cmd completion */ /* Linux netdevice and support */ - netdevice_t *netdev; /* ptr to linux netdevice */ + struct net_device *netdev; /* ptr to linux netdevice */ /* Rx bottom half */ struct tasklet_struct rx_bh; @@ -214,7 +211,7 @@ typedef struct wlandevice { struct sk_buff_head nsd_rxq; /* 802.11 device statistics */ - struct p80211_frmrx_t rx; + struct p80211_frmrx rx; struct iw_statistics wstats; @@ -222,19 +219,19 @@ typedef struct wlandevice { u8 spy_number; char spy_address[IW_MAX_SPY][ETH_ALEN]; struct iw_quality spy_stat[IW_MAX_SPY]; -} wlandevice_t; +}; /* WEP stuff */ -int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen); -int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, - u8 *iv, u8 *icv); -int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, +int wep_change_key(struct wlandevice *wlandev, int keynum, u8 *key, int keylen); +int wep_decrypt(struct wlandevice *wlandev, u8 *buf, u32 len, int key_override, u8 *iv, u8 *icv); - -int wlan_setup(wlandevice_t *wlandev, struct device *physdev); -void wlan_unsetup(wlandevice_t *wlandev); -int register_wlandev(wlandevice_t *wlandev); -int unregister_wlandev(wlandevice_t *wlandev); -void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb); -void p80211netdev_hwremoved(wlandevice_t *wlandev); +int wep_encrypt(struct wlandevice *wlandev, u8 *buf, u8 *dst, u32 len, + int keynum, u8 *iv, u8 *icv); + +int wlan_setup(struct wlandevice *wlandev, struct device *physdev); +void wlan_unsetup(struct wlandevice *wlandev); +int register_wlandev(struct wlandevice *wlandev); +int unregister_wlandev(struct wlandevice *wlandev); +void p80211netdev_rx(struct wlandevice *wlandev, struct sk_buff *skb); +void p80211netdev_hwremoved(struct wlandevice *wlandev); #endif diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c index 4b84b56..2112458 100644 --- a/drivers/staging/wlan-ng/p80211req.c +++ b/drivers/staging/wlan-ng/p80211req.c @@ -72,10 +72,11 @@ #include "p80211metastruct.h" #include "p80211req.h" -static void p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg); -static void p80211req_mibset_mibget(wlandevice_t *wlandev, - struct p80211msg_dot11req_mibget *mib_msg, - int isget); +static void p80211req_handlemsg(struct wlandevice *wlandev, + struct p80211msg *msg); +static void p80211req_mibset_mibget(struct wlandevice *wlandev, + struct p80211msg_dot11req_mibget *mib_msg, + int isget); /*---------------------------------------------------------------- * p80211req_dorequest @@ -93,7 +94,7 @@ static void p80211req_mibset_mibget(wlandevice_t *wlandev, * Potentially blocks the caller, so it's a good idea to * not call this function from an interrupt context. ----------------------------------------------------------------*/ -int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf) +int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf) { struct p80211msg *msg = (struct p80211msg *) msgbuf; @@ -149,7 +150,8 @@ int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf) * Call context: * Process thread ----------------------------------------------------------------*/ -static void p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg) +static void p80211req_handlemsg(struct wlandevice *wlandev, + struct p80211msg *msg) { switch (msg->msgcode) { @@ -176,13 +178,14 @@ static void p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg) } /* switch msg->msgcode */ } -static void p80211req_mibset_mibget(wlandevice_t *wlandev, - struct p80211msg_dot11req_mibget *mib_msg, - int isget) +static void p80211req_mibset_mibget(struct wlandevice *wlandev, + struct p80211msg_dot11req_mibget *mib_msg, + int isget) { - p80211itemd_t *mibitem = (p80211itemd_t *) mib_msg->mibattribute.data; - p80211pstrd_t *pstr = (p80211pstrd_t *) mibitem->data; - u8 *key = mibitem->data + sizeof(p80211pstrd_t); + struct p80211itemd *mibitem = + (struct p80211itemd *)mib_msg->mibattribute.data; + struct p80211pstrd *pstr = (struct p80211pstrd *)mibitem->data; + u8 *key = mibitem->data + sizeof(struct p80211pstrd); switch (mibitem->did) { case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0:{ diff --git a/drivers/staging/wlan-ng/p80211req.h b/drivers/staging/wlan-ng/p80211req.h index a95a45a..8d3054c 100644 --- a/drivers/staging/wlan-ng/p80211req.h +++ b/drivers/staging/wlan-ng/p80211req.h @@ -48,6 +48,6 @@ #ifndef _LINUX_P80211REQ_H #define _LINUX_P80211REQ_H -int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf); +int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf); #endif diff --git a/drivers/staging/wlan-ng/p80211types.h b/drivers/staging/wlan-ng/p80211types.h index 8cb4fc6..8fc733f 100644 --- a/drivers/staging/wlan-ng/p80211types.h +++ b/drivers/staging/wlan-ng/p80211types.h @@ -200,138 +200,138 @@ /* The following structure types are used for the representation */ /* of ENUMint type metadata. */ -typedef struct p80211enumpair { +struct p80211enumpair { u32 val; char *name; -} p80211enumpair_t; +}; -typedef struct p80211enum { +struct p80211enum { int nitems; - p80211enumpair_t *list; -} p80211enum_t; + struct p80211enumpair *list; +}; /*----------------------------------------------------------------*/ /* The following structure types are used to store data items in */ /* messages. */ /* Template pascal string */ -typedef struct p80211pstr { +struct p80211pstr { u8 len; -} __packed p80211pstr_t; +} __packed; -typedef struct p80211pstrd { +struct p80211pstrd { u8 len; u8 data[0]; -} __packed p80211pstrd_t; +} __packed; /* Maximum pascal string */ -typedef struct p80211pstr255 { +struct p80211pstr255 { u8 len; u8 data[MAXLEN_PSTR255]; -} __packed p80211pstr255_t; +} __packed; /* pascal string for macaddress and bssid */ -typedef struct p80211pstr6 { +struct p80211pstr6 { u8 len; u8 data[MAXLEN_PSTR6]; -} __packed p80211pstr6_t; +} __packed; /* pascal string for channel list */ -typedef struct p80211pstr14 { +struct p80211pstr14 { u8 len; u8 data[MAXLEN_PSTR14]; -} __packed p80211pstr14_t; +} __packed; /* pascal string for ssid */ -typedef struct p80211pstr32 { +struct p80211pstr32 { u8 len; u8 data[MAXLEN_PSTR32]; -} __packed p80211pstr32_t; +} __packed; /* MAC address array */ -typedef struct p80211macarray { +struct p80211macarray { u32 cnt; u8 data[1][MAXLEN_PSTR6]; -} __packed p80211macarray_t; +} __packed; /* prototype template */ -typedef struct p80211item { +struct p80211item { u32 did; u16 status; u16 len; -} __packed p80211item_t; +} __packed; /* prototype template w/ data item */ -typedef struct p80211itemd { +struct p80211itemd { u32 did; u16 status; u16 len; u8 data[0]; -} __packed p80211itemd_t; +} __packed; /* message data item for int, BOUNDEDINT, ENUMINT */ -typedef struct p80211item_uint32 { +struct p80211item_uint32 { u32 did; u16 status; u16 len; u32 data; -} __packed p80211item_uint32_t; +} __packed; /* message data item for OCTETSTR, DISPLAYSTR */ -typedef struct p80211item_pstr6 { +struct p80211item_pstr6 { u32 did; u16 status; u16 len; - p80211pstr6_t data; -} __packed p80211item_pstr6_t; + struct p80211pstr6 data; +} __packed; /* message data item for OCTETSTR, DISPLAYSTR */ -typedef struct p80211item_pstr14 { +struct p80211item_pstr14 { u32 did; u16 status; u16 len; - p80211pstr14_t data; -} __packed p80211item_pstr14_t; + struct p80211pstr14 data; +} __packed; /* message data item for OCTETSTR, DISPLAYSTR */ -typedef struct p80211item_pstr32 { +struct p80211item_pstr32 { u32 did; u16 status; u16 len; - p80211pstr32_t data; -} __packed p80211item_pstr32_t; + struct p80211pstr32 data; +} __packed; /* message data item for OCTETSTR, DISPLAYSTR */ -typedef struct p80211item_pstr255 { +struct p80211item_pstr255 { u32 did; u16 status; u16 len; - p80211pstr255_t data; -} __packed p80211item_pstr255_t; + struct p80211pstr255 data; +} __packed; /* message data item for UNK 392, namely mib items */ -typedef struct p80211item_unk392 { +struct p80211item_unk392 { u32 did; u16 status; u16 len; u8 data[MAXLEN_MIBATTRIBUTE]; -} __packed p80211item_unk392_t; +} __packed; /* message data item for UNK 1025, namely p2 pdas */ -typedef struct p80211item_unk1024 { +struct p80211item_unk1024 { u32 did; u16 status; u16 len; u8 data[1024]; -} __packed p80211item_unk1024_t; +} __packed; /* message data item for UNK 4096, namely p2 download chunks */ -typedef struct p80211item_unk4096 { +struct p80211item_unk4096 { u32 did; u16 status; u16 len; u8 data[4096]; -} __packed p80211item_unk4096_t; +} __packed; struct catlistitem; @@ -351,25 +351,25 @@ typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf); /* The following are the external declarations */ /* for all enumerations */ -extern p80211enum_t MKENUMNAME(truth); -extern p80211enum_t MKENUMNAME(ifstate); -extern p80211enum_t MKENUMNAME(powermgmt); -extern p80211enum_t MKENUMNAME(bsstype); -extern p80211enum_t MKENUMNAME(authalg); -extern p80211enum_t MKENUMNAME(phytype); -extern p80211enum_t MKENUMNAME(temptype); -extern p80211enum_t MKENUMNAME(regdomain); -extern p80211enum_t MKENUMNAME(ccamode); -extern p80211enum_t MKENUMNAME(diversity); -extern p80211enum_t MKENUMNAME(scantype); -extern p80211enum_t MKENUMNAME(resultcode); -extern p80211enum_t MKENUMNAME(reason); -extern p80211enum_t MKENUMNAME(status); -extern p80211enum_t MKENUMNAME(msgcode); -extern p80211enum_t MKENUMNAME(msgitem_status); - -extern p80211enum_t MKENUMNAME(lnxroam_reason); - -extern p80211enum_t MKENUMNAME(p2preamble); +extern struct p80211enum MKENUMNAME(truth); +extern struct p80211enum MKENUMNAME(ifstate); +extern struct p80211enum MKENUMNAME(powermgmt); +extern struct p80211enum MKENUMNAME(bsstype); +extern struct p80211enum MKENUMNAME(authalg); +extern struct p80211enum MKENUMNAME(phytype); +extern struct p80211enum MKENUMNAME(temptype); +extern struct p80211enum MKENUMNAME(regdomain); +extern struct p80211enum MKENUMNAME(ccamode); +extern struct p80211enum MKENUMNAME(diversity); +extern struct p80211enum MKENUMNAME(scantype); +extern struct p80211enum MKENUMNAME(resultcode); +extern struct p80211enum MKENUMNAME(reason); +extern struct p80211enum MKENUMNAME(status); +extern struct p80211enum MKENUMNAME(msgcode); +extern struct p80211enum MKENUMNAME(msgitem_status); + +extern struct p80211enum MKENUMNAME(lnxroam_reason); + +extern struct p80211enum MKENUMNAME(p2preamble); #endif /* _P80211TYPES_H */ diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c index 22c7970..3b9b6f9 100644 --- a/drivers/staging/wlan-ng/p80211wep.c +++ b/drivers/staging/wlan-ng/p80211wep.c @@ -119,7 +119,7 @@ static const u32 wep_crc32_table[256] = { /* keylen in bytes! */ -int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen) +int wep_change_key(struct wlandevice *wlandev, int keynum, u8 *key, int keylen) { if (keylen < 0) return -1; @@ -143,7 +143,7 @@ int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen) * 4-byte IV at start of buffer, 4-byte ICV at end of buffer. * if successful, buf start is payload begin, length -= 8; */ -int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, +int wep_decrypt(struct wlandevice *wlandev, u8 *buf, u32 len, int key_override, u8 *iv, u8 *icv) { u32 i, j, k, crc, keylen; @@ -217,8 +217,8 @@ int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, } /* encrypts in-place. */ -int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, - u8 *iv, u8 *icv) +int wep_encrypt(struct wlandevice *wlandev, u8 *buf, u8 *dst, u32 len, + int keynum, u8 *iv, u8 *icv) { u32 i, j, k, crc, keylen; u8 s[256], key[64]; diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index 56bffd9..08831ad 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -96,16 +96,16 @@ 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; }; 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; }; @@ -152,22 +152,22 @@ static struct imgchunk fchunk[CHUNKS_MAX]; /* PDA, built from [card|newfile]+[addfile1+addfile2...] */ static struct pda pda; -static hfa384x_compident_t nicid; -static hfa384x_caplevel_t rfid; -static hfa384x_caplevel_t macid; -static hfa384x_caplevel_t priid; +static struct hfa384x_compident nicid; +static struct hfa384x_caplevel rfid; +static struct hfa384x_caplevel macid; +static struct hfa384x_caplevel priid; /*================================================================*/ /* Local Function Declarations */ static int prism2_fwapply(const struct ihex_binrec *rfptr, -wlandevice_t *wlandev); +struct wlandevice *wlandev); static int read_fwfile(const struct ihex_binrec *rfptr); static int mkimage(struct imgchunk *clist, unsigned int *ccnt); -static int read_cardpda(struct pda *pda, wlandevice_t *wlandev); +static int read_cardpda(struct pda *pda, struct wlandevice *wlandev); static int mkpdrlist(struct pda *pda); @@ -177,8 +177,8 @@ static int plugimage(struct imgchunk *fchunk, unsigned int nfchunks, static int crcimage(struct imgchunk *fchunk, unsigned int nfchunks, struct s3crcrec *s3crc, unsigned int ns3crc); -static int writeimage(wlandevice_t *wlandev, struct imgchunk *fchunk, - unsigned int nfchunks); +static int writeimage(struct wlandevice *wlandev, struct imgchunk *fchunk, + unsigned int nfchunks); static void free_chunks(struct imgchunk *fchunk, unsigned int *nfchunks); static void free_srecs(void); @@ -201,7 +201,7 @@ static int validate_identity(void); * 0 - success * ~0 - failure ----------------------------------------------------------------*/ -static int prism2_fwtry(struct usb_device *udev, wlandevice_t *wlandev) +static int prism2_fwtry(struct usb_device *udev, struct wlandevice *wlandev) { const struct firmware *fw_entry = NULL; @@ -239,11 +239,11 @@ static int prism2_fwtry(struct usb_device *udev, wlandevice_t *wlandev) * ~0 - failure ----------------------------------------------------------------*/ static int prism2_fwapply(const struct ihex_binrec *rfptr, - wlandevice_t *wlandev) + struct wlandevice *wlandev) { signed int result = 0; struct p80211msg_dot11req_mibget getmsg; - p80211itemd_t *item; + struct p80211itemd *item; u32 *data; /* Initialize the data structures */ @@ -266,7 +266,7 @@ static int prism2_fwapply(const struct ihex_binrec *rfptr, /* 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; @@ -293,7 +293,7 @@ static int prism2_fwapply(const struct ihex_binrec *rfptr, getmsg.resultcode.did = DIDmsg_dot11req_mibget_resultcode; getmsg.resultcode.status = P80211ENUM_msgitem_status_no_value; - item = (p80211itemd_t *) getmsg.mibattribute.data; + item = (struct p80211itemd *)getmsg.mibattribute.data; item->did = DIDmib_p2_p2NIC_p2PRISupRange; item->status = P80211ENUM_msgitem_status_no_value; @@ -599,7 +599,7 @@ static int mkpdrlist(struct pda *pda) curroff = 0; while (curroff < (HFA384x_PDA_LEN_MAX / 2 - 1) && 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) { @@ -638,7 +638,7 @@ static int mkpdrlist(struct pda *pda) curroff, pda->nrec); return 1; } - pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); + pda->rec[pda->nrec] = (struct hfa384x_pdrec *)&pda16[curroff]; (pda->nrec)++; return 0; } @@ -766,7 +766,7 @@ static int plugimage(struct imgchunk *fchunk, unsigned int nfchunks, * 0 - success * ~0 - failure (probably an errno) ----------------------------------------------------------------*/ -static int read_cardpda(struct pda *pda, wlandevice_t *wlandev) +static int read_cardpda(struct pda *pda, struct wlandevice *wlandev) { int result = 0; struct p80211msg_p2req_readpda *msg; @@ -982,8 +982,8 @@ static int read_fwfile(const struct ihex_binrec *record) * 0 success * ~0 failure ----------------------------------------------------------------*/ -static int writeimage(wlandevice_t *wlandev, struct imgchunk *fchunk, - unsigned int nfchunks) +static int writeimage(struct wlandevice *wlandev, struct imgchunk *fchunk, + unsigned int nfchunks) { int result = 0; struct p80211msg_p2req_ramdl_state *rstmsg; diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index d8ed9a0..2d69bb1 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -113,16 +113,16 @@ * process thread (usually) * interrupt ----------------------------------------------------------------*/ -int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_scan(struct wlandevice *wlandev, void *msgp) { int result = 0; - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; struct p80211msg_dot11req_scan *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, @@ -292,7 +292,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) result = hfa384x_drvr_setconfig(hw, HFA384x_RID_HOSTSCAN, &scanreq, - sizeof(hfa384x_HostScanRequest_data_t)); + sizeof(scanreq)); if (result) { netdev_err(wlandev->netdev, "setconfig(SCANREQUEST) failed. result=%d\n", @@ -366,12 +366,12 @@ exit: * process thread (usually) * interrupt ----------------------------------------------------------------*/ -int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_scan_results(struct wlandevice *wlandev, void *msgp) { int result = 0; struct p80211msg_dot11req_scan_results *req; - hfa384x_t *hw = wlandev->priv; - hfa384x_HScanResultSub_t *item = NULL; + struct hfa384x *hw = wlandev->priv; + struct hfa384x_HScanResultSub *item = NULL; int count; @@ -525,13 +525,13 @@ exit: * process thread (usually) * interrupt ----------------------------------------------------------------*/ -int prism2mgmt_start(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_start(struct wlandevice *wlandev, void *msgp) { int result = 0; - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; struct p80211msg_dot11req_start *msg = msgp; - p80211pstrd_t *pstr; + struct p80211pstrd *pstr; u8 bytebuf[80]; struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf; u16 word; @@ -558,7 +558,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp) /*** STATION ***/ /* Set the REQUIRED config items */ /* SSID */ - pstr = (p80211pstrd_t *) &(msg->ssid.data); + pstr = (struct p80211pstrd *)&msg->ssid.data; prism2mgmt_pstr2bytestr(p2bytestr, pstr); result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID, bytebuf, HFA384x_RID_CNFOWNSSID_LEN); @@ -708,9 +708,9 @@ done: * Call context: * process thread (usually) ----------------------------------------------------------------*/ -int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_readpda(struct wlandevice *wlandev, void *msgp) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; struct p80211msg_p2req_readpda *msg = msgp; int result; @@ -774,9 +774,9 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp) * Call context: * process thread (usually) ----------------------------------------------------------------*/ -int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_ramdl_state(struct wlandevice *wlandev, void *msgp) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; struct p80211msg_p2req_ramdl_state *msg = msgp; if (wlandev->msdstate != WLAN_MSD_FWLOAD) { @@ -829,9 +829,9 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp) * Call context: * process thread (usually) ----------------------------------------------------------------*/ -int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_ramdl_write(struct wlandevice *wlandev, void *msgp) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; struct p80211msg_p2req_ramdl_write *msg = msgp; u32 addr; u32 len; @@ -890,10 +890,10 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp) * Call context: * process thread (usually) ----------------------------------------------------------------*/ -int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_flashdl_state(struct wlandevice *wlandev, void *msgp) { int result = 0; - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; struct p80211msg_p2req_flashdl_state *msg = msgp; if (wlandev->msdstate != WLAN_MSD_FWLOAD) { @@ -961,9 +961,9 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp) * Call context: * process thread (usually) ----------------------------------------------------------------*/ -int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_flashdl_write(struct wlandevice *wlandev, void *msgp) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; struct p80211msg_p2req_flashdl_write *msg = msgp; u32 addr; u32 len; @@ -1021,14 +1021,14 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp) * process thread (usually) * interrupt ----------------------------------------------------------------*/ -int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_autojoin(struct wlandevice *wlandev, void *msgp) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; int result = 0; u16 reg; u16 port_type; struct p80211msg_lnxreq_autojoin *msg = msgp; - p80211pstrd_t *pstr; + struct p80211pstrd *pstr; u8 bytebuf[256]; struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *) bytebuf; @@ -1054,7 +1054,7 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp) /* Set the ssid */ memset(bytebuf, 0, 256); - pstr = (p80211pstrd_t *) &(msg->ssid.data); + pstr = (struct p80211pstrd *)&msg->ssid.data; prism2mgmt_pstr2bytestr(p2bytestr, pstr); result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID, bytebuf, @@ -1092,12 +1092,12 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp) * process thread (usually) * interrupt ----------------------------------------------------------------*/ -int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp) { int result = 0; struct p80211msg_lnxreq_wlansniff *msg = msgp; - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; u16 word; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h index e647203..c7de95a 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.h +++ b/drivers/staging/wlan-ng/prism2mgmt.h @@ -63,43 +63,46 @@ extern int prism2_reset_holdtime; extern int prism2_reset_settletime; -u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate); +u32 prism2sta_ifstate(struct wlandevice *wlandev, u32 ifstate); -void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf); -void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status); -void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status); -void prism2sta_ev_alloc(wlandevice_t *wlandev); +void prism2sta_ev_info(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +void prism2sta_ev_txexc(struct wlandevice *wlandev, u16 status); +void prism2sta_ev_tx(struct wlandevice *wlandev, u16 status); +void prism2sta_ev_alloc(struct wlandevice *wlandev); -int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_start(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp); -int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_mibset_mibget(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_scan(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_scan_results(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_start(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_readpda(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_ramdl_state(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_ramdl_write(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_flashdl_state(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_flashdl_write(struct wlandevice *wlandev, void *msgp); +int prism2mgmt_autojoin(struct wlandevice *wlandev, void *msgp); /*--------------------------------------------------------------- * conversion functions going between wlan message data types and * Prism2 data types ---------------------------------------------------------------*/ /* byte area conversion functions*/ -void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len); +void prism2mgmt_bytearea2pstr(u8 *bytearea, struct p80211pstrd *pstr, + int len); /* byte string conversion functions*/ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr, - p80211pstrd_t *pstr); + struct p80211pstrd *pstr); void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr, - p80211pstrd_t *pstr); + struct p80211pstrd *pstr); /* functions to convert Group Addresses */ -void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t *pstr, hfa384x_t *priv); +void prism2mgmt_get_grpaddr(u32 did, struct p80211pstrd *pstr, + struct hfa384x *priv); int prism2mgmt_set_grpaddr(u32 did, - u8 *prism2buf, p80211pstrd_t *pstr, - hfa384x_t *priv); + u8 *prism2buf, struct p80211pstrd *pstr, + struct hfa384x *priv); int prism2mgmt_get_grpaddr_index(u32 did); void prism2sta_processing_defer(struct work_struct *data); @@ -108,8 +111,8 @@ void prism2sta_commsqual_defer(struct work_struct *data); void prism2sta_commsqual_timer(unsigned long data); /* Interface callback functions, passing data back up to the cfg80211 layer */ -void prism2_connect_result(wlandevice_t *wlandev, u8 failed); -void prism2_disconnected(wlandevice_t *wlandev); -void prism2_roamed(wlandevice_t *wlandev); +void prism2_connect_result(struct wlandevice *wlandev, u8 failed); +void prism2_disconnected(struct wlandevice *wlandev); +void prism2_roamed(struct wlandevice *wlandev); #endif diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index fe914b1..e992ce7 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -87,62 +87,62 @@ struct mibrec { u16 parm3; int (*func)(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); }; static int prism2mib_bytearea2pstr(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_uint32(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_flag(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_wepdefaultkey(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_privacyinvoked(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_excludeunencrypted(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_fragmentationthreshold(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static int prism2mib_priv(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data); static struct mibrec mibtab[] = { @@ -257,16 +257,16 @@ static struct mibrec mibtab[] = { * interrupt ----------------------------------------------------------------*/ -int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) +int prism2mgmt_mibset_mibget(struct wlandevice *wlandev, void *msgp) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; int result, isget; struct mibrec *mib; u16 which; struct p80211msg_dot11req_mibset *msg = msgp; - p80211itemd_t *mibitem; + struct p80211itemd *mibitem; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; msg->resultcode.data = P80211ENUM_resultcode_success; @@ -284,7 +284,7 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) ** MIB table. */ - mibitem = (p80211itemd_t *) msg->mibattribute.data; + mibitem = (struct p80211itemd *)msg->mibattribute.data; for (mib = mibtab; mib->did != 0; mib++) if (mib->did == mibitem->did && (mib->flag & which)) @@ -373,13 +373,13 @@ done: static int prism2mib_bytearea2pstr(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { int result; - p80211pstrd_t *pstr = data; + struct p80211pstrd *pstr = data; u8 bytebuf[MIB_TMP_MAXLEN]; if (isget) { @@ -423,8 +423,8 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib, static int prism2mib_uint32(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { int result; @@ -470,8 +470,8 @@ static int prism2mib_uint32(struct mibrec *mib, static int prism2mib_flag(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { int result; @@ -527,13 +527,13 @@ static int prism2mib_flag(struct mibrec *mib, static int prism2mib_wepdefaultkey(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { int result; - p80211pstrd_t *pstr = data; + struct p80211pstrd *pstr = data; u8 bytebuf[MIB_TMP_MAXLEN]; u16 len; @@ -577,8 +577,8 @@ static int prism2mib_wepdefaultkey(struct mibrec *mib, static int prism2mib_privacyinvoked(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { @@ -619,8 +619,8 @@ static int prism2mib_privacyinvoked(struct mibrec *mib, static int prism2mib_excludeunencrypted(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { @@ -655,8 +655,8 @@ static int prism2mib_excludeunencrypted(struct mibrec *mib, static int prism2mib_fragmentationthreshold(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { @@ -701,15 +701,15 @@ static int prism2mib_fragmentationthreshold(struct mibrec *mib, static int prism2mib_priv(struct mibrec *mib, int isget, - wlandevice_t *wlandev, - hfa384x_t *hw, + struct wlandevice *wlandev, + struct hfa384x *hw, struct p80211msg_dot11req_mibset *msg, void *data) { - p80211pstrd_t *pstr = data; + struct p80211pstrd *pstr = data; switch (mib->did) { case DIDmib_lnx_lnxConfigTable_lnxRSNAIE:{ - hfa384x_WPAData_t wpa; + struct hfa384x_WPAData wpa; if (isget) { hfa384x_drvr_getconfig(hw, @@ -752,7 +752,7 @@ static int prism2mib_priv(struct mibrec *mib, ----------------------------------------------------------------*/ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr, - p80211pstrd_t *pstr) + struct p80211pstrd *pstr) { bytestr->len = cpu_to_le16((u16) (pstr->len)); memcpy(bytestr->data, pstr->data, pstr->len); @@ -774,7 +774,7 @@ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr, ----------------------------------------------------------------*/ void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr, - p80211pstrd_t *pstr) + struct p80211pstrd *pstr) { pstr->len = (u8) (le16_to_cpu((u16) (bytestr->len))); memcpy(pstr->data, bytestr->data, pstr->len); @@ -795,7 +795,7 @@ void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr, * ----------------------------------------------------------------*/ -void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len) +void prism2mgmt_bytearea2pstr(u8 *bytearea, struct p80211pstrd *pstr, int len) { pstr->len = (u8) len; memcpy(pstr->data, bytearea, len); diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 64f9072..1d039bd4 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -81,7 +81,7 @@ #include "prism2mgmt.h" static char *dev_info = "prism2_usb"; -static wlandevice_t *create_wlan(void); +static struct wlandevice *create_wlan(void); int prism2_reset_holdtime = 30; /* Reset hold time in ms */ int prism2_reset_settletime = 100; /* Reset settle time in ms */ @@ -98,37 +98,39 @@ MODULE_PARM_DESC(prism2_reset_settletime, "reset settle time in ms"); MODULE_LICENSE("Dual MPL/GPL"); -static int prism2sta_open(wlandevice_t *wlandev); -static int prism2sta_close(wlandevice_t *wlandev); -static void prism2sta_reset(wlandevice_t *wlandev); -static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb, +static int prism2sta_open(struct wlandevice *wlandev); +static int prism2sta_close(struct wlandevice *wlandev); +static void prism2sta_reset(struct wlandevice *wlandev); +static int prism2sta_txframe(struct wlandevice *wlandev, struct sk_buff *skb, union p80211_hdr *p80211_hdr, struct p80211_metawep *p80211_wep); -static int prism2sta_mlmerequest(wlandevice_t *wlandev, struct p80211msg *msg); -static int prism2sta_getcardinfo(wlandevice_t *wlandev); -static int prism2sta_globalsetup(wlandevice_t *wlandev); -static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev); - -static void prism2sta_inf_handover(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); -static void prism2sta_inf_tallies(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); -static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); -static void prism2sta_inf_scanresults(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); -static void prism2sta_inf_chinforesults(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); -static void prism2sta_inf_linkstatus(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); -static void prism2sta_inf_assocstatus(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); -static void prism2sta_inf_authreq(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); -static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); -static void prism2sta_inf_psusercnt(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf); +static int prism2sta_mlmerequest(struct wlandevice *wlandev, + struct p80211msg *msg); +static int prism2sta_getcardinfo(struct wlandevice *wlandev); +static int prism2sta_globalsetup(struct wlandevice *wlandev); +static int prism2sta_setmulticast(struct wlandevice *wlandev, + struct net_device *dev); + +static void prism2sta_inf_handover(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +static void prism2sta_inf_tallies(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +static void prism2sta_inf_scanresults(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +static void prism2sta_inf_chinforesults(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +static void prism2sta_inf_linkstatus(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +static void prism2sta_inf_assocstatus(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +static void prism2sta_inf_authreq(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +static void prism2sta_inf_authreq_defer(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); +static void prism2sta_inf_psusercnt(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf); /* * prism2sta_open @@ -151,7 +153,7 @@ static void prism2sta_inf_psusercnt(wlandevice_t *wlandev, * Call context: * process thread */ -static int prism2sta_open(wlandevice_t *wlandev) +static int prism2sta_open(struct wlandevice *wlandev) { /* We don't currently have to do anything else. * The setup of the MAC should be subsequently completed via @@ -185,7 +187,7 @@ static int prism2sta_open(wlandevice_t *wlandev) * Call context: * process thread */ -static int prism2sta_close(wlandevice_t *wlandev) +static int prism2sta_close(struct wlandevice *wlandev) { /* We don't currently have to do anything else. * Higher layers know we're not ready from dev->start==0 and @@ -213,7 +215,7 @@ static int prism2sta_close(wlandevice_t *wlandev) * Call context: * process thread */ -static void prism2sta_reset(wlandevice_t *wlandev) +static void prism2sta_reset(struct wlandevice *wlandev) { } @@ -238,11 +240,11 @@ static void prism2sta_reset(wlandevice_t *wlandev) * Call context: * process thread */ -static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb, +static int prism2sta_txframe(struct wlandevice *wlandev, struct sk_buff *skb, union p80211_hdr *p80211_hdr, struct p80211_metawep *p80211_wep) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; /* If necessary, set the 802.11 WEP bit */ if ((wlandev->hostwep & (HOSTWEP_PRIVACYINVOKED | HOSTWEP_ENCRYPT)) == @@ -277,9 +279,10 @@ static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb, * Call context: * process thread */ -static int prism2sta_mlmerequest(wlandevice_t *wlandev, struct p80211msg *msg) +static int prism2sta_mlmerequest(struct wlandevice *wlandev, + struct p80211msg *msg) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; int result = 0; @@ -407,9 +410,9 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, struct p80211msg *msg) * process thread (usually) * interrupt */ -u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) +u32 prism2sta_ifstate(struct wlandevice *wlandev, u32 ifstate) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; u32 result; result = P80211ENUM_resultcode_implementation_failure; @@ -580,10 +583,10 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate) * Call context: * Either. */ -static int prism2sta_getcardinfo(wlandevice_t *wlandev) +static int prism2sta_getcardinfo(struct wlandevice *wlandev) { int result = 0; - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; u16 temp; u8 snum[HFA384x_RID_NICSERIALNUMBER_LEN]; @@ -592,7 +595,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* NIC identity */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_NICIDENTITY, &hw->ident_nic, - sizeof(hfa384x_compident_t)); + sizeof(struct hfa384x_compident)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve NICIDENTITY\n"); goto failed; @@ -611,7 +614,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Primary f/w identity */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRIIDENTITY, &hw->ident_pri_fw, - sizeof(hfa384x_compident_t)); + sizeof(struct hfa384x_compident)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve PRIIDENTITY\n"); goto failed; @@ -630,7 +633,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Station (Secondary?) f/w identity */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STAIDENTITY, &hw->ident_sta_fw, - sizeof(hfa384x_compident_t)); + sizeof(struct hfa384x_compident)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve STAIDENTITY\n"); goto failed; @@ -670,7 +673,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Compatibility range, Modem supplier */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_MFISUPRANGE, &hw->cap_sup_mfi, - sizeof(hfa384x_caplevel_t)); + sizeof(struct hfa384x_caplevel)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve MFISUPRANGE\n"); goto failed; @@ -694,7 +697,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Compatibility range, Controller supplier */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CFISUPRANGE, &hw->cap_sup_cfi, - sizeof(hfa384x_caplevel_t)); + sizeof(struct hfa384x_caplevel)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve CFISUPRANGE\n"); goto failed; @@ -718,7 +721,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Compatibility range, Primary f/w supplier */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRISUPRANGE, &hw->cap_sup_pri, - sizeof(hfa384x_caplevel_t)); + sizeof(struct hfa384x_caplevel)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve PRISUPRANGE\n"); goto failed; @@ -742,7 +745,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Compatibility range, Station f/w supplier */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STASUPRANGE, &hw->cap_sup_sta, - sizeof(hfa384x_caplevel_t)); + sizeof(struct hfa384x_caplevel)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve STASUPRANGE\n"); goto failed; @@ -774,7 +777,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Compatibility range, primary f/w actor, CFI supplier */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_PRI_CFIACTRANGES, &hw->cap_act_pri_cfi, - sizeof(hfa384x_caplevel_t)); + sizeof(struct hfa384x_caplevel)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve PRI_CFIACTRANGES\n"); goto failed; @@ -798,7 +801,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Compatibility range, sta f/w actor, CFI supplier */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_CFIACTRANGES, &hw->cap_act_sta_cfi, - sizeof(hfa384x_caplevel_t)); + sizeof(struct hfa384x_caplevel)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve STA_CFIACTRANGES\n"); goto failed; @@ -822,7 +825,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Compatibility range, sta f/w actor, MFI supplier */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_STA_MFIACTRANGES, &hw->cap_act_sta_mfi, - sizeof(hfa384x_caplevel_t)); + sizeof(struct hfa384x_caplevel)); if (result) { netdev_err(wlandev->netdev, "Failed to retrieve STA_MFIACTRANGES\n"); goto failed; @@ -909,19 +912,20 @@ done: * Call context: * process thread */ -static int prism2sta_globalsetup(wlandevice_t *wlandev) +static int prism2sta_globalsetup(struct wlandevice *wlandev) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; /* Set the maximum frame size */ return hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFMAXDATALEN, WLAN_DATA_MAXLEN); } -static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev) +static int prism2sta_setmulticast(struct wlandevice *wlandev, + struct net_device *dev) { int result = 0; - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; u16 promisc; @@ -959,8 +963,8 @@ exit: * Call context: * interrupt */ -static void prism2sta_inf_handover(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_handover(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { pr_debug("received infoframe:HANDOVER (unhandled)\n"); } @@ -982,10 +986,10 @@ static void prism2sta_inf_handover(wlandevice_t *wlandev, * Call context: * interrupt */ -static void prism2sta_inf_tallies(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_tallies(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; u16 *src16; u32 *dst; u32 *src32; @@ -997,7 +1001,7 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, * record length of the info record. */ - cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32); + cnt = sizeof(struct hfa384x_CommTallies32) / sizeof(u32); if (inf->framelen > 22) { dst = (u32 *) &hw->tallies; src32 = (u32 *) &inf->info.commtallies32; @@ -1028,21 +1032,21 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, * Call context: * interrupt */ -static void prism2sta_inf_scanresults(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_scanresults(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; int nbss; - hfa384x_ScanResult_t *sr = &(inf->info.scanresult); + struct hfa384x_ScanResult *sr = &inf->info.scanresult; int i; - hfa384x_JoinRequest_data_t joinreq; + struct hfa384x_JoinRequest_data joinreq; int result; /* Get the number of results, first in bytes, then in results */ nbss = (inf->framelen * sizeof(u16)) - sizeof(inf->infotype) - sizeof(inf->info.scanresult.scanreason); - nbss /= sizeof(hfa384x_ScanResultSub_t); + nbss /= sizeof(struct hfa384x_ScanResultSub); /* Print em */ pr_debug("rx scanresults, reason=%d, nbss=%d:\n", @@ -1084,10 +1088,10 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev, * Call context: * interrupt */ -static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; int nbss; nbss = (inf->framelen - 3) / 32; @@ -1098,7 +1102,7 @@ static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev, kfree(hw->scanresults); - hw->scanresults = kmemdup(inf, sizeof(hfa384x_InfFrame_t), GFP_ATOMIC); + hw->scanresults = kmemdup(inf, sizeof(*inf), GFP_ATOMIC); if (nbss == 0) nbss = -1; @@ -1125,18 +1129,18 @@ static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev, * Call context: * interrupt */ -static void prism2sta_inf_chinforesults(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_chinforesults(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; unsigned int i, n; hw->channel_info.results.scanchannels = le16_to_cpu(inf->info.chinforesult.scanchannels); for (i = 0, n = 0; i < HFA384x_CHINFORESULT_MAX; i++) { - hfa384x_ChInfoResultSub_t *result; - hfa384x_ChInfoResultSub_t *chinforesult; + struct hfa384x_ChInfoResultSub *result; + struct hfa384x_ChInfoResultSub *chinforesult; int chan; if (!(hw->channel_info.results.scanchannels & (1 << i))) @@ -1170,18 +1174,18 @@ static void prism2sta_inf_chinforesults(wlandevice_t *wlandev, void prism2sta_processing_defer(struct work_struct *data) { - hfa384x_t *hw = container_of(data, struct hfa384x, link_bh); - wlandevice_t *wlandev = hw->wlandev; - hfa384x_bytestr32_t ssid; + struct hfa384x *hw = container_of(data, struct hfa384x, link_bh); + struct wlandevice *wlandev = hw->wlandev; + struct hfa384x_bytestr32 ssid; int result; /* First let's process the auth frames */ { struct sk_buff *skb; - hfa384x_InfFrame_t *inf; + struct hfa384x_InfFrame *inf; while ((skb = skb_dequeue(&hw->authq))) { - inf = (hfa384x_InfFrame_t *) skb->data; + inf = (struct hfa384x_InfFrame *)skb->data; prism2sta_inf_authreq_defer(wlandev, inf); } @@ -1257,7 +1261,7 @@ void prism2sta_processing_defer(struct work_struct *data) } prism2mgmt_bytestr2pstr( (struct hfa384x_bytestr *) &ssid, - (p80211pstrd_t *) &wlandev->ssid); + (struct p80211pstrd *)&wlandev->ssid); /* Collect the port status */ result = hfa384x_drvr_getconfig16(hw, @@ -1338,7 +1342,7 @@ void prism2sta_processing_defer(struct work_struct *data) return; } prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid, - (p80211pstrd_t *) &wlandev->ssid); + (struct p80211pstrd *)&wlandev->ssid); hw->link_status = HFA384x_LINK_CONNECTED; netif_carrier_on(wlandev->netdev); @@ -1390,7 +1394,7 @@ void prism2sta_processing_defer(struct work_struct *data) * Disable Transmits, Ignore receives of data frames */ if (hw->join_ap && --hw->join_retries > 0) { - hfa384x_JoinRequest_data_t joinreq; + struct hfa384x_JoinRequest_data joinreq; joinreq = hw->joinreq; /* Send the join request */ @@ -1438,10 +1442,10 @@ void prism2sta_processing_defer(struct work_struct *data) * Call context: * interrupt */ -static void prism2sta_inf_linkstatus(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_linkstatus(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; hw->link_status_new = le16_to_cpu(inf->info.linkstatus.linkstatus); @@ -1466,11 +1470,11 @@ static void prism2sta_inf_linkstatus(wlandevice_t *wlandev, * Call context: * interrupt */ -static void prism2sta_inf_assocstatus(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_assocstatus(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { - hfa384x_t *hw = wlandev->priv; - hfa384x_AssocStatus_t rec; + struct hfa384x *hw = wlandev->priv; + struct hfa384x_AssocStatus rec; int i; memcpy(&rec, &inf->info.assocstatus, sizeof(rec)); @@ -1527,10 +1531,10 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev, * interrupt * */ -static void prism2sta_inf_authreq(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_authreq(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; struct sk_buff *skb; skb = dev_alloc_skb(sizeof(*inf)); @@ -1542,11 +1546,11 @@ static void prism2sta_inf_authreq(wlandevice_t *wlandev, } } -static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_authreq_defer(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { - hfa384x_t *hw = wlandev->priv; - hfa384x_authenticateStation_data_t rec; + struct hfa384x *hw = wlandev->priv; + struct hfa384x_authenticateStation_data rec; int i, added, result, cnt; u8 *addr; @@ -1716,10 +1720,10 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, * Call context: * interrupt */ -static void prism2sta_inf_psusercnt(wlandevice_t *wlandev, - hfa384x_InfFrame_t *inf) +static void prism2sta_inf_psusercnt(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; hw->psusercount = le16_to_cpu(inf->info.psusercnt.usercnt); } @@ -1741,7 +1745,8 @@ static void prism2sta_inf_psusercnt(wlandevice_t *wlandev, * Call context: * interrupt */ -void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) +void prism2sta_ev_info(struct wlandevice *wlandev, + struct hfa384x_InfFrame *inf) { inf->infotype = le16_to_cpu(inf->infotype); /* Dispatch */ @@ -1808,7 +1813,7 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) * Call context: * interrupt */ -void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status) +void prism2sta_ev_txexc(struct wlandevice *wlandev, u16 status) { pr_debug("TxExc status=0x%x.\n", status); } @@ -1829,7 +1834,7 @@ void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status) * Call context: * interrupt */ -void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status) +void prism2sta_ev_tx(struct wlandevice *wlandev, u16 status) { pr_debug("Tx Complete, status=0x%04x\n", status); /* update linux network stats */ @@ -1852,7 +1857,7 @@ void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status) * Call context: * interrupt */ -void prism2sta_ev_alloc(wlandevice_t *wlandev) +void prism2sta_ev_alloc(struct wlandevice *wlandev) { netif_wake_queue(wlandev->netdev); } @@ -1860,14 +1865,14 @@ void prism2sta_ev_alloc(wlandevice_t *wlandev) /* * create_wlan * -* Called at module init time. This creates the wlandevice_t structure +* Called at module init time. This creates the struct wlandevice structure * and initializes it with relevant bits. * * Arguments: * none * * Returns: -* the created wlandevice_t structure. +* the created struct wlandevice structure. * * Side effects: * also allocates the priv/hw structures. @@ -1876,14 +1881,14 @@ void prism2sta_ev_alloc(wlandevice_t *wlandev) * process thread * */ -static wlandevice_t *create_wlan(void) +static struct wlandevice *create_wlan(void) { - wlandevice_t *wlandev = NULL; - hfa384x_t *hw = NULL; + struct wlandevice *wlandev = NULL; + struct hfa384x *hw = NULL; /* Alloc our structures */ - wlandev = kzalloc(sizeof(wlandevice_t), GFP_KERNEL); - hw = kzalloc(sizeof(hfa384x_t), GFP_KERNEL); + wlandev = kzalloc(sizeof(*wlandev), GFP_KERNEL); + hw = kzalloc(sizeof(*hw), GFP_KERNEL); if (!wlandev || !hw) { kfree(wlandev); @@ -1913,11 +1918,11 @@ static wlandevice_t *create_wlan(void) void prism2sta_commsqual_defer(struct work_struct *data) { - hfa384x_t *hw = container_of(data, struct hfa384x, commsqual_bh); - wlandevice_t *wlandev = hw->wlandev; - hfa384x_bytestr32_t ssid; + struct hfa384x *hw = container_of(data, struct hfa384x, commsqual_bh); + struct wlandevice *wlandev = hw->wlandev; + struct hfa384x_bytestr32 ssid; struct p80211msg_dot11req_mibget msg; - p80211item_uint32_t *mibitem = (p80211item_uint32_t *) + struct p80211item_uint32 *mibitem = (struct p80211item_uint32 *) &msg.mibattribute.data; int result = 0; @@ -1994,7 +1999,7 @@ void prism2sta_commsqual_defer(struct work_struct *data) return; } prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid, - (p80211pstrd_t *) &wlandev->ssid); + (struct p80211pstrd *)&wlandev->ssid); /* Reschedule timer */ mod_timer(&hw->commsqual_timer, jiffies + HZ); @@ -2002,7 +2007,7 @@ void prism2sta_commsqual_defer(struct work_struct *data) void prism2sta_commsqual_timer(unsigned long data) { - hfa384x_t *hw = (hfa384x_t *) data; + struct hfa384x *hw = (struct hfa384x *)data; schedule_work(&hw->commsqual_bh); } diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c index b26d09f..7f6d94f 100644 --- a/drivers/staging/wlan-ng/prism2usb.c +++ b/drivers/staging/wlan-ng/prism2usb.c @@ -61,8 +61,8 @@ static int prism2sta_probe_usb(struct usb_interface *interface, { struct usb_device *dev; - wlandevice_t *wlandev = NULL; - hfa384x_t *hw = NULL; + struct wlandevice *wlandev = NULL; + struct hfa384x *hw = NULL; int result = 0; dev = interface_to_usbdev(interface); @@ -134,15 +134,15 @@ done: static void prism2sta_disconnect_usb(struct usb_interface *interface) { - wlandevice_t *wlandev; + struct wlandevice *wlandev; - wlandev = (wlandevice_t *)usb_get_intfdata(interface); + wlandev = (struct wlandevice *)usb_get_intfdata(interface); if (wlandev != NULL) { LIST_HEAD(cleanlist); - hfa384x_usbctlx_t *ctlx, *temp; + struct hfa384x_usbctlx *ctlx, *temp; unsigned long flags; - hfa384x_t *hw = wlandev->priv; + struct hfa384x *hw = wlandev->priv; if (!hw) goto exit; @@ -218,10 +218,10 @@ exit: static int prism2sta_suspend(struct usb_interface *interface, pm_message_t message) { - hfa384x_t *hw = NULL; - wlandevice_t *wlandev; + struct hfa384x *hw = NULL; + struct wlandevice *wlandev; - wlandev = (wlandevice_t *)usb_get_intfdata(interface); + wlandev = (struct wlandevice *)usb_get_intfdata(interface); if (!wlandev) return -ENODEV; @@ -241,10 +241,10 @@ static int prism2sta_suspend(struct usb_interface *interface, static int prism2sta_resume(struct usb_interface *interface) { int result = 0; - hfa384x_t *hw = NULL; - wlandevice_t *wlandev; + struct hfa384x *hw = NULL; + struct wlandevice *wlandev; - wlandev = (wlandevice_t *)usb_get_intfdata(interface); + wlandev = (struct wlandevice *)usb_get_intfdata(interface); if (!wlandev) return -ENODEV; -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel