Skip to contentSkip to conversation

w35und: some more cleanups

PATCH Pavel Machek 1 participant 1 message Apr 7, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

Some more cleanups for today. I took a look at transmit/receive paths, and they seem to be reasonably simple, maybe softmac conversion will not be that hard to do...?

drivers/net/wireless/winbond/winbondport/linux/wb35reg.c +2 -2
index 3fa841f..9809139 100644
@@ -10,7 +10,7 @@ extern void phy_calibration_winbond(hw_d
 // Flag : AUTO_INCREMENT - RegisterNo will auto increment 4
 //		  NO_INCREMENT - Function will write data into the same register
 unsigned char
-Wb35Reg_BurstWrite(  phw_data_t pHwData,  u16 RegisterNo,  PULONG pRegisterData,  u8 NumberOfData,  u8 Flag )
+Wb35Reg_BurstWrite(phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterData, u8 NumberOfData, u8 Flag)
 {
 	PWB35REG pWb35Reg = &pHwData->Wb35Reg;
 	PURB		pUrb = NULL;
@@ -70,7 +70,7 @@ Wb35Reg_BurstWrite(  phw_data_t pHwData,
 }
 
 void
-Wb35Reg_Update(  phw_data_t pHwData,  u16 RegisterNo,  u32 RegisterValue )
+Wb35Reg_Update(phw_data_t pHwData,  u16 RegisterNo,  u32 RegisterValue)
 {
 	PWB35REG	pWb35Reg = &pHwData->Wb35Reg;
 	switch (RegisterNo) {
drivers/net/wireless/winbond/winbondport/linux/wb35rx.c +8 -8
index ea70d84..f9d2b82 100644
@@ -26,11 +26,11 @@ void Wb35Rx_start(phw_data_t pHwData)
 // This function cannot reentrain
 void Wb35Rx(  phw_data_t pHwData )
 {
-	PWB35RX		pWb35Rx = &pHwData->Wb35Rx;
-	PUCHAR		pRxBufferAddress;
-	PURB		pUrb = (PURB)pWb35Rx->RxUrb;
-	int		retv;
-	u32		RxBufferId;
+	PWB35RX	pWb35Rx = &pHwData->Wb35Rx;
+	PUCHAR	pRxBufferAddress;
+	PURB	pUrb = (PURB)pWb35Rx->RxUrb;
+	int	retv;
+	u32	RxBufferId;
 
 	//
 	// Issuing URB
@@ -183,14 +183,14 @@ void Wb35Rx_stop(phw_data_t pHwData)
 
 	// Canceling the Irp if already sends it out.
 	if (pWb35Rx->EP3vm_state == VM_RUNNING) {
-		usb_unlink_urb( pWb35Rx->RxUrb ); // Only use unlink, let Wb35Rx_destrot to free them
+		usb_unlink_urb( pWb35Rx->RxUrb ); // Only use unlink, let Wb35Rx_destroy to free them
 		#ifdef _PE_RX_DUMP_
 		WBDEBUG(("EP3 Rx stop\n"));
 		#endif
 	}
 }
 
-// Only can be run in passive-level
+// Needs process context
 void Wb35Rx_destroy(phw_data_t pHwData)
 {
 	PWB35RX pWb35Rx = &pHwData->Wb35Rx;
@@ -200,7 +200,7 @@ void Wb35Rx_destroy(phw_data_t pHwData)
 	} while (pWb35Rx->EP3vm_state != VM_STOP);
 	OS_SLEEP(10000); // Delay for waiting function exit 940623.1.b
 
-	if( pWb35Rx->RxUrb )
+	if (pWb35Rx->RxUrb)
 		usb_free_urb( pWb35Rx->RxUrb );
 	#ifdef _PE_RX_DUMP_
 	WBDEBUG(("Wb35Rx_destroy OK\n"));
drivers/net/wireless/winbond/winbondport/linux/wb35tx.c +43 -45

131 lines not on this page · raw message

drivers/net/wireless/winbond/winbondport/linux/wbusb.c +0 -4
index 4a980e6..62d3e49 100644
@@ -130,10 +130,6 @@ int wb35_probe( struct usb_interface *in
 		pWbUsb = &Adapter->sHwData.WbUsb;
 		pWbUsb->udev = udev;
 
-		//set the interface name for this device.
-		//dev_alloc_name(	netdev, "wlan%d");
-
-
 	        //Cambiado
 	        interface = intf->cur_altsetting;
 	        endpoint = &interface->endpoint[0].desc;
drivers/net/wireless/winbond/winbondport/linux/wbusb_s.h +6 -20
index 7a775c0..74d72bd 100644
@@ -12,7 +12,7 @@
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 #define OS_SLEEP( _MT )	{ set_current_state(TASK_INTERRUPTIBLE); \
-							  schedule_timeout( _MT*HZ/1000000 ); }
+			  schedule_timeout( _MT*HZ/1000000 ); }
 
 
 //---------------------------------------------------------------------------
@@ -22,7 +22,7 @@ #define OS_SLEEP( _MT )	{ set_current_st
 //---------------------------------------------------------------------------
 typedef struct _RW_CONTEXT
 {
-    void*			pHwData;
+	void*			pHwData;
 	PURB			pUrb;
 	void*			pCallBackFunctionParameter;
 } RW_CONTEXT, *PRW_CONTEXT;
@@ -30,27 +30,13 @@ typedef struct _RW_CONTEXT
 
 
 
-#define DRIVER_AUTHOR 			"Original by: Jeff Lee<[email protected]> Adapted to 2.6.x by Costantino Leandro (Rxart Desktop) <[email protected]>"
-#define DRIVER_DESC				"IS89C35 802.11bg WLAN USB Driver"
+#define DRIVER_AUTHOR "Original by: Jeff Lee<[email protected]> Adapted to 2.6.x by Costantino Leandro (Rxart Desktop) <[email protected]>"
+#define DRIVER_DESC   "IS89C35 802.11bg WLAN USB Driver"
 
 
 
-typedef struct _WBUSB
-{
-	// Is USB 2.0
+typedef struct _WBUSB {
 	u32	IsUsb20;
-	struct usb_device *			udev;
+	struct usb_device *udev;
 	u32	DetectCount;
-
 } WBUSB, *PWBUSB;
-
-#if 0 //some Linux don't have usb_ctrlrequest  
-struct usb_ctrlrequest {
-                __u8 bRequestType;
-                __u8 bRequest;
-                __u16 wValue;
-                __u16 wIndex;
-                __u16 wLength;
-} __attribute__ ((packed));
-#endif 
-
drivers/net/wireless/winbond/winbondport/mds.c +29 -41

173 lines not on this page · raw message

drivers/net/wireless/winbond/winbondport/reg.c +1 -3
index 34d963a..2a30f32 100644
@@ -1043,10 +1043,8 @@ void Set_ChanIndep_RfData_al7230_50(  ph
 // RFSynthesizer_initial --
 //=============================================================================================================
 void
-RFSynthesizer_initial(  phw_data_t pHwData )
+RFSynthesizer_initial(phw_data_t pHwData)
 {
-//	PADAPTER Adapter = pHwData->Adapter;
-//	PWB35REG pWb35Reg = &pHwData->Wb35Reg;
 	u32	altmp[32];
 	PULONG	pltmp = altmp;
 	u32	ltmp;
drivers/net/wireless/winbond/winbondport/sme_api.c +9 -45

120 lines not on this page · raw message

drivers/net/wireless/winbond/winbondport/wblinux.c +103 -112

267 lines not on this page · raw message

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html