diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-10-20 17:03:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-22 12:56:32 -0400 |
commit | 8b384e0c3f85065a4986013d74d5585ed595cfa0 (patch) | |
tree | 7674336584ed288af973b55ea684de4a2d53905e | |
parent | 58be3fb09b0a140e086475e8d34f72e366c6994b (diff) |
Staging: w35und: remove some typedefs
This patch removes some obfuscating typedefs from the driver code.
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23 files changed, 119 insertions, 124 deletions
diff --git a/drivers/staging/winbond/bss_f.h b/drivers/staging/winbond/bss_f.h index c957bc94f08d..013183153993 100644 --- a/drivers/staging/winbond/bss_f.h +++ b/drivers/staging/winbond/bss_f.h | |||
@@ -24,7 +24,7 @@ void DesiredRate2InfoElement(PWB32_ADAPTER Adapter, u8 *addr, u16 *iFildOffset, | |||
24 | u8 *pBasicRateSet, u8 BasicRateCount, | 24 | u8 *pBasicRateSet, u8 BasicRateCount, |
25 | u8 *pOperationRateSet, u8 OperationRateCount); | 25 | u8 *pOperationRateSet, u8 OperationRateCount); |
26 | void BSSAddIBSSdata(PWB32_ADAPTER Adapter, PWB_BSSDESCRIPTION psDesData); | 26 | void BSSAddIBSSdata(PWB32_ADAPTER Adapter, PWB_BSSDESCRIPTION psDesData); |
27 | unsigned char boCmpMacAddr( PUCHAR, PUCHAR ); | 27 | unsigned char boCmpMacAddr( u8 *, u8 *); |
28 | unsigned char boCmpSSID(struct SSID_Element *psSSID1, struct SSID_Element *psSSID2); | 28 | unsigned char boCmpSSID(struct SSID_Element *psSSID1, struct SSID_Element *psSSID2); |
29 | u16 wBSSfindSSID(PWB32_ADAPTER Adapter, struct SSID_Element *psSsid); | 29 | u16 wBSSfindSSID(PWB32_ADAPTER Adapter, struct SSID_Element *psSsid); |
30 | u16 wRoamingQuery(PWB32_ADAPTER Adapter); | 30 | u16 wRoamingQuery(PWB32_ADAPTER Adapter); |
@@ -42,11 +42,11 @@ void RateReSortForSRate(PWB32_ADAPTER Adapter, u8 *RateArray, u8 num); | |||
42 | void Assemble_IE(PWB32_ADAPTER Adapter, u16 wBssIdx); | 42 | void Assemble_IE(PWB32_ADAPTER Adapter, u16 wBssIdx); |
43 | void SetMaxTxRate(PWB32_ADAPTER Adapter); | 43 | void SetMaxTxRate(PWB32_ADAPTER Adapter); |
44 | 44 | ||
45 | void CreateWpaIE(PWB32_ADAPTER Adapter, u16* iFildOffset, PUCHAR msg, struct Management_Frame* msgHeader, | 45 | void CreateWpaIE(PWB32_ADAPTER Adapter, u16* iFildOffset, u8 *msg, struct Management_Frame* msgHeader, |
46 | struct Association_Request_Frame_Body* msgBody, u16 iMSindex); //added by WS 05/14/05 | 46 | struct Association_Request_Frame_Body* msgBody, u16 iMSindex); //added by WS 05/14/05 |
47 | 47 | ||
48 | #ifdef _WPA2_ | 48 | #ifdef _WPA2_ |
49 | void CreateRsnIE(PWB32_ADAPTER Adapter, u16* iFildOffset, PUCHAR msg, struct Management_Frame* msgHeader, | 49 | void CreateRsnIE(PWB32_ADAPTER Adapter, u16* iFildOffset, u8 *msg, struct Management_Frame* msgHeader, |
50 | struct Association_Request_Frame_Body* msgBody, u16 iMSindex);//added by WS 05/14/05 | 50 | struct Association_Request_Frame_Body* msgBody, u16 iMSindex);//added by WS 05/14/05 |
51 | 51 | ||
52 | u16 SearchPmkid(PWB32_ADAPTER Adapter, struct Management_Frame* msgHeader, | 52 | u16 SearchPmkid(PWB32_ADAPTER Adapter, struct Management_Frame* msgHeader, |
diff --git a/drivers/staging/winbond/ds_tkip.h b/drivers/staging/winbond/ds_tkip.h index 29e5055b45a1..6841d66e7e8c 100644 --- a/drivers/staging/winbond/ds_tkip.h +++ b/drivers/staging/winbond/ds_tkip.h | |||
@@ -25,9 +25,9 @@ typedef struct tkip | |||
25 | s32 bytes_in_M; // # bytes in M | 25 | s32 bytes_in_M; // # bytes in M |
26 | } tkip_t; | 26 | } tkip_t; |
27 | 27 | ||
28 | //void _append_data( PUCHAR pData, u16 size, tkip_t *p ); | 28 | //void _append_data( u8 *pData, u16 size, tkip_t *p ); |
29 | void Mds_MicGet( void* Adapter, void* pRxLayer1, PUCHAR pKey, PUCHAR pMic ); | 29 | void Mds_MicGet( void* Adapter, void* pRxLayer1, u8 *pKey, u8 *pMic ); |
30 | void Mds_MicFill( void* Adapter, void* pDes, PUCHAR XmitBufAddress ); | 30 | void Mds_MicFill( void* Adapter, void* pDes, u8 *XmitBufAddress ); |
31 | 31 | ||
32 | 32 | ||
33 | 33 | ||
diff --git a/drivers/staging/winbond/linux/common.h b/drivers/staging/winbond/linux/common.h index 6b00bad74f78..c8f14b7b5b22 100644 --- a/drivers/staging/winbond/linux/common.h +++ b/drivers/staging/winbond/linux/common.h | |||
@@ -39,14 +39,6 @@ | |||
39 | // Common type definition | 39 | // Common type definition |
40 | //=============================================================== | 40 | //=============================================================== |
41 | 41 | ||
42 | typedef u8* PUCHAR; | ||
43 | typedef s8* PCHAR; | ||
44 | typedef u8* PBOOLEAN; | ||
45 | typedef u16* PUSHORT; | ||
46 | typedef u32* PULONG; | ||
47 | typedef s16* PSHORT; | ||
48 | |||
49 | |||
50 | //=========================================== | 42 | //=========================================== |
51 | #define IGNORE 2 | 43 | #define IGNORE 2 |
52 | #define SUCCESS 1 | 44 | #define SUCCESS 1 |
@@ -110,7 +102,7 @@ typedef struct urb * PURB; | |||
110 | #define OS_ATOMIC_READ( _A, _V ) _V | 102 | #define OS_ATOMIC_READ( _A, _V ) _V |
111 | #define OS_ATOMIC_INC( _A, _V ) EncapAtomicInc( _A, (void*)_V ) | 103 | #define OS_ATOMIC_INC( _A, _V ) EncapAtomicInc( _A, (void*)_V ) |
112 | #define OS_ATOMIC_DEC( _A, _V ) EncapAtomicDec( _A, (void*)_V ) | 104 | #define OS_ATOMIC_DEC( _A, _V ) EncapAtomicDec( _A, (void*)_V ) |
113 | #define OS_MEMORY_CLEAR( _A, _S ) memset( (PUCHAR)_A,0,_S) | 105 | #define OS_MEMORY_CLEAR( _A, _S ) memset( (u8 *)_A,0,_S) |
114 | #define OS_MEMORY_COMPARE( _A, _B, _S ) (memcmp(_A,_B,_S)? 0 : 1) // Definition is reverse with Ndis 1: the same 0: different | 106 | #define OS_MEMORY_COMPARE( _A, _B, _S ) (memcmp(_A,_B,_S)? 0 : 1) // Definition is reverse with Ndis 1: the same 0: different |
115 | 107 | ||
116 | 108 | ||
diff --git a/drivers/staging/winbond/linux/wb35reg.c b/drivers/staging/winbond/linux/wb35reg.c index 2c0b454e8cad..5c28ec9643de 100644 --- a/drivers/staging/winbond/linux/wb35reg.c +++ b/drivers/staging/winbond/linux/wb35reg.c | |||
@@ -10,7 +10,7 @@ extern void phy_calibration_winbond(hw_data_t *phw_data, u32 frequency); | |||
10 | // Flag : AUTO_INCREMENT - RegisterNo will auto increment 4 | 10 | // Flag : AUTO_INCREMENT - RegisterNo will auto increment 4 |
11 | // NO_INCREMENT - Function will write data into the same register | 11 | // NO_INCREMENT - Function will write data into the same register |
12 | unsigned char | 12 | unsigned char |
13 | Wb35Reg_BurstWrite(phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterData, u8 NumberOfData, u8 Flag) | 13 | Wb35Reg_BurstWrite(phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterData, u8 NumberOfData, u8 Flag) |
14 | { | 14 | { |
15 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; | 15 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; |
16 | PURB pUrb = NULL; | 16 | PURB pUrb = NULL; |
@@ -30,13 +30,13 @@ Wb35Reg_BurstWrite(phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterData, u8 | |||
30 | if( pUrb && pRegQueue ) { | 30 | if( pUrb && pRegQueue ) { |
31 | pRegQueue->DIRECT = 2;// burst write register | 31 | pRegQueue->DIRECT = 2;// burst write register |
32 | pRegQueue->INDEX = RegisterNo; | 32 | pRegQueue->INDEX = RegisterNo; |
33 | pRegQueue->pBuffer = (PULONG)((PUCHAR)pRegQueue + sizeof(REG_QUEUE)); | 33 | pRegQueue->pBuffer = (u32 *)((u8 *)pRegQueue + sizeof(REG_QUEUE)); |
34 | memcpy( pRegQueue->pBuffer, pRegisterData, DataSize ); | 34 | memcpy( pRegQueue->pBuffer, pRegisterData, DataSize ); |
35 | //the function for reversing register data from little endian to big endian | 35 | //the function for reversing register data from little endian to big endian |
36 | for( i=0; i<NumberOfData ; i++ ) | 36 | for( i=0; i<NumberOfData ; i++ ) |
37 | pRegQueue->pBuffer[i] = cpu_to_le32( pRegQueue->pBuffer[i] ); | 37 | pRegQueue->pBuffer[i] = cpu_to_le32( pRegQueue->pBuffer[i] ); |
38 | 38 | ||
39 | dr = (struct usb_ctrlrequest *)((PUCHAR)pRegQueue + sizeof(REG_QUEUE) + DataSize); | 39 | dr = (struct usb_ctrlrequest *)((u8 *)pRegQueue + sizeof(REG_QUEUE) + DataSize); |
40 | dr->bRequestType = USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE; | 40 | dr->bRequestType = USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE; |
41 | dr->bRequest = 0x04; // USB or vendor-defined request code, burst mode | 41 | dr->bRequest = 0x04; // USB or vendor-defined request code, burst mode |
42 | dr->wValue = cpu_to_le16( Flag ); // 0: Register number auto-increment, 1: No auto increment | 42 | dr->wValue = cpu_to_le16( Flag ); // 0: Register number auto-increment, 1: No auto increment |
@@ -181,7 +181,7 @@ Wb35Reg_Write( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ) | |||
181 | pRegQueue->INDEX = RegisterNo; | 181 | pRegQueue->INDEX = RegisterNo; |
182 | pRegQueue->VALUE = cpu_to_le32(RegisterValue); | 182 | pRegQueue->VALUE = cpu_to_le32(RegisterValue); |
183 | pRegQueue->RESERVED_VALID = FALSE; | 183 | pRegQueue->RESERVED_VALID = FALSE; |
184 | dr = (struct usb_ctrlrequest *)((PUCHAR)pRegQueue + sizeof(REG_QUEUE)); | 184 | dr = (struct usb_ctrlrequest *)((u8 *)pRegQueue + sizeof(REG_QUEUE)); |
185 | dr->bRequestType = USB_TYPE_VENDOR|USB_DIR_OUT |USB_RECIP_DEVICE; | 185 | dr->bRequestType = USB_TYPE_VENDOR|USB_DIR_OUT |USB_RECIP_DEVICE; |
186 | dr->bRequest = 0x03; // USB or vendor-defined request code, burst mode | 186 | dr->bRequest = 0x03; // USB or vendor-defined request code, burst mode |
187 | dr->wValue = cpu_to_le16(0x0); | 187 | dr->wValue = cpu_to_le16(0x0); |
@@ -220,7 +220,7 @@ Wb35Reg_Write( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ) | |||
220 | // FALSE : register not support | 220 | // FALSE : register not support |
221 | unsigned char | 221 | unsigned char |
222 | Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue, | 222 | Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue, |
223 | PCHAR pValue, s8 Len) | 223 | s8 *pValue, s8 Len) |
224 | { | 224 | { |
225 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; | 225 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; |
226 | struct usb_ctrlrequest *dr; | 226 | struct usb_ctrlrequest *dr; |
@@ -243,7 +243,7 @@ Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, u16 RegisterNo, u32 Register | |||
243 | //NOTE : Users must guarantee the size of value will not exceed the buffer size. | 243 | //NOTE : Users must guarantee the size of value will not exceed the buffer size. |
244 | memcpy(pRegQueue->RESERVED, pValue, Len); | 244 | memcpy(pRegQueue->RESERVED, pValue, Len); |
245 | pRegQueue->RESERVED_VALID = TRUE; | 245 | pRegQueue->RESERVED_VALID = TRUE; |
246 | dr = (struct usb_ctrlrequest *)((PUCHAR)pRegQueue + sizeof(REG_QUEUE)); | 246 | dr = (struct usb_ctrlrequest *)((u8 *)pRegQueue + sizeof(REG_QUEUE)); |
247 | dr->bRequestType = USB_TYPE_VENDOR|USB_DIR_OUT |USB_RECIP_DEVICE; | 247 | dr->bRequestType = USB_TYPE_VENDOR|USB_DIR_OUT |USB_RECIP_DEVICE; |
248 | dr->bRequest = 0x03; // USB or vendor-defined request code, burst mode | 248 | dr->bRequest = 0x03; // USB or vendor-defined request code, burst mode |
249 | dr->wValue = cpu_to_le16(0x0); | 249 | dr->wValue = cpu_to_le16(0x0); |
@@ -278,10 +278,10 @@ Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, u16 RegisterNo, u32 Register | |||
278 | // FALSE : register not support | 278 | // FALSE : register not support |
279 | // pRegisterValue : It must be a resident buffer due to asynchronous read register. | 279 | // pRegisterValue : It must be a resident buffer due to asynchronous read register. |
280 | unsigned char | 280 | unsigned char |
281 | Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterValue ) | 281 | Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ) |
282 | { | 282 | { |
283 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; | 283 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; |
284 | PULONG pltmp = pRegisterValue; | 284 | u32 * pltmp = pRegisterValue; |
285 | int ret = -1; | 285 | int ret = -1; |
286 | 286 | ||
287 | // Module shutdown | 287 | // Module shutdown |
@@ -327,7 +327,7 @@ Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterValue | |||
327 | // FALSE : register not support | 327 | // FALSE : register not support |
328 | // pRegisterValue : It must be a resident buffer due to asynchronous read register. | 328 | // pRegisterValue : It must be a resident buffer due to asynchronous read register. |
329 | unsigned char | 329 | unsigned char |
330 | Wb35Reg_Read(phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterValue ) | 330 | Wb35Reg_Read(phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ) |
331 | { | 331 | { |
332 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; | 332 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; |
333 | struct usb_ctrlrequest * dr; | 333 | struct usb_ctrlrequest * dr; |
@@ -348,7 +348,7 @@ Wb35Reg_Read(phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterValue ) | |||
348 | pRegQueue->DIRECT = 0;// read register | 348 | pRegQueue->DIRECT = 0;// read register |
349 | pRegQueue->INDEX = RegisterNo; | 349 | pRegQueue->INDEX = RegisterNo; |
350 | pRegQueue->pBuffer = pRegisterValue; | 350 | pRegQueue->pBuffer = pRegisterValue; |
351 | dr = (struct usb_ctrlrequest *)((PUCHAR)pRegQueue + sizeof(REG_QUEUE)); | 351 | dr = (struct usb_ctrlrequest *)((u8 *)pRegQueue + sizeof(REG_QUEUE)); |
352 | dr->bRequestType = USB_TYPE_VENDOR|USB_RECIP_DEVICE|USB_DIR_IN; | 352 | dr->bRequestType = USB_TYPE_VENDOR|USB_RECIP_DEVICE|USB_DIR_IN; |
353 | dr->bRequest = 0x01; // USB or vendor-defined request code, burst mode | 353 | dr->bRequest = 0x01; // USB or vendor-defined request code, burst mode |
354 | dr->wValue = cpu_to_le16(0x0); | 354 | dr->wValue = cpu_to_le16(0x0); |
@@ -399,7 +399,7 @@ Wb35Reg_EP0VM(phw_data_t pHwData ) | |||
399 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; | 399 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; |
400 | PURB pUrb; | 400 | PURB pUrb; |
401 | struct usb_ctrlrequest *dr; | 401 | struct usb_ctrlrequest *dr; |
402 | PULONG pBuffer; | 402 | u32 * pBuffer; |
403 | int ret = -1; | 403 | int ret = -1; |
404 | PREG_QUEUE pRegQueue; | 404 | PREG_QUEUE pRegQueue; |
405 | 405 | ||
@@ -429,7 +429,7 @@ Wb35Reg_EP0VM(phw_data_t pHwData ) | |||
429 | 429 | ||
430 | usb_fill_control_urb( pUrb, pHwData->WbUsb.udev, | 430 | usb_fill_control_urb( pUrb, pHwData->WbUsb.udev, |
431 | REG_DIRECTION(pHwData->WbUsb.udev,pRegQueue), | 431 | REG_DIRECTION(pHwData->WbUsb.udev,pRegQueue), |
432 | (PUCHAR)dr,pBuffer,cpu_to_le16(dr->wLength), | 432 | (u8 *)dr,pBuffer,cpu_to_le16(dr->wLength), |
433 | Wb35Reg_EP0VM_complete, (void*)pHwData); | 433 | Wb35Reg_EP0VM_complete, (void*)pHwData); |
434 | 434 | ||
435 | pWb35Reg->EP0vm_state = VM_RUNNING; | 435 | pWb35Reg->EP0vm_state = VM_RUNNING; |
@@ -655,7 +655,7 @@ unsigned char Wb35Reg_initial(phw_data_t pHwData) | |||
655 | // version in _GENREQ.ASM of the DWB NE1000/2000 driver. | 655 | // version in _GENREQ.ASM of the DWB NE1000/2000 driver. |
656 | //================================================================================== | 656 | //================================================================================== |
657 | u32 | 657 | u32 |
658 | CardComputeCrc(PUCHAR Buffer, u32 Length) | 658 | CardComputeCrc(u8 * Buffer, u32 Length) |
659 | { | 659 | { |
660 | u32 Crc, Carry; | 660 | u32 Crc, Carry; |
661 | u32 i, j; | 661 | u32 i, j; |
diff --git a/drivers/staging/winbond/linux/wb35reg_f.h b/drivers/staging/winbond/linux/wb35reg_f.h index 38e2906b51a7..3006cfe99ccd 100644 --- a/drivers/staging/winbond/linux/wb35reg_f.h +++ b/drivers/staging/winbond/linux/wb35reg_f.h | |||
@@ -29,16 +29,16 @@ void EEPROMTxVgaAdjust( phw_data_t pHwData ); // 20060619.5 Add | |||
29 | 29 | ||
30 | void Wb35Reg_destroy( phw_data_t pHwData ); | 30 | void Wb35Reg_destroy( phw_data_t pHwData ); |
31 | 31 | ||
32 | unsigned char Wb35Reg_Read( phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterValue ); | 32 | unsigned char Wb35Reg_Read( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ); |
33 | unsigned char Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterValue ); | 33 | unsigned char Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ); |
34 | unsigned char Wb35Reg_Write( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); | 34 | unsigned char Wb35Reg_Write( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); |
35 | unsigned char Wb35Reg_WriteSync( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); | 35 | unsigned char Wb35Reg_WriteSync( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); |
36 | unsigned char Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, | 36 | unsigned char Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, |
37 | u16 RegisterNo, | 37 | u16 RegisterNo, |
38 | u32 RegisterValue, | 38 | u32 RegisterValue, |
39 | PCHAR pValue, | 39 | s8 *pValue, |
40 | s8 Len); | 40 | s8 Len); |
41 | unsigned char Wb35Reg_BurstWrite( phw_data_t pHwData, u16 RegisterNo, PULONG pRegisterData, u8 NumberOfData, u8 Flag ); | 41 | unsigned char Wb35Reg_BurstWrite( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterData, u8 NumberOfData, u8 Flag ); |
42 | 42 | ||
43 | void Wb35Reg_EP0VM( phw_data_t pHwData ); | 43 | void Wb35Reg_EP0VM( phw_data_t pHwData ); |
44 | void Wb35Reg_EP0VM_start( phw_data_t pHwData ); | 44 | void Wb35Reg_EP0VM_start( phw_data_t pHwData ); |
@@ -47,7 +47,7 @@ void Wb35Reg_EP0VM_complete( PURB pUrb ); | |||
47 | u32 BitReverse( u32 dwData, u32 DataLength); | 47 | u32 BitReverse( u32 dwData, u32 DataLength); |
48 | 48 | ||
49 | void CardGetMulticastBit( u8 Address[MAC_ADDR_LENGTH], u8 *Byte, u8 *Value ); | 49 | void CardGetMulticastBit( u8 Address[MAC_ADDR_LENGTH], u8 *Byte, u8 *Value ); |
50 | u32 CardComputeCrc( PUCHAR Buffer, u32 Length ); | 50 | u32 CardComputeCrc( u8 * Buffer, u32 Length ); |
51 | 51 | ||
52 | void Wb35Reg_phy_calibration( phw_data_t pHwData ); | 52 | void Wb35Reg_phy_calibration( phw_data_t pHwData ); |
53 | void Wb35Reg_Update( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); | 53 | void Wb35Reg_Update( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); |
diff --git a/drivers/staging/winbond/linux/wb35reg_s.h b/drivers/staging/winbond/linux/wb35reg_s.h index a7595b1e7336..9b7630126103 100644 --- a/drivers/staging/winbond/linux/wb35reg_s.h +++ b/drivers/staging/winbond/linux/wb35reg_s.h | |||
@@ -75,7 +75,7 @@ typedef struct _REG_QUEUE | |||
75 | union | 75 | union |
76 | { | 76 | { |
77 | u32 VALUE; | 77 | u32 VALUE; |
78 | PULONG pBuffer; | 78 | u32 * pBuffer; |
79 | }; | 79 | }; |
80 | u8 RESERVED[4];// space reserved for communication | 80 | u8 RESERVED[4];// space reserved for communication |
81 | 81 | ||
diff --git a/drivers/staging/winbond/linux/wb35rx.c b/drivers/staging/winbond/linux/wb35rx.c index 26157eb3d5a2..c5c331773db9 100644 --- a/drivers/staging/winbond/linux/wb35rx.c +++ b/drivers/staging/winbond/linux/wb35rx.c | |||
@@ -27,7 +27,7 @@ void Wb35Rx_start(phw_data_t pHwData) | |||
27 | void Wb35Rx( phw_data_t pHwData ) | 27 | void Wb35Rx( phw_data_t pHwData ) |
28 | { | 28 | { |
29 | PWB35RX pWb35Rx = &pHwData->Wb35Rx; | 29 | PWB35RX pWb35Rx = &pHwData->Wb35Rx; |
30 | PUCHAR pRxBufferAddress; | 30 | u8 * pRxBufferAddress; |
31 | PURB pUrb = (PURB)pWb35Rx->RxUrb; | 31 | PURB pUrb = (PURB)pWb35Rx->RxUrb; |
32 | int retv; | 32 | int retv; |
33 | u32 RxBufferId; | 33 | u32 RxBufferId; |
@@ -89,7 +89,7 @@ void Wb35Rx_Complete(PURB pUrb) | |||
89 | { | 89 | { |
90 | phw_data_t pHwData = pUrb->context; | 90 | phw_data_t pHwData = pUrb->context; |
91 | PWB35RX pWb35Rx = &pHwData->Wb35Rx; | 91 | PWB35RX pWb35Rx = &pHwData->Wb35Rx; |
92 | PUCHAR pRxBufferAddress; | 92 | u8 * pRxBufferAddress; |
93 | u32 SizeCheck; | 93 | u32 SizeCheck; |
94 | u16 BulkLength; | 94 | u16 BulkLength; |
95 | u32 RxBufferId; | 95 | u32 RxBufferId; |
@@ -116,7 +116,7 @@ void Wb35Rx_Complete(PURB pUrb) | |||
116 | 116 | ||
117 | // Start to process the data only in successful condition | 117 | // Start to process the data only in successful condition |
118 | pWb35Rx->RxOwner[ RxBufferId ] = 0; // Set the owner to driver | 118 | pWb35Rx->RxOwner[ RxBufferId ] = 0; // Set the owner to driver |
119 | R00.value = le32_to_cpu(*(PULONG)pRxBufferAddress); | 119 | R00.value = le32_to_cpu(*(u32 *)pRxBufferAddress); |
120 | 120 | ||
121 | // The URB is completed, check the result | 121 | // The URB is completed, check the result |
122 | if (pWb35Rx->EP3VM_status != 0) { | 122 | if (pWb35Rx->EP3VM_status != 0) { |
@@ -223,7 +223,7 @@ void Wb35Rx_reset_descriptor( phw_data_t pHwData ) | |||
223 | 223 | ||
224 | void Wb35Rx_adjust(PDESCRIPTOR pRxDes) | 224 | void Wb35Rx_adjust(PDESCRIPTOR pRxDes) |
225 | { | 225 | { |
226 | PULONG pRxBufferAddress; | 226 | u32 * pRxBufferAddress; |
227 | u32 DecryptionMethod; | 227 | u32 DecryptionMethod; |
228 | u32 i; | 228 | u32 i; |
229 | u16 BufferSize; | 229 | u16 BufferSize; |
@@ -264,7 +264,7 @@ u16 Wb35Rx_indicate(phw_data_t pHwData) | |||
264 | { | 264 | { |
265 | DESCRIPTOR RxDes; | 265 | DESCRIPTOR RxDes; |
266 | PWB35RX pWb35Rx = &pHwData->Wb35Rx; | 266 | PWB35RX pWb35Rx = &pHwData->Wb35Rx; |
267 | PUCHAR pRxBufferAddress; | 267 | u8 * pRxBufferAddress; |
268 | u16 PacketSize; | 268 | u16 PacketSize; |
269 | u16 stmp, BufferSize, stmp2 = 0; | 269 | u16 stmp, BufferSize, stmp2 = 0; |
270 | u32 RxBufferId; | 270 | u32 RxBufferId; |
@@ -283,13 +283,13 @@ u16 Wb35Rx_indicate(phw_data_t pHwData) | |||
283 | 283 | ||
284 | // Parse the bulkin buffer | 284 | // Parse the bulkin buffer |
285 | while (BufferSize >= 4) { | 285 | while (BufferSize >= 4) { |
286 | if ((cpu_to_le32(*(PULONG)pRxBufferAddress) & 0x0fffffff) == RX_END_TAG) //Is ending? 921002.9.a | 286 | if ((cpu_to_le32(*(u32 *)pRxBufferAddress) & 0x0fffffff) == RX_END_TAG) //Is ending? 921002.9.a |
287 | break; | 287 | break; |
288 | 288 | ||
289 | // Get the R00 R01 first | 289 | // Get the R00 R01 first |
290 | RxDes.R00.value = le32_to_cpu(*(PULONG)pRxBufferAddress); | 290 | RxDes.R00.value = le32_to_cpu(*(u32 *)pRxBufferAddress); |
291 | PacketSize = (u16)RxDes.R00.R00_receive_byte_count; | 291 | PacketSize = (u16)RxDes.R00.R00_receive_byte_count; |
292 | RxDes.R01.value = le32_to_cpu(*((PULONG)(pRxBufferAddress+4))); | 292 | RxDes.R01.value = le32_to_cpu(*((u32 *)(pRxBufferAddress+4))); |
293 | // For new DMA 4k | 293 | // For new DMA 4k |
294 | if ((PacketSize & 0x03) > 0) | 294 | if ((PacketSize & 0x03) > 0) |
295 | PacketSize -= 4; | 295 | PacketSize -= 4; |
diff --git a/drivers/staging/winbond/linux/wb35rx_s.h b/drivers/staging/winbond/linux/wb35rx_s.h index 53b831fdeb78..b90c269e6adb 100644 --- a/drivers/staging/winbond/linux/wb35rx_s.h +++ b/drivers/staging/winbond/linux/wb35rx_s.h | |||
@@ -41,7 +41,7 @@ typedef struct _WB35RX | |||
41 | u32 Ep3ErrorCount2; // 20060625.1 Usbd for Rx DMA error count | 41 | u32 Ep3ErrorCount2; // 20060625.1 Usbd for Rx DMA error count |
42 | 42 | ||
43 | int EP3VM_status; | 43 | int EP3VM_status; |
44 | PUCHAR pDRx; | 44 | u8 * pDRx; |
45 | 45 | ||
46 | } WB35RX, *PWB35RX; | 46 | } WB35RX, *PWB35RX; |
47 | 47 | ||
diff --git a/drivers/staging/winbond/linux/wb35tx.c b/drivers/staging/winbond/linux/wb35tx.c index cf19c3bc524a..bcb014a073de 100644 --- a/drivers/staging/winbond/linux/wb35tx.c +++ b/drivers/staging/winbond/linux/wb35tx.c | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | 13 | ||
14 | unsigned char | 14 | unsigned char |
15 | Wb35Tx_get_tx_buffer(phw_data_t pHwData, PUCHAR *pBuffer ) | 15 | Wb35Tx_get_tx_buffer(phw_data_t pHwData, u8 **pBuffer) |
16 | { | 16 | { |
17 | PWB35TX pWb35Tx = &pHwData->Wb35Tx; | 17 | PWB35TX pWb35Tx = &pHwData->Wb35Tx; |
18 | 18 | ||
@@ -37,7 +37,7 @@ void Wb35Tx(phw_data_t pHwData) | |||
37 | { | 37 | { |
38 | PWB35TX pWb35Tx = &pHwData->Wb35Tx; | 38 | PWB35TX pWb35Tx = &pHwData->Wb35Tx; |
39 | PADAPTER Adapter = pHwData->Adapter; | 39 | PADAPTER Adapter = pHwData->Adapter; |
40 | PUCHAR pTxBufferAddress; | 40 | u8 *pTxBufferAddress; |
41 | PMDS pMds = &Adapter->Mds; | 41 | PMDS pMds = &Adapter->Mds; |
42 | struct urb * pUrb = (struct urb *)pWb35Tx->Tx4Urb; | 42 | struct urb * pUrb = (struct urb *)pWb35Tx->Tx4Urb; |
43 | int retv; | 43 | int retv; |
@@ -225,7 +225,7 @@ void Wb35Tx_EP2VM(phw_data_t pHwData) | |||
225 | { | 225 | { |
226 | PWB35TX pWb35Tx = &pHwData->Wb35Tx; | 226 | PWB35TX pWb35Tx = &pHwData->Wb35Tx; |
227 | struct urb * pUrb = (struct urb *)pWb35Tx->Tx2Urb; | 227 | struct urb * pUrb = (struct urb *)pWb35Tx->Tx2Urb; |
228 | PULONG pltmp = (PULONG)pWb35Tx->EP2_buf; | 228 | u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; |
229 | int retv; | 229 | int retv; |
230 | 230 | ||
231 | do { | 231 | do { |
@@ -266,7 +266,7 @@ void Wb35Tx_EP2VM_complete(struct urb * pUrb) | |||
266 | T02_DESCRIPTOR T02, TSTATUS; | 266 | T02_DESCRIPTOR T02, TSTATUS; |
267 | PADAPTER Adapter = (PADAPTER)pHwData->Adapter; | 267 | PADAPTER Adapter = (PADAPTER)pHwData->Adapter; |
268 | PWB35TX pWb35Tx = &pHwData->Wb35Tx; | 268 | PWB35TX pWb35Tx = &pHwData->Wb35Tx; |
269 | PULONG pltmp = (PULONG)pWb35Tx->EP2_buf; | 269 | u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; |
270 | u32 i; | 270 | u32 i; |
271 | u16 InterruptInLength; | 271 | u16 InterruptInLength; |
272 | 272 | ||
diff --git a/drivers/staging/winbond/linux/wb35tx_f.h b/drivers/staging/winbond/linux/wb35tx_f.h index 7705a8454dcb..107b12918137 100644 --- a/drivers/staging/winbond/linux/wb35tx_f.h +++ b/drivers/staging/winbond/linux/wb35tx_f.h | |||
@@ -3,7 +3,7 @@ | |||
3 | //==================================== | 3 | //==================================== |
4 | unsigned char Wb35Tx_initial( phw_data_t pHwData ); | 4 | unsigned char Wb35Tx_initial( phw_data_t pHwData ); |
5 | void Wb35Tx_destroy( phw_data_t pHwData ); | 5 | void Wb35Tx_destroy( phw_data_t pHwData ); |
6 | unsigned char Wb35Tx_get_tx_buffer( phw_data_t pHwData, PUCHAR *pBuffer ); | 6 | unsigned char Wb35Tx_get_tx_buffer( phw_data_t pHwData, u8 **pBuffer ); |
7 | 7 | ||
8 | void Wb35Tx_EP2VM( phw_data_t pHwData ); | 8 | void Wb35Tx_EP2VM( phw_data_t pHwData ); |
9 | void Wb35Tx_EP2VM_start( phw_data_t pHwData ); | 9 | void Wb35Tx_EP2VM_start( phw_data_t pHwData ); |
diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c index cbad5fb05959..ee9f47103160 100644 --- a/drivers/staging/winbond/linux/wbusb.c +++ b/drivers/staging/winbond/linux/wbusb.c | |||
@@ -136,7 +136,7 @@ static int wbsoft_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf) | |||
136 | hal_set_current_channel(&my_adapter->sHwData, ch); | 136 | hal_set_current_channel(&my_adapter->sHwData, ch); |
137 | hal_set_beacon_period(&my_adapter->sHwData, conf->beacon_int); | 137 | hal_set_beacon_period(&my_adapter->sHwData, conf->beacon_int); |
138 | // hal_set_cap_info(&my_adapter->sHwData, ?? ); | 138 | // hal_set_cap_info(&my_adapter->sHwData, ?? ); |
139 | // hal_set_ssid(phw_data_t pHwData, PUCHAR pssid, u8 ssid_len); ?? | 139 | // hal_set_ssid(phw_data_t pHwData, u8 * pssid, u8 ssid_len); ?? |
140 | hal_set_accept_broadcast(&my_adapter->sHwData, 1); | 140 | hal_set_accept_broadcast(&my_adapter->sHwData, 1); |
141 | hal_set_accept_promiscuous(&my_adapter->sHwData, 1); | 141 | hal_set_accept_promiscuous(&my_adapter->sHwData, 1); |
142 | hal_set_accept_multicast(&my_adapter->sHwData, 1); | 142 | hal_set_accept_multicast(&my_adapter->sHwData, 1); |
@@ -148,7 +148,7 @@ static int wbsoft_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf) | |||
148 | 148 | ||
149 | // hal_start_bss(&my_adapter->sHwData, WLAN_BSSTYPE_INFRASTRUCTURE); ?? | 149 | // hal_start_bss(&my_adapter->sHwData, WLAN_BSSTYPE_INFRASTRUCTURE); ?? |
150 | 150 | ||
151 | //void hal_set_rates(phw_data_t pHwData, PUCHAR pbss_rates, | 151 | //void hal_set_rates(phw_data_t pHwData, u8 * pbss_rates, |
152 | // u8 length, unsigned char basic_rate_set) | 152 | // u8 length, unsigned char basic_rate_set) |
153 | 153 | ||
154 | return 0; | 154 | return 0; |
diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c index 8ce6389c4135..400397c79b72 100644 --- a/drivers/staging/winbond/mds.c +++ b/drivers/staging/winbond/mds.c | |||
@@ -40,7 +40,7 @@ Mds_Tx(PADAPTER Adapter) | |||
40 | PMDS pMds = &Adapter->Mds; | 40 | PMDS pMds = &Adapter->Mds; |
41 | DESCRIPTOR TxDes; | 41 | DESCRIPTOR TxDes; |
42 | PDESCRIPTOR pTxDes = &TxDes; | 42 | PDESCRIPTOR pTxDes = &TxDes; |
43 | PUCHAR XmitBufAddress; | 43 | u8 *XmitBufAddress; |
44 | u16 XmitBufSize, PacketSize, stmp, CurrentSize, FragmentThreshold; | 44 | u16 XmitBufSize, PacketSize, stmp, CurrentSize, FragmentThreshold; |
45 | u8 FillIndex, TxDesIndex, FragmentCount, FillCount; | 45 | u8 FillIndex, TxDesIndex, FragmentCount, FillCount; |
46 | unsigned char BufferFilled = FALSE, MICAdd = 0; | 46 | unsigned char BufferFilled = FALSE, MICAdd = 0; |
@@ -90,7 +90,7 @@ Mds_Tx(PADAPTER Adapter) | |||
90 | BufferFilled = TRUE; | 90 | BufferFilled = TRUE; |
91 | 91 | ||
92 | /* Leaves first u8 intact */ | 92 | /* Leaves first u8 intact */ |
93 | memset((PUCHAR)pTxDes + 1, 0, sizeof(DESCRIPTOR) - 1); | 93 | memset((u8 *)pTxDes + 1, 0, sizeof(DESCRIPTOR) - 1); |
94 | 94 | ||
95 | TxDesIndex = pMds->TxDesIndex;//Get the current ID | 95 | TxDesIndex = pMds->TxDesIndex;//Get the current ID |
96 | pTxDes->Descriptor_ID = TxDesIndex; | 96 | pTxDes->Descriptor_ID = TxDesIndex; |
@@ -229,10 +229,10 @@ Mds_SendComplete(PADAPTER Adapter, PT02_DESCRIPTOR pT02) | |||
229 | } | 229 | } |
230 | 230 | ||
231 | void | 231 | void |
232 | Mds_HeaderCopy(PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer) | 232 | Mds_HeaderCopy(PADAPTER Adapter, PDESCRIPTOR pDes, u8 *TargetBuffer) |
233 | { | 233 | { |
234 | PMDS pMds = &Adapter->Mds; | 234 | PMDS pMds = &Adapter->Mds; |
235 | PUCHAR src_buffer = pDes->buffer_address[0];//931130.5.g | 235 | u8 *src_buffer = pDes->buffer_address[0];//931130.5.g |
236 | PT00_DESCRIPTOR pT00; | 236 | PT00_DESCRIPTOR pT00; |
237 | PT01_DESCRIPTOR pT01; | 237 | PT01_DESCRIPTOR pT01; |
238 | u16 stmp; | 238 | u16 stmp; |
@@ -276,7 +276,7 @@ Mds_HeaderCopy(PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer) | |||
276 | // | 276 | // |
277 | // Set tx rate | 277 | // Set tx rate |
278 | // | 278 | // |
279 | stmp = *(PUSHORT)(TargetBuffer+30); // 2n alignment address | 279 | stmp = *(u16 *)(TargetBuffer+30); // 2n alignment address |
280 | 280 | ||
281 | //Use basic rate | 281 | //Use basic rate |
282 | ctmp1 = ctmpf = CURRENT_TX_RATE_FOR_MNG; | 282 | ctmp1 = ctmpf = CURRENT_TX_RATE_FOR_MNG; |
@@ -326,11 +326,13 @@ Mds_HeaderCopy(PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer) | |||
326 | 326 | ||
327 | // The function return the 4n size of usb pk | 327 | // The function return the 4n size of usb pk |
328 | u16 | 328 | u16 |
329 | Mds_BodyCopy(PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer) | 329 | Mds_BodyCopy(PADAPTER Adapter, PDESCRIPTOR pDes, u8 *TargetBuffer) |
330 | { | 330 | { |
331 | PT00_DESCRIPTOR pT00; | 331 | PT00_DESCRIPTOR pT00; |
332 | PMDS pMds = &Adapter->Mds; | 332 | PMDS pMds = &Adapter->Mds; |
333 | PUCHAR buffer, src_buffer, pctmp; | 333 | u8 *buffer; |
334 | u8 *src_buffer; | ||
335 | u8 *pctmp; | ||
334 | u16 Size = 0; | 336 | u16 Size = 0; |
335 | u16 SizeLeft, CopySize, CopyLeft, stmp; | 337 | u16 SizeLeft, CopySize, CopyLeft, stmp; |
336 | u8 buf_index, FragmentCount = 0; | 338 | u8 buf_index, FragmentCount = 0; |
@@ -354,7 +356,7 @@ Mds_BodyCopy(PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer) | |||
354 | SizeLeft -= CopySize; | 356 | SizeLeft -= CopySize; |
355 | 357 | ||
356 | // 1 Byte operation | 358 | // 1 Byte operation |
357 | pctmp = (PUCHAR)( buffer + 8 + DOT_11_SEQUENCE_OFFSET ); | 359 | pctmp = (u8 *)( buffer + 8 + DOT_11_SEQUENCE_OFFSET ); |
358 | *pctmp &= 0xf0; | 360 | *pctmp &= 0xf0; |
359 | *pctmp |= FragmentCount;//931130.5.m | 361 | *pctmp |= FragmentCount;//931130.5.m |
360 | if( !FragmentCount ) | 362 | if( !FragmentCount ) |
@@ -379,7 +381,7 @@ Mds_BodyCopy(PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer) | |||
379 | buf_index++; | 381 | buf_index++; |
380 | buf_index %= MAX_DESCRIPTOR_BUFFER_INDEX; | 382 | buf_index %= MAX_DESCRIPTOR_BUFFER_INDEX; |
381 | } else { | 383 | } else { |
382 | PUCHAR pctmp = pDes->buffer_address[buf_index]; | 384 | u8 *pctmp = pDes->buffer_address[buf_index]; |
383 | pctmp += CopySize; | 385 | pctmp += CopySize; |
384 | pDes->buffer_address[buf_index] = pctmp; | 386 | pDes->buffer_address[buf_index] = pctmp; |
385 | pDes->buffer_size[buf_index] -= CopySize; | 387 | pDes->buffer_size[buf_index] -= CopySize; |
@@ -419,7 +421,7 @@ Mds_BodyCopy(PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer) | |||
419 | 421 | ||
420 | pT00->T00_last_mpdu = 1; | 422 | pT00->T00_last_mpdu = 1; |
421 | pT00->T00_IsLastMpdu = 1; | 423 | pT00->T00_IsLastMpdu = 1; |
422 | buffer = (PUCHAR)pT00 + 8; // +8 for USB hdr | 424 | buffer = (u8 *)pT00 + 8; // +8 for USB hdr |
423 | buffer[1] &= ~0x04; // Clear more frag bit of 802.11 frame control | 425 | buffer[1] &= ~0x04; // Clear more frag bit of 802.11 frame control |
424 | pDes->FragmentCount = FragmentCount; // Update the correct fragment number | 426 | pDes->FragmentCount = FragmentCount; // Update the correct fragment number |
425 | return Size; | 427 | return Size; |
@@ -427,7 +429,7 @@ Mds_BodyCopy(PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer) | |||
427 | 429 | ||
428 | 430 | ||
429 | void | 431 | void |
430 | Mds_DurationSet( PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR buffer ) | 432 | Mds_DurationSet( PADAPTER Adapter, PDESCRIPTOR pDes, u8 *buffer ) |
431 | { | 433 | { |
432 | PT00_DESCRIPTOR pT00; | 434 | PT00_DESCRIPTOR pT00; |
433 | PT01_DESCRIPTOR pT01; | 435 | PT01_DESCRIPTOR pT01; |
@@ -574,7 +576,7 @@ Mds_DurationSet( PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR buffer ) | |||
574 | DEFAULT_SIFSTIME*3 ); | 576 | DEFAULT_SIFSTIME*3 ); |
575 | } | 577 | } |
576 | 578 | ||
577 | ((PUSHORT)buffer)[5] = cpu_to_le16(Duration);// 4 USHOR for skip 8B USB, 2USHORT=FC + Duration | 579 | ((u16 *)buffer)[5] = cpu_to_le16(Duration);// 4 USHOR for skip 8B USB, 2USHORT=FC + Duration |
578 | 580 | ||
579 | //----20061009 add by anson's endian | 581 | //----20061009 add by anson's endian |
580 | pNextT00->value = cpu_to_le32(pNextT00->value); | 582 | pNextT00->value = cpu_to_le32(pNextT00->value); |
@@ -615,7 +617,7 @@ Mds_DurationSet( PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR buffer ) | |||
615 | } | 617 | } |
616 | } | 618 | } |
617 | 619 | ||
618 | ((PUSHORT)buffer)[5] = cpu_to_le16(Duration);// 4 USHOR for skip 8B USB, 2USHORT=FC + Duration | 620 | ((u16 *)buffer)[5] = cpu_to_le16(Duration);// 4 USHOR for skip 8B USB, 2USHORT=FC + Duration |
619 | pT00->value = cpu_to_le32(pT00->value); | 621 | pT00->value = cpu_to_le32(pT00->value); |
620 | pT01->value = cpu_to_le32(pT01->value); | 622 | pT01->value = cpu_to_le32(pT01->value); |
621 | //--end 20061009 add | 623 | //--end 20061009 add |
diff --git a/drivers/staging/winbond/mds_f.h b/drivers/staging/winbond/mds_f.h index 651188be1065..7a682d4cfbdc 100644 --- a/drivers/staging/winbond/mds_f.h +++ b/drivers/staging/winbond/mds_f.h | |||
@@ -1,9 +1,9 @@ | |||
1 | unsigned char Mds_initial( PADAPTER Adapter ); | 1 | unsigned char Mds_initial( PADAPTER Adapter ); |
2 | void Mds_Destroy( PADAPTER Adapter ); | 2 | void Mds_Destroy( PADAPTER Adapter ); |
3 | void Mds_Tx( PADAPTER Adapter ); | 3 | void Mds_Tx( PADAPTER Adapter ); |
4 | void Mds_HeaderCopy( PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer ); | 4 | void Mds_HeaderCopy( PADAPTER Adapter, PDESCRIPTOR pDes, u8 *TargetBuffer ); |
5 | u16 Mds_BodyCopy( PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer ); | 5 | u16 Mds_BodyCopy( PADAPTER Adapter, PDESCRIPTOR pDes, u8 *TargetBuffer ); |
6 | void Mds_DurationSet( PADAPTER Adapter, PDESCRIPTOR pDes, PUCHAR TargetBuffer ); | 6 | void Mds_DurationSet( PADAPTER Adapter, PDESCRIPTOR pDes, u8 *TargetBuffer ); |
7 | void Mds_SendComplete( PADAPTER Adapter, PT02_DESCRIPTOR pT02 ); | 7 | void Mds_SendComplete( PADAPTER Adapter, PT02_DESCRIPTOR pT02 ); |
8 | void Mds_MpduProcess( PADAPTER Adapter, PDESCRIPTOR pRxDes ); | 8 | void Mds_MpduProcess( PADAPTER Adapter, PDESCRIPTOR pRxDes ); |
9 | void Mds_reset_descriptor( PADAPTER Adapter ); | 9 | void Mds_reset_descriptor( PADAPTER Adapter ); |
diff --git a/drivers/staging/winbond/mds_s.h b/drivers/staging/winbond/mds_s.h index 4738279d5f39..9df2e0936bf8 100644 --- a/drivers/staging/winbond/mds_s.h +++ b/drivers/staging/winbond/mds_s.h | |||
@@ -86,7 +86,7 @@ typedef struct _MDS | |||
86 | { | 86 | { |
87 | // For Tx usage | 87 | // For Tx usage |
88 | u8 TxOwner[ ((MAX_USB_TX_BUFFER_NUMBER + 3) & ~0x03) ]; | 88 | u8 TxOwner[ ((MAX_USB_TX_BUFFER_NUMBER + 3) & ~0x03) ]; |
89 | PUCHAR pTxBuffer; | 89 | u8 *pTxBuffer; |
90 | u16 TxBufferSize[ ((MAX_USB_TX_BUFFER_NUMBER + 1) & ~0x01) ]; | 90 | u16 TxBufferSize[ ((MAX_USB_TX_BUFFER_NUMBER + 1) & ~0x01) ]; |
91 | u8 TxDesFrom[ ((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03) ];//931130.4.u // 1: MLME 2: NDIS control 3: NDIS data | 91 | u8 TxDesFrom[ ((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03) ];//931130.4.u // 1: MLME 2: NDIS control 3: NDIS data |
92 | u8 TxCountInBuffer[ ((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03) ]; // 20060928 | 92 | u8 TxCountInBuffer[ ((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03) ]; // 20060928 |
@@ -103,7 +103,7 @@ typedef struct _MDS | |||
103 | u16 TxResult[ ((MAX_USB_TX_DESCRIPTOR + 1) & ~0x01) ];//Collect the sending result of Mpdu | 103 | u16 TxResult[ ((MAX_USB_TX_DESCRIPTOR + 1) & ~0x01) ];//Collect the sending result of Mpdu |
104 | 104 | ||
105 | u8 MicRedundant[8]; // For tmp use | 105 | u8 MicRedundant[8]; // For tmp use |
106 | PUCHAR MicWriteAddress[2]; //The start address to fill the Mic, use 2 point due to Mic maybe fragment | 106 | u8 *MicWriteAddress[2]; //The start address to fill the Mic, use 2 point due to Mic maybe fragment |
107 | 107 | ||
108 | u16 MicWriteSize[2]; //931130.4.x | 108 | u16 MicWriteSize[2]; //931130.4.x |
109 | 109 | ||
@@ -144,7 +144,7 @@ typedef struct _MDS | |||
144 | 144 | ||
145 | typedef struct _RxBuffer | 145 | typedef struct _RxBuffer |
146 | { | 146 | { |
147 | PUCHAR pBufferAddress; // Pointer the received data buffer. | 147 | u8 * pBufferAddress; // Pointer the received data buffer. |
148 | u16 BufferSize; | 148 | u16 BufferSize; |
149 | u8 RESERVED; | 149 | u8 RESERVED; |
150 | u8 BufferIndex;// Only 1 byte | 150 | u8 BufferIndex;// Only 1 byte |
@@ -176,7 +176,7 @@ typedef struct _RXLAYER1 | |||
176 | ///////////////////////////////////////////////////////////////////////////////////////////// | 176 | ///////////////////////////////////////////////////////////////////////////////////////////// |
177 | // For brand-new Rx system | 177 | // For brand-new Rx system |
178 | u8 ReservedBuffer[ 2400 ];//If Buffer ID is reserved one, it must copy the data into this area | 178 | u8 ReservedBuffer[ 2400 ];//If Buffer ID is reserved one, it must copy the data into this area |
179 | PUCHAR ReservedBufferPoint;// Point to the next availabe address of reserved buffer | 179 | u8 *ReservedBufferPoint;// Point to the next availabe address of reserved buffer |
180 | 180 | ||
181 | }RXLAYER1, * PRXLAYER1; | 181 | }RXLAYER1, * PRXLAYER1; |
182 | 182 | ||
diff --git a/drivers/staging/winbond/mlme_s.h b/drivers/staging/winbond/mlme_s.h index 58094f61c032..6ec818b3c231 100644 --- a/drivers/staging/winbond/mlme_s.h +++ b/drivers/staging/winbond/mlme_s.h | |||
@@ -125,7 +125,7 @@ | |||
125 | typedef struct _MLME_FRAME | 125 | typedef struct _MLME_FRAME |
126 | { | 126 | { |
127 | //NDIS_PACKET MLME_Packet; | 127 | //NDIS_PACKET MLME_Packet; |
128 | PCHAR pMMPDU; | 128 | s8 * pMMPDU; |
129 | u16 len; | 129 | u16 len; |
130 | u8 DataType; | 130 | u8 DataType; |
131 | u8 IsInUsed; | 131 | u8 IsInUsed; |
diff --git a/drivers/staging/winbond/mlmetxrx.c b/drivers/staging/winbond/mlmetxrx.c index 46b091e96794..e8533b8d1976 100644 --- a/drivers/staging/winbond/mlmetxrx.c +++ b/drivers/staging/winbond/mlmetxrx.c | |||
@@ -113,13 +113,13 @@ MLME_GetNextPacket(PADAPTER Adapter, PDESCRIPTOR pDes) | |||
113 | pDes->Type = Adapter->sMlmeFrame.DataType; | 113 | pDes->Type = Adapter->sMlmeFrame.DataType; |
114 | } | 114 | } |
115 | 115 | ||
116 | void MLMEfreeMMPDUBuffer(PWB32_ADAPTER Adapter, PCHAR pData) | 116 | void MLMEfreeMMPDUBuffer(PWB32_ADAPTER Adapter, s8 *pData) |
117 | { | 117 | { |
118 | int i; | 118 | int i; |
119 | 119 | ||
120 | // Reclaim the data buffer | 120 | // Reclaim the data buffer |
121 | for (i = 0; i < MAX_NUM_TX_MMPDU; i++) { | 121 | for (i = 0; i < MAX_NUM_TX_MMPDU; i++) { |
122 | if (pData == (PCHAR)&(Adapter->sMlmeFrame.TxMMPDU[i])) | 122 | if (pData == (s8 *)&(Adapter->sMlmeFrame.TxMMPDU[i])) |
123 | break; | 123 | break; |
124 | } | 124 | } |
125 | if (Adapter->sMlmeFrame.TxMMPDUInUse[i]) | 125 | if (Adapter->sMlmeFrame.TxMMPDUInUse[i]) |
diff --git a/drivers/staging/winbond/mlmetxrx_f.h b/drivers/staging/winbond/mlmetxrx_f.h index d74e225be215..24cd5f308d9f 100644 --- a/drivers/staging/winbond/mlmetxrx_f.h +++ b/drivers/staging/winbond/mlmetxrx_f.h | |||
@@ -20,7 +20,7 @@ MLMEGetMMPDUBuffer( | |||
20 | PWB32_ADAPTER Adapter | 20 | PWB32_ADAPTER Adapter |
21 | ); | 21 | ); |
22 | 22 | ||
23 | void MLMEfreeMMPDUBuffer( PWB32_ADAPTER Adapter, PCHAR pData); | 23 | void MLMEfreeMMPDUBuffer( PWB32_ADAPTER Adapter, s8 * pData); |
24 | 24 | ||
25 | void MLME_GetNextPacket( PADAPTER Adapter, PDESCRIPTOR pDes ); | 25 | void MLME_GetNextPacket( PADAPTER Adapter, PDESCRIPTOR pDes ); |
26 | u8 MLMESendFrame( PWB32_ADAPTER Adapter, | 26 | u8 MLMESendFrame( PWB32_ADAPTER Adapter, |
@@ -42,7 +42,7 @@ MLMERcvFrame( | |||
42 | void | 42 | void |
43 | MLMEReturnPacket( | 43 | MLMEReturnPacket( |
44 | PWB32_ADAPTER Adapter, | 44 | PWB32_ADAPTER Adapter, |
45 | PUCHAR pRxBufer | 45 | u8 * pRxBufer |
46 | ); | 46 | ); |
47 | #ifdef _IBSS_BEACON_SEQ_STICK_ | 47 | #ifdef _IBSS_BEACON_SEQ_STICK_ |
48 | s8 SendBCNullData(PWB32_ADAPTER Adapter, u16 wIdx); | 48 | s8 SendBCNullData(PWB32_ADAPTER Adapter, u16 wIdx); |
diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c index b475c7a7c424..57af5b831509 100644 --- a/drivers/staging/winbond/reg.c +++ b/drivers/staging/winbond/reg.c | |||
@@ -922,16 +922,16 @@ Uxx_ReadEthernetAddress( phw_data_t pHwData ) | |||
922 | // Only unplug and plug again can make hardware read EEPROM again. 20060727 | 922 | // Only unplug and plug again can make hardware read EEPROM again. 20060727 |
923 | Wb35Reg_WriteSync( pHwData, 0x03b4, 0x08000000 ); // Start EEPROM access + Read + address(0x0d) | 923 | Wb35Reg_WriteSync( pHwData, 0x03b4, 0x08000000 ); // Start EEPROM access + Read + address(0x0d) |
924 | Wb35Reg_ReadSync( pHwData, 0x03b4, <mp ); | 924 | Wb35Reg_ReadSync( pHwData, 0x03b4, <mp ); |
925 | *(PUSHORT)pHwData->PermanentMacAddress = cpu_to_le16((u16)ltmp); //20060926 anson's endian | 925 | *(u16 *)pHwData->PermanentMacAddress = cpu_to_le16((u16)ltmp); //20060926 anson's endian |
926 | Wb35Reg_WriteSync( pHwData, 0x03b4, 0x08010000 ); // Start EEPROM access + Read + address(0x0d) | 926 | Wb35Reg_WriteSync( pHwData, 0x03b4, 0x08010000 ); // Start EEPROM access + Read + address(0x0d) |
927 | Wb35Reg_ReadSync( pHwData, 0x03b4, <mp ); | 927 | Wb35Reg_ReadSync( pHwData, 0x03b4, <mp ); |
928 | *(PUSHORT)(pHwData->PermanentMacAddress + 2) = cpu_to_le16((u16)ltmp); //20060926 anson's endian | 928 | *(u16 *)(pHwData->PermanentMacAddress + 2) = cpu_to_le16((u16)ltmp); //20060926 anson's endian |
929 | Wb35Reg_WriteSync( pHwData, 0x03b4, 0x08020000 ); // Start EEPROM access + Read + address(0x0d) | 929 | Wb35Reg_WriteSync( pHwData, 0x03b4, 0x08020000 ); // Start EEPROM access + Read + address(0x0d) |
930 | Wb35Reg_ReadSync( pHwData, 0x03b4, <mp ); | 930 | Wb35Reg_ReadSync( pHwData, 0x03b4, <mp ); |
931 | *(PUSHORT)(pHwData->PermanentMacAddress + 4) = cpu_to_le16((u16)ltmp); //20060926 anson's endian | 931 | *(u16 *)(pHwData->PermanentMacAddress + 4) = cpu_to_le16((u16)ltmp); //20060926 anson's endian |
932 | *(PUSHORT)(pHwData->PermanentMacAddress + 6) = 0; | 932 | *(u16 *)(pHwData->PermanentMacAddress + 6) = 0; |
933 | Wb35Reg_WriteSync( pHwData, 0x03e8, cpu_to_le32(*(PULONG)pHwData->PermanentMacAddress) ); //20060926 anson's endian | 933 | Wb35Reg_WriteSync( pHwData, 0x03e8, cpu_to_le32(*(u32 *)pHwData->PermanentMacAddress) ); //20060926 anson's endian |
934 | Wb35Reg_WriteSync( pHwData, 0x03ec, cpu_to_le32(*(PULONG)(pHwData->PermanentMacAddress+4)) ); //20060926 anson's endian | 934 | Wb35Reg_WriteSync( pHwData, 0x03ec, cpu_to_le32(*(u32 *)(pHwData->PermanentMacAddress+4)) ); //20060926 anson's endian |
935 | } | 935 | } |
936 | 936 | ||
937 | 937 | ||
@@ -1038,7 +1038,7 @@ void | |||
1038 | RFSynthesizer_initial(phw_data_t pHwData) | 1038 | RFSynthesizer_initial(phw_data_t pHwData) |
1039 | { | 1039 | { |
1040 | u32 altmp[32]; | 1040 | u32 altmp[32]; |
1041 | PULONG pltmp = altmp; | 1041 | u32 * pltmp = altmp; |
1042 | u32 ltmp; | 1042 | u32 ltmp; |
1043 | u8 number=0x00; // The number of register vale | 1043 | u8 number=0x00; // The number of register vale |
1044 | u8 i; | 1044 | u8 i; |
@@ -2358,11 +2358,11 @@ void Mxx_initial( phw_data_t pHwData ) | |||
2358 | pltmp[2] = pWb35Reg->M2C_MacControl; | 2358 | pltmp[2] = pWb35Reg->M2C_MacControl; |
2359 | 2359 | ||
2360 | // M30 BSSID | 2360 | // M30 BSSID |
2361 | pltmp[3] = *(PULONG)pHwData->bssid; | 2361 | pltmp[3] = *(u32 *)pHwData->bssid; |
2362 | 2362 | ||
2363 | // M34 | 2363 | // M34 |
2364 | pHwData->AID = DEFAULT_AID; | 2364 | pHwData->AID = DEFAULT_AID; |
2365 | tmp = *(PUSHORT)(pHwData->bssid+4); | 2365 | tmp = *(u16 *)(pHwData->bssid+4); |
2366 | tmp |= DEFAULT_AID << 16; | 2366 | tmp |= DEFAULT_AID << 16; |
2367 | pltmp[4] = tmp; | 2367 | pltmp[4] = tmp; |
2368 | 2368 | ||
@@ -2428,7 +2428,7 @@ void GetTxVgaFromEEPROM( phw_data_t pHwData ) | |||
2428 | { | 2428 | { |
2429 | u32 i, j, ltmp; | 2429 | u32 i, j, ltmp; |
2430 | u16 Value[MAX_TXVGA_EEPROM]; | 2430 | u16 Value[MAX_TXVGA_EEPROM]; |
2431 | PUCHAR pctmp; | 2431 | u8 *pctmp; |
2432 | u8 ctmp=0; | 2432 | u8 ctmp=0; |
2433 | 2433 | ||
2434 | // Get the entire TxVga setting in EEPROM | 2434 | // Get the entire TxVga setting in EEPROM |
@@ -2441,7 +2441,7 @@ void GetTxVgaFromEEPROM( phw_data_t pHwData ) | |||
2441 | } | 2441 | } |
2442 | 2442 | ||
2443 | // Adjust the filed which fills with reserved value. | 2443 | // Adjust the filed which fills with reserved value. |
2444 | pctmp = (PUCHAR)Value; | 2444 | pctmp = (u8 *)Value; |
2445 | for( i=0; i<(MAX_TXVGA_EEPROM*2); i++ ) | 2445 | for( i=0; i<(MAX_TXVGA_EEPROM*2); i++ ) |
2446 | { | 2446 | { |
2447 | if( pctmp[i] != 0xff ) | 2447 | if( pctmp[i] != 0xff ) |
@@ -2480,7 +2480,7 @@ void GetTxVgaFromEEPROM( phw_data_t pHwData ) | |||
2480 | // This function will use default TxVgaSettingInEEPROM data to calculate new TxVga. | 2480 | // This function will use default TxVgaSettingInEEPROM data to calculate new TxVga. |
2481 | void EEPROMTxVgaAdjust( phw_data_t pHwData ) // 20060619.5 Add | 2481 | void EEPROMTxVgaAdjust( phw_data_t pHwData ) // 20060619.5 Add |
2482 | { | 2482 | { |
2483 | PUCHAR pTxVga = pHwData->TxVgaSettingInEEPROM; | 2483 | u8 * pTxVga = pHwData->TxVgaSettingInEEPROM; |
2484 | s16 i, stmp; | 2484 | s16 i, stmp; |
2485 | 2485 | ||
2486 | //-- 2.4G -- 20060704.2 Request from Tiger | 2486 | //-- 2.4G -- 20060704.2 Request from Tiger |
diff --git a/drivers/staging/winbond/sme_api.h b/drivers/staging/winbond/sme_api.h index 016b225ca4a4..745eb376bc70 100644 --- a/drivers/staging/winbond/sme_api.h +++ b/drivers/staging/winbond/sme_api.h | |||
@@ -208,7 +208,7 @@ s8 sme_set_tx_antenna(void *pcore_data, u32 TxAntenna); | |||
208 | s8 sme_set_IBSS_chan(void *pcore_data, ChanInfo chan); | 208 | s8 sme_set_IBSS_chan(void *pcore_data, ChanInfo chan); |
209 | 209 | ||
210 | //20061108 WPS | 210 | //20061108 WPS |
211 | s8 sme_set_IE_append(void *pcore_data, PUCHAR buffer, u16 buf_len); | 211 | s8 sme_set_IE_append(void *pcore_data, u8 *buffer, u16 buf_len); |
212 | 212 | ||
213 | 213 | ||
214 | 214 | ||
diff --git a/drivers/staging/winbond/wbhal.c b/drivers/staging/winbond/wbhal.c index daf442247558..5d68ecec34c7 100644 --- a/drivers/staging/winbond/wbhal.c +++ b/drivers/staging/winbond/wbhal.c | |||
@@ -1,13 +1,13 @@ | |||
1 | #include "os_common.h" | 1 | #include "os_common.h" |
2 | 2 | ||
3 | void hal_get_ethernet_address( phw_data_t pHwData, PUCHAR current_address ) | 3 | void hal_get_ethernet_address( phw_data_t pHwData, u8 *current_address ) |
4 | { | 4 | { |
5 | if( pHwData->SurpriseRemove ) return; | 5 | if( pHwData->SurpriseRemove ) return; |
6 | 6 | ||
7 | memcpy( current_address, pHwData->CurrentMacAddress, ETH_LENGTH_OF_ADDRESS ); | 7 | memcpy( current_address, pHwData->CurrentMacAddress, ETH_LENGTH_OF_ADDRESS ); |
8 | } | 8 | } |
9 | 9 | ||
10 | void hal_set_ethernet_address( phw_data_t pHwData, PUCHAR current_address ) | 10 | void hal_set_ethernet_address( phw_data_t pHwData, u8 *current_address ) |
11 | { | 11 | { |
12 | u32 ltmp[2]; | 12 | u32 ltmp[2]; |
13 | 13 | ||
@@ -15,13 +15,13 @@ void hal_set_ethernet_address( phw_data_t pHwData, PUCHAR current_address ) | |||
15 | 15 | ||
16 | memcpy( pHwData->CurrentMacAddress, current_address, ETH_LENGTH_OF_ADDRESS ); | 16 | memcpy( pHwData->CurrentMacAddress, current_address, ETH_LENGTH_OF_ADDRESS ); |
17 | 17 | ||
18 | ltmp[0]= cpu_to_le32( *(PULONG)pHwData->CurrentMacAddress ); | 18 | ltmp[0]= cpu_to_le32( *(u32 *)pHwData->CurrentMacAddress ); |
19 | ltmp[1]= cpu_to_le32( *(PULONG)(pHwData->CurrentMacAddress + 4) ) & 0xffff; | 19 | ltmp[1]= cpu_to_le32( *(u32 *)(pHwData->CurrentMacAddress + 4) ) & 0xffff; |
20 | 20 | ||
21 | Wb35Reg_BurstWrite( pHwData, 0x03e8, ltmp, 2, AUTO_INCREMENT ); | 21 | Wb35Reg_BurstWrite( pHwData, 0x03e8, ltmp, 2, AUTO_INCREMENT ); |
22 | } | 22 | } |
23 | 23 | ||
24 | void hal_get_permanent_address( phw_data_t pHwData, PUCHAR pethernet_address ) | 24 | void hal_get_permanent_address( phw_data_t pHwData, u8 *pethernet_address ) |
25 | { | 25 | { |
26 | if( pHwData->SurpriseRemove ) return; | 26 | if( pHwData->SurpriseRemove ) return; |
27 | 27 | ||
@@ -89,7 +89,7 @@ void hal_halt(phw_data_t pHwData, void *ppa_data) | |||
89 | } | 89 | } |
90 | 90 | ||
91 | //--------------------------------------------------------------------------------------------------- | 91 | //--------------------------------------------------------------------------------------------------- |
92 | void hal_set_rates(phw_data_t pHwData, PUCHAR pbss_rates, | 92 | void hal_set_rates(phw_data_t pHwData, u8 *pbss_rates, |
93 | u8 length, unsigned char basic_rate_set) | 93 | u8 length, unsigned char basic_rate_set) |
94 | { | 94 | { |
95 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; | 95 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; |
@@ -158,13 +158,13 @@ void hal_set_rates(phw_data_t pHwData, PUCHAR pbss_rates, | |||
158 | // Fill data into support rate until buffer full | 158 | // Fill data into support rate until buffer full |
159 | //---20060926 add by anson's endian | 159 | //---20060926 add by anson's endian |
160 | for (i=0; i<4; i++) | 160 | for (i=0; i<4; i++) |
161 | *(PULONG)(SupportedRate+(i<<2)) = cpu_to_le32( *(PULONG)(SupportedRate+(i<<2)) ); | 161 | *(u32 *)(SupportedRate+(i<<2)) = cpu_to_le32( *(u32 *)(SupportedRate+(i<<2)) ); |
162 | //--- end 20060926 add by anson's endian | 162 | //--- end 20060926 add by anson's endian |
163 | Wb35Reg_BurstWrite( pHwData,0x087c, (PULONG)SupportedRate, 4, AUTO_INCREMENT ); | 163 | Wb35Reg_BurstWrite( pHwData,0x087c, (u32 *)SupportedRate, 4, AUTO_INCREMENT ); |
164 | pWb35Reg->M7C_MacControl = ((PULONG)SupportedRate)[0]; | 164 | pWb35Reg->M7C_MacControl = ((u32 *)SupportedRate)[0]; |
165 | pWb35Reg->M80_MacControl = ((PULONG)SupportedRate)[1]; | 165 | pWb35Reg->M80_MacControl = ((u32 *)SupportedRate)[1]; |
166 | pWb35Reg->M84_MacControl = ((PULONG)SupportedRate)[2]; | 166 | pWb35Reg->M84_MacControl = ((u32 *)SupportedRate)[2]; |
167 | pWb35Reg->M88_MacControl = ((PULONG)SupportedRate)[3]; | 167 | pWb35Reg->M88_MacControl = ((u32 *)SupportedRate)[3]; |
168 | 168 | ||
169 | // Fill length | 169 | // Fill length |
170 | tmp = Count1<<28 | Count2<<24; | 170 | tmp = Count1<<28 | Count2<<24; |
@@ -206,7 +206,7 @@ void hal_set_current_channel_ex( phw_data_t pHwData, ChanInfo channel ) | |||
206 | pWb35Reg->M28_MacControl &= ~0xff; // Clean channel information field | 206 | pWb35Reg->M28_MacControl &= ~0xff; // Clean channel information field |
207 | pWb35Reg->M28_MacControl |= channel.ChanNo; | 207 | pWb35Reg->M28_MacControl |= channel.ChanNo; |
208 | Wb35Reg_WriteWithCallbackValue( pHwData, 0x0828, pWb35Reg->M28_MacControl, | 208 | Wb35Reg_WriteWithCallbackValue( pHwData, 0x0828, pWb35Reg->M28_MacControl, |
209 | (PCHAR)&channel, sizeof(ChanInfo)); | 209 | (s8 *)&channel, sizeof(ChanInfo)); |
210 | } | 210 | } |
211 | //--------------------------------------------------------------------------------------------------- | 211 | //--------------------------------------------------------------------------------------------------- |
212 | void hal_set_current_channel( phw_data_t pHwData, ChanInfo channel ) | 212 | void hal_set_current_channel( phw_data_t pHwData, ChanInfo channel ) |
@@ -277,7 +277,7 @@ void hal_set_accept_beacon( phw_data_t pHwData, u8 enable ) | |||
277 | Wb35Reg_Write( pHwData, 0x0800, pWb35Reg->M00_MacControl ); | 277 | Wb35Reg_Write( pHwData, 0x0800, pWb35Reg->M00_MacControl ); |
278 | } | 278 | } |
279 | //--------------------------------------------------------------------------------------------------- | 279 | //--------------------------------------------------------------------------------------------------- |
280 | void hal_set_multicast_address( phw_data_t pHwData, PUCHAR address, u8 number ) | 280 | void hal_set_multicast_address( phw_data_t pHwData, u8 *address, u8 number ) |
281 | { | 281 | { |
282 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; | 282 | PWB35REG pWb35Reg = &pHwData->Wb35Reg; |
283 | u8 Byte, Bit; | 283 | u8 Byte, Bit; |
@@ -297,7 +297,7 @@ void hal_set_multicast_address( phw_data_t pHwData, PUCHAR address, u8 number ) | |||
297 | } | 297 | } |
298 | 298 | ||
299 | // Updating register | 299 | // Updating register |
300 | Wb35Reg_BurstWrite( pHwData, 0x0804, (PULONG)pWb35Reg->Multicast, 2, AUTO_INCREMENT ); | 300 | Wb35Reg_BurstWrite( pHwData, 0x0804, (u32 *)pWb35Reg->Multicast, 2, AUTO_INCREMENT ); |
301 | } | 301 | } |
302 | //--------------------------------------------------------------------------------------------------- | 302 | //--------------------------------------------------------------------------------------------------- |
303 | u8 hal_get_accept_beacon( phw_data_t pHwData ) | 303 | u8 hal_get_accept_beacon( phw_data_t pHwData ) |
@@ -806,7 +806,7 @@ u8 hal_get_hw_radio_off( phw_data_t pHwData ) | |||
806 | } | 806 | } |
807 | } | 807 | } |
808 | 808 | ||
809 | unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, PULONG pValue ) | 809 | unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, u32 * pValue ) |
810 | { | 810 | { |
811 | if( number < 0x1000 ) | 811 | if( number < 0x1000 ) |
812 | number += 0x1000; | 812 | number += 0x1000; |
diff --git a/drivers/staging/winbond/wbhal_f.h b/drivers/staging/winbond/wbhal_f.h index fe25f97af724..ea9531ac8474 100644 --- a/drivers/staging/winbond/wbhal_f.h +++ b/drivers/staging/winbond/wbhal_f.h | |||
@@ -16,23 +16,23 @@ | |||
16 | //==================================================================================== | 16 | //==================================================================================== |
17 | // Function declaration | 17 | // Function declaration |
18 | //==================================================================================== | 18 | //==================================================================================== |
19 | void hal_remove_mapping_key( phw_data_t pHwData, PUCHAR pmac_addr ); | 19 | void hal_remove_mapping_key( phw_data_t pHwData, u8 *pmac_addr ); |
20 | void hal_remove_default_key( phw_data_t pHwData, u32 index ); | 20 | void hal_remove_default_key( phw_data_t pHwData, u32 index ); |
21 | unsigned char hal_set_mapping_key( phw_data_t Adapter, PUCHAR pmac_addr, u8 null_key, u8 wep_on, PUCHAR ptx_tsc, PUCHAR prx_tsc, u8 key_type, u8 key_len, PUCHAR pkey_data ); | 21 | unsigned char hal_set_mapping_key( phw_data_t Adapter, u8 *pmac_addr, u8 null_key, u8 wep_on, u8 *ptx_tsc, u8 *prx_tsc, u8 key_type, u8 key_len, u8 *pkey_data ); |
22 | unsigned char hal_set_default_key( phw_data_t Adapter, u8 index, u8 null_key, u8 wep_on, PUCHAR ptx_tsc, PUCHAR prx_tsc, u8 key_type, u8 key_len, PUCHAR pkey_data ); | 22 | unsigned char hal_set_default_key( phw_data_t Adapter, u8 index, u8 null_key, u8 wep_on, u8 *ptx_tsc, u8 *prx_tsc, u8 key_type, u8 key_len, u8 *pkey_data ); |
23 | void hal_clear_all_default_key( phw_data_t pHwData ); | 23 | void hal_clear_all_default_key( phw_data_t pHwData ); |
24 | void hal_clear_all_group_key( phw_data_t pHwData ); | 24 | void hal_clear_all_group_key( phw_data_t pHwData ); |
25 | void hal_clear_all_mapping_key( phw_data_t pHwData ); | 25 | void hal_clear_all_mapping_key( phw_data_t pHwData ); |
26 | void hal_clear_all_key( phw_data_t pHwData ); | 26 | void hal_clear_all_key( phw_data_t pHwData ); |
27 | void hal_get_ethernet_address( phw_data_t pHwData, PUCHAR current_address ); | 27 | void hal_get_ethernet_address( phw_data_t pHwData, u8 *current_address ); |
28 | void hal_set_ethernet_address( phw_data_t pHwData, PUCHAR current_address ); | 28 | void hal_set_ethernet_address( phw_data_t pHwData, u8 *current_address ); |
29 | void hal_get_permanent_address( phw_data_t pHwData, PUCHAR pethernet_address ); | 29 | void hal_get_permanent_address( phw_data_t pHwData, u8 *pethernet_address ); |
30 | unsigned char hal_init_hardware( phw_data_t pHwData, PADAPTER Adapter ); | 30 | unsigned char hal_init_hardware( phw_data_t pHwData, PADAPTER Adapter ); |
31 | void hal_set_power_save_mode( phw_data_t pHwData, unsigned char power_save, unsigned char wakeup, unsigned char dtim ); | 31 | void hal_set_power_save_mode( phw_data_t pHwData, unsigned char power_save, unsigned char wakeup, unsigned char dtim ); |
32 | void hal_get_power_save_mode( phw_data_t pHwData, PBOOLEAN pin_pwr_save ); | 32 | void hal_get_power_save_mode( phw_data_t pHwData, u8 *pin_pwr_save ); |
33 | void hal_set_slot_time( phw_data_t pHwData, u8 type ); | 33 | void hal_set_slot_time( phw_data_t pHwData, u8 type ); |
34 | #define hal_set_atim_window( _A, _ATM ) | 34 | #define hal_set_atim_window( _A, _ATM ) |
35 | void hal_set_rates( phw_data_t pHwData, PUCHAR pbss_rates, u8 length, unsigned char basic_rate_set ); | 35 | void hal_set_rates( phw_data_t pHwData, u8 *pbss_rates, u8 length, unsigned char basic_rate_set ); |
36 | #define hal_set_basic_rates( _A, _R, _L ) hal_set_rates( _A, _R, _L, TRUE ) | 36 | #define hal_set_basic_rates( _A, _R, _L ) hal_set_rates( _A, _R, _L, TRUE ) |
37 | #define hal_set_op_rates( _A, _R, _L ) hal_set_rates( _A, _R, _L, FALSE ) | 37 | #define hal_set_op_rates( _A, _R, _L ) hal_set_rates( _A, _R, _L, FALSE ) |
38 | void hal_start_bss( phw_data_t pHwData, u8 mac_op_mode ); | 38 | void hal_start_bss( phw_data_t pHwData, u8 mac_op_mode ); |
@@ -40,19 +40,19 @@ void hal_join_request( phw_data_t pHwData, u8 bss_type ); // 0:BSS STA 1:IBSS | |||
40 | void hal_stop_sync_bss( phw_data_t pHwData ); | 40 | void hal_stop_sync_bss( phw_data_t pHwData ); |
41 | void hal_resume_sync_bss( phw_data_t pHwData); | 41 | void hal_resume_sync_bss( phw_data_t pHwData); |
42 | void hal_set_aid( phw_data_t pHwData, u16 aid ); | 42 | void hal_set_aid( phw_data_t pHwData, u16 aid ); |
43 | void hal_set_bssid( phw_data_t pHwData, PUCHAR pbssid ); | 43 | void hal_set_bssid( phw_data_t pHwData, u8 *pbssid ); |
44 | void hal_get_bssid( phw_data_t pHwData, PUCHAR pbssid ); | 44 | void hal_get_bssid( phw_data_t pHwData, u8 *pbssid ); |
45 | void hal_set_beacon_period( phw_data_t pHwData, u16 beacon_period ); | 45 | void hal_set_beacon_period( phw_data_t pHwData, u16 beacon_period ); |
46 | void hal_set_listen_interval( phw_data_t pHwData, u16 listen_interval ); | 46 | void hal_set_listen_interval( phw_data_t pHwData, u16 listen_interval ); |
47 | void hal_set_cap_info( phw_data_t pHwData, u16 capability_info ); | 47 | void hal_set_cap_info( phw_data_t pHwData, u16 capability_info ); |
48 | void hal_set_ssid( phw_data_t pHwData, PUCHAR pssid, u8 ssid_len ); | 48 | void hal_set_ssid( phw_data_t pHwData, u8 *pssid, u8 ssid_len ); |
49 | void hal_set_current_channel( phw_data_t pHwData, ChanInfo channel ); | 49 | void hal_set_current_channel( phw_data_t pHwData, ChanInfo channel ); |
50 | void hal_set_current_channel_ex( phw_data_t pHwData, ChanInfo channel ); | 50 | void hal_set_current_channel_ex( phw_data_t pHwData, ChanInfo channel ); |
51 | void hal_get_current_channel( phw_data_t pHwData, ChanInfo *channel ); | 51 | void hal_get_current_channel( phw_data_t pHwData, ChanInfo *channel ); |
52 | void hal_set_accept_broadcast( phw_data_t pHwData, u8 enable ); | 52 | void hal_set_accept_broadcast( phw_data_t pHwData, u8 enable ); |
53 | void hal_set_accept_multicast( phw_data_t pHwData, u8 enable ); | 53 | void hal_set_accept_multicast( phw_data_t pHwData, u8 enable ); |
54 | void hal_set_accept_beacon( phw_data_t pHwData, u8 enable ); | 54 | void hal_set_accept_beacon( phw_data_t pHwData, u8 enable ); |
55 | void hal_set_multicast_address( phw_data_t pHwData, PUCHAR address, u8 number ); | 55 | void hal_set_multicast_address( phw_data_t pHwData, u8 *address, u8 number ); |
56 | u8 hal_get_accept_beacon( phw_data_t pHwData ); | 56 | u8 hal_get_accept_beacon( phw_data_t pHwData ); |
57 | void hal_stop( phw_data_t pHwData ); | 57 | void hal_stop( phw_data_t pHwData ); |
58 | void hal_halt( phw_data_t pHwData, void *ppa_data ); | 58 | void hal_halt( phw_data_t pHwData, void *ppa_data ); |
@@ -97,7 +97,7 @@ void hal_surprise_remove( phw_data_t pHwData ); | |||
97 | 97 | ||
98 | 98 | ||
99 | void hal_rate_change( phw_data_t pHwData ); // Notify the HAL rate is changing 20060613.1 | 99 | void hal_rate_change( phw_data_t pHwData ); // Notify the HAL rate is changing 20060613.1 |
100 | unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, PULONG pValue ); | 100 | unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, u32 * pValue ); |
101 | unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value ); | 101 | unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value ); |
102 | #define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count | 102 | #define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count |
103 | #define hal_detect_error( _P ) (_P->WbUsb.DetectCount) | 103 | #define hal_detect_error( _P ) (_P->WbUsb.DetectCount) |
@@ -116,7 +116,7 @@ unsigned char hal_idle( phw_data_t pHwData ); | |||
116 | #define pa_stall_execution( _A ) //OS_SLEEP( 1 ) | 116 | #define pa_stall_execution( _A ) //OS_SLEEP( 1 ) |
117 | #define hw_get_cxx_reg( _A, _B, _C ) | 117 | #define hw_get_cxx_reg( _A, _B, _C ) |
118 | #define hw_set_cxx_reg( _A, _B, _C ) | 118 | #define hw_set_cxx_reg( _A, _B, _C ) |
119 | #define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (PULONG)_C ) | 119 | #define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (u32 *)_C ) |
120 | #define hw_set_dxx_reg( _A, _B, _C ) hal_set_dxx_reg( _A, _B, (u32)_C ) | 120 | #define hw_set_dxx_reg( _A, _B, _C ) hal_set_dxx_reg( _A, _B, (u32)_C ) |
121 | 121 | ||
122 | 122 | ||
diff --git a/drivers/staging/winbond/wbhal_s.h b/drivers/staging/winbond/wbhal_s.h index 5b862ff357bd..2ee3f0fc1ad8 100644 --- a/drivers/staging/winbond/wbhal_s.h +++ b/drivers/staging/winbond/wbhal_s.h | |||
@@ -461,7 +461,7 @@ typedef struct _HW_DATA_T | |||
461 | //===================================================================== | 461 | //===================================================================== |
462 | // Definition for 802.11 | 462 | // Definition for 802.11 |
463 | //===================================================================== | 463 | //===================================================================== |
464 | PUCHAR bssid_pointer; // Used by hal_get_bssid for return value | 464 | u8 *bssid_pointer; // Used by hal_get_bssid for return value |
465 | u8 bssid[8];// Only 6 byte will be used. 8 byte is required for read buffer | 465 | u8 bssid[8];// Only 6 byte will be used. 8 byte is required for read buffer |
466 | u8 ssid[32];// maximum ssid length is 32 byte | 466 | u8 ssid[32];// maximum ssid length is 32 byte |
467 | 467 | ||
@@ -486,7 +486,7 @@ typedef struct _HW_DATA_T | |||
486 | u32 CurrentRadioSw; // 20060320.2 0:On 1:Off | 486 | u32 CurrentRadioSw; // 20060320.2 0:On 1:Off |
487 | u32 CurrentRadioHw; // 20060825 0:On 1:Off | 487 | u32 CurrentRadioHw; // 20060825 0:On 1:Off |
488 | 488 | ||
489 | PUCHAR power_save_point; // Used by hal_get_power_save_mode for return value | 489 | u8 *power_save_point; // Used by hal_get_power_save_mode for return value |
490 | u8 cwmin; | 490 | u8 cwmin; |
491 | u8 desired_power_save; | 491 | u8 desired_power_save; |
492 | u8 dtim;// Is running dtim | 492 | u8 dtim;// Is running dtim |
diff --git a/drivers/staging/winbond/wblinux.c b/drivers/staging/winbond/wblinux.c index 2eade5a47b19..51dad95b48b8 100644 --- a/drivers/staging/winbond/wblinux.c +++ b/drivers/staging/winbond/wblinux.c | |||
@@ -25,7 +25,7 @@ EncapAtomicInc(PADAPTER Adapter, void* pAtomic) | |||
25 | { | 25 | { |
26 | PWBLINUX pWbLinux = &Adapter->WbLinux; | 26 | PWBLINUX pWbLinux = &Adapter->WbLinux; |
27 | u32 ltmp; | 27 | u32 ltmp; |
28 | PULONG pltmp = (PULONG)pAtomic; | 28 | u32 * pltmp = (u32 *)pAtomic; |
29 | OS_SPIN_LOCK_ACQUIRED( &pWbLinux->AtomicSpinLock ); | 29 | OS_SPIN_LOCK_ACQUIRED( &pWbLinux->AtomicSpinLock ); |
30 | (*pltmp)++; | 30 | (*pltmp)++; |
31 | ltmp = (*pltmp); | 31 | ltmp = (*pltmp); |
@@ -38,7 +38,7 @@ EncapAtomicDec(PADAPTER Adapter, void* pAtomic) | |||
38 | { | 38 | { |
39 | PWBLINUX pWbLinux = &Adapter->WbLinux; | 39 | PWBLINUX pWbLinux = &Adapter->WbLinux; |
40 | u32 ltmp; | 40 | u32 ltmp; |
41 | PULONG pltmp = (PULONG)pAtomic; | 41 | u32 * pltmp = (u32 *)pAtomic; |
42 | OS_SPIN_LOCK_ACQUIRED( &pWbLinux->AtomicSpinLock ); | 42 | OS_SPIN_LOCK_ACQUIRED( &pWbLinux->AtomicSpinLock ); |
43 | (*pltmp)--; | 43 | (*pltmp)--; |
44 | ltmp = (*pltmp); | 44 | ltmp = (*pltmp); |
@@ -142,7 +142,8 @@ unsigned char | |||
142 | WbWLanInitialize(PADAPTER Adapter) | 142 | WbWLanInitialize(PADAPTER Adapter) |
143 | { | 143 | { |
144 | phw_data_t pHwData; | 144 | phw_data_t pHwData; |
145 | PUCHAR pMacAddr, pMacAddr2; | 145 | u8 *pMacAddr; |
146 | u8 *pMacAddr2; | ||
146 | u32 InitStep = 0; | 147 | u32 InitStep = 0; |
147 | u8 EEPROM_region; | 148 | u8 EEPROM_region; |
148 | u8 HwRadioOff; | 149 | u8 HwRadioOff; |