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

Staging: winbond: mlme_s.h Coding style fixes

I fixed all problems found by checkpatch.pl except typedefs.

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
1a48ba14 5ea05255

+128 -136
+128 -136
drivers/staging/winbond/mlme_s.h
··· 7 7 #include "mac_structures.h" 8 8 #include "mds_s.h" 9 9 10 - //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 11 - // Mlme.h 12 - // Define the related definitions of MLME module 13 - // history -- 01/14/03' created 14 - // 15 - //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 10 + /* 11 + * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 12 + * Mlme.h 13 + * Define the related definitions of MLME module 14 + * 15 + * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 16 + */ 16 17 17 - #define AUTH_REJECT_REASON_CHALLENGE_FAIL 1 18 + #define AUTH_REJECT_REASON_CHALLENGE_FAIL 1 18 19 19 - //====== the state of MLME module 20 - #define INACTIVE 0x0 21 - #define IDLE_SCAN 0x1 20 + /* the state of MLME module */ 21 + #define INACTIVE 0x0 22 + #define IDLE_SCAN 0x1 22 23 23 - //====== the state of MLME/ESS module 24 - #define STATE_1 0x2 25 - #define AUTH_REQ 0x3 26 - #define AUTH_WEP 0x4 27 - #define STATE_2 0x5 28 - #define ASSOC_REQ 0x6 29 - #define STATE_3 0x7 24 + /* the state of MLME/ESS module */ 25 + #define STATE_1 0x2 26 + #define AUTH_REQ 0x3 27 + #define AUTH_WEP 0x4 28 + #define STATE_2 0x5 29 + #define ASSOC_REQ 0x6 30 + #define STATE_3 0x7 30 31 31 - //====== the state of MLME/IBSS module 32 + /* the state of MLME/IBSS module */ 32 33 #define IBSS_JOIN_SYNC 0x8 33 34 #define IBSS_AUTH_REQ 0x9 34 35 #define IBSS_AUTH_CHANLGE 0xa ··· 39 38 40 39 41 40 42 - //========================================= 43 - //depend on D5C(MAC timing control 03 register): MaxTxMSDULifeTime default 0x80000us 44 - #define AUTH_FAIL_TIMEOUT 550 45 - #define ASSOC_FAIL_TIMEOUT 550 41 + /* 42 + * ========================================= 43 + * depend on D5C(MAC timing control 03 register): 44 + * MaxTxMSDULifeTime default 0x80000us 45 + */ 46 + #define AUTH_FAIL_TIMEOUT 550 47 + #define ASSOC_FAIL_TIMEOUT 550 46 48 #define REASSOC_FAIL_TIMEOUT 550 47 49 50 + /* MLME task global CONSTANTS, STRUCTURE, variables */ 51 + 52 + /* ========================================= 53 + * enum_ResultCode -- 54 + * Result code returned from MLME to SME. 55 + * ========================================= 56 + */ 57 + #define MLME_SUCCESS 0 /* follow spec. */ 58 + #define INVALID_PARAMETERS 1 /* Not following spec. */ 59 + #define NOT_SUPPPORTED 2 60 + #define TIMEOUT 3 61 + #define TOO_MANY_SIMULTANEOUS_REQUESTS 4 62 + #define REFUSED 5 63 + #define BSS_ALREADY_STARTED_OR_JOINED 6 64 + #define TRANSMIT_FRAME_FAIL 7 65 + #define NO_BSS_FOUND 8 66 + #define RETRY 9 67 + #define GIVE_UP 10 48 68 49 69 50 - // 51 - // MLME task global CONSTANTS, STRUCTURE, variables 52 - // 53 - 54 - 55 - ///////////////////////////////////////////////////////////// 56 - // enum_ResultCode -- 57 - // Result code returned from MLME to SME. 58 - // 59 - ///////////////////////////////////////////////////////////// 60 - // PD43 20030829 Modifiled 61 - //#define SUCCESS 0 62 - #define MLME_SUCCESS 0 //follow spec. 63 - #define INVALID_PARAMETERS 1 //Not following spec. 64 - #define NOT_SUPPPORTED 2 65 - #define TIMEOUT 3 66 - #define TOO_MANY_SIMULTANEOUS_REQUESTS 4 67 - #define REFUSED 5 68 - #define BSS_ALREADY_STARTED_OR_JOINED 6 69 - #define TRANSMIT_FRAME_FAIL 7 70 - #define NO_BSS_FOUND 8 71 - #define RETRY 9 72 - #define GIVE_UP 10 73 - 74 - 75 - #define OPEN_AUTH 0 76 - #define SHARE_AUTH 1 77 - #define ANY_AUTH 2 78 - #define WPA_AUTH 3 //for WPA 79 - #define WPAPSK_AUTH 4 80 - #define WPANONE_AUTH 5 81 - ///////////////////////////////////////////// added by ws 04/19/04 70 + #define OPEN_AUTH 0 71 + #define SHARE_AUTH 1 72 + #define ANY_AUTH 2 73 + #define WPA_AUTH 3 /* for WPA */ 74 + #define WPAPSK_AUTH 4 75 + #define WPANONE_AUTH 5 82 76 #ifdef _WPA2_ 83 - #define WPA2_AUTH 6//for WPA2 84 - #define WPA2PSK_AUTH 7 85 - #endif //end def _WPA2_ 77 + #define WPA2_AUTH 6 /* for WPA2 */ 78 + #define WPA2PSK_AUTH 7 79 + #endif /* end def _WPA2_ */ 86 80 87 - ////////////////////////////////////////////////////////////////// 88 - //define the msg type of MLME module 89 - ////////////////////////////////////////////////////////////////// 90 - //-------------------------------------------------------- 91 - //from SME 81 + /* 82 + * ========================================= 83 + * define the msg type of MLME module 84 + * ========================================= 85 + */ 92 86 93 - #define MLMEMSG_AUTH_REQ 0x0b 94 - #define MLMEMSG_DEAUTH_REQ 0x0c 95 - #define MLMEMSG_ASSOC_REQ 0x0d 96 - #define MLMEMSG_REASSOC_REQ 0x0e 97 - #define MLMEMSG_DISASSOC_REQ 0x0f 98 - #define MLMEMSG_START_IBSS_REQ 0x10 99 - #define MLMEMSG_IBSS_NET_CFM 0x11 87 + /* from SME */ 88 + #define MLMEMSG_AUTH_REQ 0x0b 89 + #define MLMEMSG_DEAUTH_REQ 0x0c 90 + #define MLMEMSG_ASSOC_REQ 0x0d 91 + #define MLMEMSG_REASSOC_REQ 0x0e 92 + #define MLMEMSG_DISASSOC_REQ 0x0f 93 + #define MLMEMSG_START_IBSS_REQ 0x10 94 + #define MLMEMSG_IBSS_NET_CFM 0x11 100 95 101 - //from RX : 102 - #define MLMEMSG_RCV_MLMEFRAME 0x20 103 - #define MLMEMSG_RCV_ASSOCRSP 0x22 104 - #define MLMEMSG_RCV_REASSOCRSP 0x24 105 - #define MLMEMSG_RCV_DISASSOC 0x2b 106 - #define MLMEMSG_RCV_AUTH 0x2c 107 - #define MLMEMSG_RCV_DEAUTH 0x2d 108 - 109 - 110 - //from TX callback 111 - #define MLMEMSG_TX_CALLBACK 0x40 112 - #define MLMEMSG_ASSOCREQ_CALLBACK 0x41 113 - #define MLMEMSG_REASSOCREQ_CALLBACK 0x43 114 - #define MLMEMSG_DISASSOC_CALLBACK 0x4a 115 - #define MLMEMSG_AUTH_CALLBACK 0x4c 116 - #define MLMEMSG_DEAUTH_CALLBACK 0x4d 117 - 118 - //#define MLMEMSG_JOIN_FAIL 4 119 - //#define MLMEMSG_AUTHEN_FAIL 18 120 - #define MLMEMSG_TIMEOUT 0x50 121 - 122 - /////////////////////////////////////////////////////////////////////////// 123 - //Global data structures 124 - #define MAX_NUM_TX_MMPDU 2 125 - #define MAX_MMPDU_SIZE 1512 126 - #define MAX_NUM_RX_MMPDU 6 96 + /* from RX */ 97 + #define MLMEMSG_RCV_MLMEFRAME 0x20 98 + #define MLMEMSG_RCV_ASSOCRSP 0x22 99 + #define MLMEMSG_RCV_REASSOCRSP 0x24 100 + #define MLMEMSG_RCV_DISASSOC 0x2b 101 + #define MLMEMSG_RCV_AUTH 0x2c 102 + #define MLMEMSG_RCV_DEAUTH 0x2d 127 103 128 104 129 - /////////////////////////////////////////////////////////////////////////// 130 - //MACRO 131 - #define boMLME_InactiveState(_AA_) (_AA_->wState==INACTIVE) 132 - #define boMLME_IdleScanState(_BB_) (_BB_->wState==IDLE_SCAN) 133 - #define boMLME_FoundSTAinfo(_CC_) (_CC_->wState>=IDLE_SCAN) 105 + /* from TX callback */ 106 + #define MLMEMSG_TX_CALLBACK 0x40 107 + #define MLMEMSG_ASSOCREQ_CALLBACK 0x41 108 + #define MLMEMSG_REASSOCREQ_CALLBACK 0x43 109 + #define MLMEMSG_DISASSOC_CALLBACK 0x4a 110 + #define MLMEMSG_AUTH_CALLBACK 0x4c 111 + #define MLMEMSG_DEAUTH_CALLBACK 0x4d 134 112 135 - typedef struct _MLME_FRAME 136 - { 137 - //NDIS_PACKET MLME_Packet; 138 - s8 * pMMPDU; 139 - u16 len; 140 - u8 DataType; 141 - u8 IsInUsed; 113 + #define MLMEMSG_TIMEOUT 0x50 114 + 115 + /* 116 + * ============================================== 117 + * Global data structures 118 + * ============================================== 119 + */ 120 + #define MAX_NUM_TX_MMPDU 2 121 + #define MAX_MMPDU_SIZE 1512 122 + #define MAX_NUM_RX_MMPDU 6 123 + 124 + 125 + /* 126 + * ============================================== 127 + * MACRO 128 + * ============================================== 129 + */ 130 + #define boMLME_InactiveState(_AA_) (_AA_->wState == INACTIVE) 131 + #define boMLME_IdleScanState(_BB_) (_BB_->wState == IDLE_SCAN) 132 + #define boMLME_FoundSTAinfo(_CC_) (_CC_->wState >= IDLE_SCAN) 133 + 134 + typedef struct _MLME_FRAME { 135 + s8 *pMMPDU; 136 + u16 len; 137 + u8 DataType; 138 + u8 IsInUsed; 142 139 143 140 spinlock_t MLMESpinLock; 144 141 145 - u8 TxMMPDU[MAX_NUM_TX_MMPDU][MAX_MMPDU_SIZE]; 146 - u8 TxMMPDUInUse[ (MAX_NUM_TX_MMPDU+3) & ~0x03 ]; 142 + u8 TxMMPDU[MAX_NUM_TX_MMPDU][MAX_MMPDU_SIZE]; 143 + u8 TxMMPDUInUse[(MAX_NUM_TX_MMPDU + 3) & ~0x03]; 147 144 148 145 u16 wNumTxMMPDU; 149 146 u16 wNumTxMMPDUDiscarded; 150 147 151 - u8 RxMMPDU[MAX_NUM_RX_MMPDU][MAX_MMPDU_SIZE]; 152 - u8 SaveRxBufSlotInUse[ (MAX_NUM_RX_MMPDU+3) & ~0x03 ]; 148 + u8 RxMMPDU[MAX_NUM_RX_MMPDU][MAX_MMPDU_SIZE]; 149 + u8 SaveRxBufSlotInUse[(MAX_NUM_RX_MMPDU + 3) & ~0x03]; 153 150 154 151 u16 wNumRxMMPDU; 155 152 u16 wNumRxMMPDUDiscarded; 156 153 157 - u16 wNumRxMMPDUInMLME; // Number of the Rx MMPDU 158 - u16 reserved_1; // in MLME. 159 - // excluding the discarded 154 + u16 wNumRxMMPDUInMLME; /* Number of the Rx MMPDU */ 155 + u16 reserved_1; /* in MLME. */ 156 + /* excluding the discarded */ 160 157 } MLME_FRAME, *psMLME_FRAME; 161 158 162 159 typedef struct _AUTHREQ { 163 160 164 - u8 peerMACaddr[MAC_ADDR_LENGTH]; 165 - u16 wAuthAlgorithm; 166 - 161 + u8 peerMACaddr[MAC_ADDR_LENGTH]; 162 + u16 wAuthAlgorithm; 167 163 } MLME_AUTHREQ_PARA, *psMLME_AUTHREQ_PARA; 168 164 169 165 typedef struct _ASSOCREQ { 170 - u8 PeerSTAAddr[MAC_ADDR_LENGTH]; 171 - u16 CapabilityInfo; 172 - u16 ListenInterval; 173 - 174 - }__attribute__ ((packed)) MLME_ASSOCREQ_PARA, *psMLME_ASSOCREQ_PARA; 166 + u8 PeerSTAAddr[MAC_ADDR_LENGTH]; 167 + u16 CapabilityInfo; 168 + u16 ListenInterval; 169 + } __attribute__ ((packed)) MLME_ASSOCREQ_PARA, *psMLME_ASSOCREQ_PARA; 175 170 176 171 typedef struct _REASSOCREQ { 177 - u8 NewAPAddr[MAC_ADDR_LENGTH]; 178 - u16 CapabilityInfo; 179 - u16 ListenInterval; 180 - 181 - }__attribute__ ((packed)) MLME_REASSOCREQ_PARA, *psMLME_REASSOCREQ_PARA; 172 + u8 NewAPAddr[MAC_ADDR_LENGTH]; 173 + u16 CapabilityInfo; 174 + u16 ListenInterval; 175 + } __attribute__ ((packed)) MLME_REASSOCREQ_PARA, *psMLME_REASSOCREQ_PARA; 182 176 183 177 typedef struct _MLMECALLBACK { 184 - 185 - u8 *psFramePtr; 186 - u8 bResult; 187 - 178 + u8 *psFramePtr; 179 + u8 bResult; 188 180 } MLME_TXCALLBACK, *psMLME_TXCALLBACK; 189 181 190 - typedef struct _RXDATA 191 - { 182 + typedef struct _RXDATA { 192 183 s32 FrameLength; 193 - u8 __attribute__ ((packed)) *pbFramePtr; 194 - 195 - }__attribute__ ((packed)) RXDATA, *psRXDATA; 184 + u8 __attribute__ ((packed)) *pbFramePtr; 185 + } __attribute__ ((packed)) RXDATA, *psRXDATA; 196 186 197 187 #endif