]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Staging: w35und: typedef removal
authorPekka Enberg <penberg@cs.helsinki.fi>
Thu, 8 Jan 2009 16:32:14 +0000 (18:32 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Apr 2009 21:53:16 +0000 (14:53 -0700)
This patch removes some typedefs from the driver code. I also removed some
unused structs I spotted while removing the typedefs.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/winbond/mto.c
drivers/staging/winbond/wb35rx.c
drivers/staging/winbond/wb35rx_s.h
drivers/staging/winbond/wb35tx.c
drivers/staging/winbond/wb35tx_s.h
drivers/staging/winbond/wbhal.c
drivers/staging/winbond/wbhal_s.h
drivers/staging/winbond/wbusb.c
drivers/staging/winbond/wbusb_s.h

index 8c4107b56b753a946ff8fe485b87eddaf1f236f5..a962fddaa22bf4d6ae4b01e1b752ea5c7e4f9b61 100644 (file)
@@ -51,12 +51,6 @@ static int retryrate_rec[MTO_MAX_DATA_RATE_LEVELS];//this record the retry rate
 static int PeriodTotalTxPkt = 0;
 static int PeriodTotalTxPktRetry = 0;
 
-typedef struct
-{
-       s32 RSSI;
-       u8  TxRate;
-}RSSI2RATE;
-
 static u8 boSparseTxTraffic = false;
 
 void MTO_Init(MTO_FUNC_INPUT);
index 029d91892a8008660901b136e0a3e64f7da23685..bffebf926d35c432dd61e61f4265344cbe34ee49 100644 (file)
@@ -84,7 +84,7 @@ static u16 Wb35Rx_indicate(struct ieee80211_hw *hw)
        struct wbsoft_priv *priv = hw->priv;
        phw_data_t pHwData = &priv->sHwData;
        DESCRIPTOR      RxDes;
-       PWB35RX pWb35Rx = &pHwData->Wb35Rx;
+       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
        u8 *            pRxBufferAddress;
        u16             PacketSize;
        u16             stmp, BufferSize, stmp2 = 0;
@@ -162,7 +162,7 @@ static void Wb35Rx_Complete(struct urb *urb)
        struct ieee80211_hw *hw = urb->context;
        struct wbsoft_priv *priv = hw->priv;
        phw_data_t pHwData = &priv->sHwData;
-       PWB35RX         pWb35Rx = &pHwData->Wb35Rx;
+       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
        u8 *            pRxBufferAddress;
        u32             SizeCheck;
        u16             BulkLength;
@@ -239,7 +239,7 @@ static void Wb35Rx(struct ieee80211_hw *hw)
 {
        struct wbsoft_priv *priv = hw->priv;
        phw_data_t pHwData = &priv->sHwData;
-       PWB35RX pWb35Rx = &pHwData->Wb35Rx;
+       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
        u8 *    pRxBufferAddress;
        struct urb *urb = pWb35Rx->RxUrb;
        int     retv;
@@ -302,7 +302,7 @@ void Wb35Rx_start(struct ieee80211_hw *hw)
 {
        struct wbsoft_priv *priv = hw->priv;
        phw_data_t pHwData = &priv->sHwData;
-       PWB35RX pWb35Rx = &pHwData->Wb35Rx;
+       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
 
        // Allow only one thread to run into the Wb35Rx() function
        if (atomic_inc_return(&pWb35Rx->RxFireCounter) == 1) {
@@ -315,7 +315,7 @@ void Wb35Rx_start(struct ieee80211_hw *hw)
 //=====================================================================================
 static void Wb35Rx_reset_descriptor(  phw_data_t pHwData )
 {
-       PWB35RX pWb35Rx = &pHwData->Wb35Rx;
+       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
        u32     i;
 
        pWb35Rx->ByteReceived = 0;
@@ -331,7 +331,7 @@ static void Wb35Rx_reset_descriptor(  phw_data_t pHwData )
 
 unsigned char Wb35Rx_initial(phw_data_t pHwData)
 {
-       PWB35RX pWb35Rx = &pHwData->Wb35Rx;
+       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
 
        // Initial the Buffer Queue
        Wb35Rx_reset_descriptor( pHwData );
@@ -342,7 +342,7 @@ unsigned char Wb35Rx_initial(phw_data_t pHwData)
 
 void Wb35Rx_stop(phw_data_t pHwData)
 {
-       PWB35RX pWb35Rx = &pHwData->Wb35Rx;
+       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
 
        // Canceling the Irp if already sends it out.
        if (pWb35Rx->EP3vm_state == VM_RUNNING) {
@@ -356,7 +356,7 @@ void Wb35Rx_stop(phw_data_t pHwData)
 // Needs process context
 void Wb35Rx_destroy(phw_data_t pHwData)
 {
-       PWB35RX pWb35Rx = &pHwData->Wb35Rx;
+       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
 
        do {
                msleep(10); // Delay for waiting function enter 940623.1.a
index f18350b41c44a999459891fdb47127af7d7ed702..4b03274a7d28336f9600d876baca098d70f35aa7 100644 (file)
@@ -15,8 +15,7 @@
 //====================================
 // Internal variable for module
 //====================================
-typedef struct _WB35RX
-{
+struct wb35_rx {
        u32                     ByteReceived;// For calculating throughput of BulkIn
        atomic_t                RxFireCounter;// Does Wb35Rx module fire?
 
@@ -42,7 +41,4 @@ typedef struct _WB35RX
 
        int             EP3VM_status;
        u8 *    pDRx;
-
-} WB35RX, *PWB35RX;
-
-
+};
index f7fe8d60a7ea45b483686721f1e377f7a1508377..d35875f87e29a63955c2c68186e257b358d28d0a 100644 (file)
@@ -17,7 +17,7 @@
 unsigned char
 Wb35Tx_get_tx_buffer(phw_data_t pHwData, u8 **pBuffer)
 {
-       PWB35TX pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
 
        *pBuffer = pWb35Tx->TxBuffer[0];
        return true;
@@ -29,7 +29,7 @@ static void Wb35Tx_complete(struct urb * pUrb)
 {
        struct wbsoft_priv *adapter = pUrb->context;
        phw_data_t      pHwData = &adapter->sHwData;
-       PWB35TX         pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
        PMDS            pMds = &adapter->Mds;
 
        printk("wb35: tx complete\n");
@@ -65,7 +65,7 @@ error:
 static void Wb35Tx(struct wbsoft_priv *adapter)
 {
        phw_data_t      pHwData = &adapter->sHwData;
-       PWB35TX         pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
        u8              *pTxBufferAddress;
        PMDS            pMds = &adapter->Mds;
        struct urb *    pUrb = (struct urb *)pWb35Tx->Tx4Urb;
@@ -116,7 +116,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter)
 void Wb35Tx_start(struct wbsoft_priv *adapter)
 {
        phw_data_t pHwData = &adapter->sHwData;
-       PWB35TX pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
 
        // Allow only one thread to run into function
        if (atomic_inc_return(&pWb35Tx->TxFireCounter) == 1) {
@@ -128,7 +128,7 @@ void Wb35Tx_start(struct wbsoft_priv *adapter)
 
 unsigned char Wb35Tx_initial(phw_data_t pHwData)
 {
-       PWB35TX pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
 
        pWb35Tx->Tx4Urb = usb_alloc_urb(0, GFP_ATOMIC);
        if (!pWb35Tx->Tx4Urb)
@@ -147,7 +147,7 @@ unsigned char Wb35Tx_initial(phw_data_t pHwData)
 //======================================================
 void Wb35Tx_stop(phw_data_t pHwData)
 {
-       PWB35TX pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
 
        // Trying to canceling the Trp of EP2
        if (pWb35Tx->EP2vm_state == VM_RUNNING)
@@ -167,7 +167,7 @@ void Wb35Tx_stop(phw_data_t pHwData)
 //======================================================
 void Wb35Tx_destroy(phw_data_t pHwData)
 {
-       PWB35TX pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
 
        // Wait for VM stop
        do {
@@ -189,7 +189,7 @@ void Wb35Tx_destroy(phw_data_t pHwData)
 void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount)
 {
        phw_data_t pHwData = &adapter->sHwData;
-       PWB35TX pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
        unsigned char Trigger = false;
 
        if (pWb35Tx->TxTimer > TimeCount)
@@ -210,7 +210,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb)
        struct wbsoft_priv *adapter = pUrb->context;
        phw_data_t      pHwData = &adapter->sHwData;
        T02_DESCRIPTOR  T02, TSTATUS;
-       PWB35TX         pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
        u32 *           pltmp = (u32 *)pWb35Tx->EP2_buf;
        u32             i;
        u16             InterruptInLength;
@@ -257,7 +257,7 @@ error:
 static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter)
 {
        phw_data_t      pHwData = &adapter->sHwData;
-       PWB35TX pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
        struct urb *    pUrb = (struct urb *)pWb35Tx->Tx2Urb;
        u32 *   pltmp = (u32 *)pWb35Tx->EP2_buf;
        int             retv;
@@ -293,7 +293,7 @@ error:
 void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter)
 {
        phw_data_t pHwData = &adapter->sHwData;
-       PWB35TX pWb35Tx = &pHwData->Wb35Tx;
+       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
 
        // Allow only one thread to run into function
        if (atomic_inc_return(&pWb35Tx->TxResultCount) == 1) {
index 3960276cae682f2bab7b706398be9c784d629a87..f70f4339559155a4d1942095c63a443909965e4c 100644 (file)
@@ -18,8 +18,7 @@
 //====================================
 
 
-typedef struct _WB35TX
-{
+struct wb35_tx {
        // For Tx buffer
        u8      TxBuffer[ MAX_USB_TX_BUFFER_NUMBER ][ MAX_USB_TX_BUFFER ];
 
@@ -43,7 +42,6 @@ typedef struct _WB35TX
 
        u32     TxFillCount; // 20060928
        u32     TxTimer; // 20060928 Add if sending packet not great than 13
-
-} WB35TX, *PWB35TX;
+};
 
 #endif
index c8313dba7dc5d93238e2e4dfb2373629da92ce65..a1cd4114fe8c9556d259bfd3f2ee71716f1523de 100644 (file)
@@ -484,7 +484,7 @@ void hal_stop(  phw_data_t pHwData )
 unsigned char hal_idle(phw_data_t pHwData)
 {
        struct wb35_reg *reg = &pHwData->reg;
-       PWBUSB  pWbUsb = &pHwData->WbUsb;
+       struct wb_usb *pWbUsb = &pHwData->WbUsb;
 
        if( !pHwData->SurpriseRemove && ( pWbUsb->DetectCount || reg->EP0vm_state!=VM_STOP ) )
                return false;
index 64d8e615d6614f080923543ab7119f7e448eeccf..799f790bb4cb391580c6c0658eba11bec7d5940e 100644 (file)
@@ -85,19 +85,6 @@ enum {
        VM_COMPLETED
 };
 
-// Be used for 802.11 mac header
-typedef struct _MAC_FRAME_CONTROL {
-       u8      mac_frame_info; // this is a combination of the protovl version, type and subtype
-       u8      to_ds:1;
-       u8      from_ds:1;
-       u8      more_frag:1;
-       u8      retry:1;
-       u8      pwr_mgt:1;
-       u8      more_data:1;
-       u8      WEP:1;
-       u8      order:1;
-} MAC_FRAME_CONTROL, *PMAC_FRAME_CONTROL;
-
 //-----------------------------------------------------
 // Normal Key table format
 //-----------------------------------------------------
@@ -105,28 +92,6 @@ typedef struct _MAC_FRAME_CONTROL {
 #define MAX_KEY_TABLE                          24      // 24 entry for storing key data
 #define GROUP_KEY_START_INDEX          4
 #define MAPPING_KEY_START_INDEX                8
-typedef struct _KEY_TABLE
-{
-       u32     DW0_Valid:1;
-       u32     DW0_NullKey:1;
-       u32     DW0_Security_Mode:2;//0:WEP 40 bit 1:WEP 104 bit 2:TKIP 128 bit 3:CCMP 128 bit
-       u32     DW0_WEPON:1;
-       u32     DW0_RESERVED:11;
-       u32     DW0_Address1:16;
-
-       u32     DW1_Address2;
-
-       u32     DW2_RxSequenceCount1;
-
-       u32     DW3_RxSequenceCount2:16;
-       u32     DW3_RESERVED:16;
-
-       u32     DW4_TxSequenceCount1;
-
-       u32     DW5_TxSequenceCount2:16;
-       u32     DW5_RESERVED:16;
-
-} KEY_TABLE, *PKEY_TABLE;
 
 //--------------------------------------------------------
 //                      Descriptor
@@ -412,8 +377,8 @@ typedef struct _DESCRIPTOR {                // Skip length = 8 DWORD
 #define MAX_RF_PARAMETER       32
 
 typedef struct _TXVGA_FOR_50 {
-       u8      ChanNo;
-       u8      TxVgaValue;
+       u8      ChanNo;
+       u8      TxVgaValue;
 } TXVGA_FOR_50;
 
 
@@ -500,10 +465,10 @@ typedef struct _HW_DATA_T
        //========================================================================
        // Variable for each module
        //========================================================================
-       WBUSB           WbUsb; // Need WbUsb.h
+       struct wb_usb   WbUsb; // Need WbUsb.h
        struct wb35_reg reg; // Need Wb35Reg.h
-       WB35TX          Wb35Tx; // Need Wb35Tx.h
-       WB35RX          Wb35Rx; // Need Wb35Rx.h
+       struct wb35_tx  Wb35Tx; // Need Wb35Tx.h
+       struct wb35_rx  Wb35Rx; // Need Wb35Rx.h
 
        struct timer_list       LEDTimer;// For LED
 
@@ -578,33 +543,4 @@ typedef struct _HW_DATA_T
 
 } hw_data_t, *phw_data_t;
 
-// The mapping of Rx and Tx descriptor field
-typedef struct _HAL_RATE
-{
-       // DSSS
-       u32     RESERVED_0;
-       u32   NumRate2MS;
-       u32   NumRate55MS;
-       u32   NumRate11MS;
-
-       u32     RESERVED_1[4];
-
-       u32   NumRate1M;
-       u32   NumRate2ML;
-       u32   NumRate55ML;
-       u32   NumRate11ML;
-
-       u32     RESERVED_2[4];
-
-       // OFDM
-       u32   NumRate6M;
-       u32   NumRate9M;
-       u32   NumRate12M;
-       u32   NumRate18M;
-       u32   NumRate24M;
-       u32   NumRate36M;
-       u32   NumRate48M;
-       u32   NumRate54M;
-} HAL_RATE, *PHAL_RATE;
-
 #endif
index 853ec39137f056998e91706a02603e99e099e585..75b4b04792d9fa71875d64645e57c1dc11edab26 100644 (file)
@@ -312,7 +312,7 @@ error:
 
 static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id_table)
 {
-       PWBUSB          pWbUsb;
+       struct wb_usb *pWbUsb;
         struct usb_host_interface *interface;
        struct usb_endpoint_descriptor *endpoint;
        u32     ltmp;
index 1de93600d848208f87877d022253a414873e46fd..0c7e6a383f2d876da93f932acfa034b4410e02a1 100644 (file)
 
 #include <linux/types.h>
 
-//---------------------------------------------------------------------------
-//  RW_CONTEXT --
-//
-//  Used to track driver-generated io irps
-//---------------------------------------------------------------------------
-typedef struct _RW_CONTEXT
-{
-       void*                   pHwData;
-       struct urb              *urb;
-       void*                   pCallBackFunctionParameter;
-} RW_CONTEXT, *PRW_CONTEXT;
-
-typedef struct _WBUSB {
+struct wb_usb {
        u32     IsUsb20;
        struct usb_device *udev;
        u32     DetectCount;
-} WBUSB, *PWBUSB;
+};
 
 #endif