aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2008-10-30 16:14:38 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:51:49 -0800
commit1e8a2b60339a050f4fd383e332a5dd66b75f4f02 (patch)
tree4caedc94ac170b32d18336833c9387a10b532078
parentac418b8faaaad7a17474c8fba5c2e5917c91cf31 (diff)
Staging: w35und: merge struct wb35_adapter to struct wbsoft_priv
This patch merges struct wb35_adapter to struct wbsoft_priv. Now we can finally start passing a pointer to struct ieee80211_hw around where necessary. Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/winbond/adapter.h44
-rw-r--r--drivers/staging/winbond/bss_f.h70
-rw-r--r--drivers/staging/winbond/core.h38
-rw-r--r--drivers/staging/winbond/mds.c16
-rw-r--r--drivers/staging/winbond/mds_f.h36
-rw-r--r--drivers/staging/winbond/mlmetxrx.c12
-rw-r--r--drivers/staging/winbond/mlmetxrx_f.h22
-rw-r--r--drivers/staging/winbond/mto.h2
-rw-r--r--drivers/staging/winbond/mto_f.h8
-rw-r--r--drivers/staging/winbond/rxisr.c8
-rw-r--r--drivers/staging/winbond/scan_s.h6
-rw-r--r--drivers/staging/winbond/wb35tx.c14
-rw-r--r--drivers/staging/winbond/wb35tx_f.h12
-rw-r--r--drivers/staging/winbond/wbhal.c10
-rw-r--r--drivers/staging/winbond/wbhal_f.h10
-rw-r--r--drivers/staging/winbond/wblinux.c10
-rw-r--r--drivers/staging/winbond/wblinux_f.h14
-rw-r--r--drivers/staging/winbond/wbusb.c55
18 files changed, 183 insertions, 204 deletions
diff --git a/drivers/staging/winbond/adapter.h b/drivers/staging/winbond/adapter.h
deleted file mode 100644
index 239cc3a5fa2..00000000000
--- a/drivers/staging/winbond/adapter.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef __WINBOND_ADAPTER_H
-#define __WINBOND_ADAPTER_H
-
-#include <linux/wireless.h>
-
-#include "bssdscpt.h"
-#include "mto.h"
-#include "wbhal_s.h"
-
-#define WBLINUX_PACKET_ARRAY_SIZE (ETHERNET_TX_DESCRIPTORS*4)
-
-#define WB_MAX_LINK_NAME_LEN 40
-
-struct wb35_adapter {
- u32 adapterIndex; // 20060703.4 Add for using padapterContext global adapter point
-
- WB_LOCALDESCRIPT sLocalPara; // Myself connected parameters
- PWB_BSSDESCRIPTION asBSSDescriptElement;
-
- MLME_FRAME sMlmeFrame; // connect to peerSTA parameters
-
- MTO_PARAMETERS sMtoPara; // MTO_struct ...
- hw_data_t sHwData; //For HAL
- MDS Mds;
-
- spinlock_t SpinLock;
- u32 shutdown;
-
- atomic_t ThreadCount;
-
- u32 RxByteCount;
- u32 TxByteCount;
-
- struct sk_buff *skb_array[WBLINUX_PACKET_ARRAY_SIZE];
- struct sk_buff *packet_return;
- s32 skb_SetIndex;
- s32 skb_GetIndex;
- s32 netif_state_stop; // 1: stop 0: normal
- struct iw_statistics iw_stats;
-
- u8 LinkName[WB_MAX_LINK_NAME_LEN];
-};
-
-#endif
diff --git a/drivers/staging/winbond/bss_f.h b/drivers/staging/winbond/bss_f.h
index feffe5f25f0..a433b5a8592 100644
--- a/drivers/staging/winbond/bss_f.h
+++ b/drivers/staging/winbond/bss_f.h
@@ -1,7 +1,7 @@
#ifndef __WINBOND_BSS_F_H
#define __WINBOND_BSS_F_H
-#include "adapter.h"
+#include "core.h"
struct PMKID_Information_Element;
@@ -9,54 +9,54 @@ struct PMKID_Information_Element;
// BSS descriptor DataBase management global function
//
-void vBSSdescriptionInit(struct wb35_adapter * adapter);
-void vBSSfoundList(struct wb35_adapter * adapter);
-u8 boChanFilter(struct wb35_adapter * adapter, u8 ChanNo);
-u16 wBSSallocateEntry(struct wb35_adapter * adapter);
-u16 wBSSGetEntry(struct wb35_adapter * adapter);
-void vSimpleHouseKeeping(struct wb35_adapter * adapter);
-u16 wBSShouseKeeping(struct wb35_adapter * adapter);
-void ClearBSSdescpt(struct wb35_adapter * adapter, u16 i);
-u16 wBSSfindBssID(struct wb35_adapter * adapter, u8 *pbBssid);
-u16 wBSSfindDedicateCandidate(struct wb35_adapter * adapter, struct SSID_Element *psSsid, u8 *pbBssid);
-u16 wBSSfindMACaddr(struct wb35_adapter * adapter, u8 *pbMacAddr);
-u16 wBSSsearchMACaddr(struct wb35_adapter * adapter, u8 *pbMacAddr, u8 band);
-u16 wBSSaddScanData(struct wb35_adapter *, u16, psRXDATA);
-u16 wBSSUpdateScanData(struct wb35_adapter * adapter, u16 wBssIdx, psRXDATA psRcvData);
-u16 wBSScreateIBSSdata(struct wb35_adapter * adapter, PWB_BSSDESCRIPTION psDesData);
-void DesiredRate2BSSdescriptor(struct wb35_adapter * adapter, PWB_BSSDESCRIPTION psDesData,
+void vBSSdescriptionInit(struct wbsoft_priv * adapter);
+void vBSSfoundList(struct wbsoft_priv * adapter);
+u8 boChanFilter(struct wbsoft_priv * adapter, u8 ChanNo);
+u16 wBSSallocateEntry(struct wbsoft_priv * adapter);
+u16 wBSSGetEntry(struct wbsoft_priv * adapter);
+void vSimpleHouseKeeping(struct wbsoft_priv * adapter);
+u16 wBSShouseKeeping(struct wbsoft_priv * adapter);
+void ClearBSSdescpt(struct wbsoft_priv * adapter, u16 i);
+u16 wBSSfindBssID(struct wbsoft_priv * adapter, u8 *pbBssid);
+u16 wBSSfindDedicateCandidate(struct wbsoft_priv * adapter, struct SSID_Element *psSsid, u8 *pbBssid);
+u16 wBSSfindMACaddr(struct wbsoft_priv * adapter, u8 *pbMacAddr);
+u16 wBSSsearchMACaddr(struct wbsoft_priv * adapter, u8 *pbMacAddr, u8 band);
+u16 wBSSaddScanData(struct wbsoft_priv *, u16, psRXDATA);
+u16 wBSSUpdateScanData(struct wbsoft_priv * adapter, u16 wBssIdx, psRXDATA psRcvData);
+u16 wBSScreateIBSSdata(struct wbsoft_priv * adapter, PWB_BSSDESCRIPTION psDesData);
+void DesiredRate2BSSdescriptor(struct wbsoft_priv * adapter, PWB_BSSDESCRIPTION psDesData,
u8 *pBasicRateSet, u8 BasicRateCount,
u8 *pOperationRateSet, u8 OperationRateCount);
-void DesiredRate2InfoElement(struct wb35_adapter * adapter, u8 *addr, u16 *iFildOffset,
+void DesiredRate2InfoElement(struct wbsoft_priv * adapter, u8 *addr, u16 *iFildOffset,
u8 *pBasicRateSet, u8 BasicRateCount,
u8 *pOperationRateSet, u8 OperationRateCount);
-void BSSAddIBSSdata(struct wb35_adapter * adapter, PWB_BSSDESCRIPTION psDesData);
+void BSSAddIBSSdata(struct wbsoft_priv * adapter, PWB_BSSDESCRIPTION psDesData);
unsigned char boCmpMacAddr( u8 *, u8 *);
unsigned char boCmpSSID(struct SSID_Element *psSSID1, struct SSID_Element *psSSID2);
-u16 wBSSfindSSID(struct wb35_adapter * adapter, struct SSID_Element *psSsid);
-u16 wRoamingQuery(struct wb35_adapter * adapter);
-void vRateToBitmap(struct wb35_adapter * adapter, u16 index);
-u8 bRateToBitmapIndex(struct wb35_adapter * adapter, u8 bRate);
+u16 wBSSfindSSID(struct wbsoft_priv * adapter, struct SSID_Element *psSsid);
+u16 wRoamingQuery(struct wbsoft_priv * adapter);
+void vRateToBitmap(struct wbsoft_priv * adapter, u16 index);
+u8 bRateToBitmapIndex(struct wbsoft_priv * adapter, u8 bRate);
u8 bBitmapToRate(u8 i);
-unsigned char boIsERPsta(struct wb35_adapter * adapter, u16 i);
-unsigned char boCheckConnect(struct wb35_adapter * adapter);
-unsigned char boCheckSignal(struct wb35_adapter * adapter);
-void AddIBSSIe(struct wb35_adapter * adapter,PWB_BSSDESCRIPTION psDesData );//added by ws for WPA_None06/01/04
-void BssScanUpToDate(struct wb35_adapter * adapter);
-void BssUpToDate(struct wb35_adapter * adapter);
+unsigned char boIsERPsta(struct wbsoft_priv * adapter, u16 i);
+unsigned char boCheckConnect(struct wbsoft_priv * adapter);
+unsigned char boCheckSignal(struct wbsoft_priv * adapter);
+void AddIBSSIe(struct wbsoft_priv * adapter,PWB_BSSDESCRIPTION psDesData );//added by ws for WPA_None06/01/04
+void BssScanUpToDate(struct wbsoft_priv * adapter);
+void BssUpToDate(struct wbsoft_priv * adapter);
void RateSort(u8 *RateArray, u8 num, u8 mode);
-void RateReSortForSRate(struct wb35_adapter * adapter, u8 *RateArray, u8 num);
-void Assemble_IE(struct wb35_adapter * adapter, u16 wBssIdx);
-void SetMaxTxRate(struct wb35_adapter * adapter);
+void RateReSortForSRate(struct wbsoft_priv * adapter, u8 *RateArray, u8 num);
+void Assemble_IE(struct wbsoft_priv * adapter, u16 wBssIdx);
+void SetMaxTxRate(struct wbsoft_priv * adapter);
-void CreateWpaIE(struct wb35_adapter * adapter, u16* iFildOffset, u8 *msg, struct Management_Frame* msgHeader,
+void CreateWpaIE(struct wbsoft_priv * adapter, u16* iFildOffset, u8 *msg, struct Management_Frame* msgHeader,
struct Association_Request_Frame_Body* msgBody, u16 iMSindex); //added by WS 05/14/05
#ifdef _WPA2_
-void CreateRsnIE(struct wb35_adapter * adapter, u16* iFildOffset, u8 *msg, struct Management_Frame* msgHeader,
+void CreateRsnIE(struct wbsoft_priv * adapter, u16* iFildOffset, u8 *msg, struct Management_Frame* msgHeader,
struct Association_Request_Frame_Body* msgBody, u16 iMSindex);//added by WS 05/14/05
-u16 SearchPmkid(struct wb35_adapter * adapter, struct Management_Frame* msgHeader,
+u16 SearchPmkid(struct wbsoft_priv * adapter, struct Management_Frame* msgHeader,
struct PMKID_Information_Element * AssoReq_PMKID );
#endif
diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
index 62ad9545548..64b73bbf747 100644
--- a/drivers/staging/winbond/core.h
+++ b/drivers/staging/winbond/core.h
@@ -1,10 +1,44 @@
#ifndef __WINBOND_CORE_H
#define __WINBOND_CORE_H
-#include "adapter.h"
+#include <linux/wireless.h>
+
+#include "bssdscpt.h"
+#include "mto.h"
+#include "wbhal_s.h"
+
+#define WBLINUX_PACKET_ARRAY_SIZE (ETHERNET_TX_DESCRIPTORS*4)
+
+#define WB_MAX_LINK_NAME_LEN 40
struct wbsoft_priv {
- struct wb35_adapter *adapter;
+ u32 adapterIndex; // 20060703.4 Add for using padapterContext global adapter point
+
+ WB_LOCALDESCRIPT sLocalPara; // Myself connected parameters
+ PWB_BSSDESCRIPTION asBSSDescriptElement;
+
+ MLME_FRAME sMlmeFrame; // connect to peerSTA parameters
+
+ MTO_PARAMETERS sMtoPara; // MTO_struct ...
+ hw_data_t sHwData; //For HAL
+ MDS Mds;
+
+ spinlock_t SpinLock;
+ u32 shutdown;
+
+ atomic_t ThreadCount;
+
+ u32 RxByteCount;
+ u32 TxByteCount;
+
+ struct sk_buff *skb_array[WBLINUX_PACKET_ARRAY_SIZE];
+ struct sk_buff *packet_return;
+ s32 skb_SetIndex;
+ s32 skb_GetIndex;
+ s32 netif_state_stop; // 1: stop 0: normal
+ struct iw_statistics iw_stats;
+
+ u8 LinkName[WB_MAX_LINK_NAME_LEN];
};
#endif /* __WINBOND_CORE_H */
diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c
index 35ea100a665..df59b04da74 100644
--- a/drivers/staging/winbond/mds.c
+++ b/drivers/staging/winbond/mds.c
@@ -8,7 +8,7 @@
#include "wblinux_f.h"
void
-Mds_reset_descriptor(struct wb35_adapter * adapter)
+Mds_reset_descriptor(struct wbsoft_priv * adapter)
{
PMDS pMds = &adapter->Mds;
@@ -21,7 +21,7 @@ Mds_reset_descriptor(struct wb35_adapter * adapter)
}
unsigned char
-Mds_initial(struct wb35_adapter * adapter)
+Mds_initial(struct wbsoft_priv * adapter)
{
PMDS pMds = &adapter->Mds;
@@ -35,13 +35,13 @@ Mds_initial(struct wb35_adapter * adapter)
}
void
-Mds_Destroy(struct wb35_adapter * adapter)
+Mds_Destroy(struct wbsoft_priv * adapter)
{
vRxTimerStop(adapter);
}
void
-Mds_Tx(struct wb35_adapter * adapter)
+Mds_Tx(struct wbsoft_priv * adapter)
{
phw_data_t pHwData = &adapter->sHwData;
PMDS pMds = &adapter->Mds;
@@ -183,7 +183,7 @@ Mds_Tx(struct wb35_adapter * adapter)
}
void
-Mds_SendComplete(struct wb35_adapter * adapter, PT02_DESCRIPTOR pT02)
+Mds_SendComplete(struct wbsoft_priv * adapter, PT02_DESCRIPTOR pT02)
{
PMDS pMds = &adapter->Mds;
phw_data_t pHwData = &adapter->sHwData;
@@ -236,7 +236,7 @@ Mds_SendComplete(struct wb35_adapter * adapter, PT02_DESCRIPTOR pT02)
}
void
-Mds_HeaderCopy(struct wb35_adapter * adapter, PDESCRIPTOR pDes, u8 *TargetBuffer)
+Mds_HeaderCopy(struct wbsoft_priv * adapter, PDESCRIPTOR pDes, u8 *TargetBuffer)
{
PMDS pMds = &adapter->Mds;
u8 *src_buffer = pDes->buffer_address[0];//931130.5.g
@@ -333,7 +333,7 @@ Mds_HeaderCopy(struct wb35_adapter * adapter, PDESCRIPTOR pDes, u8 *TargetBuffer
// The function return the 4n size of usb pk
u16
-Mds_BodyCopy(struct wb35_adapter * adapter, PDESCRIPTOR pDes, u8 *TargetBuffer)
+Mds_BodyCopy(struct wbsoft_priv * adapter, PDESCRIPTOR pDes, u8 *TargetBuffer)
{
PT00_DESCRIPTOR pT00;
PMDS pMds = &adapter->Mds;
@@ -436,7 +436,7 @@ Mds_BodyCopy(struct wb35_adapter * adapter, PDESCRIPTOR pDes, u8 *TargetBuffer)
void
-Mds_DurationSet( struct wb35_adapter * adapter, PDESCRIPTOR pDes, u8 *buffer )
+Mds_DurationSet( struct wbsoft_priv * adapter, PDESCRIPTOR pDes, u8 *buffer )
{
PT00_DESCRIPTOR pT00;
PT01_DESCRIPTOR pT01;
diff --git a/drivers/staging/winbond/mds_f.h b/drivers/staging/winbond/mds_f.h
index 2e0f7a84a48..a3724ac6798 100644
--- a/drivers/staging/winbond/mds_f.h
+++ b/drivers/staging/winbond/mds_f.h
@@ -2,31 +2,31 @@
#define __WINBOND_MDS_F_H
#include "wbhal_s.h"
-#include "adapter.h"
+#include "core.h"
-unsigned char Mds_initial( struct wb35_adapter *adapter );
-void Mds_Destroy( struct wb35_adapter *adapter );
-void Mds_Tx( struct wb35_adapter *adapter );
-void Mds_HeaderCopy( struct wb35_adapter *adapter, PDESCRIPTOR pDes, u8 *TargetBuffer );
-u16 Mds_BodyCopy( struct wb35_adapter *adapter, PDESCRIPTOR pDes, u8 *TargetBuffer );
-void Mds_DurationSet( struct wb35_adapter *adapter, PDESCRIPTOR pDes, u8 *TargetBuffer );
-void Mds_SendComplete( struct wb35_adapter *adapter, PT02_DESCRIPTOR pT02 );
-void Mds_MpduProcess( struct wb35_adapter *adapter, PDESCRIPTOR pRxDes );
-void Mds_reset_descriptor( struct wb35_adapter *adapter );
+unsigned char Mds_initial( struct wbsoft_priv *adapter );
+void Mds_Destroy( struct wbsoft_priv *adapter );
+void Mds_Tx( struct wbsoft_priv *adapter );
+void Mds_HeaderCopy( struct wbsoft_priv *adapter, PDESCRIPTOR pDes, u8 *TargetBuffer );
+u16 Mds_BodyCopy( struct wbsoft_priv *adapter, PDESCRIPTOR pDes, u8 *TargetBuffer );
+void Mds_DurationSet( struct wbsoft_priv *adapter, PDESCRIPTOR pDes, u8 *TargetBuffer );
+void Mds_SendComplete( struct wbsoft_priv *adapter, PT02_DESCRIPTOR pT02 );
+void Mds_MpduProcess( struct wbsoft_priv *adapter, PDESCRIPTOR pRxDes );
+void Mds_reset_descriptor( struct wbsoft_priv *adapter );
extern void DataDmp(u8 *pdata, u32 len, u32 offset);
-void vRxTimerInit(struct wb35_adapter *adapter);
-void vRxTimerStart(struct wb35_adapter *adapter, int timeout_value);
-void vRxTimerStop(struct wb35_adapter *adapter);
+void vRxTimerInit(struct wbsoft_priv *adapter);
+void vRxTimerStart(struct wbsoft_priv *adapter, int timeout_value);
+void vRxTimerStop(struct wbsoft_priv *adapter);
// For Asynchronous indicating. The routine collocates with USB.
-void Mds_MsduProcess( struct wb35_adapter *adapter, PRXLAYER1 pRxLayer1, u8 SlotIndex);
+void Mds_MsduProcess( struct wbsoft_priv *adapter, PRXLAYER1 pRxLayer1, u8 SlotIndex);
// For data frame sending 20060802
-u16 MDS_GetPacketSize( struct wb35_adapter *adapter );
-void MDS_GetNextPacket( struct wb35_adapter *adapter, PDESCRIPTOR pDes );
-void MDS_GetNextPacketComplete( struct wb35_adapter *adapter, PDESCRIPTOR pDes );
-void MDS_SendResult( struct wb35_adapter *adapter, u8 PacketId, unsigned char SendOK );
+u16 MDS_GetPacketSize( struct wbsoft_priv *adapter );
+void MDS_GetNextPacket( struct wbsoft_priv *adapter, PDESCRIPTOR pDes );
+void MDS_GetNextPacketComplete( struct wbsoft_priv *adapter, PDESCRIPTOR pDes );
+void MDS_SendResult( struct wbsoft_priv *adapter, u8 PacketId, unsigned char SendOK );
#endif
diff --git a/drivers/staging/winbond/mlmetxrx.c b/drivers/staging/winbond/mlmetxrx.c
index ee80aed7f0b..f3da9a6a85c 100644
--- a/drivers/staging/winbond/mlmetxrx.c
+++ b/drivers/staging/winbond/mlmetxrx.c
@@ -19,7 +19,7 @@
#include "mds_f.h"
-void MLMEResetTxRx(struct wb35_adapter * adapter)
+void MLMEResetTxRx(struct wbsoft_priv * adapter)
{
s32 i;
@@ -55,7 +55,7 @@ void MLMEResetTxRx(struct wb35_adapter * adapter)
//=============================================================================
/* FIXME: Should this just be replaced with kmalloc() and kfree()? */
-u8 *MLMEGetMMPDUBuffer(struct wb35_adapter * adapter)
+u8 *MLMEGetMMPDUBuffer(struct wbsoft_priv * adapter)
{
s32 i;
u8 *returnVal;
@@ -73,7 +73,7 @@ u8 *MLMEGetMMPDUBuffer(struct wb35_adapter * adapter)
}
//=============================================================================
-u8 MLMESendFrame(struct wb35_adapter * adapter, u8 *pMMPDU, u16 len, u8 DataType)
+u8 MLMESendFrame(struct wbsoft_priv * adapter, u8 *pMMPDU, u16 len, u8 DataType)
/* DataType : FRAME_TYPE_802_11_MANAGEMENT, FRAME_TYPE_802_11_MANAGEMENT_CHALLENGE,
FRAME_TYPE_802_11_DATA */
{
@@ -98,7 +98,7 @@ u8 MLMESendFrame(struct wb35_adapter * adapter, u8 *pMMPDU, u16 len, u8 DataType
return true;
}
-void MLME_GetNextPacket(struct wb35_adapter *adapter, PDESCRIPTOR desc)
+void MLME_GetNextPacket(struct wbsoft_priv *adapter, PDESCRIPTOR desc)
{
desc->InternalUsed = desc->buffer_start_index + desc->buffer_number;
desc->InternalUsed %= MAX_DESCRIPTOR_BUFFER_INDEX;
@@ -109,7 +109,7 @@ void MLME_GetNextPacket(struct wb35_adapter *adapter, PDESCRIPTOR desc)
desc->Type = adapter->sMlmeFrame.DataType;
}
-void MLMEfreeMMPDUBuffer(struct wb35_adapter * adapter, s8 *pData)
+void MLMEfreeMMPDUBuffer(struct wbsoft_priv * adapter, s8 *pData)
{
int i;
@@ -127,7 +127,7 @@ void MLMEfreeMMPDUBuffer(struct wb35_adapter * adapter, s8 *pData)
}
void
-MLME_SendComplete(struct wb35_adapter * adapter, u8 PacketID, unsigned char SendOK)
+MLME_SendComplete(struct wbsoft_priv * adapter, u8 PacketID, unsigned char SendOK)
{
MLME_TXCALLBACK TxCallback;
diff --git a/drivers/staging/winbond/mlmetxrx_f.h b/drivers/staging/winbond/mlmetxrx_f.h
index 0f264ed64ea..905c301028a 100644
--- a/drivers/staging/winbond/mlmetxrx_f.h
+++ b/drivers/staging/winbond/mlmetxrx_f.h
@@ -8,34 +8,34 @@
#ifndef _MLMETXRX_H
#define _MLMETXRX_H
-#include "adapter.h"
+#include "core.h"
void
MLMEProcThread(
- struct wb35_adapter * adapter
+ struct wbsoft_priv * adapter
);
-void MLMEResetTxRx( struct wb35_adapter * adapter);
+void MLMEResetTxRx( struct wbsoft_priv * adapter);
u8 *
MLMEGetMMPDUBuffer(
- struct wb35_adapter * adapter
+ struct wbsoft_priv * adapter
);
-void MLMEfreeMMPDUBuffer( struct wb35_adapter * adapter, s8 * pData);
+void MLMEfreeMMPDUBuffer( struct wbsoft_priv * adapter, s8 * pData);
-void MLME_GetNextPacket( struct wb35_adapter * adapter, PDESCRIPTOR pDes );
-u8 MLMESendFrame( struct wb35_adapter * adapter,
+void MLME_GetNextPacket( struct wbsoft_priv * adapter, PDESCRIPTOR pDes );
+u8 MLMESendFrame( struct wbsoft_priv * adapter,
u8 *pMMPDU,
u16 len,
u8 DataType);
void
-MLME_SendComplete( struct wb35_adapter * adapter, u8 PacketID, unsigned char SendOK );
+MLME_SendComplete( struct wbsoft_priv * adapter, u8 PacketID, unsigned char SendOK );
void
MLMERcvFrame(
- struct wb35_adapter * adapter,
+ struct wbsoft_priv * adapter,
PRXBUFFER pRxBufferArray,
u8 NumOfBuffer,
u8 ReturnSlotIndex
@@ -43,11 +43,11 @@ MLMERcvFrame(
void
MLMEReturnPacket(
- struct wb35_adapter * adapter,
+ struct wbsoft_priv * adapter,
u8 * pRxBufer
);
#ifdef _IBSS_BEACON_SEQ_STICK_
-s8 SendBCNullData(struct wb35_adapter * adapter, u16 wIdx);
+s8 SendBCNullData(struct wbsoft_priv * adapter, u16 wIdx);
#endif
#endif
diff --git a/drivers/staging/winbond/mto.h b/drivers/staging/winbond/mto.h
index 9a175449ce5..536c4f15c41 100644
--- a/drivers/staging/winbond/mto.h
+++ b/drivers/staging/winbond/mto.h
@@ -131,7 +131,7 @@ typedef struct _MTO_PARAMETERS
} MTO_PARAMETERS, *PMTO_PARAMETERS;
-#define MTO_FUNC_INPUT struct wb35_adapter * adapter
+#define MTO_FUNC_INPUT struct wbsoft_priv * adapter
#define MTO_FUNC_INPUT_DATA adapter
#define MTO_DATA() (adapter->sMtoPara)
#define MTO_HAL() (&adapter->sHwData)
diff --git a/drivers/staging/winbond/mto_f.h b/drivers/staging/winbond/mto_f.h
index ce4319da1f3..81f59137c6d 100644
--- a/drivers/staging/winbond/mto_f.h
+++ b/drivers/staging/winbond/mto_f.h
@@ -1,11 +1,11 @@
#ifndef __WINBOND_MTO_F_H
#define __WINBOND_MTO_F_H
-#include "adapter.h"
+#include "core.h"
-extern void MTO_Init(struct wb35_adapter *);
-extern void MTO_PeriodicTimerExpired(struct wb35_adapter *);
-extern void MTO_SetDTORateRange(struct wb35_adapter *, u8 *, u8);
+extern void MTO_Init(struct wbsoft_priv *);
+extern void MTO_PeriodicTimerExpired(struct wbsoft_priv *);
+extern void MTO_SetDTORateRange(struct wbsoft_priv *, u8 *, u8);
extern u8 MTO_GetTxRate(MTO_FUNC_INPUT, u32 fpdu_len);
extern u8 MTO_GetTxFallbackRate(MTO_FUNC_INPUT);
extern void MTO_SetTxCount(MTO_FUNC_INPUT, u8 t0, u8 index);
diff --git a/drivers/staging/winbond/rxisr.c b/drivers/staging/winbond/rxisr.c
index f5c98d915c7..d591003a38e 100644
--- a/drivers/staging/winbond/rxisr.c
+++ b/drivers/staging/winbond/rxisr.c
@@ -1,19 +1,19 @@
#include "os_common.h"
-#include "adapter.h"
+#include "core.h"
static void RxTimerHandler(unsigned long data)
{
WARN_ON(1);
}
-void vRxTimerInit(struct wb35_adapter *adapter)
+void vRxTimerInit(struct wbsoft_priv *adapter)
{
init_timer(&adapter->Mds.timer);
adapter->Mds.timer.function = RxTimerHandler;
adapter->Mds.timer.data = (unsigned long) adapter;
}
-void vRxTimerStart(struct wb35_adapter *adapter, int timeout_value)
+void vRxTimerStart(struct wbsoft_priv *adapter, int timeout_value)
{
if (timeout_value < MIN_TIMEOUT_VAL)
timeout_value = MIN_TIMEOUT_VAL;
@@ -22,7 +22,7 @@ void vRxTimerStart(struct wb35_adapter *adapter, int timeout_value)
add_timer(&adapter->Mds.timer);
}
-void vRxTimerStop(struct wb35_adapter *adapter)
+void vRxTimerStop(struct wbsoft_priv *adapter)
{
del_timer_sync(&adapter->Mds.timer);
}
diff --git a/drivers/staging/winbond/scan_s.h b/drivers/staging/winbond/scan_s.h
index 726954684ce..775bb81f23c 100644
--- a/drivers/staging/winbond/scan_s.h
+++ b/drivers/staging/winbond/scan_s.h
@@ -114,8 +114,8 @@ typedef struct _SCAN_PARAMETERS
// static functions
-//static void ScanTimerHandler(struct wb35_adapter * adapter);
-//static void vScanTimerStart(struct wb35_adapter * adapter, int timeout_value);
-//static void vScanTimerStop(struct wb35_adapter * adapter);
+//static void ScanTimerHandler(struct wbsoft_priv * adapter);
+//static void vScanTimerStart(struct wbsoft_priv * adapter, int timeout_value);
+//static void vScanTimerStop(struct wbsoft_priv * adapter);
#endif
diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
index ce7e9812739..32ee391eac8 100644
--- a/drivers/staging/winbond/wb35tx.c
+++ b/drivers/staging/winbond/wb35tx.c
@@ -23,7 +23,7 @@ Wb35Tx_get_tx_buffer(phw_data_t pHwData, u8 **pBuffer)
return true;
}
-void Wb35Tx_start(struct wb35_adapter *adapter)
+void Wb35Tx_start(struct wbsoft_priv *adapter)
{
phw_data_t pHwData = &adapter->sHwData;
PWB35TX pWb35Tx = &pHwData->Wb35Tx;
@@ -37,7 +37,7 @@ void Wb35Tx_start(struct wb35_adapter *adapter)
}
-void Wb35Tx(struct wb35_adapter *adapter)
+void Wb35Tx(struct wbsoft_priv *adapter)
{
phw_data_t pHwData = &adapter->sHwData;
PWB35TX pWb35Tx = &pHwData->Wb35Tx;
@@ -91,7 +91,7 @@ void Wb35Tx(struct wb35_adapter *adapter)
void Wb35Tx_complete(struct urb * pUrb)
{
- struct wb35_adapter *adapter = pUrb->context;
+ struct wbsoft_priv *adapter = pUrb->context;
phw_data_t pHwData = &adapter->sHwData;
PWB35TX pWb35Tx = &pHwData->Wb35Tx;
PMDS pMds = &adapter->Mds;
@@ -194,7 +194,7 @@ void Wb35Tx_destroy(phw_data_t pHwData)
#endif
}
-void Wb35Tx_CurrentTime(struct wb35_adapter *adapter, u32 TimeCount)
+void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount)
{
phw_data_t pHwData = &adapter->sHwData;
PWB35TX pWb35Tx = &pHwData->Wb35Tx;
@@ -211,7 +211,7 @@ void Wb35Tx_CurrentTime(struct wb35_adapter *adapter, u32 TimeCount)
}
}
-void Wb35Tx_EP2VM_start(struct wb35_adapter *adapter)
+void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter)
{
phw_data_t pHwData = &adapter->sHwData;
PWB35TX pWb35Tx = &pHwData->Wb35Tx;
@@ -226,7 +226,7 @@ void Wb35Tx_EP2VM_start(struct wb35_adapter *adapter)
}
-void Wb35Tx_EP2VM(struct wb35_adapter *adapter)
+void Wb35Tx_EP2VM(struct wbsoft_priv *adapter)
{
phw_data_t pHwData = &adapter->sHwData;
PWB35TX pWb35Tx = &pHwData->Wb35Tx;
@@ -265,7 +265,7 @@ error:
void Wb35Tx_EP2VM_complete(struct urb * pUrb)
{
- struct wb35_adapter *adapter = pUrb->context;
+ struct wbsoft_priv *adapter = pUrb->context;
phw_data_t pHwData = &adapter->sHwData;
T02_DESCRIPTOR T02, TSTATUS;
PWB35TX pWb35Tx = &pHwData->Wb35Tx;
diff --git a/drivers/staging/winbond/wb35tx_f.h b/drivers/staging/winbond/wb35tx_f.h
index 466eb6f26c6..277faa7aaed 100644
--- a/drivers/staging/winbond/wb35tx_f.h
+++ b/drivers/staging/winbond/wb35tx_f.h
@@ -1,7 +1,7 @@
#ifndef __WINBOND_WB35TX_F_H
#define __WINBOND_WB35TX_F_H
-#include "adapter.h"
+#include "core.h"
#include "wbhal_f.h"
//====================================
@@ -11,16 +11,16 @@ unsigned char Wb35Tx_initial( phw_data_t pHwData );
void Wb35Tx_destroy( phw_data_t pHwData );
unsigned char Wb35Tx_get_tx_buffer( phw_data_t pHwData, u8 **pBuffer );
-void Wb35Tx_EP2VM(struct wb35_adapter *adapter);
-void Wb35Tx_EP2VM_start(struct wb35_adapter *adapter);
+void Wb35Tx_EP2VM(struct wbsoft_priv *adapter);
+void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter);
void Wb35Tx_EP2VM_complete(struct urb *urb);
-void Wb35Tx_start(struct wb35_adapter *adapter);
+void Wb35Tx_start(struct wbsoft_priv *adapter);
void Wb35Tx_stop( phw_data_t pHwData );
-void Wb35Tx(struct wb35_adapter *adapter);
+void Wb35Tx(struct wbsoft_priv *adapter);
void Wb35Tx_complete(struct urb *urb);
void Wb35Tx_reset_descriptor( phw_data_t pHwData );
-void Wb35Tx_CurrentTime(struct wb35_adapter *adapter, u32 TimeCount);
+void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount);
#endif
diff --git a/drivers/staging/winbond/wbhal.c b/drivers/staging/winbond/wbhal.c
index 1fb8c3d7846..163ca3c4f11 100644
--- a/drivers/staging/winbond/wbhal.c
+++ b/drivers/staging/winbond/wbhal.c
@@ -32,7 +32,7 @@ void hal_get_permanent_address( phw_data_t pHwData, u8 *pethernet_address )
static void hal_led_control(unsigned long data)
{
- struct wb35_adapter *adapter = (struct wb35_adapter *) data;
+ struct wbsoft_priv *adapter = (struct wbsoft_priv *) data;
phw_data_t pHwData = &adapter->sHwData;
struct wb35_reg *reg = &pHwData->reg;
u32 LEDSet = (pHwData->SoftwareSet & HAL_LED_SET_MASK) >> HAL_LED_SET_SHIFT;
@@ -316,7 +316,7 @@ static void hal_led_control(unsigned long data)
}
-u8 hal_init_hardware(phw_data_t pHwData, struct wb35_adapter * adapter)
+u8 hal_init_hardware(phw_data_t pHwData, struct wbsoft_priv * adapter)
{
u16 SoftwareSet;
@@ -671,7 +671,7 @@ s32 hal_get_rssi( phw_data_t pHwData, u32 *HalRssiArry, u8 Count )
return ltmp;
}
//----------------------------------------------------------------------------------------------------
-s32 hal_get_rssi_bss(struct wb35_adapter *adapter, u16 idx, u8 Count)
+s32 hal_get_rssi_bss(struct wbsoft_priv *adapter, u16 idx, u8 Count)
{
phw_data_t pHwData = &adapter->sHwData;
struct wb35_reg *reg = &pHwData->reg;
@@ -841,7 +841,7 @@ void hal_system_power_change(phw_data_t pHwData, u32 PowerState)
}
}
-void hal_surprise_remove(struct wb35_adapter *adapter)
+void hal_surprise_remove(struct wbsoft_priv *adapter)
{
phw_data_t pHwData = &adapter->sHwData;
@@ -853,7 +853,7 @@ void hal_surprise_remove(struct wb35_adapter *adapter)
}
}
-void hal_rate_change(struct wb35_adapter *adapter) // Notify the HAL rate is changing 20060613.1
+void hal_rate_change(struct wbsoft_priv *adapter) // Notify the HAL rate is changing 20060613.1
{
phw_data_t pHwData = &adapter->sHwData;
u8 rate = CURRENT_TX_RATE;
diff --git a/drivers/staging/winbond/wbhal_f.h b/drivers/staging/winbond/wbhal_f.h
index 4cb4da05540..e7a1d611bde 100644
--- a/drivers/staging/winbond/wbhal_f.h
+++ b/drivers/staging/winbond/wbhal_f.h
@@ -5,7 +5,7 @@
#include "wb35tx_f.h"
#include "wb35rx_f.h"
-#include "adapter.h"
+#include "core.h"
//====================================================================================
// Function declaration
@@ -21,7 +21,7 @@ void hal_clear_all_key( phw_data_t pHwData );
void hal_get_ethernet_address( phw_data_t pHwData, u8 *current_address );
void hal_set_ethernet_address( phw_data_t pHwData, u8 *current_address );
void hal_get_permanent_address( phw_data_t pHwData, u8 *pethernet_address );
-unsigned char hal_init_hardware( phw_data_t pHwData, struct wb35_adapter * adapter );
+unsigned char hal_init_hardware( phw_data_t pHwData, struct wbsoft_priv * adapter );
void hal_set_power_save_mode( phw_data_t pHwData, unsigned char power_save, unsigned char wakeup, unsigned char dtim );
void hal_get_power_save_mode( phw_data_t pHwData, u8 *pin_pwr_save );
void hal_set_slot_time( phw_data_t pHwData, u8 type );
@@ -61,7 +61,7 @@ void hal_set_cwmax( phw_data_t pHwData, u16 cwin_max );
void hal_set_rsn_wpa( phw_data_t pHwData, u32 * RSN_IE_Bitmap , u32 * RSN_OUI_type , unsigned char bDesiredAuthMode);
//s32 hal_get_rssi( phw_data_t pHwData, u32 HalRssi );
s32 hal_get_rssi( phw_data_t pHwData, u32 *HalRssiArry, u8 Count );
-s32 hal_get_rssi_bss(struct wb35_adapter *adapter, u16 idx, u8 Count);
+s32 hal_get_rssi_bss(struct wbsoft_priv *adapter, u16 idx, u8 Count);
void hal_set_connect_info( phw_data_t pHwData, unsigned char boConnect );
u8 hal_get_est_sq3( phw_data_t pHwData, u8 Count );
void hal_set_rf_power( phw_data_t pHwData, u8 PowerIndex ); // 20060621 Modify
@@ -82,13 +82,13 @@ u8 hal_get_hw_radio_off ( phw_data_t pHwData );
#define hal_scan_interval( _A ) (_A->Scan_Interval)
void hal_scan_status_indicate( phw_data_t pHwData, u8 status); // 0: complete, 1: in progress
void hal_system_power_change( phw_data_t pHwData, u32 PowerState ); // 20051230 -=D0 1=D1 ..
-void hal_surprise_remove(struct wb35_adapter *adapter);
+void hal_surprise_remove(struct wbsoft_priv *adapter);
#define PHY_DEBUG( msg, args... )
-void hal_rate_change(struct wb35_adapter *adapter); // Notify the HAL rate is changing 20060613.1
+void hal_rate_change(struct wbsoft_priv *adapter); // Notify the HAL rate is changing 20060613.1
unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, u32 * pValue );
unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value );
#define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count
diff --git a/drivers/staging/winbond/wblinux.c b/drivers/staging/winbond/wblinux.c
index d6894f9da83..594c0692a93 100644
--- a/drivers/staging/winbond/wblinux.c
+++ b/drivers/staging/winbond/wblinux.c
@@ -17,14 +17,14 @@
#include "wblinux_f.h"
unsigned char
-WBLINUX_Initial(struct wb35_adapter * adapter)
+WBLINUX_Initial(struct wbsoft_priv * adapter)
{
spin_lock_init( &adapter->SpinLock );
return true;
}
void
-WBLINUX_Destroy(struct wb35_adapter * adapter)
+WBLINUX_Destroy(struct wbsoft_priv * adapter)
{
WBLINUX_stop( adapter );
#ifdef _PE_USB_INI_DUMP_
@@ -33,7 +33,7 @@ WBLINUX_Destroy(struct wb35_adapter * adapter)
}
void
-WBLINUX_stop( struct wb35_adapter * adapter )
+WBLINUX_stop( struct wbsoft_priv * adapter )
{
struct sk_buff *pSkb;
@@ -63,7 +63,7 @@ WBLINUX_stop( struct wb35_adapter * adapter )
}
void
-WbWlanHalt(struct wb35_adapter *adapter)
+WbWlanHalt( struct wbsoft_priv * adapter )
{
//---------------------
adapter->sLocalPara.ShutDowned = true;
@@ -85,7 +85,7 @@ WbWlanHalt(struct wb35_adapter *adapter)
}
unsigned char
-WbWLanInitialize(struct wb35_adapter *adapter)
+WbWLanInitialize(struct wbsoft_priv * adapter)
{
phw_data_t pHwData;
u8 *pMacAddr;
diff --git a/drivers/staging/winbond/wblinux_f.h b/drivers/staging/winbond/wblinux_f.h
index ed2676b22f6..4b786fcf34e 100644
--- a/drivers/staging/winbond/wblinux_f.h
+++ b/drivers/staging/winbond/wblinux_f.h
@@ -1,7 +1,7 @@
#ifndef __WBLINUX_F_H
#define __WBLINUX_F_H
-#include "adapter.h"
+#include "core.h"
#include "mds_s.h"
//=========================================================================
@@ -9,14 +9,14 @@
//
// wblinux_f.h
//
-unsigned char WBLINUX_Initial( struct wb35_adapter *adapter );
+unsigned char WBLINUX_Initial( struct wbsoft_priv *adapter );
int wb35_start_xmit(struct sk_buff *skb, struct net_device *netdev );
-void WBLINUX_stop( struct wb35_adapter *adapter );
-void WBLINUX_Destroy( struct wb35_adapter *adapter );
+void WBLINUX_stop( struct wbsoft_priv *adapter );
+void WBLINUX_Destroy( struct wbsoft_priv *adapter );
void wb35_set_multicast( struct net_device *netdev );
struct net_device_stats * wb35_netdev_stats( struct net_device *netdev );
-void WBLINUX_stop( struct wb35_adapter *adapter );
-void WbWlanHalt( struct wb35_adapter *adapter );
-unsigned char WbWLanInitialize(struct wb35_adapter *adapter);
+void WBLINUX_stop( struct wbsoft_priv *adapter );
+void WbWlanHalt( struct wbsoft_priv *adapter );
+unsigned char WbWLanInitialize(struct wbsoft_priv *adapter);
#endif
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index d8fa9e56318..a6bc78e4609 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -120,7 +120,7 @@ static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
{
struct wbsoft_priv *priv = dev->priv;
- MLMESendFrame(priv->adapter, skb->data, skb->len, FRAME_TYPE_802_11_MANAGEMENT);
+ MLMESendFrame(priv, skb->data, skb->len, FRAME_TYPE_802_11_MANAGEMENT);
return NETDEV_TX_OK;
}
@@ -144,20 +144,20 @@ static int wbsoft_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf)
ch.ChanNo = 1; /* Should use channel_num, or something, as that is already pre-translated */
- hal_set_current_channel(&priv->adapter->sHwData, ch);
- hal_set_beacon_period(&priv->adapter->sHwData, conf->beacon_int);
-// hal_set_cap_info(&priv->adapter->sHwData, ?? );
+ hal_set_current_channel(&priv->sHwData, ch);
+ hal_set_beacon_period(&priv->sHwData, conf->beacon_int);
+// hal_set_cap_info(&priv->sHwData, ?? );
// hal_set_ssid(phw_data_t pHwData, u8 * pssid, u8 ssid_len); ??
- hal_set_accept_broadcast(&priv->adapter->sHwData, 1);
- hal_set_accept_promiscuous(&priv->adapter->sHwData, 1);
- hal_set_accept_multicast(&priv->adapter->sHwData, 1);
- hal_set_accept_beacon(&priv->adapter->sHwData, 1);
- hal_set_radio_mode(&priv->adapter->sHwData, 0);
+ hal_set_accept_broadcast(&priv->sHwData, 1);
+ hal_set_accept_promiscuous(&priv->sHwData, 1);
+ hal_set_accept_multicast(&priv->sHwData, 1);
+ hal_set_accept_beacon(&priv->sHwData, 1);
+ hal_set_radio_mode(&priv->sHwData, 0);
//hal_set_antenna_number( phw_data_t pHwData, u8 number )
//hal_set_rf_power(phw_data_t pHwData, u8 PowerIndex)
-// hal_start_bss(&priv->adapter->sHwData, WLAN_BSSTYPE_INFRASTRUCTURE); ??
+// hal_start_bss(&priv->sHwData, WLAN_BSSTYPE_INFRASTRUCTURE); ??
//void hal_set_rates(phw_data_t pHwData, u8 * pbss_rates,
// u8 length, unsigned char basic_rate_set)
@@ -196,7 +196,6 @@ static const struct ieee80211_ops wbsoft_ops = {
static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id_table)
{
- struct wb35_adapter *adapter;
PWBUSB pWbUsb;
struct usb_host_interface *interface;
struct usb_endpoint_descriptor *endpoint;
@@ -221,13 +220,14 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
goto error;
}
- adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
- if (!adapter) {
- err = -ENOMEM;
+ dev = ieee80211_alloc_hw(sizeof(*priv), &wbsoft_ops);
+ if (!dev)
goto error;
- }
- pWbUsb = &adapter->sHwData.WbUsb;
+ priv = dev->priv;
+ my_dev = dev;
+
+ pWbUsb = &priv->sHwData.WbUsb;
pWbUsb->udev = udev;
interface = intf->cur_altsetting;
@@ -238,23 +238,14 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
pWbUsb->IsUsb20 = 1;
}
- if (!WbWLanInitialize(adapter)) {
+ if (!WbWLanInitialize(priv)) {
err = -EINVAL;
- goto error_free_adapter;
+ goto error_free_hw;
}
- dev = ieee80211_alloc_hw(sizeof(*priv), &wbsoft_ops);
- if (!dev)
- goto error_free_adapter;
-
- priv = dev->priv;
- priv->adapter = adapter;
-
- my_dev = dev;
-
SET_IEEE80211_DEV(dev, &udev->dev);
{
- phw_data_t pHwData = &adapter->sHwData;
+ phw_data_t pHwData = &priv->sHwData;
unsigned char dev_addr[MAX_ADDR_LEN];
hal_get_permanent_address(pHwData, dev_addr);
SET_IEEE80211_PERM_ADDR(dev, dev_addr);
@@ -272,14 +263,12 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
if (err)
goto error_free_hw;
- usb_set_intfdata(intf, adapter);
+ usb_set_intfdata(intf, priv);
return 0;
error_free_hw:
ieee80211_free_hw(dev);
-error_free_adapter:
- kfree(adapter);
error:
usb_put_dev(udev);
return err;
@@ -315,9 +304,9 @@ void packet_came(char *pRxBufferAddress, int PacketSize)
static void wb35_disconnect(struct usb_interface *intf)
{
- struct wb35_adapter *adapter = usb_get_intfdata(intf);
+ struct wbsoft_priv *priv = usb_get_intfdata(intf);
- WbWlanHalt(adapter);
+ WbWlanHalt(priv);
usb_set_intfdata(intf, NULL);
usb_put_dev(interface_to_usbdev(intf));