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

Staging: winbond: fix comments coding style issue in mac_structures.h

This is a patch to the mac_structures.h file that fixed up a comments
Errors found by the checkpatch.pl tool

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Ruslan Pisarev and committed by
Greg Kroah-Hartman
03a4389c 5dcf8f66

+78 -78
+78 -78
drivers/staging/winbond/mac_structures.h
··· 1 - //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 + /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 2 // MAC_Structures.h 3 3 // 4 4 // This file contains the definitions and data structures used by SW-MAC. ··· 16 16 // Deleted some unused. 17 17 // 20021129 PD43 Austin 18 18 // 20030617 increase the 802.11g definition 19 - //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 19 + //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 20 20 21 21 #ifndef _MAC_Structures_H_ 22 22 #define _MAC_Structures_H_ 23 23 24 24 #include <linux/skbuff.h> 25 25 26 - //========================================================= 26 + /*========================================================= 27 27 // Some miscellaneous definitions 28 - //----- 28 + //-----*/ 29 29 #define MAX_CHANNELS 30 30 30 #define MAC_ADDR_LENGTH 6 31 - #define MAX_WEP_KEY_SIZE 16 // 128 bits 32 - #define MAX_802_11_FRAGMENT_NUMBER 10 // By spec 31 + #define MAX_WEP_KEY_SIZE 16 /* 128 bits */ 32 + #define MAX_802_11_FRAGMENT_NUMBER 10 /* By spec */ 33 33 34 - //======================================================== 34 + /* ======================================================== 35 35 // 802.11 Frame define 36 - //----- 36 + //----- */ 37 37 #define MASK_PROTOCOL_VERSION_TYPE 0x0F 38 38 #define MASK_FRAGMENT_NUMBER 0x000F 39 39 #define SEQUENCE_NUMBER_SHIFT 4 ··· 41 41 #define DOT_11_MAC_HEADER_SIZE 24 42 42 #define DOT_11_SNAP_SIZE 6 43 43 #define DOT_11_DURATION_OFFSET 2 44 - #define DOT_11_SEQUENCE_OFFSET 22 //Sequence control offset 45 - #define DOT_11_TYPE_OFFSET 30 //The start offset of 802.11 Frame// 44 + #define DOT_11_SEQUENCE_OFFSET 22 /* Sequence control offset */ 45 + #define DOT_11_TYPE_OFFSET 30 /* The start offset of 802.11 Frame// */ 46 46 #define DOT_11_DATA_OFFSET 24 47 47 #define DOT_11_DA_OFFSET 4 48 48 #define DOT_3_TYPE_ARP 0x80F3 ··· 54 54 #define MAX_ETHERNET_PACKET_SIZE 1514 55 55 56 56 57 - //----- management : Type of Bits (2, 3) and Subtype of Bits (4, 5, 6, 7) 57 + /* ----- management : Type of Bits (2, 3) and Subtype of Bits (4, 5, 6, 7) */ 58 58 #define MAC_SUBTYPE_MNGMNT_ASSOC_REQUEST 0x00 59 59 #define MAC_SUBTYPE_MNGMNT_ASSOC_RESPONSE 0x10 60 60 #define MAC_SUBTYPE_MNGMNT_REASSOC_REQUEST 0x20 ··· 67 67 #define MAC_SUBTYPE_MNGMNT_AUTHENTICATION 0xB0 68 68 #define MAC_SUBTYPE_MNGMNT_DEAUTHENTICATION 0xC0 69 69 70 - //----- control : Type of Bits (2, 3) and Subtype of Bits (4, 5, 6, 7) 70 + /* ----- control : Type of Bits (2, 3) and Subtype of Bits (4, 5, 6, 7) */ 71 71 #define MAC_SUBTYPE_CONTROL_PSPOLL 0xA4 72 72 #define MAC_SUBTYPE_CONTROL_RTS 0xB4 73 73 #define MAC_SUBTYPE_CONTROL_CTS 0xC4 ··· 75 75 #define MAC_SUBTYPE_CONTROL_CFEND 0xE4 76 76 #define MAC_SUBTYPE_CONTROL_CFEND_CFACK 0xF4 77 77 78 - //----- data : Type of Bits (2, 3) and Subtype of Bits (4, 5, 6, 7) 78 + /* ----- data : Type of Bits (2, 3) and Subtype of Bits (4, 5, 6, 7) */ 79 79 #define MAC_SUBTYPE_DATA 0x08 80 80 #define MAC_SUBTYPE_DATA_CFACK 0x18 81 81 #define MAC_SUBTYPE_DATA_CFPOLL 0x28 ··· 85 85 #define MAC_SUBTYPE_DATA_CFPOLL_NULL 0x68 86 86 #define MAC_SUBTYPE_DATA_CFACK_CFPOLL_NULL 0x78 87 87 88 - //----- Frame Type of Bits (2, 3) 88 + /* ----- Frame Type of Bits (2, 3) */ 89 89 #define MAC_TYPE_MANAGEMENT 0x00 90 90 #define MAC_TYPE_CONTROL 0x04 91 91 #define MAC_TYPE_DATA 0x08 92 92 93 - //----- definitions for Management Frame Element ID (1 BYTE) 93 + /* ----- definitions for Management Frame Element ID (1 BYTE) */ 94 94 #define ELEMENT_ID_SSID 0 95 95 #define ELEMENT_ID_SUPPORTED_RATES 1 96 96 #define ELEMENT_ID_FH_PARAMETER_SET 2 ··· 130 130 #define REASON_CLASS3_FRAME_FROM_NONASSO_STA 7 131 131 #define DISASS_REASON_LEFT_BSS 8 132 132 #define REASON_NOT_AUTH_YET 9 133 - //802.11i define 133 + /* 802.11i define */ 134 134 #define REASON_INVALID_IE 13 135 135 #define REASON_MIC_ERROR 14 136 136 #define REASON_4WAY_HANDSHAKE_TIMEOUT 15 ··· 175 175 } WB_MMPDURESULTCODE, *PWB_MMPDURESULTCODE; 176 176 */ 177 177 178 - //=========================================================== 178 + /*=========================================================== 179 179 // enum_TxRate -- 180 180 // Define the transmission constants based on W89C32 MAC 181 181 // target specification. 182 - //=========================================================== 182 + //===========================================================*/ 183 183 typedef enum enum_TxRate 184 184 { 185 185 TXRATE_1M = 0, ··· 189 189 TXRATE_55MSHORT = 5, 190 190 TXRATE_11MLONG = 6, 191 191 TXRATE_11MSHORT = 7, 192 - TXRATE_AUTO = 255 // PD43 20021108 192 + TXRATE_AUTO = 255 /* PD43 20021108 */ 193 193 } WB_TXRATE, *PWB_TXRATE; 194 194 195 195 ··· 225 225 #define RATE_54M 108 226 226 #define RATE_MAX 255 227 227 228 - //CAPABILITY 228 + /* CAPABILITY */ 229 229 #define CAPABILITY_ESS_BIT 0x0001 230 230 #define CAPABILITY_IBSS_BIT 0x0002 231 231 #define CAPABILITY_CF_POLL_BIT 0x0004 ··· 243 243 union 244 244 { 245 245 u16 __attribute__ ((packed)) wValue; 246 - #ifdef _BIG_ENDIAN_ //20060926 add by anson's endian 246 + #ifdef _BIG_ENDIAN_ /* 20060926 add by anson's endian */ 247 247 struct _Capability 248 248 { 249 - //-- 11G -- 249 + /* -- 11G -- */ 250 250 u8 Reserved3 : 2; 251 251 u8 DSSS_OFDM : 1; 252 252 u8 Reserved2 : 2; ··· 273 273 u8 PBCC : 1; 274 274 u8 Channel_Agility : 1; 275 275 u8 Reserved1 : 2; 276 - //-- 11G -- 276 + /* -- 11G -- */ 277 277 u8 Short_Slot_Time : 1; 278 278 u8 Reserved2 : 2; 279 279 u8 DSSS_OFDM : 1; ··· 320 320 u8 Length; 321 321 u8 CFP_Count; 322 322 u8 CFP_Period; 323 - u8 CFP_MaxDuration[2]; // in Time Units 324 - u8 CFP_DurRemaining[2]; // in time units 323 + u8 CFP_MaxDuration[2]; /* in Time Units */ 324 + u8 CFP_DurRemaining[2]; /* in time units */ 325 325 }; 326 326 327 327 struct TIM_Element ··· 350 350 351 351 struct PHY_Parameter_Set_Element 352 352 { 353 - // int aSlotTime; 354 - // int aSifsTime; 353 + /* int aSlotTime; */ 354 + /* int aSifsTime; */ 355 355 s32 aCCATime; 356 356 s32 aRxTxTurnaroundTime; 357 357 s32 aTxPLCPDelay; ··· 367 367 s32 aPLCPHeaderLength; 368 368 s32 aMPDUDurationFactor; 369 369 s32 aMPDUMaxLength; 370 - // int aCWmin; 371 - // int aCWmax; 370 + /* int aCWmin; */ 371 + /* int aCWmax; */ 372 372 }; 373 373 374 - //-- 11G -- 374 + /* -- 11G -- */ 375 375 struct ERP_Information_Element 376 376 { 377 377 u8 Element_ID; 378 378 u8 Length; 379 - #ifdef _BIG_ENDIAN_ //20060926 add by anson's endian 380 - u8 Reserved:5; //20060926 add by anson 379 + #ifdef _BIG_ENDIAN_ /* 20060926 add by anson's endian */ 380 + u8 Reserved:5; /* 20060926 add by anson */ 381 381 u8 Barker_Preamble_Mode:1; 382 382 u8 Use_Protection:1; 383 383 u8 NonERP_Present:1; ··· 396 396 u8 ExtendedSupportedRates[255]; 397 397 }__attribute__ ((packed)); 398 398 399 - //WPA(802.11i draft 3.0) 399 + /* WPA(802.11i draft 3.0) */ 400 400 #define VERSION_WPA 1 401 401 #ifdef _WPA2_ 402 402 #define VERSION_WPA2 1 403 - #endif //end def _WPA2_ 404 - #define OUI_WPA 0x00F25000 //WPA2.0 OUI=00:50:F2, the MSB is reserved for suite type 403 + #endif /* end def _WPA2_ */ 404 + #define OUI_WPA 0x00F25000 /* WPA2.0 OUI=00:50:F2, the MSB is reserved for suite type */ 405 405 #ifdef _WPA2_ 406 - #define OUI_WPA2 0x00AC0F00 // for wpa2 change to 0x00ACOF04 by Ws 26/04/04 407 - #endif //end def _WPA2_ 406 + #define OUI_WPA2 0x00AC0F00 /* for wpa2 change to 0x00ACOF04 by Ws 26/04/04 */ 407 + #endif /* end def _WPA2_ */ 408 408 409 409 #define OUI_WPA_ADDITIONAL 0x01 410 - #define WLAN_MIN_RSN_WPA_LENGTH 6 //added by ws 09/10/04 410 + #define WLAN_MIN_RSN_WPA_LENGTH 6 /* added by ws 09/10/04 */ 411 411 #ifdef _WPA2_ 412 - #define WLAN_MIN_RSN_WPA2_LENGTH 2 // Fix to 2 09/14/05 413 - #endif //end def _WPA2_ 412 + #define WLAN_MIN_RSN_WPA2_LENGTH 2 /* Fix to 2 09/14/05 */ 413 + #endif /* end def _WPA2_ */ 414 414 415 415 #define oui_wpa (u32)(OUI_WPA|OUI_WPA_ADDITIONAL) 416 416 417 - #define WPA_OUI_BIG ((u32) 0x01F25000)//added by ws 09/23/04 418 - #define WPA_OUI_LITTLE ((u32) 0x01F25001)//added by ws 09/23/04 417 + #define WPA_OUI_BIG ((u32) 0x01F25000)/* added by ws 09/23/04 */ 418 + #define WPA_OUI_LITTLE ((u32) 0x01F25001)/* added by ws 09/23/04 */ 419 419 420 - #define WPA_WPS_OUI cpu_to_le32(0x04F25000) // 20061108 For WPS. It's little endian. Big endian is 0x0050F204 420 + #define WPA_WPS_OUI cpu_to_le32(0x04F25000) /* 20061108 For WPS. It's little endian. Big endian is 0x0050F204 */ 421 421 422 - //-----WPA2----- 422 + /* -----WPA2----- */ 423 423 #ifdef _WPA2_ 424 424 #define WPA2_OUI_BIG ((u32)0x01AC0F00) 425 425 #define WPA2_OUI_LITTLE ((u32)0x01AC0F01) 426 - #endif //end def _WPA2_ 426 + #endif /* end def _WPA2_ */ 427 427 428 - //Authentication suite 429 - #define OUI_AUTH_WPA_NONE 0x00 //for WPA_NONE 428 + /* Authentication suite */ 429 + #define OUI_AUTH_WPA_NONE 0x00 /* for WPA_NONE */ 430 430 #define OUI_AUTH_8021X 0x01 431 431 #define OUI_AUTH_PSK 0x02 432 - //Cipher suite 433 - #define OUI_CIPHER_GROUP_KEY 0x00 //added by ws 05/21/04 432 + /* Cipher suite */ 433 + #define OUI_CIPHER_GROUP_KEY 0x00 /* added by ws 05/21/04 */ 434 434 #define OUI_CIPHER_WEP_40 0x01 435 435 #define OUI_CIPHER_TKIP 0x02 436 436 #define OUI_CIPHER_CCMP 0x04 ··· 466 466 struct suite_selector AuthKeyMngtSuite[1]; 467 467 }__attribute__ ((packed)); 468 468 469 - //-- WPA2 -- 469 + /* -- WPA2 -- */ 470 470 struct RSN_Capability_Element 471 471 { 472 472 union 473 473 { 474 474 u16 __attribute__ ((packed)) wValue; 475 - #ifdef _BIG_ENDIAN_ //20060927 add by anson's endian 475 + #ifdef _BIG_ENDIAN_ /* 20060927 add by anson's endian */ 476 476 struct _RSN_Capability 477 477 { 478 - u16 __attribute__ ((packed)) Reserved2 : 8; // 20051201 478 + u16 __attribute__ ((packed)) Reserved2 : 8; /* 20051201 */ 479 479 u16 __attribute__ ((packed)) Reserved1 : 2; 480 480 u16 __attribute__ ((packed)) GTK_Replay_Counter : 2; 481 481 u16 __attribute__ ((packed)) PTK_Replay_Counter : 2; ··· 490 490 u16 __attribute__ ((packed)) PTK_Replay_Counter : 2; 491 491 u16 __attribute__ ((packed)) GTK_Replay_Counter : 2; 492 492 u16 __attribute__ ((packed)) Reserved1 : 2; 493 - u16 __attribute__ ((packed)) Reserved2 : 8; // 20051201 493 + u16 __attribute__ ((packed)) Reserved2 : 8; /* 20051201 */ 494 494 }__attribute__ ((packed)) RSN_Capability; 495 495 #endif 496 496 ··· 527 527 struct pmkid pmkid[16]; 528 528 }__attribute__ ((packed)); 529 529 530 - #endif //enddef _WPA2_ 531 - //============================================================ 530 + #endif /* enddef _WPA2_ */ 531 + /*============================================================ 532 532 // MAC Frame structure (different type) and subfield structure 533 - //============================================================ 533 + //============================================================*/ 534 534 struct MAC_frame_control 535 535 { 536 - u8 mac_frame_info; // a combination of the [Protocol Version, Control Type, Control Subtype] 537 - #ifdef _BIG_ENDIAN_ //20060927 add by anson's endian 536 + u8 mac_frame_info; /* a combination of the [Protocol Version, Control Type, Control Subtype]*/ 537 + #ifdef _BIG_ENDIAN_ /* 20060927 add by anson's endian */ 538 538 u8 order:1; 539 539 u8 WEP:1; 540 540 u8 more_data:1; ··· 556 556 } __attribute__ ((packed)); 557 557 558 558 struct Management_Frame { 559 - struct MAC_frame_control frame_control; // 2B, ToDS,FromDS,MoreFrag,MoreData,Order=0 559 + struct MAC_frame_control frame_control; /* 2B, ToDS,FromDS,MoreFrag,MoreData,Order=0 */ 560 560 u16 duration; 561 - u8 DA[MAC_ADDR_LENGTH]; // Addr1 562 - u8 SA[MAC_ADDR_LENGTH]; // Addr2 563 - u8 BSSID[MAC_ADDR_LENGTH]; // Addr3 561 + u8 DA[MAC_ADDR_LENGTH]; /* Addr1 */ 562 + u8 SA[MAC_ADDR_LENGTH]; /* Addr2 */ 563 + u8 BSSID[MAC_ADDR_LENGTH]; /* Addr3 */ 564 564 u16 Sequence_Control; 565 - // Management Frame Body <= 325 bytes 566 - // FCS 4 bytes 565 + /* Management Frame Body <= 325 bytes */ 566 + /* FCS 4 bytes */ 567 567 }__attribute__ ((packed)); 568 568 569 - // SW-MAC don't Tx/Rx Control-Frame, HW-MAC do it. 569 + /* SW-MAC don't Tx/Rx Control-Frame, HW-MAC do it. */ 570 570 struct Control_Frame { 571 - struct MAC_frame_control frame_control; // ToDS,FromDS,MoreFrag,Retry,MoreData,WEP,Order=0 571 + struct MAC_frame_control frame_control; /* ToDS,FromDS,MoreFrag,Retry,MoreData,WEP,Order=0 */ 572 572 u16 duration; 573 573 u8 RA[MAC_ADDR_LENGTH]; 574 574 u8 TA[MAC_ADDR_LENGTH]; ··· 582 582 u8 Addr2[MAC_ADDR_LENGTH]; 583 583 u8 Addr3[MAC_ADDR_LENGTH]; 584 584 u16 Sequence_Control; 585 - u8 Addr4[MAC_ADDR_LENGTH]; // only exist when ToDS=FromDS=1 586 - // Data Frame Body <= 2312 587 - // FCS 585 + u8 Addr4[MAC_ADDR_LENGTH]; /* only exist when ToDS=FromDS=1 */ 586 + /* Data Frame Body <= 2312 */ 587 + /* FCS */ 588 588 }__attribute__ ((packed)); 589 589 590 590 struct Disassociation_Frame_Body ··· 596 596 { 597 597 u16 capability_information; 598 598 u16 listenInterval; 599 - u8 Current_AP_Address[MAC_ADDR_LENGTH];//for reassociation only 600 - // SSID (2+32 bytes) 601 - // Supported_Rates (2+8 bytes) 599 + u8 Current_AP_Address[MAC_ADDR_LENGTH];/* for reassociation only */ 600 + /* SSID (2+32 bytes) */ 601 + /* Supported_Rates (2+8 bytes) */ 602 602 }__attribute__ ((packed)); 603 603 604 604 struct Association_Response_Frame_Body ··· 617 617 // SSID (2+32 bytes) 618 618 // Supported_Rates (2+8 bytes) 619 619 };*/ 620 - // eliminated by WS 07/22/04 comboined with associateion request frame. 620 + /* eliminated by WS 07/22/04 comboined with associateion request frame. */ 621 621 622 622 struct Reassociation_Response_Frame_Body 623 623 { ··· 638 638 u16 Timestamp; 639 639 u16 Beacon_Interval; 640 640 u16 Capability_Information; 641 - // SSID 641 + /* SSID 642 642 // Supported_Rates 643 643 // PHY parameter Set (DS Parameters) 644 644 // CF parameter Set 645 - // IBSS parameter Set 645 + // IBSS parameter Set */ 646 646 }__attribute__ ((packed)); 647 647 648 648 struct Authentication_Frame_Body ··· 650 650 u16 algorithmNumber; 651 651 u16 sequenceNumber; 652 652 u16 statusCode; 653 - // NB: don't include ChallengeText in this structure 654 - // struct Challenge_Text_Element sChallengeTextElement; // wkchen added 653 + /* NB: don't include ChallengeText in this structure 654 + // struct Challenge_Text_Element sChallengeTextElement; // wkchen added */ 655 655 }__attribute__ ((packed)); 656 656 657 657 658 - #endif // _MAC_Structure_H_ 658 + #endif /* _MAC_Structure_H_ */ 659 659 660 660