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

Staging: winbond: wbhal_s.h Coding style fixes.

I fixed checkpatch warnings except some long lines and typedefs.
I also removed versioning comments.

Signed-off-by: Lars Lindley <lindley@coyote.org>
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
5a7df3c4 b66e65e2

+235 -253
+235 -253
drivers/staging/winbond/wbhal_s.h
··· 4 4 #include <linux/types.h> 5 5 #include <linux/if_ether.h> /* for ETH_ALEN */ 6 6 7 - //[20040722 WK] 8 - #define HAL_LED_SET_MASK 0x001c //20060901 Extend 9 - #define HAL_LED_SET_SHIFT 2 7 + #define HAL_LED_SET_MASK 0x001c 8 + #define HAL_LED_SET_SHIFT 2 10 9 11 - //supported RF type 10 + /* supported RF type */ 12 11 #define RF_MAXIM_2825 0 13 12 #define RF_MAXIM_2827 1 14 13 #define RF_MAXIM_2828 2 15 14 #define RF_MAXIM_2829 3 16 - #define RF_MAXIM_V1 15 15 + #define RF_MAXIM_V1 15 17 16 #define RF_AIROHA_2230 16 18 17 #define RF_AIROHA_7230 17 19 - #define RF_AIROHA_2230S 18 // 20060420 Add this 20 - // #define RF_RFMD_2959 32 // 20060626 Remove all about RFMD 21 - #define RF_WB_242 33 22 - #define RF_WB_242_1 34 // 20060619.5 Add 18 + #define RF_AIROHA_2230S 18 19 + #define RF_WB_242 33 20 + #define RF_WB_242_1 34 23 21 #define RF_DECIDE_BY_INF 255 24 22 25 - //---------------------------------------------------------------- 26 - // The follow define connect to upper layer 27 - // User must modify for connection between HAL and upper layer 28 - //---------------------------------------------------------------- 23 + /* 24 + * ---------------------------------------------------------------- 25 + * The follow define connect to upper layer 26 + * User must modify for connection between HAL and upper layer 27 + * ---------------------------------------------------------------- 28 + */ 29 29 30 + /* 31 + * ============================== 32 + * Common define 33 + * ============================== 34 + */ 35 + /* Bit 5 */ 36 + #define HAL_USB_MODE_BURST(_H) (_H->SoftwareSet & 0x20) 30 37 38 + /* Scan interval */ 39 + #define SCAN_MAX_CHNL_TIME (50) 31 40 32 - 33 - ///////////////////////////////////////////////////////////////////////////////////////////////////// 34 - //================================================================================================ 35 - // Common define 36 - //================================================================================================ 37 - #define HAL_USB_MODE_BURST( _H ) (_H->SoftwareSet & 0x20 ) // Bit 5 20060901 Modify 38 - 39 - // Scan interval 40 - #define SCAN_MAX_CHNL_TIME (50) 41 - 42 - // For TxL2 Frame typr recognise 41 + /* For TxL2 Frame typr recognise */ 43 42 #define FRAME_TYPE_802_3_DATA 0 44 43 #define FRAME_TYPE_802_11_MANAGEMENT 1 45 - #define FRAME_TYPE_802_11_MANAGEMENT_CHALLENGE 2 44 + #define FRAME_TYPE_802_11_MANAGEMENT_CHALLENGE 2 46 45 #define FRAME_TYPE_802_11_CONTROL 3 47 46 #define FRAME_TYPE_802_11_DATA 4 48 47 #define FRAME_TYPE_PROMISCUOUS 5 49 48 50 - // The follow definition is used for convert the frame-------------------- 51 - #define DOT_11_SEQUENCE_OFFSET 22 //Sequence control offset 49 + /* The follow definition is used for convert the frame------------ */ 50 + #define DOT_11_SEQUENCE_OFFSET 22 /* Sequence control offset */ 52 51 #define DOT_3_TYPE_OFFSET 12 53 - #define DOT_11_MAC_HEADER_SIZE 24 52 + #define DOT_11_MAC_HEADER_SIZE 24 54 53 #define DOT_11_SNAP_SIZE 6 55 - #define DOT_11_TYPE_OFFSET 30 //The start offset of 802.11 Frame. Type encapsulatuin. 54 + #define DOT_11_TYPE_OFFSET 30 /* The start offset of 802.11 Frame. Type encapsulation. */ 56 55 #define DEFAULT_SIFSTIME 10 57 - #define DEFAULT_FRAGMENT_THRESHOLD 2346 // No fragment 56 + #define DEFAULT_FRAGMENT_THRESHOLD 2346 /* No fragment */ 58 57 #define DEFAULT_MSDU_LIFE_TIME 0xffff 59 58 60 - #define LONG_PREAMBLE_PLUS_PLCPHEADER_TIME (144+48) 61 - #define SHORT_PREAMBLE_PLUS_PLCPHEADER_TIME (72+24) 62 - #define PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION (16+4+6) 63 - #define Tsym 4 59 + #define LONG_PREAMBLE_PLUS_PLCPHEADER_TIME (144 + 48) 60 + #define SHORT_PREAMBLE_PLUS_PLCPHEADER_TIME (72 + 24) 61 + #define PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION (16 + 4 + 6) 62 + #define Tsym 4 64 63 65 - // Frame Type of Bits (2, 3)--------------------------------------------- 64 + /* Frame Type of Bits (2, 3)----------------------------------- */ 66 65 #define MAC_TYPE_MANAGEMENT 0x00 67 66 #define MAC_TYPE_CONTROL 0x04 68 67 #define MAC_TYPE_DATA 0x08 69 - #define MASK_FRAGMENT_NUMBER 0x000F 70 - #define SEQUENCE_NUMBER_SHIFT 4 68 + #define MASK_FRAGMENT_NUMBER 0x000F 69 + #define SEQUENCE_NUMBER_SHIFT 4 71 70 72 71 #define HAL_WOL_TYPE_WAKEUP_FRAME 0x01 73 72 #define HAL_WOL_TYPE_MAGIC_PACKET 0x02 74 73 75 - // 20040106 ADDED 76 - #define HAL_KEYTYPE_WEP40 0 77 - #define HAL_KEYTYPE_WEP104 1 78 - #define HAL_KEYTYPE_TKIP 2 // 128 bit key 79 - #define HAL_KEYTYPE_AES_CCMP 3 // 128 bit key 74 + #define HAL_KEYTYPE_WEP40 0 75 + #define HAL_KEYTYPE_WEP104 1 76 + #define HAL_KEYTYPE_TKIP 2 /* 128 bit key */ 77 + #define HAL_KEYTYPE_AES_CCMP 3 /* 128 bit key */ 80 78 81 - // For VM state 79 + /* For VM state */ 82 80 enum { 83 81 VM_STOP = 0, 84 82 VM_RUNNING, 85 83 VM_COMPLETED 86 84 }; 87 85 88 - //----------------------------------------------------- 89 - // Normal Key table format 90 - //----------------------------------------------------- 91 - // The order of KEY index is MAPPING_KEY_START_INDEX > GROUP_KEY_START_INDEX 92 - #define MAX_KEY_TABLE 24 // 24 entry for storing key data 86 + /* 87 + * ================================ 88 + * Normal Key table format 89 + * ================================ 90 + */ 91 + 92 + /* The order of KEY index is MAPPING_KEY_START_INDEX > GROUP_KEY_START_INDEX */ 93 + #define MAX_KEY_TABLE 24 /* 24 entry for storing key data */ 93 94 #define GROUP_KEY_START_INDEX 4 94 95 #define MAPPING_KEY_START_INDEX 8 95 96 96 - //-------------------------------------------------------- 97 - // Descriptor 98 - //-------------------------------------------------------- 99 - #define MAX_DESCRIPTOR_BUFFER_INDEX 8 // Have to multiple of 2 100 - //#define FLAG_ERROR_TX_MASK cpu_to_le32(0x000000bf) //20061009 marked by anson's endian 101 - #define FLAG_ERROR_TX_MASK 0x000000bf //20061009 anson's endian 102 - //#define FLAG_ERROR_RX_MASK 0x00000c3f 103 - //#define FLAG_ERROR_RX_MASK cpu_to_le32(0x0000083f) //20061009 marked by anson's endian 104 - //Don't care replay error, 105 - //it is handled by S/W 106 - #define FLAG_ERROR_RX_MASK 0x0000083f //20060926 anson's endian 97 + /* 98 + * ========================================= 99 + * Descriptor 100 + * ========================================= 101 + */ 102 + #define MAX_DESCRIPTOR_BUFFER_INDEX 8 /* Have to multiple of 2 */ 103 + #define FLAG_ERROR_TX_MASK 0x000000bf 104 + #define FLAG_ERROR_RX_MASK 0x0000083f 107 105 108 - #define FLAG_BAND_RX_MASK 0x10000000 //Bit 28 106 + #define FLAG_BAND_RX_MASK 0x10000000 /* Bit 28 */ 109 107 110 - typedef struct _R00_DESCRIPTOR 111 - { 112 - union 113 - { 108 + typedef struct _R00_DESCRIPTOR { 109 + union { 114 110 u32 value; 115 - #ifdef _BIG_ENDIAN_ //20060926 anson's endian 116 - struct 117 - { 111 + #ifdef _BIG_ENDIAN_ 112 + struct { 118 113 u32 R00_packet_or_buffer_status:1; 119 114 u32 R00_packet_in_fifo:1; 120 115 u32 R00_RESERVED:2; 121 116 u32 R00_receive_byte_count:12; 122 117 u32 R00_receive_time_index:16; 123 118 }; 124 - #else 125 - struct 126 - { 119 + #else 120 + struct { 127 121 u32 R00_receive_time_index:16; 128 122 u32 R00_receive_byte_count:12; 129 123 u32 R00_RESERVED:2; 130 124 u32 R00_packet_in_fifo:1; 131 125 u32 R00_packet_or_buffer_status:1; 132 126 }; 133 - #endif 127 + #endif 134 128 }; 135 129 } R00_DESCRIPTOR, *PR00_DESCRIPTOR; 136 130 137 - typedef struct _T00_DESCRIPTOR 138 - { 139 - union 140 - { 131 + typedef struct _T00_DESCRIPTOR { 132 + union { 141 133 u32 value; 142 - #ifdef _BIG_ENDIAN_ //20061009 anson's endian 143 - struct 144 - { 145 - u32 T00_first_mpdu:1; // for hardware use 146 - u32 T00_last_mpdu:1; // for hardware use 147 - u32 T00_IsLastMpdu:1;// 0: not 1:Yes for software used 148 - u32 T00_IgnoreResult:1;// The same mechanism with T00 setting. 050111 Modify for TS 149 - u32 T00_RESERVED_ID:2;//3 bit ID reserved 150 - u32 T00_tx_packet_id:4;//930519.4.e 930810.3.c 134 + #ifdef _BIG_ENDIAN_ 135 + struct { 136 + u32 T00_first_mpdu:1; /* for hardware use */ 137 + u32 T00_last_mpdu:1; /* for hardware use */ 138 + u32 T00_IsLastMpdu:1;/* 0:not 1:Yes for software used */ 139 + u32 T00_IgnoreResult:1;/* The same mechanism with T00 setting. */ 140 + u32 T00_RESERVED_ID:2;/* 3 bit ID reserved */ 141 + u32 T00_tx_packet_id:4; 151 142 u32 T00_RESERVED:4; 152 143 u32 T00_header_length:6; 153 144 u32 T00_frame_length:12; 154 145 }; 155 - #else 156 - struct 157 - { 146 + #else 147 + struct { 158 148 u32 T00_frame_length:12; 159 149 u32 T00_header_length:6; 160 150 u32 T00_RESERVED:4; 161 - u32 T00_tx_packet_id:4;//930519.4.e 930810.3.c 162 - u32 T00_RESERVED_ID:2;//3 bit ID reserved 163 - u32 T00_IgnoreResult:1;// The same mechanism with T00 setting. 050111 Modify for TS 164 - u32 T00_IsLastMpdu:1;// 0: not 1:Yes for software used 165 - u32 T00_last_mpdu:1; // for hardware use 166 - u32 T00_first_mpdu:1; // for hardware use 151 + u32 T00_tx_packet_id:4; 152 + u32 T00_RESERVED_ID:2; /* 3 bit ID reserved */ 153 + u32 T00_IgnoreResult:1; /* The same mechanism with T00 setting. */ 154 + u32 T00_IsLastMpdu:1; /* 0:not 1:Yes for software used */ 155 + u32 T00_last_mpdu:1; /* for hardware use */ 156 + u32 T00_first_mpdu:1; /* for hardware use */ 167 157 }; 168 - #endif 158 + #endif 169 159 }; 170 160 } T00_DESCRIPTOR, *PT00_DESCRIPTOR; 171 161 172 - typedef struct _R01_DESCRIPTOR 173 - { 174 - union 175 - { 162 + typedef struct _R01_DESCRIPTOR { 163 + union { 176 164 u32 value; 177 - #ifdef _BIG_ENDIAN_ //20060926 add by anson's endian 178 - struct 179 - { 165 + #ifdef _BIG_ENDIAN_ 166 + struct { 180 167 u32 R01_RESERVED:3; 181 168 u32 R01_mod_type:1; 182 169 u32 R01_pre_type:1; ··· 184 197 u32 R01_icv_error:1; 185 198 u32 R01_crc_error:1; 186 199 }; 187 - #else 188 - struct 189 - { 200 + #else 201 + struct { 190 202 u32 R01_crc_error:1; 191 203 u32 R01_icv_error:1; 192 204 u32 R01_null_key_to_authentication_frame:1; ··· 206 220 u32 R01_mod_type:1; 207 221 u32 R01_RESERVED:3; 208 222 }; 209 - #endif 223 + #endif 210 224 }; 211 225 } R01_DESCRIPTOR, *PR01_DESCRIPTOR; 212 226 213 - typedef struct _T01_DESCRIPTOR 214 - { 215 - union 216 - { 227 + typedef struct _T01_DESCRIPTOR { 228 + union { 217 229 u32 value; 218 - #ifdef _BIG_ENDIAN_ //20061009 anson's endian 219 - struct 220 - { 230 + #ifdef _BIG_ENDIAN_ 231 + struct { 221 232 u32 T01_rts_cts_duration:16; 222 233 u32 T01_fall_back_rate:3; 223 234 u32 T01_add_rts:1; ··· 228 245 u32 T01_loop_back_wep_mode:1; 229 246 u32 T01_retry_abort_ebable:1; 230 247 }; 231 - #else 232 - struct 233 - { 248 + #else 249 + struct { 234 250 u32 T01_retry_abort_ebable:1; 235 251 u32 T01_loop_back_wep_mode:1; 236 252 u32 T01_inhibit_crc:1; ··· 243 261 u32 T01_fall_back_rate:3; 244 262 u32 T01_rts_cts_duration:16; 245 263 }; 246 - #endif 264 + #endif 247 265 }; 248 266 } T01_DESCRIPTOR, *PT01_DESCRIPTOR; 249 267 250 - typedef struct _T02_DESCRIPTOR 251 - { 252 - union 253 - { 268 + typedef struct _T02_DESCRIPTOR { 269 + union { 254 270 u32 value; 255 - #ifdef _BIG_ENDIAN_ //20061009 add by anson's endian 256 - struct 257 - { 258 - u32 T02_IsLastMpdu:1;// The same mechanism with T00 setting 259 - u32 T02_IgnoreResult:1;// The same mechanism with T00 setting. 050111 Modify for TS 260 - u32 T02_RESERVED_ID:2;// The same mechanism with T00 setting 271 + #ifdef _BIG_ENDIAN_ 272 + struct { 273 + u32 T02_IsLastMpdu:1; /* The same mechanism with T00 setting */ 274 + u32 T02_IgnoreResult:1; /* The same mechanism with T00 setting. */ 275 + u32 T02_RESERVED_ID:2; /* The same mechanism with T00 setting */ 261 276 u32 T02_Tx_PktID:4; 262 277 u32 T02_MPDU_Cnt:4; 263 278 u32 T02_RTS_Cnt:4; ··· 269 290 u32 T02_transmit_abort:1; 270 291 u32 T02_transmit_fail:1; 271 292 }; 272 - #else 273 - struct 274 - { 293 + #else 294 + struct { 275 295 u32 T02_transmit_fail:1; 276 296 u32 T02_transmit_abort:1; 277 297 u32 T02_out_of_MaxTxMSDULiftTime:1; ··· 284 306 u32 T02_RTS_Cnt:4; 285 307 u32 T02_MPDU_Cnt:4; 286 308 u32 T02_Tx_PktID:4; 287 - u32 T02_RESERVED_ID:2;// The same mechanism with T00 setting 288 - u32 T02_IgnoreResult:1;// The same mechanism with T00 setting. 050111 Modify for TS 289 - u32 T02_IsLastMpdu:1;// The same mechanism with T00 setting 309 + u32 T02_RESERVED_ID:2; /* The same mechanism with T00 setting */ 310 + u32 T02_IgnoreResult:1; /* The same mechanism with T00 setting. */ 311 + u32 T02_IsLastMpdu:1; /* The same mechanism with T00 setting */ 290 312 }; 291 - #endif 313 + #endif 292 314 }; 293 315 } T02_DESCRIPTOR, *PT02_DESCRIPTOR; 294 316 295 - struct wb35_descriptor { // Skip length = 8 DWORD 296 - // ID for descriptor ---, The field doesn't be cleard in the operation of Descriptor definition 317 + struct wb35_descriptor { /* Skip length = 8 DWORD */ 318 + /* ID for descriptor ---, The field doesn't be cleard in the operation of Descriptor definition */ 297 319 u8 Descriptor_ID; 298 - //----------------------The above region doesn't be cleared by DESCRIPTOR_RESET------ 320 + /* ----------------------The above region doesn't be cleared by DESCRIPTOR_RESET------ */ 299 321 u8 RESERVED[3]; 300 322 301 323 u16 FragmentThreshold; 302 - u8 InternalUsed;//Only can be used by operation of descriptor definition 303 - u8 Type;// 0: 802.3 1:802.11 data frame 2:802.11 management frame 324 + u8 InternalUsed; /* Only can be used by operation of descriptor definition */ 325 + u8 Type; /* 0: 802.3 1:802.11 data frame 2:802.11 management frame */ 304 326 305 - u8 PreambleMode;// 0: short 1:long 327 + u8 PreambleMode;/* 0: short 1:long */ 306 328 u8 TxRate; 307 329 u8 FragmentCount; 308 - u8 EapFix; // For speed up key install 330 + u8 EapFix; /* For speed up key install */ 309 331 310 - // For R00 and T00 ---------------------------------------------- 311 - union 312 - { 332 + /* For R00 and T00 ------------------------------ */ 333 + union { 313 334 R00_DESCRIPTOR R00; 314 335 T00_DESCRIPTOR T00; 315 336 }; 316 337 317 - // For R01 and T01 ---------------------------------------------- 318 - union 319 - { 338 + /* For R01 and T01 ------------------------------ */ 339 + union { 320 340 R01_DESCRIPTOR R01; 321 341 T01_DESCRIPTOR T01; 322 342 }; 323 343 324 - // For R02 and T02 ---------------------------------------------- 325 - union 326 - { 327 - u32 R02; 344 + /* For R02 and T02 ------------------------------ */ 345 + union { 346 + u32 R02; 328 347 T02_DESCRIPTOR T02; 329 348 }; 330 349 331 - // For R03 and T03 ---------------------------------------------- 332 - // For software used 333 - union 334 - { 350 + /* For R03 and T03 ------------------------------ */ 351 + /* For software used */ 352 + union { 335 353 u32 R03; 336 354 u32 T03; 337 - struct 338 - { 355 + struct { 339 356 u8 buffer_number; 340 357 u8 buffer_start_index; 341 358 u16 buffer_total_size; 342 359 }; 343 360 }; 344 361 345 - // For storing the buffer 346 - u16 buffer_size[ MAX_DESCRIPTOR_BUFFER_INDEX ]; 347 - void* buffer_address[ MAX_DESCRIPTOR_BUFFER_INDEX ];//931130.4.q 348 - 362 + /* For storing the buffer */ 363 + u16 buffer_size[MAX_DESCRIPTOR_BUFFER_INDEX]; 364 + void *buffer_address[MAX_DESCRIPTOR_BUFFER_INDEX]; 349 365 }; 350 366 351 367 352 - #define DEFAULT_NULL_PACKET_COUNT 180000 //20060828.1 Add. 180 seconds 368 + #define DEFAULT_NULL_PACKET_COUNT 180000 /* 180 seconds */ 353 369 354 - #define MAX_TXVGA_EEPROM 9 //How many word(u16) of EEPROM will be used for TxVGA 355 - #define MAX_RF_PARAMETER 32 370 + #define MAX_TXVGA_EEPROM 9 /* How many word(u16) of EEPROM will be used for TxVGA */ 371 + #define MAX_RF_PARAMETER 32 356 372 357 373 typedef struct _TXVGA_FOR_50 { 358 - u8 ChanNo; 359 - u8 TxVgaValue; 374 + u8 ChanNo; 375 + u8 TxVgaValue; 360 376 } TXVGA_FOR_50; 361 377 362 378 363 - //===================================================================== 364 - // Device related include 365 - //===================================================================== 379 + /* 380 + * ============================================== 381 + * Device related include 382 + * ============================================== 383 + */ 366 384 367 385 #include "wbusb_s.h" 368 386 #include "wb35reg_s.h" 369 387 #include "wb35tx_s.h" 370 388 #include "wb35rx_s.h" 371 389 372 - // For Hal using ================================================================== 390 + /* For Hal using ============================================ */ 373 391 struct hw_data { 374 - // For compatible with 33 392 + /* For compatible with 33 */ 375 393 u32 revision; 376 - u32 BB3c_cal; // The value for Tx calibration comes from EEPROM 377 - u32 BB54_cal; // The value for Rx calibration comes from EEPROM 394 + u32 BB3c_cal; /* The value for Tx calibration comes from EEPROM */ 395 + u32 BB54_cal; /* The value for Rx calibration comes from EEPROM */ 378 396 379 - 380 - // For surprise remove 381 - u32 SurpriseRemove; // 0: Normal 1: Surprise remove 397 + /* For surprise remove */ 398 + u32 SurpriseRemove; /* 0: Normal 1: Surprise remove */ 382 399 u8 IsKeyPreSet; 383 - u8 CalOneTime; // 20060630.1 400 + u8 CalOneTime; 384 401 385 402 u8 VCO_trim; 386 403 387 - // For Fix 1'st DMA bug 388 404 u32 FragCount; 389 - u32 DMAFix; //V1_DMA_FIX The variable can be removed if driver want to save mem space for V2. 405 + u32 DMAFix; /* V1_DMA_FIX The variable can be removed if driver want to save mem space for V2. */ 390 406 391 - //=============================================== 392 - // Definition for MAC address 393 - //=============================================== 394 - u8 PermanentMacAddress[ETH_ALEN + 2]; // The Enthernet addr that are stored in EEPROM. + 2 to 8-byte alignment 395 - u8 CurrentMacAddress[ETH_ALEN + 2]; // The Enthernet addr that are in used. + 2 to 8-byte alignment 407 + /* 408 + * =============================================== 409 + * Definition for MAC address 410 + * =============================================== 411 + */ 412 + u8 PermanentMacAddress[ETH_ALEN + 2]; /* The Ethernet addr that are stored in EEPROM. + 2 to 8-byte alignment */ 413 + u8 CurrentMacAddress[ETH_ALEN + 2]; /* The Enthernet addr that are in used. + 2 to 8-byte alignment */ 396 414 397 - //===================================================================== 398 - // Definition for 802.11 399 - //===================================================================== 400 - u8 *bssid_pointer; // Used by hal_get_bssid for return value 401 - u8 bssid[8];// Only 6 byte will be used. 8 byte is required for read buffer 402 - u8 ssid[32];// maximum ssid length is 32 byte 415 + /* 416 + * ========================================= 417 + * Definition for 802.11 418 + * ========================================= 419 + */ 420 + u8 *bssid_pointer; /* Used by hal_get_bssid for return value */ 421 + u8 bssid[8]; /* Only 6 byte will be used. 8 byte is required for read buffer */ 422 + u8 ssid[32]; /* maximum ssid length is 32 byte */ 403 423 404 424 u16 AID; 405 425 u8 ssid_length; ··· 409 433 u16 BeaconPeriod; 410 434 u16 ProbeDelay; 411 435 412 - u8 bss_type;// 0: IBSS_NET or 1:ESS_NET 413 - u8 preamble;// 0: short preamble, 1: long preamble 414 - u8 slot_time_select;// 9 or 20 value 415 - u8 phy_type;// Phy select 436 + u8 bss_type;/* 0: IBSS_NET or 1:ESS_NET */ 437 + u8 preamble;/* 0: short preamble, 1: long preamble */ 438 + u8 slot_time_select; /* 9 or 20 value */ 439 + u8 phy_type; /* Phy select */ 416 440 417 441 u32 phy_para[MAX_RF_PARAMETER]; 418 442 u32 phy_number; 419 443 420 - u32 CurrentRadioSw; // 20060320.2 0:On 1:Off 421 - u32 CurrentRadioHw; // 20060825 0:On 1:Off 444 + u32 CurrentRadioSw; /* 0:On 1:Off */ 445 + u32 CurrentRadioHw; /* 0:On 1:Off */ 422 446 423 - u8 *power_save_point; // Used by hal_get_power_save_mode for return value 447 + u8 *power_save_point; /* Used by hal_get_power_save_mode for return value */ 424 448 u8 cwmin; 425 449 u8 desired_power_save; 426 - u8 dtim;// Is running dtim 427 - u8 mapping_key_replace_index;//In Key table, the next index be replaced 931130.4.r 450 + u8 dtim; /* Is running dtim */ 451 + u8 mapping_key_replace_index; /* In Key table, the next index be replaced */ 428 452 429 453 u16 MaxReceiveLifeTime; 430 454 u16 FragmentThreshold; 431 455 u16 FragmentThreshold_tmp; 432 456 u16 cwmax; 433 457 434 - u8 Key_slot[MAX_KEY_TABLE][8]; //Ownership record for key slot. For Alignment 435 - u32 Key_content[MAX_KEY_TABLE][12]; // 10DW for each entry + 2 for burst command( Off and On valid bit) 458 + u8 Key_slot[MAX_KEY_TABLE][8]; /* Ownership record for key slot. For Alignment */ 459 + u32 Key_content[MAX_KEY_TABLE][12]; /* 10DW for each entry + 2 for burst command (Off and On valid bit) */ 436 460 u8 CurrentDefaultKeyIndex; 437 461 u32 CurrentDefaultKeyLength; 438 462 439 - //======================================================================== 440 - // Variable for each module 441 - //======================================================================== 442 - struct wb_usb WbUsb; // Need WbUsb.h 443 - struct wb35_reg reg; // Need Wb35Reg.h 444 - struct wb35_tx Wb35Tx; // Need Wb35Tx.h 445 - struct wb35_rx Wb35Rx; // Need Wb35Rx.h 463 + /* 464 + * ================================================== 465 + * Variable for each module 466 + * ================================================== 467 + */ 468 + struct wb_usb WbUsb; /* Need WbUsb.h */ 469 + struct wb35_reg reg; /* Need Wb35Reg.h */ 470 + struct wb35_tx Wb35Tx; /* Need Wb35Tx.h */ 471 + struct wb35_rx Wb35Rx; /* Need Wb35Rx.h */ 446 472 447 - struct timer_list LEDTimer;// For LED 473 + struct timer_list LEDTimer; /* For LED */ 448 474 449 - u32 LEDpoint;// For LED 475 + u32 LEDpoint; /* For LED */ 450 476 451 - u32 dto_tx_retry_count; // LA20040210_DTO kevin 452 - u32 dto_tx_frag_count; // LA20040210_DTO kevin 453 - u32 rx_ok_count[13]; // index=0: total rx ok 454 - //u32 rx_ok_bytes[13]; // index=0, total rx ok bytes 455 - u32 rx_err_count[13]; // index=0: total rx err 477 + u32 dto_tx_retry_count; 478 + u32 dto_tx_frag_count; 479 + u32 rx_ok_count[13]; /* index=0: total rx ok */ 480 + u32 rx_err_count[13]; /* index=0: total rx err */ 456 481 457 - //for Tx debug 482 + /* for Tx debug */ 458 483 u32 tx_TBTT_start_count; 459 484 u32 tx_ETR_count; 460 485 u32 tx_WepOn_false_count; 461 486 u32 tx_Null_key_count; 462 487 u32 tx_retry_count[8]; 463 488 464 - u8 PowerIndexFromEEPROM; // For 2412MHz 465 - u8 power_index; 466 - u8 IsWaitJoinComplete; // TRUE: set join request 467 - u8 band; 489 + u8 PowerIndexFromEEPROM; /* For 2412MHz */ 490 + u8 power_index; 491 + u8 IsWaitJoinComplete; /* TRUE: set join request */ 492 + u8 band; 468 493 469 - u16 SoftwareSet; 470 - u16 Reserved_s; 494 + u16 SoftwareSet; 495 + u16 Reserved_s; 471 496 472 - u32 IsInitOK; // 0: Driver starting 1: Driver init OK 497 + u32 IsInitOK; /* 0: Driver starting 1: Driver init OK */ 473 498 474 - // For Phy calibration 475 - s32 iq_rsdl_gain_tx_d2; 476 - s32 iq_rsdl_phase_tx_d2; 477 - u32 txvga_setting_for_cal; // 20060703.1 Add 499 + /* For Phy calibration */ 500 + s32 iq_rsdl_gain_tx_d2; 501 + s32 iq_rsdl_phase_tx_d2; 502 + u32 txvga_setting_for_cal; 478 503 479 - u8 TxVgaSettingInEEPROM[ (((MAX_TXVGA_EEPROM*2)+3) & ~0x03) ]; // 20060621 For backup EEPROM value 480 - u8 TxVgaFor24[16]; // Max is 14, 2 for alignment 481 - TXVGA_FOR_50 TxVgaFor50[36]; // 35 channels in 5G. 35x2 = 70 byte. 2 for alignments 504 + u8 TxVgaSettingInEEPROM[(((MAX_TXVGA_EEPROM * 2) + 3) & ~0x03)]; /* For EEPROM value */ 505 + u8 TxVgaFor24[16]; /* Max is 14, 2 for alignment */ 506 + TXVGA_FOR_50 TxVgaFor50[36]; /* 35 channels in 5G. 35x2 = 70 byte. 2 for alignments */ 482 507 483 - u16 Scan_Interval; 484 - u16 RESERVED6; 508 + u16 Scan_Interval; 509 + u16 RESERVED6; 485 510 486 - // LED control 511 + /* LED control */ 487 512 u32 LED_control; 488 - // LED_control 4 byte: Gray_Led_1[3] Gray_Led_0[2] Led[1] Led[0] 489 - // Gray_Led 490 - // For Led gray setting 491 - // Led 492 - // 0: normal control, LED behavior will decide by EEPROM setting 493 - // 1: Turn off specific LED 494 - // 2: Always on specific LED 495 - // 3: slow blinking specific LED 496 - // 4: fast blinking specific LED 497 - // 5: WPS led control is set. Led0 is Red, Led1 id Green 498 - // Led[1] is parameter for WPS LED mode 499 - // // 1:InProgress 2: Error 3: Session overlap 4: Success 20061108 control 500 - 501 - u32 LED_LinkOn; //Turn LED on control 502 - u32 LED_Scanning; // Let LED in scan process control 503 - u32 LED_Blinking; // Temp variable for shining 513 + /* 514 + * LED_control 4 byte: Gray_Led_1[3] Gray_Led_0[2] Led[1] Led[0] 515 + * Gray_Led 516 + * For Led gray setting 517 + * Led 518 + * 0: normal control, 519 + * LED behavior will decide by EEPROM setting 520 + * 1: Turn off specific LED 521 + * 2: Always on specific LED 522 + * 3: slow blinking specific LED 523 + * 4: fast blinking specific LED 524 + * 5: WPS led control is set. Led0 is Red, Led1 id Green 525 + * 526 + * Led[1] is parameter for WPS LED mode 527 + * 1:InProgress 528 + * 2: Error 529 + * 3: Session overlap 530 + * 4: Success control 531 + */ 532 + u32 LED_LinkOn; /* Turn LED on control */ 533 + u32 LED_Scanning; /* Let LED in scan process control */ 534 + u32 LED_Blinking; /* Temp variable for shining */ 504 535 u32 RxByteCountLast; 505 536 u32 TxByteCountLast; 506 537 507 538 atomic_t SurpriseRemoveCount; 508 539 509 - // For global timer 510 - u32 time_count;//TICK_TIME_100ms 1 = 100ms 540 + /* For global timer */ 541 + u32 time_count; /* TICK_TIME_100ms 1 = 100ms */ 511 542 512 - // For error recover 543 + /* For error recover */ 513 544 u32 HwStop; 514 545 515 - // 20060828.1 for avoid AP disconnect 546 + /* For avoid AP disconnect */ 516 547 u32 NullPacketCount; 517 - 518 548 }; 519 549 520 550 #endif