aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/winbond
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/winbond')
-rw-r--r--drivers/staging/winbond/mds.c7
-rw-r--r--drivers/staging/winbond/wb35rx_f.h12
-rw-r--r--drivers/staging/winbond/wb35rx_s.h62
-rw-r--r--drivers/staging/winbond/wbhal.h4
-rw-r--r--drivers/staging/winbond/wbusb.c14
5 files changed, 41 insertions, 58 deletions
diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c
index 1b8b8ace39e..faa93f0ee10 100644
--- a/drivers/staging/winbond/mds.c
+++ b/drivers/staging/winbond/mds.c
@@ -315,7 +315,7 @@ static void Mds_HeaderCopy(struct wbsoft_priv *adapter, struct wb35_descriptor *
pT00->T00_tx_packet_id = pDes->Descriptor_ID; /* Set packet ID */
pT00->T00_header_length = 24; /* Set header length */
- pT01->T01_retry_abort_ebable = 1; /* 921013 931130.5.h */
+ pT01->T01_retry_abort_enable = 1; /* 921013 931130.5.h */
/* Key ID setup */
pT01->T01_wep_id = 0;
@@ -476,11 +476,8 @@ Mds_Tx(struct wbsoft_priv *adapter)
/* 931130.5.b */
FragmentCount = PacketSize/FragmentThreshold + 1;
stmp = PacketSize + FragmentCount*32 + 8; /* 931130.5.c 8:MIC */
- if ((XmitBufSize + stmp) >= MAX_USB_TX_BUFFER) {
- printk("[Mds_Tx] Excess max tx buffer.\n");
+ if ((XmitBufSize + stmp) >= MAX_USB_TX_BUFFER)
break; /* buffer is not enough */
- }
-
/*
* Start transmitting
diff --git a/drivers/staging/winbond/wb35rx_f.h b/drivers/staging/winbond/wb35rx_f.h
index 1fdf65ea604..559bdca12e1 100644
--- a/drivers/staging/winbond/wb35rx_f.h
+++ b/drivers/staging/winbond/wb35rx_f.h
@@ -4,12 +4,12 @@
#include <net/mac80211.h>
#include "wbhal.h"
-//====================================
-// Interface function declare
-//====================================
-unsigned char Wb35Rx_initial( struct hw_data * pHwData );
-void Wb35Rx_destroy( struct hw_data * pHwData );
-void Wb35Rx_stop( struct hw_data * pHwData );
+/*
+ * Interface function declaration
+ */
+unsigned char Wb35Rx_initial(struct hw_data *pHwData);
+void Wb35Rx_destroy(struct hw_data *pHwData);
+void Wb35Rx_stop(struct hw_data *pHwData);
void Wb35Rx_start(struct ieee80211_hw *hw);
#endif
diff --git a/drivers/staging/winbond/wb35rx_s.h b/drivers/staging/winbond/wb35rx_s.h
index 4b03274a7d2..545bc950072 100644
--- a/drivers/staging/winbond/wb35rx_s.h
+++ b/drivers/staging/winbond/wb35rx_s.h
@@ -1,44 +1,44 @@
-//============================================================================
-// wb35rx.h --
-//============================================================================
+#ifndef __WINBOND_35RX_S_H
+#define __WINBOND_35RX_S_H
-// Definition for this module used
-#define MAX_USB_RX_BUFFER 4096 // This parameter must be 4096 931130.4.f
+/* Definition for this module used */
+#define MAX_USB_RX_BUFFER 4096 /* This parameter must be 4096 931130.4.f */
+#define MAX_USB_RX_BUFFER_NUMBER ETHERNET_RX_DESCRIPTORS /* Maximum 254, 255 is RESERVED ID */
+#define RX_INTERFACE 0 /* Interface 1 */
+#define RX_PIPE 2 /* Pipe 3 */
+#define MAX_PACKET_SIZE 1600 /* 1568 = 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g */
+#define RX_END_TAG 0x0badbeef
-#define MAX_USB_RX_BUFFER_NUMBER ETHERNET_RX_DESCRIPTORS // Maximum 254, 255 is RESERVED ID
-#define RX_INTERFACE 0 // Interface 1
-#define RX_PIPE 2 // Pipe 3
-#define MAX_PACKET_SIZE 1600 //1568 // 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g
-#define RX_END_TAG 0x0badbeef
-
-//====================================
-// Internal variable for module
-//====================================
+/*
+ * Internal variable for module
+ */
struct wb35_rx {
- u32 ByteReceived;// For calculating throughput of BulkIn
- atomic_t RxFireCounter;// Does Wb35Rx module fire?
+ u32 ByteReceived; /* For calculating throughput of BulkIn */
+ atomic_t RxFireCounter;/* Does Wb35Rx module fire? */
- u8 RxBuffer[ MAX_USB_RX_BUFFER_NUMBER ][ ((MAX_USB_RX_BUFFER+3) & ~0x03 ) ];
- u16 RxBufferSize[ ((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01) ];
- u8 RxOwner[ ((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03 ) ];//Ownership of buffer 0: SW 1:HW
+ u8 RxBuffer[MAX_USB_RX_BUFFER_NUMBER][((MAX_USB_RX_BUFFER+3) & ~0x03)];
+ u16 RxBufferSize[((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01)];
+ u8 RxOwner[((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03)]; /* Ownership of buffer 0:SW 1:HW */
- u32 RxProcessIndex;//The next index to process
- u32 RxBufferId;
- u32 EP3vm_state;
+ u32 RxProcessIndex; /* The next index to process */
+ u32 RxBufferId;
+ u32 EP3vm_state;
- u32 rx_halt; // For VM stopping
+ u32 rx_halt; /* For VM stopping */
- u16 MoreDataSize;
- u16 PacketSize;
+ u16 MoreDataSize;
+ u16 PacketSize;
- u32 CurrentRxBufferId; // For complete routine usage
- u32 Rx3UrbCancel;
+ u32 CurrentRxBufferId; /* For complete routine usage */
+ u32 Rx3UrbCancel;
- u32 LastR1; // For RSSI reporting
- struct urb * RxUrb;
- u32 Ep3ErrorCount2; // 20060625.1 Usbd for Rx DMA error count
+ u32 LastR1; /* For RSSI reporting */
+ struct urb *RxUrb;
+ u32 Ep3ErrorCount2; /* 20060625.1 Usbd for Rx DMA error count */
int EP3VM_status;
- u8 * pDRx;
+ u8 *pDRx;
};
+
+#endif /* __WINBOND_35RX_S_H */
diff --git a/drivers/staging/winbond/wbhal.h b/drivers/staging/winbond/wbhal.h
index 39e84a0d972..289ee549146 100644
--- a/drivers/staging/winbond/wbhal.h
+++ b/drivers/staging/winbond/wbhal.h
@@ -226,11 +226,11 @@ struct T01_descriptor {
u32 T01_add_challenge_text:1;
u32 T01_inhibit_crc:1;
u32 T01_loop_back_wep_mode:1;
- u32 T01_retry_abort_ebable:1;
+ u32 T01_retry_abort_enable:1;
};
#else
struct {
- u32 T01_retry_abort_ebable:1;
+ u32 T01_retry_abort_enable:1;
u32 T01_loop_back_wep_mode:1;
u32 T01_inhibit_crc:1;
u32 T01_add_challenge_text:1;
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index 48aa1361903..3fa1ae4d3d7 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -79,18 +79,15 @@ static int wbsoft_add_interface(struct ieee80211_hw *dev,
static void wbsoft_remove_interface(struct ieee80211_hw *dev,
struct ieee80211_vif *vif)
{
- printk("wbsoft_remove interface called\n");
}
static void wbsoft_stop(struct ieee80211_hw *hw)
{
- printk(KERN_INFO "%s called\n", __func__);
}
static int wbsoft_get_stats(struct ieee80211_hw *hw,
struct ieee80211_low_level_stats *stats)
{
- printk(KERN_INFO "%s called\n", __func__);
return 0;
}
@@ -179,12 +176,9 @@ static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info
if (pHwData->SurpriseRemove)
return;
- printk("Going to channel: %d/%d\n", channel.band, channel.ChanNo);
-
RFSynthesizer_SwitchingChannel(pHwData, channel); /* Switch channel */
pHwData->Channel = channel.ChanNo;
pHwData->band = channel.band;
- pr_debug("Set channel is %d, band =%d\n", pHwData->Channel, pHwData->band);
reg->M28_MacControl &= ~0xff; /* Clean channel information field */
reg->M28_MacControl |= channel.ChanNo;
Wb35Reg_WriteWithCallbackValue(pHwData, 0x0828, reg->M28_MacControl,
@@ -264,8 +258,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed)
struct wbsoft_priv *priv = dev->priv;
struct chan_info ch;
- printk("wbsoft_config called\n");
-
/* Should use channel_num, or something, as that is already pre-translated */
ch.band = 1;
ch.ChanNo = 1;
@@ -282,7 +274,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed)
static u64 wbsoft_get_tsf(struct ieee80211_hw *dev, struct ieee80211_vif *vif)
{
- printk("wbsoft_get_tsf called\n");
return 0;
}
@@ -716,7 +707,6 @@ static int wb35_hw_init(struct ieee80211_hw *hw)
}
priv->sLocalPara.bAntennaNo = hal_get_antenna_number(pHwData);
- pr_debug("Driver init, antenna no = %d\n", priv->sLocalPara.bAntennaNo);
hal_get_hw_radio_off(pHwData);
/* Waiting for HAL setting OK */
@@ -782,9 +772,6 @@ static int wb35_probe(struct usb_interface *intf,
interface = intf->cur_altsetting;
endpoint = &interface->endpoint[0].desc;
- if (endpoint[2].wMaxPacketSize == 512)
- printk("[w35und] Working on USB 2.0\n");
-
err = wb35_hw_init(dev);
if (err)
goto error_free_hw;
@@ -836,7 +823,6 @@ static void wb35_hw_halt(struct wbsoft_priv *adapter)
{
/* Turn off Rx and Tx hardware ability */
hal_stop(&adapter->sHwData);
- pr_debug("[w35und] Hal_stop O.K.\n");
/* Waiting Irp completed */
msleep(100);