Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: winbond: mds_s.h coding style fixes.

I fixed all problems reported by checkpatch.pl except some
long lines.

Signed-off-by: Lars Lindley <lindley@coyote.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Lars Lindley and committed by
Greg Kroah-Hartman
5ea05255 e7b10ba8

+85 -86
+85 -86
drivers/staging/winbond/mds_s.h
··· 15 15 WLAN_PREAMBLE_TYPE_LONG, 16 16 }; 17 17 18 - //////////////////////////////////////////////////////////////////////////////////////////////////////// 19 - #define MAX_USB_TX_DESCRIPTOR 15 // IS89C35 ability 20 - #define MAX_USB_TX_BUFFER_NUMBER 4 // Virtual pre-buffer number of MAX_USB_TX_BUFFER 21 - #define MAX_USB_TX_BUFFER 4096 // IS89C35 ability 4n alignment is required for hardware 18 + /*****************************************************************************/ 19 + #define MAX_USB_TX_DESCRIPTOR 15 /* IS89C35 ability */ 20 + #define MAX_USB_TX_BUFFER_NUMBER 4 /* Virtual pre-buffer number of MAX_USB_TX_BUFFER */ 21 + #define MAX_USB_TX_BUFFER 4096 /* IS89C35 ability 4n alignment is required for hardware */ 22 22 23 - #define AUTH_REQUEST_PAIRWISE_ERROR 0 // _F flag setting 24 - #define AUTH_REQUEST_GROUP_ERROR 1 // _F flag setting 23 + #define AUTH_REQUEST_PAIRWISE_ERROR 0 /* _F flag setting */ 24 + #define AUTH_REQUEST_GROUP_ERROR 1 /* _F flag setting */ 25 25 26 - #define CURRENT_FRAGMENT_THRESHOLD (adapter->Mds.TxFragmentThreshold & ~0x1) 27 - #define CURRENT_PREAMBLE_MODE psLOCAL->boShortPreamble?WLAN_PREAMBLE_TYPE_SHORT:WLAN_PREAMBLE_TYPE_LONG 28 - #define CURRENT_TX_RATE_FOR_MNG adapter->sLocalPara.CurrentTxRateForMng 29 - #define CURRENT_PROTECT_MECHANISM psLOCAL->boProtectMechanism 30 - #define CURRENT_RTS_THRESHOLD adapter->Mds.TxRTSThreshold 26 + #define CURRENT_FRAGMENT_THRESHOLD (adapter->Mds.TxFragmentThreshold & ~0x1) 27 + #define CURRENT_PREAMBLE_MODE (psLOCAL->boShortPreamble ? WLAN_PREAMBLE_TYPE_SHORT : WLAN_PREAMBLE_TYPE_LONG) 28 + #define CURRENT_TX_RATE_FOR_MNG (adapter->sLocalPara.CurrentTxRateForMng) 29 + #define CURRENT_PROTECT_MECHANISM (psLOCAL->boProtectMechanism) 30 + #define CURRENT_RTS_THRESHOLD (adapter->Mds.TxRTSThreshold) 31 31 32 - #define MIB_GS_XMIT_OK_INC adapter->sLocalPara.GS_XMIT_OK++ 33 - #define MIB_GS_RCV_OK_INC adapter->sLocalPara.GS_RCV_OK++ 34 - #define MIB_GS_XMIT_ERROR_INC adapter->sLocalPara.GS_XMIT_ERROR 32 + #define MIB_GS_XMIT_OK_INC (adapter->sLocalPara.GS_XMIT_OK++) 33 + #define MIB_GS_RCV_OK_INC (adapter->sLocalPara.GS_RCV_OK++) 34 + #define MIB_GS_XMIT_ERROR_INC (adapter->sLocalPara.GS_XMIT_ERROR) 35 35 36 - //---------- TX ----------------------------------- 36 + /* ---------- TX ----------------------------------- */ 37 37 #define ETHERNET_TX_DESCRIPTORS MAX_USB_TX_BUFFER_NUMBER 38 38 39 - //---------- RX ------------------------------------ 40 - #define ETHERNET_RX_DESCRIPTORS 8 //It's not necessary to allocate more than 2 in sync indicate 39 + /* ---------- RX ----------------------------------- */ 40 + #define ETHERNET_RX_DESCRIPTORS 8 /* It's not necessary to allocate more than 2 in sync indicate */ 41 41 42 - //================================================================ 43 - // Configration default value 44 - //================================================================ 45 - #define DEFAULT_MULTICASTLISTMAX 32 // standard 46 - #define DEFAULT_TX_BURSTLENGTH 3 // 32 Longwords 47 - #define DEFAULT_RX_BURSTLENGTH 3 // 32 Longwords 48 - #define DEFAULT_TX_THRESHOLD 0 // Full Packet 49 - #define DEFAULT_RX_THRESHOLD 0 // Full Packet 50 - #define DEFAULT_MAXTXRATE 6 // 11 Mbps (Long) 51 - #define DEFAULT_CHANNEL 3 // Chennel 3 52 - #define DEFAULT_RTSThreshold 2347 // Disable RTS 53 - //#define DEFAULT_PME 1 // Enable 54 - #define DEFAULT_PME 0 // Disable 55 - #define DEFAULT_SIFSTIME 10 56 - #define DEFAULT_ACKTIME_1ML 304 // 148+44+112 911220 by LCC 57 - #define DEFAULT_ACKTIME_2ML 248 // 148+44+56 911220 by LCC 58 - #define DEFAULT_FRAGMENT_THRESHOLD 2346 // No fragment 59 - #define DEFAULT_PREAMBLE_LENGTH 72 42 + /* 43 + * ================================================================ 44 + * Configration default value 45 + * ================================================================ 46 + */ 47 + #define DEFAULT_MULTICASTLISTMAX 32 /* standard */ 48 + #define DEFAULT_TX_BURSTLENGTH 3 /* 32 Longwords */ 49 + #define DEFAULT_RX_BURSTLENGTH 3 /* 32 Longwords */ 50 + #define DEFAULT_TX_THRESHOLD 0 /* Full Packet */ 51 + #define DEFAULT_RX_THRESHOLD 0 /* Full Packet */ 52 + #define DEFAULT_MAXTXRATE 6 /* 11 Mbps (Long) */ 53 + #define DEFAULT_CHANNEL 3 /* Chennel 3 */ 54 + #define DEFAULT_RTSThreshold 2347 /* Disable RTS */ 55 + #define DEFAULT_PME 0 /* Disable */ 56 + #define DEFAULT_SIFSTIME 10 57 + #define DEFAULT_ACKTIME_1ML 304 /* 148 + 44 + 112 */ 58 + #define DEFAULT_ACKTIME_2ML 248 /* 148 + 44 + 56 */ 59 + #define DEFAULT_FRAGMENT_THRESHOLD 2346 /* No fragment */ 60 + #define DEFAULT_PREAMBLE_LENGTH 72 60 61 #define DEFAULT_PLCPHEADERTIME_LENGTH 24 61 62 62 - /*------------------------------------------------------------------------ 63 - 0.96 sec since time unit of the R03 for the current, W89C32 is about 60ns 64 - instead of 960 ns. This shall be fixed in the future W89C32 65 - -------------------------------------------------------------------------*/ 66 - #define DEFAULT_MAX_RECEIVE_TIME 16440000 63 + /* 64 + * ------------------------------------------------------------------------ 65 + * 0.96 sec since time unit of the R03 for the current, W89C32 is about 60ns 66 + * instead of 960 ns. This shall be fixed in the future W89C32 67 + * ------------------------------------------------------------------------- 68 + */ 69 + #define DEFAULT_MAX_RECEIVE_TIME 16440000 67 70 68 - #define RX_BUF_SIZE 2352 // 600 // For 301 must be multiple of 8 69 - #define MAX_RX_DESCRIPTORS 18 // Rx Layer 2 71 + #define RX_BUF_SIZE 2352 /* 600 - For 301 must be multiple of 8 */ 72 + #define MAX_RX_DESCRIPTORS 18 /* Rx Layer 2 */ 70 73 74 + /* For brand-new rx system */ 75 + #define MDS_ID_IGNORE ETHERNET_RX_DESCRIPTORS 71 76 72 - // For brand-new rx system 73 - #define MDS_ID_IGNORE ETHERNET_RX_DESCRIPTORS 74 - 75 - // For Tx Packet status classify 76 - #define PACKET_FREE_TO_USE 0 77 - #define PACKET_COME_FROM_NDIS 0x08 78 - #define PACKET_COME_FROM_MLME 0x80 79 - #define PACKET_SEND_COMPLETE 0xff 77 + /* For Tx Packet status classify */ 78 + #define PACKET_FREE_TO_USE 0 79 + #define PACKET_COME_FROM_NDIS 0x08 80 + #define PACKET_COME_FROM_MLME 0x80 81 + #define PACKET_SEND_COMPLETE 0xff 80 82 81 83 struct wb35_mds { 82 - // For Tx usage 83 - u8 TxOwner[ ((MAX_USB_TX_BUFFER_NUMBER + 3) & ~0x03) ]; 84 + /* For Tx usage */ 85 + u8 TxOwner[((MAX_USB_TX_BUFFER_NUMBER + 3) & ~0x03)]; 84 86 u8 *pTxBuffer; 85 - u16 TxBufferSize[ ((MAX_USB_TX_BUFFER_NUMBER + 1) & ~0x01) ]; 86 - u8 TxDesFrom[ ((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03) ];//931130.4.u // 1: MLME 2: NDIS control 3: NDIS data 87 - u8 TxCountInBuffer[ ((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03) ]; // 20060928 87 + u16 TxBufferSize[((MAX_USB_TX_BUFFER_NUMBER + 1) & ~0x01)]; 88 + u8 TxDesFrom[((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03)];/* 1: MLME 2: NDIS control 3: NDIS data */ 89 + u8 TxCountInBuffer[((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03)]; 88 90 89 - u8 TxFillIndex;//the next index of TxBuffer can be used 90 - u8 TxDesIndex;//The next index of TxDes can be used 91 - u8 ScanTxPause; //data Tx pause because the scanning is progressing, but probe request Tx won't. 92 - u8 TxPause;//For pause the Mds_Tx modult 91 + u8 TxFillIndex; /* the next index of TxBuffer can be used */ 92 + u8 TxDesIndex; /* The next index of TxDes can be used */ 93 + u8 ScanTxPause; /* data Tx pause because the scanning is progressing, but probe request Tx won't. */ 94 + u8 TxPause; /*For pause the Mds_Tx modult */ 93 95 94 - atomic_t TxThreadCount;//For thread counting 931130.4.v 95 - //950301 delete due to HW 96 - // atomic_t TxConcurrentCount;//931130.4.w 96 + atomic_t TxThreadCount; /* For thread counting */ 97 97 98 - u16 TxResult[ ((MAX_USB_TX_DESCRIPTOR + 1) & ~0x01) ];//Collect the sending result of Mpdu 98 + u16 TxResult[((MAX_USB_TX_DESCRIPTOR + 1) & ~0x01)];/* Collect the sending result of Mpdu */ 99 99 100 - u8 MicRedundant[8]; // For tmp use 101 - u8 *MicWriteAddress[2]; //The start address to fill the Mic, use 2 point due to Mic maybe fragment 100 + u8 MicRedundant[8]; /* For tmp use */ 101 + u8 *MicWriteAddress[2]; /* The start address to fill the Mic, use 2 point due to Mic maybe fragment */ 102 102 103 - u16 MicWriteSize[2]; //931130.4.x 103 + u16 MicWriteSize[2]; 104 104 105 - u16 MicAdd; // If want to add the Mic, this variable equal to 8 106 - u16 MicWriteIndex;//The number of MicWriteAddress 931130.4.y 105 + u16 MicAdd; /* If want to add the Mic, this variable equal to 8 */ 106 + u16 MicWriteIndex; /* The number of MicWriteAddress */ 107 107 108 - u8 TxRate[ ((MAX_USB_TX_DESCRIPTOR+1)&~0x01) ][2]; // [0] current tx rate, [1] fall back rate 109 - u8 TxInfo[ ((MAX_USB_TX_DESCRIPTOR+1)&~0x01) ]; //Store information for callback function 108 + u8 TxRate[((MAX_USB_TX_DESCRIPTOR + 1) & ~0x01)][2]; /* [0] current tx rate, [1] fall back rate */ 109 + u8 TxInfo[((MAX_USB_TX_DESCRIPTOR + 1) & ~0x01)]; /*Store information for callback function */ 110 110 111 - //WKCHEN added for scanning mechanism 112 - u8 TxToggle; //It is TRUE if there are tx activities in some time interval 111 + /* for scanning mechanism */ 112 + u8 TxToggle; /* It is TRUE if there are tx activities in some time interval */ 113 113 u8 Reserved_[3]; 114 114 115 - //---------- for Tx Parameter 116 - u16 TxFragmentThreshold; // For frame body only 115 + /* ---- for Tx Parameter */ 116 + u16 TxFragmentThreshold; /* For frame body only */ 117 117 u16 TxRTSThreshold; 118 118 119 - u32 MaxReceiveTime;//911220.3 Add 119 + u32 MaxReceiveTime; 120 120 121 - // depend on OS, 122 - u32 MulticastListNo; 123 - u32 PacketFilter; // Setting by NDIS, the current packet filter in use. 124 - u8 MulticastAddressesArray[DEFAULT_MULTICASTLISTMAX][MAC_ADDR_LENGTH]; 121 + /* depend on OS, */ 122 + u32 MulticastListNo; 123 + u32 PacketFilter; /* Setting by NDIS, the current packet filter in use. */ 124 + u8 MulticastAddressesArray[DEFAULT_MULTICASTLISTMAX][MAC_ADDR_LENGTH]; 125 125 126 - //COUNTERMEASURE 127 - u8 bMICfailCount; 128 - u8 boCounterMeasureBlock; 129 - u8 reserved_4[2]; 126 + /* COUNTERMEASURE */ 127 + u8 bMICfailCount; 128 + u8 boCounterMeasureBlock; 129 + u8 reserved_4[2]; 130 130 131 - u32 TxTsc; // 20060214 132 - u32 TxTsc_2; // 20060214 133 - 131 + u32 TxTsc; 132 + u32 TxTsc_2; 134 133 }; 135 134 136 135 #endif