summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r--drivers/staging/wlan-ng/cfg80211.c151
-rw-r--r--drivers/staging/wlan-ng/hfa384x.h904
-rw-r--r--drivers/staging/wlan-ng/hfa384x_usb.c307
-rw-r--r--drivers/staging/wlan-ng/p80211conv.c8
-rw-r--r--drivers/staging/wlan-ng/p80211metadef.h19
-rw-r--r--drivers/staging/wlan-ng/p80211metastruct.h248
-rw-r--r--drivers/staging/wlan-ng/p80211netdev.c88
-rw-r--r--drivers/staging/wlan-ng/p80211netdev.h43
-rw-r--r--drivers/staging/wlan-ng/p80211req.c95
-rw-r--r--drivers/staging/wlan-ng/p80211req.h2
-rw-r--r--drivers/staging/wlan-ng/p80211types.h261
-rw-r--r--drivers/staging/wlan-ng/p80211wep.c6
-rw-r--r--drivers/staging/wlan-ng/prism2fw.c50
-rw-r--r--drivers/staging/wlan-ng/prism2mgmt.c62
-rw-r--r--drivers/staging/wlan-ng/prism2mgmt.h51
-rw-r--r--drivers/staging/wlan-ng/prism2mib.c622
-rw-r--r--drivers/staging/wlan-ng/prism2sta.c261
-rw-r--r--drivers/staging/wlan-ng/prism2usb.c38
18 files changed, 1580 insertions, 1636 deletions
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index f46dfe6..182b2d5 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,11 @@ 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 +82,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 +103,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,12 +144,15 @@ 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;
int result = 0;
+ if (key_index >= NUM_WEPKEYS)
+ return -EINVAL;
+
switch (params->cipher) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
@@ -160,27 +163,7 @@ static int prism2_add_key(struct wiphy *wiphy, struct net_device *dev,
goto exit;
/* send key to driver */
- switch (key_index) {
- case 0:
- did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0;
- break;
-
- case 1:
- did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1;
- break;
-
- case 2:
- did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2;
- break;
-
- case 3:
- did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3;
- break;
-
- default:
- err = -EINVAL;
- goto exit;
- }
+ did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(key_index + 1);
result = prism2_domibset_pstr32(wlandev, did,
params->key_len, params->key);
@@ -205,7 +188,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 +216,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;
@@ -242,36 +225,13 @@ static int prism2_del_key(struct wiphy *wiphy, struct net_device *dev,
* a key, so we will cheat by setting the key to a bogus value
*/
- /* send key to driver */
- switch (key_index) {
- case 0:
- did =
- DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0;
- break;
-
- case 1:
- did =
- DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1;
- break;
-
- case 2:
- did =
- DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2;
- break;
-
- case 3:
- did =
- DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3;
- break;
-
- default:
- err = -EINVAL;
- goto exit;
- }
+ if (key_index >= NUM_WEPKEYS)
+ return -EINVAL;
+ /* send key to driver */
+ did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(key_index + 1);
result = prism2_domibset_pstr32(wlandev, did, 13, "0000000000000");
-exit:
if (result)
err = -EFAULT;
@@ -281,7 +241,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,13 +259,13 @@ 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;
memset(sinfo, 0, sizeof(*sinfo));
- if ((wlandev == NULL) || (wlandev->msdstate != WLAN_MSD_RUNNING))
+ if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING))
return -EOPNOTSUPP;
/* build request message */
@@ -314,7 +274,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
quality.dbm.status = P80211ENUM_msgitem_status_data_ok;
/* send message to nsd */
- if (wlandev->mlmerequest == NULL)
+ if (!wlandev->mlmerequest)
return -EOPNOTSUPP;
result = wlandev->mlmerequest(wlandev, (struct p80211msg *)&quality);
@@ -334,7 +294,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;
@@ -374,7 +334,7 @@ static int prism2_scan(struct wiphy *wiphy,
msg1.scantype.data = P80211ENUM_scantype_active;
msg1.ssid.data.len = request->ssids->ssid_len;
memcpy(msg1.ssid.data.data,
- request->ssids->ssid, request->ssids->ssid_len);
+ request->ssids->ssid, request->ssids->ssid_len);
} else {
msg1.scantype.data = 0;
}
@@ -451,7 +411,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 +453,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;
@@ -516,11 +476,11 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
/* Set the authorization */
if ((sme->auth_type == NL80211_AUTHTYPE_OPEN_SYSTEM) ||
- ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && !is_wep))
- msg_join.authtype.data = P80211ENUM_authalg_opensystem;
+ ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && !is_wep))
+ msg_join.authtype.data = P80211ENUM_authalg_opensystem;
else if ((sme->auth_type == NL80211_AUTHTYPE_SHARED_KEY) ||
- ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && is_wep))
- msg_join.authtype.data = P80211ENUM_authalg_sharedkey;
+ ((sme->auth_type == NL80211_AUTHTYPE_AUTOMATIC) && is_wep))
+ msg_join.authtype.data = P80211ENUM_authalg_sharedkey;
else
netdev_warn(dev,
"Unhandled authorisation type for connect (%d)\n",
@@ -529,6 +489,11 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
/* Set the encryption - we only support wep */
if (is_wep) {
if (sme->key) {
+ if (sme->key_idx >= NUM_WEPKEYS) {
+ err = -EINVAL;
+ goto exit;
+ }
+
result = prism2_domibset_uint32(wlandev,
DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID,
sme->key_idx);
@@ -536,28 +501,8 @@ static int prism2_connect(struct wiphy *wiphy, struct net_device *dev,
goto exit;
/* send key to driver */
- switch (sme->key_idx) {
- case 0:
- did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0;
- break;
-
- case 1:
- did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1;
- break;
-
- case 2:
- did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2;
- break;
-
- case 3:
- did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3;
- break;
-
- default:
- err = -EINVAL;
- goto exit;
- }
-
+ did = DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(
+ sme->key_idx + 1);
result = prism2_domibset_pstr32(wlandev,
did, sme->key_len,
(u8 *)sme->key);
@@ -618,7 +563,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 +597,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 +624,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 +649,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 +658,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);
+ 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 +689,7 @@ 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..43c299c 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -1,57 +1,57 @@
/* hfa384x.h
-*
-* Defines the constants and data structures for the hfa384x
-*
-* Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
-* --------------------------------------------------------------------
-*
-* linux-wlan
-*
-* The contents of this file are subject to the Mozilla Public
-* License Version 1.1 (the "License"); you may not use this file
-* except in compliance with the License. You may obtain a copy of
-* the License at http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS
-* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-* implied. See the License for the specific language governing
-* rights and limitations under the License.
-*
-* Alternatively, the contents of this file may be used under the
-* terms of the GNU Public License version 2 (the "GPL"), in which
-* case the provisions of the GPL are applicable instead of the
-* above. If you wish to allow the use of your version of this file
-* only under the terms of the GPL and not to allow others to use
-* your version of this file under the MPL, indicate your decision
-* by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL. If you do not delete
-* the provisions above, a recipient may use your version of this
-* file under either the MPL or the GPL.
-*
-* --------------------------------------------------------------------
-*
-* Inquiries regarding the linux-wlan Open Source project can be
-* made directly to:
-*
-* AbsoluteValue Systems Inc.
-* info@linux-wlan.com
-* http://www.linux-wlan.com
-*
-* --------------------------------------------------------------------
-*
-* Portions of the development of this software were funded by
-* Intersil Corporation as part of PRISM(R) chipset product development.
-*
-* --------------------------------------------------------------------
-*
-* [Implementation and usage notes]
-*
-* [References]
-* CW10 Programmer's Manual v1.5
-* IEEE 802.11 D10.0
-*
-* --------------------------------------------------------------------
-*/
+ *
+ * Defines the constants and data structures for the hfa384x
+ *
+ * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
+ * --------------------------------------------------------------------
+ *
+ * linux-wlan
+ *
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * Alternatively, the contents of this file may be used under the
+ * terms of the GNU Public License version 2 (the "GPL"), in which
+ * case the provisions of the GPL are applicable instead of the
+ * above. If you wish to allow the use of your version of this file
+ * only under the terms of the GPL and not to allow others to use
+ * your version of this file under the MPL, indicate your decision
+ * by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL. If you do not delete
+ * the provisions above, a recipient may use your version of this
+ * file under either the MPL or the GPL.
+ *
+ * --------------------------------------------------------------------
+ *
+ * Inquiries regarding the linux-wlan Open Source project can be
+ * made directly to:
+ *
+ * AbsoluteValue Systems Inc.
+ * info@linux-wlan.com
+ * http://www.linux-wlan.com
+ *
+ * --------------------------------------------------------------------
+ *
+ * Portions of the development of this software were funded by
+ * Intersil Corporation as part of PRISM(R) chipset product development.
+ *
+ * --------------------------------------------------------------------
+ *
+ * [Implementation and usage notes]
+ *
+ * [References]
+ * CW10 Programmer's Manual v1.5
+ * IEEE 802.11 D10.0
+ *
+ * --------------------------------------------------------------------
+ */
#ifndef _HFA384x_H
#define _HFA384x_H
@@ -63,7 +63,7 @@
/*--- Mins & Maxs -----------------------------------*/
#define HFA384x_PORTID_MAX ((u16)7)
-#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1))
+#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX + 1))
#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */
#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */
#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK*/
@@ -110,20 +110,21 @@
#define HFA384x_ADDR_FLAT_CMD_OFF_MASK (0x0000ffff)
/* Mask bits for discarding unwanted pieces in AUX format
- 16-bit address parts */
+ * 16-bit address parts
+ */
#define HFA384x_ADDR_AUX_PAGE_MASK (0xffff)
#define HFA384x_ADDR_AUX_OFF_MASK (0x007f)
/* Make a 32-bit flat address from AUX format 16-bit page and offset */
#define HFA384x_ADDR_AUX_MKFLAT(p, o) \
- ((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
- ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)))
+ ((((u32)(((u16)(p)) & HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
+ ((u32)(((u16)(o)) & HFA384x_ADDR_AUX_OFF_MASK)))
/* Make CMD format offset and page from a 32-bit flat address */
#define HFA384x_ADDR_CMD_MKPAGE(f) \
- ((u16)((((u32)(f))&HFA384x_ADDR_FLAT_CMD_PAGE_MASK)>>16))
+ ((u16)((((u32)(f)) & HFA384x_ADDR_FLAT_CMD_PAGE_MASK) >> 16))
#define HFA384x_ADDR_CMD_MKOFF(f) \
- ((u16)(((u32)(f))&HFA384x_ADDR_FLAT_CMD_OFF_MASK))
+ ((u16)(((u32)(f)) & HFA384x_ADDR_FLAT_CMD_OFF_MASK))
/*--- Controller Memory addresses -------------------*/
#define HFA3842_PDA_BASE (0x007f0000UL)
@@ -173,11 +174,12 @@
#define HFA384x_CMD_ERR ((u16)(0x7F))
/*--- Programming Modes --------------------------
- MODE 0: Disable programming
- MODE 1: Enable volatile memory programming
- MODE 2: Enable non-volatile memory programming
- MODE 3: Program non-volatile memory section
---------------------------------------------------*/
+ * MODE 0: Disable programming
+ * MODE 1: Enable volatile memory programming
+ * MODE 2: Enable non-volatile memory programming
+ * MODE 3: Program non-volatile memory section
+ *-------------------------------------------------
+ */
#define HFA384x_PROGMODE_DISABLE ((u16)0x00)
#define HFA384x_PROGMODE_RAM ((u16)0x01)
#define HFA384x_PROGMODE_NV ((u16)0x02)
@@ -185,8 +187,9 @@
/*--- Record ID Constants --------------------------*/
/*--------------------------------------------------------------------
-Configuration RIDs: Network Parameters, Static Configuration Entities
---------------------------------------------------------------------*/
+ * Configuration RIDs: Network Parameters, Static Configuration Entities
+ *--------------------------------------------------------------------
+ */
#define HFA384x_RID_CNFPORTTYPE ((u16)0xFC00)
#define HFA384x_RID_CNFOWNMACADDR ((u16)0xFC01)
#define HFA384x_RID_CNFDESIREDSSID ((u16)0xFC02)
@@ -195,17 +198,19 @@ Configuration RIDs: Network Parameters, Static Configuration Entities
#define HFA384x_RID_CNFMAXDATALEN ((u16)0xFC07)
/*--------------------------------------------------------------------
-Configuration RID lengths: Network Params, Static Config Entities
- This is the length of JUST the DATA part of the RID (does not
- include the len or code fields)
---------------------------------------------------------------------*/
+ * Configuration RID lengths: Network Params, Static Config Entities
+ * This is the length of JUST the DATA part of the RID (does not
+ * include the len or code fields)
+ *--------------------------------------------------------------------
+ */
#define HFA384x_RID_CNFOWNMACADDR_LEN ((u16)6)
#define HFA384x_RID_CNFDESIREDSSID_LEN ((u16)34)
#define HFA384x_RID_CNFOWNSSID_LEN ((u16)34)
/*--------------------------------------------------------------------
-Configuration RIDs: Network Parameters, Dynamic Configuration Entities
---------------------------------------------------------------------*/
+ * Configuration RIDs: Network Parameters, Dynamic Configuration Entities
+ *--------------------------------------------------------------------
+ */
#define HFA384x_RID_CREATEIBSS ((u16)0xFC81)
#define HFA384x_RID_FRAGTHRESH ((u16)0xFC82)
#define HFA384x_RID_RTSTHRESH ((u16)0xFC83)
@@ -213,8 +218,9 @@ Configuration RIDs: Network Parameters, Dynamic Configuration Entities
#define HFA384x_RID_PROMISCMODE ((u16)0xFC85)
/*----------------------------------------------------------------------
-Information RIDs: NIC Information
---------------------------------------------------------------------*/
+ * Information RIDs: NIC Information
+ *----------------------------------------------------------------------
+ */
#define HFA384x_RID_MAXLOADTIME ((u16)0xFD00)
#define HFA384x_RID_DOWNLOADBUFFER ((u16)0xFD01)
#define HFA384x_RID_PRIIDENTITY ((u16)0xFD02)
@@ -230,15 +236,17 @@ Information RIDs: NIC Information
#define HFA384x_RID_STA_CFIACTRANGES ((u16)0xFD23)
/*----------------------------------------------------------------------
-Information RID Lengths: NIC Information
- This is the length of JUST the DATA part of the RID (does not
- include the len or code fields)
---------------------------------------------------------------------*/
+ * Information RID Lengths: NIC Information
+ * This is the length of JUST the DATA part of the RID (does not
+ * include the len or code fields)
+ *---------------------------------------------------------------------
+ */
#define HFA384x_RID_NICSERIALNUMBER_LEN ((u16)12)
/*--------------------------------------------------------------------
-Information RIDs: MAC Information
---------------------------------------------------------------------*/
+ * Information RIDs: MAC Information
+ *--------------------------------------------------------------------
+ */
#define HFA384x_RID_PORTSTATUS ((u16)0xFD40)
#define HFA384x_RID_CURRENTSSID ((u16)0xFD41)
#define HFA384x_RID_CURRENTBSSID ((u16)0xFD42)
@@ -250,23 +258,26 @@ Information RIDs: MAC Information
#define HFA384x_RID_DBMCOMMSQUALITY ((u16)0xFD51)
/*--------------------------------------------------------------------
-Information RID Lengths: MAC Information
- This is the length of JUST the DATA part of the RID (does not
- include the len or code fields)
---------------------------------------------------------------------*/
+ * Information RID Lengths: MAC Information
+ * This is the length of JUST the DATA part of the RID (does not
+ * include the len or code fields)
+ *--------------------------------------------------------------------
+ */
#define HFA384x_RID_DBMCOMMSQUALITY_LEN \
- ((u16) sizeof(hfa384x_dbmcommsquality_t))
+ ((u16)sizeof(struct hfa384x_dbmcommsquality))
#define HFA384x_RID_JOINREQUEST_LEN \
- ((u16)sizeof(hfa384x_JoinRequest_data_t))
+ ((u16)sizeof(struct hfa384x_JoinRequest_data))
/*--------------------------------------------------------------------
-Information RIDs: Modem Information
---------------------------------------------------------------------*/
+ * Information RIDs: Modem Information
+ *--------------------------------------------------------------------
+ */
#define HFA384x_RID_CURRENTCHANNEL ((u16)0xFDC1)
/*--------------------------------------------------------------------
-API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
---------------------------------------------------------------------*/
+ * API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
+ *--------------------------------------------------------------------
+ */
#define HFA384x_RID_CNFWEPDEFAULTKEYID ((u16)0xFC23)
#define HFA384x_RID_CNFWEPDEFAULTKEY0 ((u16)0xFC24)
#define HFA384x_RID_CNFWEPDEFAULTKEY1 ((u16)0xFC25)
@@ -290,8 +301,9 @@ API ENHANCEMENTS (NOT ALREADY IMPLEMENTED)
#define HFA384x_RID_CNFWEP128DEFAULTKEY_LEN ((u16)14)
/*--------------------------------------------------------------------
-PD Record codes
---------------------------------------------------------------------*/
+ * PD Record codes
+ *--------------------------------------------------------------------
+ */
#define HFA384x_PDR_PCB_PARTNUM ((u16)0x0001)
#define HFA384x_PDR_PDAVER ((u16)0x0002)
#define HFA384x_PDR_NIC_SERIAL ((u16)0x0003)
@@ -355,31 +367,32 @@ struct hfa384x_bytestr {
u8 data[0];
} __packed;
-typedef struct hfa384x_bytestr32 {
+struct hfa384x_bytestr32 {
u16 len;
u8 data[32];
-} __packed hfa384x_bytestr32_t;
+} __packed;
/*--------------------------------------------------------------------
-Configuration Record Structures:
- Network Parameters, Static Configuration Entities
---------------------------------------------------------------------*/
+ * Configuration Record Structures:
+ * Network Parameters, Static Configuration Entities
+ *--------------------------------------------------------------------
+ */
/*-- Hardware/Firmware Component Information ----------*/
-typedef struct hfa384x_compident {
+struct hfa384x_compident {
u16 id;
u16 variant;
u16 major;
u16 minor;
-} __packed hfa384x_compident_t;
+} __packed;
-typedef struct hfa384x_caplevel {
+struct hfa384x_caplevel {
u16 role;
u16 id;
u16 variant;
u16 bottom;
u16 top;
-} __packed hfa384x_caplevel_t;
+} __packed;
/*-- Configuration Record: cnfAuthentication --*/
#define HFA384x_CNFAUTHENTICATION_OPENSYSTEM 0x0001
@@ -387,77 +400,81 @@ typedef struct hfa384x_caplevel {
#define HFA384x_CNFAUTHENTICATION_LEAP 0x0004
/*--------------------------------------------------------------------
-Configuration Record Structures:
- Network Parameters, Dynamic Configuration Entities
---------------------------------------------------------------------*/
+ * Configuration Record Structures:
+ * Network Parameters, Dynamic Configuration Entities
+ *--------------------------------------------------------------------
+ */
#define HFA384x_CREATEIBSS_JOINCREATEIBSS 0
/*-- Configuration Record: HostScanRequest (data portion only) --*/
-typedef struct hfa384x_HostScanRequest_data {
+struct hfa384x_HostScanRequest_data {
u16 channelList;
u16 txRate;
- hfa384x_bytestr32_t ssid;
-} __packed hfa384x_HostScanRequest_data_t;
+ struct hfa384x_bytestr32 ssid;
+} __packed;
/*-- Configuration Record: JoinRequest (data portion only) --*/
-typedef struct hfa384x_JoinRequest_data {
+struct hfa384x_JoinRequest_data {
u8 bssid[WLAN_BSSID_LEN];
u16 channel;
-} __packed hfa384x_JoinRequest_data_t;
+} __packed;
/*-- Configuration Record: authenticateStation (data portion only) --*/
-typedef struct hfa384x_authenticateStation_data {
+struct hfa384x_authenticateStation_data {
u8 address[ETH_ALEN];
u16 status;
u16 algorithm;
-} __packed hfa384x_authenticateStation_data_t;
+} __packed;
/*-- Configuration Record: WPAData (data portion only) --*/
-typedef struct hfa384x_WPAData {
+struct hfa384x_WPAData {
u16 datalen;
u8 data[0]; /* max 80 */
-} __packed hfa384x_WPAData_t;
+} __packed;
/*--------------------------------------------------------------------
-Information Record Structures: NIC Information
---------------------------------------------------------------------*/
+ * Information Record Structures: NIC Information
+ *--------------------------------------------------------------------
+ */
/*-- Information Record: DownLoadBuffer --*/
/* NOTE: The page and offset are in AUX format */
-typedef struct hfa384x_downloadbuffer {
+struct hfa384x_downloadbuffer {
u16 page;
u16 offset;
u16 len;
-} __packed hfa384x_downloadbuffer_t;
+} __packed;
/*--------------------------------------------------------------------
-Information Record Structures: NIC Information
---------------------------------------------------------------------*/
+ * Information Record Structures: NIC Information
+ *--------------------------------------------------------------------
+ */
#define HFA384x_PSTATUS_CONN_IBSS ((u16)3)
/*-- Information Record: commsquality --*/
-typedef struct hfa384x_commsquality {
+struct hfa384x_commsquality {
u16 CQ_currBSS;
u16 ASL_currBSS;
u16 ANL_currFC;
-} __packed hfa384x_commsquality_t;
+} __packed;
/*-- Information Record: dmbcommsquality --*/
-typedef struct hfa384x_dbmcommsquality {
+struct hfa384x_dbmcommsquality {
u16 CQdbm_currBSS;
u16 ASLdbm_currBSS;
u16 ANLdbm_currFC;
-} __packed hfa384x_dbmcommsquality_t;
+} __packed;
/*--------------------------------------------------------------------
-FRAME STRUCTURES: Communication Frames
-----------------------------------------------------------------------
-Communication Frames: Transmit Frames
---------------------------------------------------------------------*/
+ * FRAME STRUCTURES: Communication Frames
+ *--------------------------------------------------------------------
+ * Communication Frames: Transmit Frames
+ *--------------------------------------------------------------------
+ */
/*-- Communication Frame: Transmit Frame Structure --*/
-typedef struct hfa384x_tx_frame {
+struct hfa384x_tx_frame {
u16 status;
u16 reserved1;
u16 reserved2;
@@ -482,10 +499,11 @@ typedef struct hfa384x_tx_frame {
u8 dest_addr[6];
u8 src_addr[6];
u16 data_length; /* big endian format */
-} __packed hfa384x_tx_frame_t;
+} __packed;
/*--------------------------------------------------------------------
-Communication Frames: Field Masks for Transmit Frames
---------------------------------------------------------------------*/
+ * Communication Frames: Field Masks for Transmit Frames
+ *--------------------------------------------------------------------
+ */
/*-- Status Field --*/
#define HFA384x_TXSTATUS_ACKERR ((u16)BIT(5))
#define HFA384x_TXSTATUS_FORMERR ((u16)BIT(3))
@@ -499,16 +517,17 @@ Communication Frames: Field Masks for Transmit Frames
#define HFA384x_TX_TXEX ((u16)BIT(2))
#define HFA384x_TX_TXOK ((u16)BIT(1))
/*--------------------------------------------------------------------
-Communication Frames: Test/Get/Set Field Values for Transmit Frames
---------------------------------------------------------------------*/
+ * Communication Frames: Test/Get/Set Field Values for Transmit Frames
+ *--------------------------------------------------------------------
+ */
/*-- Status Field --*/
#define HFA384x_TXSTATUS_ISERROR(v) \
- (((u16)(v))&\
- (HFA384x_TXSTATUS_ACKERR|HFA384x_TXSTATUS_FORMERR|\
- HFA384x_TXSTATUS_DISCON|HFA384x_TXSTATUS_AGEDERR|\
+ (((u16)(v)) & \
+ (HFA384x_TXSTATUS_ACKERR | HFA384x_TXSTATUS_FORMERR | \
+ HFA384x_TXSTATUS_DISCON | HFA384x_TXSTATUS_AGEDERR | \
HFA384x_TXSTATUS_RETRYERR))
-#define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m)))
+#define HFA384x_TX_SET(v, m, s) ((((u16)(v)) << ((u16)(s))) & ((u16)(m)))
#define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \
@@ -516,10 +535,11 @@ Communication Frames: Test/Get/Set Field Values for Transmit Frames
#define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
#define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
/*--------------------------------------------------------------------
-Communication Frames: Receive Frames
---------------------------------------------------------------------*/
+ * Communication Frames: Receive Frames
+ *--------------------------------------------------------------------
+ */
/*-- Communication Frame: Receive Frame Structure --*/
-typedef struct hfa384x_rx_frame {
+struct hfa384x_rx_frame {
/*-- MAC rx descriptor (hfa384x byte order) --*/
u16 status;
u32 time;
@@ -544,10 +564,11 @@ typedef struct hfa384x_rx_frame {
u8 dest_addr[6];
u8 src_addr[6];
u16 data_length; /* IEEE? (big endian) format */
-} __packed hfa384x_rx_frame_t;
+} __packed;
/*--------------------------------------------------------------------
-Communication Frames: Field Masks for Receive Frames
---------------------------------------------------------------------*/
+ * Communication Frames: Field Masks for Receive Frames
+ *--------------------------------------------------------------------
+ */
/*-- Status Fields --*/
#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | \
@@ -555,17 +576,19 @@ Communication Frames: Field Masks for Receive Frames
BIT(8)))
#define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0))
/*--------------------------------------------------------------------
-Communication Frames: Test/Get/Set Field Values for Receive Frames
---------------------------------------------------------------------*/
+ * Communication Frames: Test/Get/Set Field Values for Receive Frames
+ *--------------------------------------------------------------------
+ */
#define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) \
& HFA384x_RXSTATUS_MACPORT) >> 8))
#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \
& HFA384x_RXSTATUS_FCSERR))
/*--------------------------------------------------------------------
- FRAME STRUCTURES: Information Types and Information Frame Structures
-----------------------------------------------------------------------
-Information Types
---------------------------------------------------------------------*/
+ * FRAME STRUCTURES: Information Types and Information Frame Structures
+ *--------------------------------------------------------------------
+ * Information Types
+ *--------------------------------------------------------------------
+ */
#define HFA384x_IT_HANDOVERADDR ((u16)0xF000UL)
#define HFA384x_IT_COMMTALLIES ((u16)0xF100UL)
#define HFA384x_IT_SCANRESULTS ((u16)0xF101UL)
@@ -580,13 +603,14 @@ Information Types
#define HFA384x_IT_MICFAILURE ((u16)0xF206UL)
/*--------------------------------------------------------------------
-Information Frames Structures
-----------------------------------------------------------------------
-Information Frames: Notification Frame Structures
---------------------------------------------------------------------*/
+ * Information Frames Structures
+ *--------------------------------------------------------------------
+ * Information Frames: Notification Frame Structures
+ *--------------------------------------------------------------------
+ */
/*-- Inquiry Frame, Diagnose: Communication Tallies --*/
-typedef struct hfa384x_CommTallies16 {
+struct hfa384x_CommTallies16 {
u16 txunicastframes;
u16 txmulticastframes;
u16 txfragments;
@@ -608,9 +632,9 @@ typedef struct hfa384x_CommTallies16 {
u16 rxdiscardswepundecr;
u16 rxmsginmsgfrag;
u16 rxmsginbadmsgfrag;
-} __packed hfa384x_CommTallies16_t;
+} __packed;
-typedef struct hfa384x_CommTallies32 {
+struct hfa384x_CommTallies32 {
u32 txunicastframes;
u32 txmulticastframes;
u32 txfragments;
@@ -632,62 +656,62 @@ typedef struct hfa384x_CommTallies32 {
u32 rxdiscardswepundecr;
u32 rxmsginmsgfrag;
u32 rxmsginbadmsgfrag;
-} __packed hfa384x_CommTallies32_t;
+} __packed;
/*-- Inquiry Frame, Diagnose: Scan Results & Subfields--*/
-typedef struct hfa384x_ScanResultSub {
+struct hfa384x_ScanResultSub {
u16 chid;
u16 anl;
u16 sl;
u8 bssid[WLAN_BSSID_LEN];
u16 bcnint;
u16 capinfo;
- hfa384x_bytestr32_t ssid;
+ struct hfa384x_bytestr32 ssid;
u8 supprates[10]; /* 802.11 info element */
u16 proberesp_rate;
-} __packed hfa384x_ScanResultSub_t;
+} __packed;
-typedef struct hfa384x_ScanResult {
+struct hfa384x_ScanResult {
u16 rsvd;
u16 scanreason;
- hfa384x_ScanResultSub_t result[HFA384x_SCANRESULT_MAX];
-} __packed hfa384x_ScanResult_t;
+ struct hfa384x_ScanResultSub result[HFA384x_SCANRESULT_MAX];
+} __packed;
/*-- Inquiry Frame, Diagnose: ChInfo Results & Subfields--*/
-typedef struct hfa384x_ChInfoResultSub {
+struct hfa384x_ChInfoResultSub {
u16 chid;
u16 anl;
u16 pnl;
u16 active;
-} __packed hfa384x_ChInfoResultSub_t;
+} __packed;
#define HFA384x_CHINFORESULT_BSSACTIVE BIT(0)
#define HFA384x_CHINFORESULT_PCFACTIVE BIT(1)
-typedef struct hfa384x_ChInfoResult {
+struct hfa384x_ChInfoResult {
u16 scanchannels;
- hfa384x_ChInfoResultSub_t result[HFA384x_CHINFORESULT_MAX];
-} __packed hfa384x_ChInfoResult_t;
+ struct hfa384x_ChInfoResultSub result[HFA384x_CHINFORESULT_MAX];
+} __packed;
/*-- Inquiry Frame, Diagnose: Host Scan Results & Subfields--*/
-typedef struct hfa384x_HScanResultSub {
+struct hfa384x_HScanResultSub {
u16 chid;
u16 anl;
u16 sl;
u8 bssid[WLAN_BSSID_LEN];
u16 bcnint;
u16 capinfo;
- hfa384x_bytestr32_t ssid;
+ struct hfa384x_bytestr32 ssid;
u8 supprates[10]; /* 802.11 info element */
u16 proberesp_rate;
u16 atim;
-} __packed hfa384x_HScanResultSub_t;
+} __packed;
-typedef struct hfa384x_HScanResult {
+struct hfa384x_HScanResult {
u16 nresult;
u16 rsvd;
- hfa384x_HScanResultSub_t result[HFA384x_HSCANRESULT_MAX];
-} __packed hfa384x_HScanResult_t;
+ struct hfa384x_HScanResultSub result[HFA384x_HSCANRESULT_MAX];
+} __packed;
/*-- Unsolicited Frame, MAC Mgmt: LinkStatus --*/
@@ -699,9 +723,9 @@ typedef struct hfa384x_HScanResult {
#define HFA384x_LINK_AP_INRANGE ((u16)5)
#define HFA384x_LINK_ASSOCFAIL ((u16)6)
-typedef struct hfa384x_LinkStatus {
+struct hfa384x_LinkStatus {
u16 linkstatus;
-} __packed hfa384x_LinkStatus_t;
+} __packed;
/*-- Unsolicited Frame, MAC Mgmt: AssociationStatus (--*/
@@ -709,56 +733,57 @@ typedef struct hfa384x_LinkStatus {
#define HFA384x_ASSOCSTATUS_REASSOC ((u16)2)
#define HFA384x_ASSOCSTATUS_AUTHFAIL ((u16)5)
-typedef struct hfa384x_AssocStatus {
+struct hfa384x_AssocStatus {
u16 assocstatus;
u8 sta_addr[ETH_ALEN];
/* old_ap_addr is only valid if assocstatus == 2 */
u8 old_ap_addr[ETH_ALEN];
u16 reason;
u16 reserved;
-} __packed hfa384x_AssocStatus_t;
+} __packed;
/*-- Unsolicited Frame, MAC Mgmt: AuthRequest (AP Only) --*/
-typedef struct hfa384x_AuthRequest {
+struct hfa384x_AuthRequest {
u8 sta_addr[ETH_ALEN];
u16 algorithm;
-} __packed hfa384x_AuthReq_t;
+} __packed;
/*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/
-typedef struct hfa384x_PSUserCount {
+struct hfa384x_PSUserCount {
u16 usercnt;
-} __packed hfa384x_PSUserCount_t;
+} __packed;
-typedef struct hfa384x_KeyIDChanged {
+struct hfa384x_KeyIDChanged {
u8 sta_addr[ETH_ALEN];
u16 keyid;
-} __packed hfa384x_KeyIDChanged_t;
+} __packed;
/*-- Collection of all Inf frames ---------------*/
-typedef union hfa384x_infodata {
- hfa384x_CommTallies16_t commtallies16;
- hfa384x_CommTallies32_t commtallies32;
- hfa384x_ScanResult_t scanresult;
- hfa384x_ChInfoResult_t chinforesult;
- hfa384x_HScanResult_t hscanresult;
- hfa384x_LinkStatus_t linkstatus;
- hfa384x_AssocStatus_t assocstatus;
- hfa384x_AuthReq_t authreq;
- hfa384x_PSUserCount_t psusercnt;
- hfa384x_KeyIDChanged_t keyidchanged;
-} __packed hfa384x_infodata_t;
-
-typedef struct hfa384x_InfFrame {
+union hfa384x_infodata {
+ struct hfa384x_CommTallies16 commtallies16;
+ struct hfa384x_CommTallies32 commtallies32;
+ struct hfa384x_ScanResult scanresult;
+ struct hfa384x_ChInfoResult chinforesult;
+ struct hfa384x_HScanResult hscanresult;
+ struct hfa384x_LinkStatus linkstatus;
+ struct hfa384x_AssocStatus assocstatus;
+ struct hfa384x_AuthRequest authreq;
+ struct hfa384x_PSUserCount psusercnt;
+ struct hfa384x_KeyIDChanged keyidchanged;
+} __packed;
+
+struct hfa384x_InfFrame {
u16 framelen;
u16 infotype;
- hfa384x_infodata_t info;
-} __packed hfa384x_InfFrame_t;
+ union hfa384x_infodata info;
+} __packed;
/*--------------------------------------------------------------------
-USB Packet structures and constants.
---------------------------------------------------------------------*/
+ * USB Packet structures and constants.
+ *--------------------------------------------------------------------
+ */
/* Should be sent to the bulkout endpoint */
#define HFA384x_USB_TXFRM 0
@@ -783,143 +808,140 @@ 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.
---------------------------------------------------------------------*/
+ * 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 +957,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 {
+ * --- MAC state structure, argument to all functions --
+ * --- Also, a collection of support types --
+ *--------------------------------------------------------------------
+ */
+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 +1152,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 */
@@ -1156,12 +1179,12 @@ 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 */
@@ -1173,25 +1196,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 +1241,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 +1288,20 @@ typedef struct hfa384x {
/* Download support */
unsigned int dlstate;
- hfa384x_downloadbuffer_t bufinfo;
+ struct hfa384x_downloadbuffer bufinfo;
u16 dltimeout;
int scanflag; /* to signal scan complete */
int join_ap; /* are we joined to a specific ap */
int join_retries; /* number of join retries till we fail */
- hfa384x_JoinRequest_data_t joinreq; /* join request saved data */
+ struct hfa384x_JoinRequest_data joinreq; /* join request saved data */
- wlandevice_t *wlandev;
+ struct wlandevice *wlandev;
/* Timer to allow for the deferred processing of linkstatus messages */
struct work_struct link_bh;
struct work_struct commsqual_bh;
- hfa384x_commsquality_t qual;
+ struct hfa384x_commsquality qual;
struct timer_list commsqual_timer;
u16 link_status;
@@ -1297,92 +1320,93 @@ typedef struct hfa384x {
int dbmadjust;
/* Group Addresses - right now, there are up to a total
- of MAX_GRP_ADDR group addresses */
+ * of MAX_GRP_ADDR group addresses
+ */
u8 dot11_grp_addr[MAX_GRP_ADDR][ETH_ALEN];
unsigned int dot11_grpcnt;
/* Component Identities */
- hfa384x_compident_t ident_nic;
- hfa384x_compident_t ident_pri_fw;
- hfa384x_compident_t ident_sta_fw;
- hfa384x_compident_t ident_ap_fw;
+ struct hfa384x_compident ident_nic;
+ struct hfa384x_compident ident_pri_fw;
+ struct hfa384x_compident ident_sta_fw;
+ struct hfa384x_compident ident_ap_fw;
u16 mm_mods;
/* Supplier compatibility ranges */
- hfa384x_caplevel_t cap_sup_mfi;
- hfa384x_caplevel_t cap_sup_cfi;
- hfa384x_caplevel_t cap_sup_pri;
- hfa384x_caplevel_t cap_sup_sta;
- hfa384x_caplevel_t cap_sup_ap;
+ struct hfa384x_caplevel cap_sup_mfi;
+ struct hfa384x_caplevel cap_sup_cfi;
+ struct hfa384x_caplevel cap_sup_pri;
+ struct hfa384x_caplevel cap_sup_sta;
+ struct hfa384x_caplevel cap_sup_ap;
/* Actor compatibility ranges */
- hfa384x_caplevel_t cap_act_pri_cfi; /*
- * pri f/w to controller
- * interface
- */
+ 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 hfa384x_InfFrame *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. */
-} hfa384x_t;
+};
-void hfa384x_create(hfa384x_t *hw, struct usb_device *usb);
-void hfa384x_destroy(hfa384x_t *hw);
+void hfa384x_create(struct hfa384x *hw, struct usb_device *usb);
+void hfa384x_destroy(struct hfa384x *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)
+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;
result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
if (result == 0)
- *((u16 *) val) = le16_to_cpu(*((u16 *) val));
+ *((u16 *)val) = le16_to_cpu(*((u16 *)val));
return result;
}
-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 +1414,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 +1428,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..6a107f8 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -154,13 +154,13 @@ 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 +169,19 @@ 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 +193,42 @@ 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 +236,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 +244,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 +253,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,
@@ -278,9 +278,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 +322,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 +336,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 +384,7 @@ 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 +429,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 +503,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 +521,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 +592,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 +608,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 +621,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 +636,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 +647,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)
@@ -667,9 +667,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
+ const struct hfa384x_usb_statusresp
*cmdresp,
- hfa384x_cmdresult_t *result)
+ struct hfa384x_cmdresult *result)
{
completor->head.complete = usbctlx_cmd_completor_fn;
completor->cmdresp = cmdresp;
@@ -685,7 +685,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 +693,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);
@@ -713,7 +713,7 @@ 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
+ const struct hfa384x_usb_rridresp
*rridresp,
void *riddata,
unsigned int riddatalen)
@@ -744,7 +744,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 +762,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 +795,10 @@ 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 +812,21 @@ 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 +834,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 +845,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 +853,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 +864,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 +872,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 +883,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 +891,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 +923,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 +969,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 +1002,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 +1044,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 +1095,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 +1136,7 @@ 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 +1173,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 +1289,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 +1377,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 +1385,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 +1458,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 +1466,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 +1497,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 +1545,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 +1554,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 +1636,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 +1645,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 +1679,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 +1715,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 +1753,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 +1790,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 +1849,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 +1894,7 @@ 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 +2032,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 +2061,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 +2088,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 +2128,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 +2196,7 @@ 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 +2276,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 +2386,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 +2411,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 +2512,7 @@ done:
* Call context:
* process
----------------------------------------------------------------*/
-int hfa384x_drvr_stop(hfa384x_t *hw)
+int hfa384x_drvr_stop(struct hfa384x *hw)
{
int i;
@@ -2562,11 +2562,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 +2656,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 +2681,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 +2690,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 +2713,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 +2723,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 +2787,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 +2797,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 +2836,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 +2847,7 @@ 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 +2876,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 +2886,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 +2905,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 +2988,9 @@ 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 +3154,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 +3166,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 +3285,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 +3316,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 +3346,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 +3416,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 +3517,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 +3543,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 +3557,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 +3573,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 +3618,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 +3737,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 +3749,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 +3766,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 +3795,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 +3807,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 +3818,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 +3846,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 +3886,7 @@ 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/p80211metadef.h b/drivers/staging/wlan-ng/p80211metadef.h
index 0ccfba1..b0d3567 100644
--- a/drivers/staging/wlan-ng/p80211metadef.h
+++ b/drivers/staging/wlan-ng/p80211metadef.h
@@ -155,22 +155,9 @@
#define DIDmib_dot11smt_dot11WEPDefaultKeysTable \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(4))
-#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0 \
- (P80211DID_MKSECTION(1) | \
- P80211DID_MKGROUP(4) | \
- P80211DID_MKITEM(1) | 0x0c000000)
-#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1 \
- (P80211DID_MKSECTION(1) | \
- P80211DID_MKGROUP(4) | \
- P80211DID_MKITEM(2) | 0x0c000000)
-#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2 \
- (P80211DID_MKSECTION(1) | \
- P80211DID_MKGROUP(4) | \
- P80211DID_MKITEM(3) | 0x0c000000)
-#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3 \
- (P80211DID_MKSECTION(1) | \
- P80211DID_MKGROUP(4) | \
- P80211DID_MKITEM(4) | 0x0c000000)
+#define DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(_i) \
+ (DIDmib_dot11smt_dot11WEPDefaultKeysTable | \
+ P80211DID_MKITEM(_i) | 0x0c000000)
#define DIDmib_dot11smt_dot11PrivacyTable \
(P80211DID_MKSECTION(1) | \
P80211DID_MKGROUP(6))
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..825a63a 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,11 +227,11 @@ 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;
- hdr = (struct p80211_hdr_a3 *) skb->data;
+ hdr = (struct p80211_hdr_a3 *)skb->data;
if (p80211_rx_typedrop(wlandev, hdr->fc))
return CONV_TO_ETHER_SKIPPED;
@@ -265,9 +265,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 +318,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 +446,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 +459,7 @@ 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 +531,11 @@ 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 p80211ioctl_req *req = (struct p80211ioctl_req *)ifr;
+ struct wlandevice *wlandev = dev->ml_priv;
u8 *msgbuf;
netdev_dbg(dev, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len);
@@ -610,13 +610,13 @@ bail:
*
* by: Collin R. Mulliner <collin@mulliner.org>
----------------------------------------------------------------*/
-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,7 +625,7 @@ 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 */
@@ -633,7 +633,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
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);
+ ((struct wlandevice *)dev->ml_priv)->name, WLAN_DEVNAMELEN_MAX - 1);
/* Set up the mibattribute argument */
mibattr->did = DIDmsg_dot11req_mibset_mibattribute;
@@ -653,7 +653,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
resultcode->data = 0;
/* now fire the request */
- result = p80211req_dorequest(dev->ml_priv, (u8 *) &dot11req);
+ result = p80211req_dorequest(dev->ml_priv, (u8 *)&dot11req);
/* If the request wasn't successful, report an error and don't
* change the netdev address
@@ -669,7 +669,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 +717,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 +783,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 +817,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 +839,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 +882,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 +912,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 +1071,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..d43e85b5 100644
--- a/drivers/staging/wlan-ng/p80211req.c
+++ b/drivers/staging/wlan-ng/p80211req.c
@@ -72,11 +72,26 @@
#include "p80211metastruct.h"
#include "p80211req.h"
-static void p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg);
-static void p80211req_mibset_mibget(wlandevice_t *wlandev,
+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);
+static void p80211req_handle_action(struct wlandevice *wlandev, u32 *data,
+ int isget, u32 flag)
+{
+ if (isget) {
+ if (wlandev->hostwep & flag)
+ *data = P80211ENUM_truth_true;
+ else
+ *data = P80211ENUM_truth_false;
+ } else {
+ wlandev->hostwep &= ~flag;
+ if (*data == P80211ENUM_truth_true)
+ wlandev->hostwep |= flag;
+ }
+}
+
/*----------------------------------------------------------------
* p80211req_dorequest
*
@@ -93,9 +108,9 @@ 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;
+ struct p80211msg *msg = (struct p80211msg *)msgbuf;
/* Check to make sure the MSD is running */
if (!((wlandev->msdstate == WLAN_MSD_HWPRESENT &&
@@ -149,13 +164,13 @@ 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) {
case DIDmsg_lnxreq_hostwep:{
struct p80211msg_lnxreq_hostwep *req =
- (struct p80211msg_lnxreq_hostwep *) msg;
+ (struct p80211msg_lnxreq_hostwep *)msg;
wlandev->hostwep &=
~(HOSTWEP_DECRYPT | HOSTWEP_ENCRYPT);
if (req->decrypt.data == P80211ENUM_truth_true)
@@ -169,44 +184,34 @@ static void p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg)
case DIDmsg_dot11req_mibset:{
int isget = (msg->msgcode == DIDmsg_dot11req_mibget);
struct p80211msg_dot11req_mibget *mib_msg =
- (struct p80211msg_dot11req_mibget *) msg;
+ (struct p80211msg_dot11req_mibget *)msg;
p80211req_mibset_mibget(wlandev, mib_msg, isget);
break;
}
} /* switch msg->msgcode */
}
-static void p80211req_mibset_mibget(wlandevice_t *wlandev,
+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:{
- if (!isget)
- wep_change_key(wlandev, 0, key, pstr->len);
- break;
- }
- case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1:{
- if (!isget)
- wep_change_key(wlandev, 1, key, pstr->len);
- break;
- }
- case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2:{
- if (!isget)
- wep_change_key(wlandev, 2, key, pstr->len);
- break;
- }
- case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3:{
+ case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1):
+ case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2):
+ case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(3):
+ case DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(4):
if (!isget)
- wep_change_key(wlandev, 3, key, pstr->len);
- break;
- }
+ wep_change_key(wlandev,
+ P80211DID_ITEM(mibitem->did) - 1,
+ key, pstr->len);
+ break;
+
case DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID:{
- u32 *data = (u32 *) mibitem->data;
+ u32 *data = (u32 *)mibitem->data;
if (isget) {
*data = wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK;
@@ -217,33 +222,17 @@ static void p80211req_mibset_mibget(wlandevice_t *wlandev,
break;
}
case DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked:{
- u32 *data = (u32 *) mibitem->data;
+ u32 *data = (u32 *)mibitem->data;
- if (isget) {
- if (wlandev->hostwep & HOSTWEP_PRIVACYINVOKED)
- *data = P80211ENUM_truth_true;
- else
- *data = P80211ENUM_truth_false;
- } else {
- wlandev->hostwep &= ~(HOSTWEP_PRIVACYINVOKED);
- if (*data == P80211ENUM_truth_true)
- wlandev->hostwep |= HOSTWEP_PRIVACYINVOKED;
- }
+ p80211req_handle_action(wlandev, data, isget,
+ HOSTWEP_PRIVACYINVOKED);
break;
}
case DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted:{
- u32 *data = (u32 *) mibitem->data;
+ u32 *data = (u32 *)mibitem->data;
- if (isget) {
- if (wlandev->hostwep & HOSTWEP_EXCLUDEUNENCRYPTED)
- *data = P80211ENUM_truth_true;
- else
- *data = P80211ENUM_truth_false;
- } else {
- wlandev->hostwep &= ~(HOSTWEP_EXCLUDEUNENCRYPTED);
- if (*data == P80211ENUM_truth_true)
- wlandev->hostwep |= HOSTWEP_EXCLUDEUNENCRYPTED;
- }
+ p80211req_handle_action(wlandev, data, isget,
+ HOSTWEP_EXCLUDEUNENCRYPTED);
break;
}
}
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..263ef2d 100644
--- a/drivers/staging/wlan-ng/p80211types.h
+++ b/drivers/staging/wlan-ng/p80211types.h
@@ -1,58 +1,59 @@
-/* p80211types.h
-*
-* Macros, constants, types, and funcs for p80211 data types
-*
-* Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
-* --------------------------------------------------------------------
-*
-* linux-wlan
-*
-* The contents of this file are subject to the Mozilla Public
-* License Version 1.1 (the "License"); you may not use this file
-* except in compliance with the License. You may obtain a copy of
-* the License at http://www.mozilla.org/MPL/
-*
-* Software distributed under the License is distributed on an "AS
-* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-* implied. See the License for the specific language governing
-* rights and limitations under the License.
-*
-* Alternatively, the contents of this file may be used under the
-* terms of the GNU Public License version 2 (the "GPL"), in which
-* case the provisions of the GPL are applicable instead of the
-* above. If you wish to allow the use of your version of this file
-* only under the terms of the GPL and not to allow others to use
-* your version of this file under the MPL, indicate your decision
-* by deleting the provisions above and replace them with the notice
-* and other provisions required by the GPL. If you do not delete
-* the provisions above, a recipient may use your version of this
-* file under either the MPL or the GPL.
-*
-* --------------------------------------------------------------------
-*
-* Inquiries regarding the linux-wlan Open Source project can be
-* made directly to:
-*
-* AbsoluteValue Systems Inc.
-* info@linux-wlan.com
-* http://www.linux-wlan.com
-*
-* --------------------------------------------------------------------
-*
-* Portions of the development of this software were funded by
-* Intersil Corporation as part of PRISM(R) chipset product development.
-*
-* --------------------------------------------------------------------
-*
-* This file declares some of the constants and types used in various
-* parts of the linux-wlan system.
-*
-* Notes:
-* - Constant values are always in HOST byte order.
-*
-* All functions and statics declared here are implemented in p80211types.c
-* --------------------------------------------------------------------
-*/
+/*
+ * p80211types.h
+ *
+ * Macros, constants, types, and funcs for p80211 data types
+ *
+ * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
+ * --------------------------------------------------------------------
+ *
+ * linux-wlan
+ *
+ * The contents of this file are subject to the Mozilla Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * Alternatively, the contents of this file may be used under the
+ * terms of the GNU Public License version 2 (the "GPL"), in which
+ * case the provisions of the GPL are applicable instead of the
+ * above. If you wish to allow the use of your version of this file
+ * only under the terms of the GPL and not to allow others to use
+ * your version of this file under the MPL, indicate your decision
+ * by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL. If you do not delete
+ * the provisions above, a recipient may use your version of this
+ * file under either the MPL or the GPL.
+ *
+ * --------------------------------------------------------------------
+ *
+ * Inquiries regarding the linux-wlan Open Source project can be
+ * made directly to:
+ *
+ * AbsoluteValue Systems Inc.
+ * info@linux-wlan.com
+ * http://www.linux-wlan.com
+ *
+ * --------------------------------------------------------------------
+ *
+ * Portions of the development of this software were funded by
+ * Intersil Corporation as part of PRISM(R) chipset product development.
+ *
+ * --------------------------------------------------------------------
+ *
+ * This file declares some of the constants and types used in various
+ * parts of the linux-wlan system.
+ *
+ * Notes:
+ * - Constant values are always in HOST byte order.
+ *
+ * All functions and statics declared here are implemented in p80211types.c
+ * --------------------------------------------------------------------
+ */
#ifndef _P80211TYPES_H
#define _P80211TYPES_H
@@ -123,18 +124,18 @@
#define MKENUMNAME(name) p80211enum_ ## name
/*----------------------------------------------------------------
-* The following constants and macros are used to construct and
-* deconstruct the Data ID codes. The coding is as follows:
-*
-* ...rwtnnnnnnnniiiiiiggggggssssss s - Section
-* g - Group
-* i - Item
-* n - Index
-* t - Table flag
-* w - Write flag
-* r - Read flag
-* . - Unused
-*/
+ * The following constants and macros are used to construct and
+ * deconstruct the Data ID codes. The coding is as follows:
+ *
+ * ...rwtnnnnnnnniiiiiiggggggssssss s - Section
+ * g - Group
+ * i - Item
+ * n - Index
+ * t - Table flag
+ * w - Write flag
+ * r - Read flag
+ * . - Unused
+ */
#define P80211DID_LSB_SECTION (0)
#define P80211DID_LSB_GROUP (6)
@@ -200,138 +201,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 +352,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..23b1837 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,7 +217,7 @@ 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,
+int wep_encrypt(struct wlandevice *wlandev, u8 *buf, u8 *dst, u32 len, int keynum,
u8 *iv, u8 *icv)
{
u32 i, j, k, crc, keylen;
diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c
index 56bffd9..96aa211 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,7 +177,7 @@ 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,
+static int writeimage(struct wlandevice *wlandev, struct imgchunk *fchunk,
unsigned int nfchunks);
static void free_chunks(struct imgchunk *fchunk, unsigned int *nfchunks);
@@ -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,11 +293,11 @@ 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;
- data = (u32 *) item->data;
+ data = (u32 *)item->data;
/* DIDmsg_dot11req_mibget */
prism2mgmt_mibset_mibget(wlandev, &getmsg);
@@ -592,14 +592,14 @@ static int mkimage(struct imgchunk *clist, unsigned int *ccnt)
----------------------------------------------------------------*/
static int mkpdrlist(struct pda *pda)
{
- u16 *pda16 = (u16 *) pda->buf;
+ u16 *pda16 = (u16 *)pda->buf;
int curroff; /* in 'words' */
pda->nrec = 0;
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;
@@ -879,8 +879,8 @@ static int read_fwfile(const struct ihex_binrec *record)
addr = be32_to_cpu(record->addr);
/* Point into data for different word lengths */
- ptr32 = (u32 *) record->data;
- ptr16 = (u16 *) record->data;
+ ptr32 = (u32 *)record->data;
+ ptr16 = (u16 *)record->data;
/* parse what was an S3 srec and put it in the right array */
switch (addr) {
@@ -954,7 +954,7 @@ static int read_fwfile(const struct ihex_binrec *record)
default: /* Data record */
s3data[ns3data].addr = addr;
s3data[ns3data].len = len;
- s3data[ns3data].data = (uint8_t *) record->data;
+ s3data[ns3data].data = (uint8_t *)record->data;
ns3data++;
if (ns3data == S3DATA_MAX) {
pr_err("S3 datarec limit reached - aborting\n");
@@ -982,7 +982,7 @@ static int read_fwfile(const struct ihex_binrec *record)
* 0 success
* ~0 failure
----------------------------------------------------------------*/
-static int writeimage(wlandevice_t *wlandev, struct imgchunk *fchunk,
+static int writeimage(struct wlandevice *wlandev, struct imgchunk *fchunk,
unsigned int nfchunks)
{
int result = 0;
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index d8ed9a0..170de1c 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(struct hfa384x_HostScanRequest_data));
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,15 +525,15 @@ 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;
+ struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
u16 word;
wlandev->macmode = WLAN_MACMODE_NONE;
@@ -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);
@@ -685,9 +685,7 @@ failed:
msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters;
done:
- result = 0;
-
- return result;
+ return 0;
}
/*----------------------------------------------------------------
@@ -708,9 +706,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 +772,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 +827,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 +888,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 +959,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,16 +1019,16 @@ 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;
+ struct hfa384x_bytestr *p2bytestr = (struct hfa384x_bytestr *)bytebuf;
wlandev->macmode = WLAN_MACMODE_NONE;
@@ -1054,7 +1052,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 +1090,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..cc1ac7a 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.h
+++ b/drivers/staging/wlan-ng/prism2mgmt.h
@@ -63,43 +63,44 @@
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 +109,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..63ab6bc8 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -87,80 +87,80 @@ 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[] = {
/* dot11smt MIB's */
- {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0,
+ {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1),
F_STA | F_WRITE,
HFA384x_RID_CNFWEPDEFAULTKEY0, 0, 0,
prism2mib_wepdefaultkey},
- {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1,
+ {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2),
F_STA | F_WRITE,
HFA384x_RID_CNFWEPDEFAULTKEY1, 0, 0,
prism2mib_wepdefaultkey},
- {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2,
+ {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(3),
F_STA | F_WRITE,
HFA384x_RID_CNFWEPDEFAULTKEY2, 0, 0,
prism2mib_wepdefaultkey},
- {DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3,
+ {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(4),
F_STA | F_WRITE,
HFA384x_RID_CNFWEPDEFAULTKEY3, 0, 0,
prism2mib_wepdefaultkey},
@@ -237,36 +237,36 @@ static struct mibrec mibtab[] = {
{0, 0, 0, 0, 0, NULL}
};
-/*----------------------------------------------------------------
-* prism2mgmt_mibset_mibget
-*
-* Set the value of a mib item.
-*
-* Arguments:
-* wlandev wlan device structure
-* msgp ptr to msg buffer
-*
-* Returns:
-* 0 success and done
-* <0 success, but we're waiting for something to finish.
-* >0 an error occurred while handling the message.
-* Side effects:
-*
-* Call context:
-* process thread (usually)
-* interrupt
-----------------------------------------------------------------*/
-
-int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
+/*
+ * prism2mgmt_mibset_mibget
+ *
+ * Set the value of a mib item.
+ *
+ * Arguments:
+ * wlandev wlan device structure
+ * msgp ptr to msg buffer
+ *
+ * Returns:
+ * 0 success and done
+ * <0 success, but we're waiting for something to finish.
+ * >0 an error occurred while handling the message.
+ * Side effects:
+ *
+ * Call context:
+ * process thread (usually)
+ * interrupt
+ */
+
+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))
@@ -346,40 +346,40 @@ done:
return 0;
}
-/*----------------------------------------------------------------
-* prism2mib_bytearea2pstr
-*
-* Get/set pstr data to/from a byte area.
-*
-* MIB record parameters:
-* parm1 Prism2 RID value.
-* parm2 Number of bytes of RID data.
-* parm3 Not used.
-*
-* Arguments:
-* mib MIB record.
-* isget MIBGET/MIBSET flag.
-* wlandev wlan device structure.
-* priv "priv" structure.
-* hw "hw" structure.
-* msg Message structure.
-* data Data buffer.
-*
-* Returns:
-* 0 - Success.
-* ~0 - Error.
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mib_bytearea2pstr
+ *
+ * Get/set pstr data to/from a byte area.
+ *
+ * MIB record parameters:
+ * parm1 Prism2 RID value.
+ * parm2 Number of bytes of RID data.
+ * parm3 Not used.
+ *
+ * Arguments:
+ * mib MIB record.
+ * isget MIBGET/MIBSET flag.
+ * wlandev wlan device structure.
+ * priv "priv" structure.
+ * hw "hw" structure.
+ * msg Message structure.
+ * data Data buffer.
+ *
+ * Returns:
+ * 0 - Success.
+ * ~0 - Error.
+ *
+ */
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) {
@@ -396,41 +396,41 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib,
return result;
}
-/*----------------------------------------------------------------
-* prism2mib_uint32
-*
-* Get/set uint32 data.
-*
-* MIB record parameters:
-* parm1 Prism2 RID value.
-* parm2 Not used.
-* parm3 Not used.
-*
-* Arguments:
-* mib MIB record.
-* isget MIBGET/MIBSET flag.
-* wlandev wlan device structure.
-* priv "priv" structure.
-* hw "hw" structure.
-* msg Message structure.
-* data Data buffer.
-*
-* Returns:
-* 0 - Success.
-* ~0 - Error.
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mib_uint32
+ *
+ * Get/set uint32 data.
+ *
+ * MIB record parameters:
+ * parm1 Prism2 RID value.
+ * parm2 Not used.
+ * parm3 Not used.
+ *
+ * Arguments:
+ * mib MIB record.
+ * isget MIBGET/MIBSET flag.
+ * wlandev wlan device structure.
+ * priv "priv" structure.
+ * hw "hw" structure.
+ * msg Message structure.
+ * data Data buffer.
+ *
+ * Returns:
+ * 0 - Success.
+ * ~0 - Error.
+ *
+ */
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;
u32 *uint32 = data;
u8 bytebuf[MIB_TMP_MAXLEN];
- u16 *wordbuf = (u16 *) bytebuf;
+ u16 *wordbuf = (u16 *)bytebuf;
if (isget) {
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
@@ -443,41 +443,41 @@ static int prism2mib_uint32(struct mibrec *mib,
return result;
}
-/*----------------------------------------------------------------
-* prism2mib_flag
-*
-* Get/set a flag.
-*
-* MIB record parameters:
-* parm1 Prism2 RID value.
-* parm2 Bit to get/set.
-* parm3 Not used.
-*
-* Arguments:
-* mib MIB record.
-* isget MIBGET/MIBSET flag.
-* wlandev wlan device structure.
-* priv "priv" structure.
-* hw "hw" structure.
-* msg Message structure.
-* data Data buffer.
-*
-* Returns:
-* 0 - Success.
-* ~0 - Error.
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mib_flag
+ *
+ * Get/set a flag.
+ *
+ * MIB record parameters:
+ * parm1 Prism2 RID value.
+ * parm2 Bit to get/set.
+ * parm3 Not used.
+ *
+ * Arguments:
+ * mib MIB record.
+ * isget MIBGET/MIBSET flag.
+ * wlandev wlan device structure.
+ * priv "priv" structure.
+ * hw "hw" structure.
+ * msg Message structure.
+ * data Data buffer.
+ *
+ * Returns:
+ * 0 - Success.
+ * ~0 - Error.
+ *
+ */
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;
u32 *uint32 = data;
u8 bytebuf[MIB_TMP_MAXLEN];
- u16 *wordbuf = (u16 *) bytebuf;
+ u16 *wordbuf = (u16 *)bytebuf;
u32 flags;
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
@@ -500,40 +500,40 @@ static int prism2mib_flag(struct mibrec *mib,
return result;
}
-/*----------------------------------------------------------------
-* prism2mib_wepdefaultkey
-*
-* Get/set WEP default keys.
-*
-* MIB record parameters:
-* parm1 Prism2 RID value.
-* parm2 Number of bytes of RID data.
-* parm3 Not used.
-*
-* Arguments:
-* mib MIB record.
-* isget MIBGET/MIBSET flag.
-* wlandev wlan device structure.
-* priv "priv" structure.
-* hw "hw" structure.
-* msg Message structure.
-* data Data buffer.
-*
-* Returns:
-* 0 - Success.
-* ~0 - Error.
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mib_wepdefaultkey
+ *
+ * Get/set WEP default keys.
+ *
+ * MIB record parameters:
+ * parm1 Prism2 RID value.
+ * parm2 Number of bytes of RID data.
+ * parm3 Not used.
+ *
+ * Arguments:
+ * mib MIB record.
+ * isget MIBGET/MIBSET flag.
+ * wlandev wlan device structure.
+ * priv "priv" structure.
+ * hw "hw" structure.
+ * msg Message structure.
+ * data Data buffer.
+ *
+ * Returns:
+ * 0 - Success.
+ * ~0 - Error.
+ *
+ */
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;
@@ -550,35 +550,35 @@ static int prism2mib_wepdefaultkey(struct mibrec *mib,
return result;
}
-/*----------------------------------------------------------------
-* prism2mib_privacyinvoked
-*
-* Get/set the dot11PrivacyInvoked value.
-*
-* MIB record parameters:
-* parm1 Prism2 RID value.
-* parm2 Bit value for PrivacyInvoked flag.
-* parm3 Not used.
-*
-* Arguments:
-* mib MIB record.
-* isget MIBGET/MIBSET flag.
-* wlandev wlan device structure.
-* priv "priv" structure.
-* hw "hw" structure.
-* msg Message structure.
-* data Data buffer.
-*
-* Returns:
-* 0 - Success.
-* ~0 - Error.
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mib_privacyinvoked
+ *
+ * Get/set the dot11PrivacyInvoked value.
+ *
+ * MIB record parameters:
+ * parm1 Prism2 RID value.
+ * parm2 Bit value for PrivacyInvoked flag.
+ * parm3 Not used.
+ *
+ * Arguments:
+ * mib MIB record.
+ * isget MIBGET/MIBSET flag.
+ * wlandev wlan device structure.
+ * priv "priv" structure.
+ * hw "hw" structure.
+ * msg Message structure.
+ * data Data buffer.
+ *
+ * Returns:
+ * 0 - Success.
+ * ~0 - Error.
+ *
+ */
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)
{
@@ -592,35 +592,35 @@ static int prism2mib_privacyinvoked(struct mibrec *mib,
return prism2mib_flag(mib, isget, wlandev, hw, msg, data);
}
-/*----------------------------------------------------------------
-* prism2mib_excludeunencrypted
-*
-* Get/set the dot11ExcludeUnencrypted value.
-*
-* MIB record parameters:
-* parm1 Prism2 RID value.
-* parm2 Bit value for ExcludeUnencrypted flag.
-* parm3 Not used.
-*
-* Arguments:
-* mib MIB record.
-* isget MIBGET/MIBSET flag.
-* wlandev wlan device structure.
-* priv "priv" structure.
-* hw "hw" structure.
-* msg Message structure.
-* data Data buffer.
-*
-* Returns:
-* 0 - Success.
-* ~0 - Error.
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mib_excludeunencrypted
+ *
+ * Get/set the dot11ExcludeUnencrypted value.
+ *
+ * MIB record parameters:
+ * parm1 Prism2 RID value.
+ * parm2 Bit value for ExcludeUnencrypted flag.
+ * parm3 Not used.
+ *
+ * Arguments:
+ * mib MIB record.
+ * isget MIBGET/MIBSET flag.
+ * wlandev wlan device structure.
+ * priv "priv" structure.
+ * hw "hw" structure.
+ * msg Message structure.
+ * data Data buffer.
+ *
+ * Returns:
+ * 0 - Success.
+ * ~0 - Error.
+ *
+ */
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)
{
@@ -628,35 +628,35 @@ static int prism2mib_excludeunencrypted(struct mibrec *mib,
return prism2mib_flag(mib, isget, wlandev, hw, msg, data);
}
-/*----------------------------------------------------------------
-* prism2mib_fragmentationthreshold
-*
-* Get/set the fragmentation threshold.
-*
-* MIB record parameters:
-* parm1 Prism2 RID value.
-* parm2 Not used.
-* parm3 Not used.
-*
-* Arguments:
-* mib MIB record.
-* isget MIBGET/MIBSET flag.
-* wlandev wlan device structure.
-* priv "priv" structure.
-* hw "hw" structure.
-* msg Message structure.
-* data Data buffer.
-*
-* Returns:
-* 0 - Success.
-* ~0 - Error.
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mib_fragmentationthreshold
+ *
+ * Get/set the fragmentation threshold.
+ *
+ * MIB record parameters:
+ * parm1 Prism2 RID value.
+ * parm2 Not used.
+ * parm3 Not used.
+ *
+ * Arguments:
+ * mib MIB record.
+ * isget MIBGET/MIBSET flag.
+ * wlandev wlan device structure.
+ * priv "priv" structure.
+ * hw "hw" structure.
+ * msg Message structure.
+ * data Data buffer.
+ *
+ * Returns:
+ * 0 - Success.
+ * ~0 - Error.
+ *
+ */
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)
{
@@ -674,47 +674,47 @@ static int prism2mib_fragmentationthreshold(struct mibrec *mib,
return prism2mib_uint32(mib, isget, wlandev, hw, msg, data);
}
-/*----------------------------------------------------------------
-* prism2mib_priv
-*
-* Get/set values in the "priv" data structure.
-*
-* MIB record parameters:
-* parm1 Not used.
-* parm2 Not used.
-* parm3 Not used.
-*
-* Arguments:
-* mib MIB record.
-* isget MIBGET/MIBSET flag.
-* wlandev wlan device structure.
-* priv "priv" structure.
-* hw "hw" structure.
-* msg Message structure.
-* data Data buffer.
-*
-* Returns:
-* 0 - Success.
-* ~0 - Error.
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mib_priv
+ *
+ * Get/set values in the "priv" data structure.
+ *
+ * MIB record parameters:
+ * parm1 Not used.
+ * parm2 Not used.
+ * parm3 Not used.
+ *
+ * Arguments:
+ * mib MIB record.
+ * isget MIBGET/MIBSET flag.
+ * wlandev wlan device structure.
+ * priv "priv" structure.
+ * hw "hw" structure.
+ * msg Message structure.
+ * data Data buffer.
+ *
+ * Returns:
+ * 0 - Success.
+ * ~0 - Error.
+ *
+ */
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,
HFA384x_RID_CNFWPADATA,
- (u8 *) &wpa,
+ (u8 *)&wpa,
sizeof(wpa));
pstr->len = le16_to_cpu(wpa.datalen);
memcpy(pstr->data, wpa.data, pstr->len);
@@ -724,7 +724,7 @@ static int prism2mib_priv(struct mibrec *mib,
hfa384x_drvr_setconfig(hw,
HFA384x_RID_CNFWPADATA,
- (u8 *) &wpa,
+ (u8 *)&wpa,
sizeof(wpa));
}
break;
@@ -736,67 +736,67 @@ static int prism2mib_priv(struct mibrec *mib,
return 0;
}
-/*----------------------------------------------------------------
-* prism2mgmt_pstr2bytestr
-*
-* Convert the pstr data in the WLAN message structure into an hfa384x
-* byte string format.
-*
-* Arguments:
-* bytestr hfa384x byte string data type
-* pstr wlan message data
-*
-* Returns:
-* Nothing
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mgmt_pstr2bytestr
+ *
+ * Convert the pstr data in the WLAN message structure into an hfa384x
+ * byte string format.
+ *
+ * Arguments:
+ * bytestr hfa384x byte string data type
+ * pstr wlan message data
+ *
+ * Returns:
+ * Nothing
+ *
+ */
void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
- p80211pstrd_t *pstr)
+ struct p80211pstrd *pstr)
{
- bytestr->len = cpu_to_le16((u16) (pstr->len));
+ bytestr->len = cpu_to_le16((u16)(pstr->len));
memcpy(bytestr->data, pstr->data, pstr->len);
}
-/*----------------------------------------------------------------
-* prism2mgmt_bytestr2pstr
-*
-* Convert the data in an hfa384x byte string format into a
-* pstr in the WLAN message.
-*
-* Arguments:
-* bytestr hfa384x byte string data type
-* msg wlan message
-*
-* Returns:
-* Nothing
-*
-----------------------------------------------------------------*/
+/*
+ * prism2mgmt_bytestr2pstr
+ *
+ * Convert the data in an hfa384x byte string format into a
+ * pstr in the WLAN message.
+ *
+ * Arguments:
+ * bytestr hfa384x byte string data type
+ * msg wlan message
+ *
+ * Returns:
+ * Nothing
+ *
+ */
void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
- p80211pstrd_t *pstr)
+ struct p80211pstrd *pstr)
{
- pstr->len = (u8) (le16_to_cpu((u16) (bytestr->len)));
+ pstr->len = (u8)(le16_to_cpu((u16)(bytestr->len)));
memcpy(pstr->data, bytestr->data, pstr->len);
}
-/*----------------------------------------------------------------
-* prism2mgmt_bytearea2pstr
-*
-* Convert the data in an hfa384x byte area format into a pstr
-* in the WLAN message.
-*
-* Arguments:
-* bytearea hfa384x byte area data type
-* msg wlan message
-*
-* Returns:
-* Nothing
-*
-----------------------------------------------------------------*/
-
-void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
+/*
+ * prism2mgmt_bytearea2pstr
+ *
+ * Convert the data in an hfa384x byte area format into a pstr
+ * in the WLAN message.
+ *
+ * Arguments:
+ * bytearea hfa384x byte area data type
+ * msg wlan message
+ *
+ * Returns:
+ * Nothing
+ *
+ */
+
+void prism2mgmt_bytearea2pstr(u8 *bytearea, struct p80211pstrd *pstr, int len)
{
- pstr->len = (u8) 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..e1b4a94 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,38 @@ 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 +152,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 +186,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 +214,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 +239,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 +278,9 @@ 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;
@@ -337,7 +338,7 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, struct p80211msg *msg)
struct p80211msg_lnxreq_ifstate *ifstatemsg;
pr_debug("Received mlme ifstate request\n");
- ifstatemsg = (struct p80211msg_lnxreq_ifstate *) msg;
+ ifstatemsg = (struct p80211msg_lnxreq_ifstate *)msg;
result =
prism2sta_ifstate(wlandev,
ifstatemsg->ifstate.data);
@@ -360,7 +361,7 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, struct p80211msg *msg)
pr_debug("Received commsquality request\n");
- qualmsg = (struct p80211msg_lnxreq_commsquality *) msg;
+ qualmsg = (struct p80211msg_lnxreq_commsquality *)msg;
qualmsg->link.status =
P80211ENUM_msgitem_status_data_ok;
@@ -407,9 +408,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 +581,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 +593,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 +612,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 +631,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;
@@ -651,7 +652,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
/* strip out the 'special' variant bits */
hw->mm_mods = hw->ident_sta_fw.variant & (BIT(14) | BIT(15));
- hw->ident_sta_fw.variant &= ~((u16) (BIT(14) | BIT(15)));
+ hw->ident_sta_fw.variant &= ~((u16)(BIT(14) | BIT(15)));
if (hw->ident_sta_fw.id == 0x1f) {
netdev_info(wlandev->netdev,
@@ -670,7 +671,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 +695,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 +719,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 +743,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 +775,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 +799,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 +823,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 +910,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 +961,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 +984,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,15 +999,15 @@ 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;
+ dst = (u32 *)&hw->tallies;
+ src32 = (u32 *)&inf->info.commtallies32;
for (i = 0; i < cnt; i++, dst++, src32++)
*dst += le32_to_cpu(*src32);
} else {
- dst = (u32 *) &hw->tallies;
- src16 = (u16 *) &inf->info.commtallies16;
+ dst = (u32 *)&hw->tallies;
+ src16 = (u16 *)&inf->info.commtallies16;
for (i = 0; i < cnt; i++, dst++, src16++)
*dst += le16_to_cpu(*src16);
}
@@ -1028,21 +1030,20 @@ 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 +1085,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 +1099,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(struct hfa384x_InfFrame), GFP_ATOMIC);
if (nbss == 0)
nbss = -1;
@@ -1125,18 +1126,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 +1171,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);
}
@@ -1256,8 +1257,8 @@ void prism2sta_processing_defer(struct work_struct *data)
return;
}
prism2mgmt_bytestr2pstr(
- (struct hfa384x_bytestr *) &ssid,
- (p80211pstrd_t *) &wlandev->ssid);
+ (struct hfa384x_bytestr *)&ssid,
+ (struct p80211pstrd *)&wlandev->ssid);
/* Collect the port status */
result = hfa384x_drvr_getconfig16(hw,
@@ -1337,8 +1338,8 @@ void prism2sta_processing_defer(struct work_struct *data)
HFA384x_RID_CURRENTSSID, result);
return;
}
- prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid,
- (p80211pstrd_t *) &wlandev->ssid);
+ prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
+ (struct p80211pstrd *)&wlandev->ssid);
hw->link_status = HFA384x_LINK_CONNECTED;
netif_carrier_on(wlandev->netdev);
@@ -1390,7 +1391,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 +1439,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 +1467,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 +1528,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 +1543,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 +1717,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 +1742,7 @@ 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 +1809,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 +1830,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 +1853,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 +1861,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 +1877,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(struct wlandevice), GFP_KERNEL);
+ hw = kzalloc(sizeof(struct hfa384x), GFP_KERNEL);
if (!wlandev || !hw) {
kfree(wlandev);
@@ -1913,11 +1914,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;
@@ -1950,7 +1951,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
/* Get the signal rate */
msg.msgcode = DIDmsg_dot11req_mibget;
mibitem->did = DIDmib_p2_p2MAC_p2CurrentTxRate;
- result = p80211req_dorequest(wlandev, (u8 *) &msg);
+ result = p80211req_dorequest(wlandev, (u8 *)&msg);
if (result) {
pr_debug("get signal rate failed, result = %d\n",
@@ -1993,8 +1994,8 @@ void prism2sta_commsqual_defer(struct work_struct *data)
HFA384x_RID_CURRENTSSID, result);
return;
}
- prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *) &ssid,
- (p80211pstrd_t *) &wlandev->ssid);
+ prism2mgmt_bytestr2pstr((struct hfa384x_bytestr *)&ssid,
+ (struct p80211pstrd *)&wlandev->ssid);
/* Reschedule timer */
mod_timer(&hw->commsqual_timer, jiffies + HZ);
@@ -2002,7 +2003,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..bfb6b0a 100644
--- a/drivers/staging/wlan-ng/prism2usb.c
+++ b/drivers/staging/wlan-ng/prism2usb.c
@@ -47,11 +47,11 @@ static const struct usb_device_id usb_prism_tbl[] = {
PRISM_DEV(0x0bb2, 0x0302, "Ambit Microsystems Corp."),
PRISM_DEV(0x9016, 0x182d, "Sitecom WL-022 802.11b USB Adapter"),
PRISM_DEV(0x0543, 0x0f01,
- "ViewSonic Airsync USB Adapter 11Mbps (Prism2.5)"),
+ "ViewSonic Airsync USB Adapter 11Mbps (Prism2.5)"),
PRISM_DEV(0x067c, 0x1022,
- "Siemens SpeedStream 1022 11Mbps WLAN USB Adapter"),
+ "Siemens SpeedStream 1022 11Mbps WLAN USB Adapter"),
PRISM_DEV(0x049f, 0x0033,
- "Compaq/Intel W100 PRO/Wireless 11Mbps multiport WLAN Adapter"),
+ "Compaq/Intel W100 PRO/Wireless 11Mbps multiport WLAN Adapter"),
{ } /* terminator */
};
MODULE_DEVICE_TABLE(usb, usb_prism_tbl);
@@ -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);
@@ -74,7 +74,7 @@ static int prism2sta_probe_usb(struct usb_interface *interface,
}
hw = wlandev->priv;
- if (wlan_setup(wlandev, &(interface->dev)) != 0) {
+ if (wlan_setup(wlandev, &interface->dev) != 0) {
dev_err(&interface->dev, "wlan_setup() failed.\n");
result = -EIO;
goto failed;
@@ -87,7 +87,7 @@ static int prism2sta_probe_usb(struct usb_interface *interface,
/* Register the wlandev, this gets us a name and registers the
* linux netdevice.
*/
- SET_NETDEV_DEV(wlandev->netdev, &(interface->dev));
+ SET_NETDEV_DEV(wlandev->netdev, &interface->dev);
/* Do a chip-level reset on the MAC */
if (prism2_doreset) {
@@ -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);
- if (wlandev != NULL) {
+ wlandev = (struct wlandevice *)usb_get_intfdata(interface);
+ if (wlandev) {
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;
@@ -216,12 +216,12 @@ exit:
#ifdef CONFIG_PM
static int prism2sta_suspend(struct usb_interface *interface,
- pm_message_t message)
+ 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;
OpenPOWER on IntegriCloud