Parcourir la source

Staging: rt28x0: fix comments in *.h files

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bartlomiej Zolnierkiewicz il y a 15 ans
Parent
commit
cc27706961

+ 3 - 3
drivers/staging/rt2860/ap.h

@@ -40,7 +40,7 @@
 #ifndef __AP_H__
 #define __AP_H__
 
-// ap_wpa.c
+/* ap_wpa.c */
 VOID WpaStateMachineInit(IN PRTMP_ADAPTER pAd,
 			 IN STATE_MACHINE * Sm, OUT STATE_MACHINE_FUNC Trans[]);
 
@@ -48,7 +48,7 @@ VOID WpaStateMachineInit(IN PRTMP_ADAPTER pAd,
 VOID BeaconUpdateExec(IN PVOID SystemSpecific1,
 		      IN PVOID FunctionContext,
 		      IN PVOID SystemSpecific2, IN PVOID SystemSpecific3);
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
 
 VOID RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack);
 
@@ -63,4 +63,4 @@ BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd,
 
 MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, IN PUCHAR pAddr);
 
-#endif // __AP_H__
+#endif /* __AP_H__ */

+ 0 - 1
drivers/staging/rt2860/chip/mac_pci.h

@@ -178,7 +178,6 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
 
 #define NEED_QUEUE_BACK_FOR_AGG(pAd, QueIdx, freeNum, _TxFrameType) \
 		(((freeNum != (TX_RING_SIZE-1)) && (pAd->TxSwQueue[QueIdx].Number == 0)) || (freeNum<3))
-		//(((freeNum) != (TX_RING_SIZE-1)) && (pAd->TxSwQueue[QueIdx].Number == 1 /*0*/))
 
 #define HAL_KickOutMgmtTx(_pAd, _QueIdx, _pPacket, _pSrcBufVA, _SrcBufLen)	\
 			RtmpPCIMgmtKickOut(_pAd, _QueIdx, _pPacket, _pSrcBufVA, _SrcBufLen)

+ 70 - 70
drivers/staging/rt2860/chip/mac_usb.h

@@ -46,18 +46,18 @@
 #define USB_CYC_CFG				0x02a4
 
 #define BEACON_RING_SIZE		2
-#define MGMTPIPEIDX				0	// EP6 is highest priority
+#define MGMTPIPEIDX				0	/* EP6 is highest priority */
 
-#define RTMP_PKT_TAIL_PADDING	11	// 3(max 4 byte padding) + 4 (last packet padding) + 4 (MaxBulkOutsize align padding)
+#define RTMP_PKT_TAIL_PADDING	11	/* 3(max 4 byte padding) + 4 (last packet padding) + 4 (MaxBulkOutsize align padding) */
 
 #define fRTMP_ADAPTER_NEED_STOP_TX		\
 		(fRTMP_ADAPTER_NIC_NOT_EXIST | fRTMP_ADAPTER_HALT_IN_PROGRESS |	\
 		 fRTMP_ADAPTER_RESET_IN_PROGRESS | fRTMP_ADAPTER_BULKOUT_RESET | \
 		 fRTMP_ADAPTER_RADIO_OFF | fRTMP_ADAPTER_REMOVE_IN_PROGRESS)
 
-//
-// RXINFO appends at the end of each rx packet.
-//
+/* */
+/* RXINFO appends at the end of each rx packet. */
+/* */
 #define RXINFO_SIZE				4
 #define RT2870_RXDMALEN_FIELD_SIZE	4
 
@@ -66,17 +66,17 @@ typedef struct PACKED _RXINFO_STRUC {
 	UINT32 DATA:1;
 	UINT32 NULLDATA:1;
 	UINT32 FRAG:1;
-	UINT32 U2M:1;		// 1: this RX frame is unicast to me
-	UINT32 Mcast:1;		// 1: this is a multicast frame
-	UINT32 Bcast:1;		// 1: this is a broadcast frame
-	UINT32 MyBss:1;		// 1: this frame belongs to the same BSSID
-	UINT32 Crc:1;		// 1: CRC error
-	UINT32 CipherErr:2;	// 0: decryption okay, 1:ICV error, 2:MIC error, 3:KEY not valid
-	UINT32 AMSDU:1;		// rx with 802.3 header, not 802.11 header.
+	UINT32 U2M:1;		/* 1: this RX frame is unicast to me */
+	UINT32 Mcast:1;		/* 1: this is a multicast frame */
+	UINT32 Bcast:1;		/* 1: this is a broadcast frame */
+	UINT32 MyBss:1;		/* 1: this frame belongs to the same BSSID */
+	UINT32 Crc:1;		/* 1: CRC error */
+	UINT32 CipherErr:2;	/* 0: decryption okay, 1:ICV error, 2:MIC error, 3:KEY not valid */
+	UINT32 AMSDU:1;		/* rx with 802.3 header, not 802.11 header. */
 	UINT32 HTC:1;
 	UINT32 RSSI:1;
 	UINT32 L2PAD:1;
-	UINT32 AMPDU:1;		// To be moved
+	UINT32 AMPDU:1;		/* To be moved */
 	UINT32 Decrypted:1;
 	UINT32 PlcpRssil:1;
 	UINT32 CipherAlg:1;
@@ -84,35 +84,35 @@ typedef struct PACKED _RXINFO_STRUC {
 	UINT32 PlcpSignal:12;
 } RXINFO_STRUC, *PRXINFO_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC;
 
-//
-// TXINFO
-//
+/* */
+/* TXINFO */
+/* */
 #define TXINFO_SIZE				4
 
 typedef struct _TXINFO_STRUC {
-	// Word 0
-	UINT32 USBDMATxPktLen:16;	//used ONLY in USB bulk Aggregation,  Total byte counts of all sub-frame.
+	/* Word 0 */
+	UINT32 USBDMATxPktLen:16;	/*used ONLY in USB bulk Aggregation,  Total byte counts of all sub-frame. */
 	UINT32 rsv:8;
-	UINT32 WIV:1;		// Wireless Info Valid. 1 if Driver already fill WI,  o if DMA needs to copy WI to correctposition
-	UINT32 QSEL:2;		// select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA
-	UINT32 SwUseLastRound:1;	// Software use.
-	UINT32 rsv2:2;		// Software use.
-	UINT32 USBDMANextVLD:1;	//used ONLY in USB bulk Aggregation, NextValid
-	UINT32 USBDMATxburst:1;	//used ONLY in USB bulk Aggre. Force USB DMA transmit frame from current selected endpoint
+	UINT32 WIV:1;		/* Wireless Info Valid. 1 if Driver already fill WI,  o if DMA needs to copy WI to correctposition */
+	UINT32 QSEL:2;		/* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */
+	UINT32 SwUseLastRound:1;	/* Software use. */
+	UINT32 rsv2:2;		/* Software use. */
+	UINT32 USBDMANextVLD:1;	/*used ONLY in USB bulk Aggregation, NextValid */
+	UINT32 USBDMATxburst:1;	/*used ONLY in USB bulk Aggre. Force USB DMA transmit frame from current selected endpoint */
 } TXINFO_STRUC, *PTXINFO_STRUC;
 
-//
-// Management ring buffer format
-//
+/* */
+/* Management ring buffer format */
+/* */
 typedef struct _MGMT_STRUC {
 	BOOLEAN Valid;
 	PUCHAR pBuffer;
 	ULONG Length;
 } MGMT_STRUC, *PMGMT_STRUC;
 
-////////////////////////////////////////////////////////////////////////////
-// The TX_BUFFER structure forms the transmitted USB packet to the device
-////////////////////////////////////////////////////////////////////////////
+/*////////////////////////////////////////////////////////////////////////// */
+/* The TX_BUFFER structure forms the transmitted USB packet to the device */
+/*////////////////////////////////////////////////////////////////////////// */
 typedef struct __TX_BUFFER {
 	union {
 		UCHAR WirelessPacket[TX_BUFFER_NORMSIZE];
@@ -120,7 +120,7 @@ typedef struct __TX_BUFFER {
 		PSPOLL_FRAME PsPollPacket;
 		RTS_FRAME RTSFrame;
 	} field;
-	UCHAR Aggregation[4];	//Buffer for save Aggregation size.
+	UCHAR Aggregation[4];	/*Buffer for save Aggregation size. */
 } TX_BUFFER, *PTX_BUFFER;
 
 typedef struct __HTTX_BUFFER {
@@ -130,22 +130,22 @@ typedef struct __HTTX_BUFFER {
 		PSPOLL_FRAME PsPollPacket;
 		RTS_FRAME RTSFrame;
 	} field;
-	UCHAR Aggregation[4];	//Buffer for save Aggregation size.
+	UCHAR Aggregation[4];	/*Buffer for save Aggregation size. */
 } HTTX_BUFFER, *PHTTX_BUFFER;
 
-// used to track driver-generated write irps
+/* used to track driver-generated write irps */
 typedef struct _TX_CONTEXT {
-	PVOID pAd;		//Initialized in MiniportInitialize
-	PURB pUrb;		//Initialized in MiniportInitialize
-	PIRP pIrp;		//used to cancel pending bulk out.
-	//Initialized in MiniportInitialize
-	PTX_BUFFER TransferBuffer;	//Initialized in MiniportInitialize
+	PVOID pAd;		/*Initialized in MiniportInitialize */
+	PURB pUrb;		/*Initialized in MiniportInitialize */
+	PIRP pIrp;		/*used to cancel pending bulk out. */
+	/*Initialized in MiniportInitialize */
+	PTX_BUFFER TransferBuffer;	/*Initialized in MiniportInitialize */
 	ULONG BulkOutSize;
 	UCHAR BulkOutPipeId;
 	UCHAR SelfIdx;
 	BOOLEAN InUse;
-	BOOLEAN bWaitingBulkOut;	// at least one packet is in this TxContext, ready for making IRP anytime.
-	BOOLEAN bFullForBulkOut;	// all tx buffer are full , so waiting for tx bulkout.
+	BOOLEAN bWaitingBulkOut;	/* at least one packet is in this TxContext, ready for making IRP anytime. */
+	BOOLEAN bFullForBulkOut;	/* all tx buffer are full , so waiting for tx bulkout. */
 	BOOLEAN IRPPending;
 	BOOLEAN LastOne;
 	BOOLEAN bAggregatible;
@@ -153,18 +153,18 @@ typedef struct _TX_CONTEXT {
 	UCHAR Rsv[2];
 	ULONG DataOffset;
 	UINT TxRate;
-	dma_addr_t data_dma;	// urb dma on linux
+	dma_addr_t data_dma;	/* urb dma on linux */
 
 } TX_CONTEXT, *PTX_CONTEXT, **PPTX_CONTEXT;
 
-// used to track driver-generated write irps
+/* used to track driver-generated write irps */
 typedef struct _HT_TX_CONTEXT {
-	PVOID pAd;		//Initialized in MiniportInitialize
-	PURB pUrb;		//Initialized in MiniportInitialize
-	PIRP pIrp;		//used to cancel pending bulk out.
-	//Initialized in MiniportInitialize
-	PHTTX_BUFFER TransferBuffer;	//Initialized in MiniportInitialize
-	ULONG BulkOutSize;	// Indicate the total bulk-out size in bytes in one bulk-transmission
+	PVOID pAd;		/*Initialized in MiniportInitialize */
+	PURB pUrb;		/*Initialized in MiniportInitialize */
+	PIRP pIrp;		/*used to cancel pending bulk out. */
+	/*Initialized in MiniportInitialize */
+	PHTTX_BUFFER TransferBuffer;	/*Initialized in MiniportInitialize */
+	ULONG BulkOutSize;	/* Indicate the total bulk-out size in bytes in one bulk-transmission */
 	UCHAR BulkOutPipeId;
 	BOOLEAN IRPPending;
 	BOOLEAN LastOne;
@@ -173,33 +173,33 @@ typedef struct _HT_TX_CONTEXT {
 	BOOLEAN bCopySavePad;
 	UCHAR SavedPad[8];
 	UCHAR Header_802_3[LENGTH_802_3];
-	ULONG CurWritePosition;	// Indicate the buffer offset which packet will be inserted start from.
-	ULONG CurWriteRealPos;	// Indicate the buffer offset which packet now are writing to.
-	ULONG NextBulkOutPosition;	// Indicate the buffer start offset of a bulk-transmission
-	ULONG ENextBulkOutPosition;	// Indicate the buffer end offset of a bulk-transmission
+	ULONG CurWritePosition;	/* Indicate the buffer offset which packet will be inserted start from. */
+	ULONG CurWriteRealPos;	/* Indicate the buffer offset which packet now are writing to. */
+	ULONG NextBulkOutPosition;	/* Indicate the buffer start offset of a bulk-transmission */
+	ULONG ENextBulkOutPosition;	/* Indicate the buffer end offset of a bulk-transmission */
 	UINT TxRate;
-	dma_addr_t data_dma;	// urb dma on linux
+	dma_addr_t data_dma;	/* urb dma on linux */
 } HT_TX_CONTEXT, *PHT_TX_CONTEXT, **PPHT_TX_CONTEXT;
 
-//
-// Structure to keep track of receive packets and buffers to indicate
-// receive data to the protocol.
-//
+/* */
+/* Structure to keep track of receive packets and buffers to indicate */
+/* receive data to the protocol. */
+/* */
 typedef struct _RX_CONTEXT {
 	PUCHAR TransferBuffer;
 	PVOID pAd;
-	PIRP pIrp;		//used to cancel pending bulk in.
+	PIRP pIrp;		/*used to cancel pending bulk in. */
 	PURB pUrb;
-	//These 2 Boolean shouldn't both be 1 at the same time.
-	ULONG BulkInOffset;	// number of packets waiting for reordering .
-//      BOOLEAN                         ReorderInUse;   // At least one packet in this buffer are in reordering buffer and wait for receive indication
-	BOOLEAN bRxHandling;	// Notify this packet is being process now.
-	BOOLEAN InUse;		// USB Hardware Occupied. Wait for USB HW to put packet.
-	BOOLEAN Readable;	// Receive Complete back. OK for driver to indicate receiving packet.
-	BOOLEAN IRPPending;	// TODO: To be removed
+	/*These 2 Boolean shouldn't both be 1 at the same time. */
+	ULONG BulkInOffset;	/* number of packets waiting for reordering . */
+/*      BOOLEAN                         ReorderInUse;   // At least one packet in this buffer are in reordering buffer and wait for receive indication */
+	BOOLEAN bRxHandling;	/* Notify this packet is being process now. */
+	BOOLEAN InUse;		/* USB Hardware Occupied. Wait for USB HW to put packet. */
+	BOOLEAN Readable;	/* Receive Complete back. OK for driver to indicate receiving packet. */
+	BOOLEAN IRPPending;	/* TODO: To be removed */
 	atomic_t IrpLock;
 	NDIS_SPIN_LOCK RxContextLock;
-	dma_addr_t data_dma;	// urb dma on linux
+	dma_addr_t data_dma;	/* urb dma on linux */
 } RX_CONTEXT, *PRX_CONTEXT;
 
 /******************************************************************************
@@ -207,9 +207,9 @@ typedef struct _RX_CONTEXT {
 	USB Frimware Related MACRO
 
 ******************************************************************************/
-// 8051 firmware image for usb - use last-half base address = 0x3000
+/* 8051 firmware image for usb - use last-half base address = 0x3000 */
 #define FIRMWARE_IMAGE_BASE			0x3000
-#define MAX_FIRMWARE_IMAGE_SIZE		0x1000	// 4kbyte
+#define MAX_FIRMWARE_IMAGE_SIZE		0x1000	/* 4kbyte */
 
 #define RTMP_WRITE_FIRMWARE(_pAd, _pFwImage, _FwLen)		\
 	RTUSBFirmwareWrite(_pAd, _pFwImage, _FwLen)
@@ -278,7 +278,7 @@ typedef struct _RX_CONTEXT {
 #define HAL_KickOutNullFrameTx(_pAd, _QueIdx, _pNullFrame, _frameLen)	\
 			RtmpUSBNullFrameKickOut(_pAd, _QueIdx, _pNullFrame, _frameLen)
 
-#define GET_TXRING_FREENO(_pAd, _QueIdx)	(_QueIdx)	//(_pAd->TxRing[_QueIdx].TxSwFreeIdx)
+#define GET_TXRING_FREENO(_pAd, _QueIdx)	(_QueIdx)	/*(_pAd->TxRing[_QueIdx].TxSwFreeIdx) */
 #define GET_MGMTRING_FREENO(_pAd)			(_pAd->MgmtRing.TxSwFreeIdx)
 
 /* ----------------- RX Related MACRO ----------------- */
@@ -344,4 +344,4 @@ typedef struct _RX_CONTEXT {
 #define RTMP_MLME_RADIO_OFF(pAd) \
     RT28xxUsbMlmeRadioOFF(pAd);
 
-#endif //__MAC_USB_H__ //
+#endif /*__MAC_USB_H__ // */

+ 6 - 6
drivers/staging/rt2860/chip/rt2860.h

@@ -38,17 +38,17 @@
 #error "For RT2880, you should define the compile flag -DRTMP_MAC_PCI"
 #endif
 
-//
-// Device ID & Vendor ID, these values should match EEPROM value
-//
+/* */
+/* Device ID & Vendor ID, these values should match EEPROM value */
+/* */
 #define NIC2860_PCI_DEVICE_ID	0x0601
 #define NIC2860_PCIe_DEVICE_ID	0x0681
-#define NIC2760_PCI_DEVICE_ID	0x0701	// 1T/2R Cardbus ???
-#define NIC2790_PCIe_DEVICE_ID  0x0781	// 1T/2R miniCard
+#define NIC2760_PCI_DEVICE_ID	0x0701	/* 1T/2R Cardbus ??? */
+#define NIC2790_PCIe_DEVICE_ID  0x0781	/* 1T/2R miniCard */
 
 #define VEN_AWT_PCIe_DEVICE_ID	0x1059
 #define VEN_AWT_PCI_VENDOR_ID		0x1A3B
 
 #define EDIMAX_PCI_VENDOR_ID		0x1432
 
-#endif //__RT2860_H__ //
+#endif /*__RT2860_H__ // */

+ 3 - 3
drivers/staging/rt2860/chip/rt2870.h

@@ -40,7 +40,7 @@
 #include "../rtmp_type.h"
 #include "mac_usb.h"
 
-//#define RTMP_CHIP_NAME                "RT2870"
+/*#define RTMP_CHIP_NAME                "RT2870" */
 
-#endif // RT2870 //
-#endif //__RT2870_H__ //
+#endif /* RT2870 // */
+#endif /*__RT2870_H__ // */

+ 5 - 5
drivers/staging/rt2860/chip/rt3070.h

@@ -58,10 +58,10 @@
 #include "mac_usb.h"
 #include "rt30xx.h"
 
-//
-// Device ID & Vendor ID, these values should match EEPROM value
-//
+/* */
+/* Device ID & Vendor ID, these values should match EEPROM value */
+/* */
 
-#endif // RT3070 //
+#endif /* RT3070 // */
 
-#endif //__RT3070_H__ //
+#endif /*__RT3070_H__ // */

+ 8 - 8
drivers/staging/rt2860/chip/rt3090.h

@@ -60,13 +60,13 @@
 #include "mac_pci.h"
 #include "rt30xx.h"
 
-//
-// Device ID & Vendor ID, these values should match EEPROM value
-//
-#define NIC3090_PCIe_DEVICE_ID  0x3090	// 1T/1R miniCard
-#define NIC3091_PCIe_DEVICE_ID  0x3091	// 1T/2R miniCard
-#define NIC3092_PCIe_DEVICE_ID  0x3092	// 2T/2R miniCard
+/* */
+/* Device ID & Vendor ID, these values should match EEPROM value */
+/* */
+#define NIC3090_PCIe_DEVICE_ID  0x3090	/* 1T/1R miniCard */
+#define NIC3091_PCIe_DEVICE_ID  0x3091	/* 1T/2R miniCard */
+#define NIC3092_PCIe_DEVICE_ID  0x3092	/* 2T/2R miniCard */
 
-#endif // RT3090 //
+#endif /* RT3090 // */
 
-#endif //__RT3090_H__ //
+#endif /*__RT3090_H__ // */

+ 2 - 2
drivers/staging/rt2860/chip/rt30xx.h

@@ -42,6 +42,6 @@
 extern REG_PAIR RT30xx_RFRegTable[];
 extern UCHAR NUM_RF_REG_PARMS;
 
-#endif // RT30xx //
+#endif /* RT30xx // */
 
-#endif //__RT30XX_H__ //
+#endif /*__RT30XX_H__ // */

Fichier diff supprimé car celui-ci est trop grand
+ 324 - 324
drivers/staging/rt2860/chip/rtmp_mac.h


+ 40 - 40
drivers/staging/rt2860/chip/rtmp_phy.h

@@ -74,30 +74,30 @@
 #define RF_R30			30
 #define RF_R31			31
 
-// value domain of pAd->RfIcType
-#define RFIC_2820                   1	// 2.4G 2T3R
-#define RFIC_2850                   2	// 2.4G/5G 2T3R
-#define RFIC_2720                   3	// 2.4G 1T2R
-#define RFIC_2750                   4	// 2.4G/5G 1T2R
-#define RFIC_3020                   5	// 2.4G 1T1R
-#define RFIC_2020                   6	// 2.4G B/G
-#define RFIC_3021                   7	// 2.4G 1T2R
-#define RFIC_3022                   8	// 2.4G 2T2R
-#define RFIC_3052                   9	// 2.4G/5G 2T2R
+/* value domain of pAd->RfIcType */
+#define RFIC_2820                   1	/* 2.4G 2T3R */
+#define RFIC_2850                   2	/* 2.4G/5G 2T3R */
+#define RFIC_2720                   3	/* 2.4G 1T2R */
+#define RFIC_2750                   4	/* 2.4G/5G 1T2R */
+#define RFIC_3020                   5	/* 2.4G 1T1R */
+#define RFIC_2020                   6	/* 2.4G B/G */
+#define RFIC_3021                   7	/* 2.4G 1T2R */
+#define RFIC_3022                   8	/* 2.4G 2T2R */
+#define RFIC_3052                   9	/* 2.4G/5G 2T2R */
 
 /*
 	BBP sections
 */
-#define BBP_R0			0	// version
-#define BBP_R1			1	// TSSI
-#define BBP_R2			2	// TX configure
+#define BBP_R0			0	/* version */
+#define BBP_R1			1	/* TSSI */
+#define BBP_R2			2	/* TX configure */
 #define BBP_R3			3
 #define BBP_R4			4
 #define BBP_R5			5
 #define BBP_R6			6
-#define BBP_R14			14	// RX configure
+#define BBP_R14			14	/* RX configure */
 #define BBP_R16			16
-#define BBP_R17			17	// RX sensibility
+#define BBP_R17			17	/* RX sensibility */
 #define BBP_R18			18
 #define BBP_R21			21
 #define BBP_R22			22
@@ -106,12 +106,12 @@
 #define BBP_R26			26
 #define BBP_R27			27
 #define BBP_R31			31
-#define BBP_R49			49	//TSSI
+#define BBP_R49			49	/*TSSI */
 #define BBP_R50			50
 #define BBP_R51			51
 #define BBP_R52			52
 #define BBP_R55			55
-#define BBP_R62			62	// Rx SQ0 Threshold HIGH
+#define BBP_R62			62	/* Rx SQ0 Threshold HIGH */
 #define BBP_R63			63
 #define BBP_R64			64
 #define BBP_R65			65
@@ -119,7 +119,7 @@
 #define BBP_R67			67
 #define BBP_R68			68
 #define BBP_R69			69
-#define BBP_R70			70	// Rx AGC SQ CCK Xcorr threshold
+#define BBP_R70			70	/* Rx AGC SQ CCK Xcorr threshold */
 #define BBP_R73			73
 #define BBP_R75			75
 #define BBP_R77			77
@@ -133,7 +133,7 @@
 #define BBP_R86			86
 #define BBP_R91			91
 #define BBP_R92			92
-#define BBP_R94			94	// Tx Gain Control
+#define BBP_R94			94	/* Tx Gain Control */
 #define BBP_R103		103
 #define BBP_R105		105
 #define BBP_R106		106
@@ -149,22 +149,22 @@
 #define BBP_R122		122
 #define BBP_R123		123
 #ifdef RT30xx
-#define BBP_R138		138	// add by johnli, RF power sequence setup, ADC dynamic on/off control
-#endif // RT30xx //
+#define BBP_R138		138	/* add by johnli, RF power sequence setup, ADC dynamic on/off control */
+#endif /* RT30xx // */
 
-#define BBPR94_DEFAULT	0x06	// Add 1 value will gain 1db
+#define BBPR94_DEFAULT	0x06	/* Add 1 value will gain 1db */
 
-//
-// BBP & RF are using indirect access. Before write any value into it.
-// We have to make sure there is no outstanding command pending via checking busy bit.
-//
-#define MAX_BUSY_COUNT  100	// Number of retry before failing access BBP & RF indirect register
+/* */
+/* BBP & RF are using indirect access. Before write any value into it. */
+/* We have to make sure there is no outstanding command pending via checking busy bit. */
+/* */
+#define MAX_BUSY_COUNT  100	/* Number of retry before failing access BBP & RF indirect register */
 
-//#define PHY_TR_SWITCH_TIME          5  // usec
+/*#define PHY_TR_SWITCH_TIME          5  // usec */
 
-//#define BBP_R17_LOW_SENSIBILITY     0x50
-//#define BBP_R17_MID_SENSIBILITY     0x41
-//#define BBP_R17_DYNAMIC_UP_BOUND    0x40
+/*#define BBP_R17_LOW_SENSIBILITY     0x50 */
+/*#define BBP_R17_MID_SENSIBILITY     0x41 */
+/*#define BBP_R17_DYNAMIC_UP_BOUND    0x40 */
 
 #define RSSI_FOR_VERY_LOW_SENSIBILITY   -35
 #define RSSI_FOR_LOW_SENSIBILITY		-58
@@ -194,15 +194,15 @@
 		}                                               \
 	}								\
 }
-#endif // RTMP_MAC_PCI //
+#endif /* RTMP_MAC_PCI // */
 #ifdef RTMP_MAC_USB
 #define RTMP_RF_IO_WRITE32(_A, _V)                 RTUSBWriteRFRegister(_A, _V)
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
 
 #ifdef RT30xx
 #define RTMP_RF_IO_READ8_BY_REG_ID(_A, _I, _pV)    RT30xxReadRFRegister(_A, _I, _pV)
 #define RTMP_RF_IO_WRITE8_BY_REG_ID(_A, _I, _V)    RT30xxWriteRFRegister(_A, _I, _V)
-#endif // RT30xx //
+#endif /* RT30xx // */
 
 /*****************************************************************************
 	BBP register Read/Write marco definitions.
@@ -276,7 +276,7 @@
 	But for some chipset which didn't have mcu (e.g., RBUS based chipset), we
 	will use this function too and didn't access the bbp register via the MCU.
 */
-// Read BBP register by register's ID. Generate PER to test BA
+/* Read BBP register by register's ID. Generate PER to test BA */
 #define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV)						\
 {																		\
 	BBP_CSR_CFG_STRUC	BbpCsr;											\
@@ -425,7 +425,7 @@
 	But for some chipset which didn't have mcu (e.g., RBUS based chipset), we
 	will use this function too and didn't access the bbp register via the MCU.
 */
-// Write BBP register by register's ID & value
+/* Write BBP register by register's ID & value */
 #define RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V)						\
 {																		\
 	BBP_CSR_CFG_STRUC	BbpCsr;											\
@@ -510,7 +510,7 @@
 		DBGPRINT_ERR(("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n"));	\
 	}																		\
 }
-#endif // RTMP_MAC_PCI //
+#endif /* RTMP_MAC_PCI // */
 
 #ifdef RTMP_MAC_USB
 #define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV)   RTUSBReadBBPRegister(_A, _I, _pV)
@@ -518,7 +518,7 @@
 
 #define BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V)			RTUSBWriteBBPRegister(_A, _I, _V)
 #define BBP_IO_READ8_BY_REG_ID(_A, _I, _pV)		RTUSBReadBBPRegister(_A, _I, _pV)
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
 
 #ifdef RT30xx
 #define RTMP_ASIC_MMPS_DISABLE(_pAd)							\
@@ -551,6 +551,6 @@
 		RTMP_IO_WRITE32(_pAd, 0x1210, _macData);				\
 	}while(0)
 
-#endif // RT30xx //
+#endif /* RT30xx // */
 
-#endif // __RTMP_PHY_H__ //
+#endif /* __RTMP_PHY_H__ // */

+ 5 - 5
drivers/staging/rt2860/chlist.h

@@ -52,14 +52,14 @@
 typedef struct _CH_DESP {
 	UCHAR FirstChannel;
 	UCHAR NumOfCh;
-	CHAR MaxTxPwr;		// dBm
-	UCHAR Geography;	// 0:out door, 1:in door, 2:both
-	BOOLEAN DfsReq;		// Dfs require, 0: No, 1: yes.
+	CHAR MaxTxPwr;		/* dBm */
+	UCHAR Geography;	/* 0:out door, 1:in door, 2:both */
+	BOOLEAN DfsReq;		/* Dfs require, 0: No, 1: yes. */
 } CH_DESP, *PCH_DESP;
 
 typedef struct _CH_REGION {
 	UCHAR CountReg[3];
-	UCHAR DfsType;		// 0: CE, 1: FCC, 2: JAP, 3:JAP_W53, JAP_W56
+	UCHAR DfsType;		/* 0: CE, 1: FCC, 2: JAP, 3:JAP_W53, JAP_W56 */
 	CH_DESP ChDesp[10];
 } CH_REGION, *PCH_REGION;
 
@@ -114,4 +114,4 @@ VOID N_SetCenCh(IN PRTMP_ADAPTER pAd);
 
 UINT8 GetCuntryMaxTxPwr(IN PRTMP_ADAPTER pAd, IN UINT8 channel);
 
-#endif // __CHLIST_H__
+#endif /* __CHLIST_H__ */

+ 5 - 5
drivers/staging/rt2860/eeprom.h

@@ -43,25 +43,25 @@
   ************************************************************************/
 int rtmp_ee_prom_read16(IN PRTMP_ADAPTER pAd,
 			IN USHORT Offset, OUT USHORT * pValue);
-#endif // RTMP_PCI_SUPPORT //
+#endif /* RTMP_PCI_SUPPORT // */
 #ifdef RTMP_USB_SUPPORT
 /*************************************************************************
   *	Public function declarations for usb-based prom chipset
   ************************************************************************/
 NTSTATUS RTUSBReadEEPROM16(IN PRTMP_ADAPTER pAd,
 			   IN USHORT offset, OUT PUSHORT pData);
-#endif // RTMP_USB_SUPPORT //
+#endif /* RTMP_USB_SUPPORT // */
 
 #ifdef RT30xx
 #ifdef RTMP_EFUSE_SUPPORT
 int rtmp_ee_efuse_read16(IN RTMP_ADAPTER * pAd,
 			 IN USHORT Offset, OUT USHORT * pValue);
-#endif // RTMP_EFUSE_SUPPORT //
-#endif // RT30xx //
+#endif /* RTMP_EFUSE_SUPPORT // */
+#endif /* RT30xx // */
 
 /*************************************************************************
   *	Public function declarations for prom operation callback functions setting
   ************************************************************************/
 INT RtmpChipOpsEepromHook(IN RTMP_ADAPTER * pAd, IN INT infType);
 
-#endif // __EEPROM_H__ //
+#endif /* __EEPROM_H__ // */

+ 281 - 281
drivers/staging/rt2860/mlme.h

@@ -41,18 +41,18 @@
 
 #include "rtmp_dot11.h"
 
-// maximum supported capability information -
-// ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot
+/* maximum supported capability information - */
+/* ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot */
 #define SUPPORTED_CAPABILITY_INFO   0x0533
 
 #define END_OF_ARGS                 -1
 #define LFSR_MASK                   0x80000057
-#define MLME_TASK_EXEC_INTV         100/*200*/	//
+#define MLME_TASK_EXEC_INTV         100/*200*/	/* */
 #define LEAD_TIME                   5
-#define MLME_TASK_EXEC_MULTIPLE       10  /*5*/	// MLME_TASK_EXEC_MULTIPLE * MLME_TASK_EXEC_INTV = 1 sec
-#define REORDER_EXEC_INTV         	100	// 0.1 sec
+#define MLME_TASK_EXEC_MULTIPLE       10  /*5*/	/* MLME_TASK_EXEC_MULTIPLE * MLME_TASK_EXEC_INTV = 1 sec */
+#define REORDER_EXEC_INTV         	100	/* 0.1 sec */
 
-// The definition of Radar detection duration region
+/* The definition of Radar detection duration region */
 #define CE		0
 #define FCC		1
 #define JAP		2
@@ -60,61 +60,61 @@
 #define JAP_W56	4
 #define MAX_RD_REGION 5
 
-#define BEACON_LOST_TIME            4 * OS_HZ	// 2048 msec = 2 sec
-
-#define DLS_TIMEOUT                 1200	// unit: msec
-#define AUTH_TIMEOUT                300	// unit: msec
-#define ASSOC_TIMEOUT               300	// unit: msec
-#define JOIN_TIMEOUT                2000	// unit: msec
-#define SHORT_CHANNEL_TIME          90	// unit: msec
-#define MIN_CHANNEL_TIME            110	// unit: msec, for dual band scan
-#define MAX_CHANNEL_TIME            140	// unit: msec, for single band scan
-#define	FAST_ACTIVE_SCAN_TIME	    30	// Active scan waiting for probe response time
-#define CW_MIN_IN_BITS              4	// actual CwMin = 2^CW_MIN_IN_BITS - 1
-#define LINK_DOWN_TIMEOUT           20000	// unit: msec
-#define AUTO_WAKEUP_TIMEOUT			70	//unit: msec
-
-#define CW_MAX_IN_BITS              10	// actual CwMax = 2^CW_MAX_IN_BITS - 1
-
-// Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720).
-// SHould not refer to this constant anymore
-//#define RSSI_TO_DBM_OFFSET          120 // for RT2530 RSSI-115 = dBm
-#define RSSI_FOR_MID_TX_POWER       -55	// -55 db is considered mid-distance
-#define RSSI_FOR_LOW_TX_POWER       -45	// -45 db is considered very short distance and
-					// eligible to use a lower TX power
+#define BEACON_LOST_TIME            4 * OS_HZ	/* 2048 msec = 2 sec */
+
+#define DLS_TIMEOUT                 1200	/* unit: msec */
+#define AUTH_TIMEOUT                300	/* unit: msec */
+#define ASSOC_TIMEOUT               300	/* unit: msec */
+#define JOIN_TIMEOUT                2000	/* unit: msec */
+#define SHORT_CHANNEL_TIME          90	/* unit: msec */
+#define MIN_CHANNEL_TIME            110	/* unit: msec, for dual band scan */
+#define MAX_CHANNEL_TIME            140	/* unit: msec, for single band scan */
+#define	FAST_ACTIVE_SCAN_TIME	    30	/* Active scan waiting for probe response time */
+#define CW_MIN_IN_BITS              4	/* actual CwMin = 2^CW_MIN_IN_BITS - 1 */
+#define LINK_DOWN_TIMEOUT           20000	/* unit: msec */
+#define AUTO_WAKEUP_TIMEOUT			70	/*unit: msec */
+
+#define CW_MAX_IN_BITS              10	/* actual CwMax = 2^CW_MAX_IN_BITS - 1 */
+
+/* Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720). */
+/* SHould not refer to this constant anymore */
+/*#define RSSI_TO_DBM_OFFSET          120 // for RT2530 RSSI-115 = dBm */
+#define RSSI_FOR_MID_TX_POWER       -55	/* -55 db is considered mid-distance */
+#define RSSI_FOR_LOW_TX_POWER       -45	/* -45 db is considered very short distance and */
+					/* eligible to use a lower TX power */
 #define RSSI_FOR_LOWEST_TX_POWER    -30
-//#define MID_TX_POWER_DELTA          0   // 0 db from full TX power upon mid-distance to AP
-#define LOW_TX_POWER_DELTA          6	// -3 db from full TX power upon very short distance. 1 grade is 0.5 db
-#define LOWEST_TX_POWER_DELTA       16	// -8 db from full TX power upon shortest distance. 1 grade is 0.5 db
+/*#define MID_TX_POWER_DELTA          0   // 0 db from full TX power upon mid-distance to AP */
+#define LOW_TX_POWER_DELTA          6	/* -3 db from full TX power upon very short distance. 1 grade is 0.5 db */
+#define LOWEST_TX_POWER_DELTA       16	/* -8 db from full TX power upon shortest distance. 1 grade is 0.5 db */
 
 #define RSSI_TRIGGERED_UPON_BELOW_THRESHOLD     0
 #define RSSI_TRIGGERED_UPON_EXCCEED_THRESHOLD   1
 #define RSSI_THRESHOLD_FOR_ROAMING              25
 #define RSSI_DELTA                              5
 
-// Channel Quality Indication
+/* Channel Quality Indication */
 #define CQI_IS_GOOD(cqi)            ((cqi) >= 50)
-//#define CQI_IS_FAIR(cqi)          (((cqi) >= 20) && ((cqi) < 50))
-#define CQI_IS_POOR(cqi)            (cqi < 50)	//(((cqi) >= 5) && ((cqi) < 20))
+/*#define CQI_IS_FAIR(cqi)          (((cqi) >= 20) && ((cqi) < 50)) */
+#define CQI_IS_POOR(cqi)            (cqi < 50)	/*(((cqi) >= 5) && ((cqi) < 20)) */
 #define CQI_IS_BAD(cqi)             (cqi < 5)
 #define CQI_IS_DEAD(cqi)            (cqi == 0)
 
-// weighting factor to calculate Channel quality, total should be 100%
+/* weighting factor to calculate Channel quality, total should be 100% */
 #define RSSI_WEIGHTING                   50
 #define TX_WEIGHTING                     30
 #define RX_WEIGHTING                     20
 
 #define BSS_NOT_FOUND                    0xFFFFFFFF
 
-#define MAX_LEN_OF_MLME_QUEUE            40	//10
+#define MAX_LEN_OF_MLME_QUEUE            40	/*10 */
 
-#define SCAN_PASSIVE                     18	// scan with no probe request, only wait beacon and probe response
-#define SCAN_ACTIVE                      19	// scan with probe request, and wait beacon and probe response
-#define	SCAN_CISCO_PASSIVE				 20	// Single channel passive scan
-#define	SCAN_CISCO_ACTIVE				 21	// Single channel active scan
-#define	SCAN_CISCO_NOISE				 22	// Single channel passive scan for noise histogram collection
-#define	SCAN_CISCO_CHANNEL_LOAD			 23	// Single channel passive scan for channel load collection
-#define FAST_SCAN_ACTIVE                 24	// scan with probe request, and wait beacon and probe response
+#define SCAN_PASSIVE                     18	/* scan with no probe request, only wait beacon and probe response */
+#define SCAN_ACTIVE                      19	/* scan with probe request, and wait beacon and probe response */
+#define	SCAN_CISCO_PASSIVE				 20	/* Single channel passive scan */
+#define	SCAN_CISCO_ACTIVE				 21	/* Single channel active scan */
+#define	SCAN_CISCO_NOISE				 22	/* Single channel passive scan for noise histogram collection */
+#define	SCAN_CISCO_CHANNEL_LOAD			 23	/* Single channel passive scan for channel load collection */
+#define FAST_SCAN_ACTIVE                 24	/* scan with probe request, and wait beacon and probe response */
 
 #define MAC_ADDR_IS_GROUP(Addr)       (((Addr[0]) & 0x01))
 #define MAC_ADDR_HASH(Addr)            (Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5])
@@ -122,13 +122,13 @@
 #define TID_MAC_HASH(Addr,TID)            (TID^Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5])
 #define TID_MAC_HASH_INDEX(Addr,TID)      (TID_MAC_HASH(Addr,TID) % HASH_TABLE_SIZE)
 
-// LED Control
-// assoiation ON. one LED ON. another blinking when TX, OFF when idle
-// no association, both LED off
+/* LED Control */
+/* assoiation ON. one LED ON. another blinking when TX, OFF when idle */
+/* no association, both LED off */
 #define ASIC_LED_ACT_ON(pAd)        RTMP_IO_WRITE32(pAd, MAC_CSR14, 0x00031e46)
 #define ASIC_LED_ACT_OFF(pAd)       RTMP_IO_WRITE32(pAd, MAC_CSR14, 0x00001e46)
 
-// bit definition of the 2-byte pBEACON->Capability field
+/* bit definition of the 2-byte pBEACON->Capability field */
 #define CAP_IS_ESS_ON(x)                 (((x) & 0x0001) != 0)
 #define CAP_IS_IBSS_ON(x)                (((x) & 0x0002) != 0)
 #define CAP_IS_CF_POLLABLE_ON(x)         (((x) & 0x0004) != 0)
@@ -137,44 +137,44 @@
 #define CAP_IS_SHORT_PREAMBLE_ON(x)      (((x) & 0x0020) != 0)
 #define CAP_IS_PBCC_ON(x)                (((x) & 0x0040) != 0)
 #define CAP_IS_AGILITY_ON(x)             (((x) & 0x0080) != 0)
-#define CAP_IS_SPECTRUM_MGMT(x)          (((x) & 0x0100) != 0)	// 802.11e d9
-#define CAP_IS_QOS(x)                    (((x) & 0x0200) != 0)	// 802.11e d9
+#define CAP_IS_SPECTRUM_MGMT(x)          (((x) & 0x0100) != 0)	/* 802.11e d9 */
+#define CAP_IS_QOS(x)                    (((x) & 0x0200) != 0)	/* 802.11e d9 */
 #define CAP_IS_SHORT_SLOT(x)             (((x) & 0x0400) != 0)
-#define CAP_IS_APSD(x)                   (((x) & 0x0800) != 0)	// 802.11e d9
-#define CAP_IS_IMMED_BA(x)               (((x) & 0x1000) != 0)	// 802.11e d9
+#define CAP_IS_APSD(x)                   (((x) & 0x0800) != 0)	/* 802.11e d9 */
+#define CAP_IS_IMMED_BA(x)               (((x) & 0x1000) != 0)	/* 802.11e d9 */
 #define CAP_IS_DSSS_OFDM(x)              (((x) & 0x2000) != 0)
-#define CAP_IS_DELAY_BA(x)               (((x) & 0x4000) != 0)	// 802.11e d9
+#define CAP_IS_DELAY_BA(x)               (((x) & 0x4000) != 0)	/* 802.11e d9 */
 
 #define CAP_GENERATE(ess,ibss,priv,s_pre,s_slot,spectrum)  (((ess) ? 0x0001 : 0x0000) | ((ibss) ? 0x0002 : 0x0000) | ((priv) ? 0x0010 : 0x0000) | ((s_pre) ? 0x0020 : 0x0000) | ((s_slot) ? 0x0400 : 0x0000) | ((spectrum) ? 0x0100 : 0x0000))
 
-#define ERP_IS_NON_ERP_PRESENT(x)        (((x) & 0x01) != 0)	// 802.11g
-#define ERP_IS_USE_PROTECTION(x)         (((x) & 0x02) != 0)	// 802.11g
-#define ERP_IS_USE_BARKER_PREAMBLE(x)    (((x) & 0x04) != 0)	// 802.11g
+#define ERP_IS_NON_ERP_PRESENT(x)        (((x) & 0x01) != 0)	/* 802.11g */
+#define ERP_IS_USE_PROTECTION(x)         (((x) & 0x02) != 0)	/* 802.11g */
+#define ERP_IS_USE_BARKER_PREAMBLE(x)    (((x) & 0x04) != 0)	/* 802.11g */
 
-#define DRS_TX_QUALITY_WORST_BOUND       8	// 3  // just test by gary
+#define DRS_TX_QUALITY_WORST_BOUND       8	/* 3  // just test by gary */
 #define DRS_PENALTY                      8
 
 #define BA_NOTUSE 	2
-//BA Policy subfiled value in ADDBA frame
+/*BA Policy subfiled value in ADDBA frame */
 #define IMMED_BA 	1
 #define DELAY_BA	0
 
-// BA Initiator subfield in DELBA frame
+/* BA Initiator subfield in DELBA frame */
 #define ORIGINATOR	1
 #define RECIPIENT	0
 
-// ADDBA Status Code
+/* ADDBA Status Code */
 #define ADDBA_RESULTCODE_SUCCESS					0
 #define ADDBA_RESULTCODE_REFUSED					37
 #define ADDBA_RESULTCODE_INVALID_PARAMETERS			38
 
-// DELBA Reason Code
+/* DELBA Reason Code */
 #define DELBA_REASONCODE_QSTA_LEAVING				36
 #define DELBA_REASONCODE_END_BA						37
 #define DELBA_REASONCODE_UNKNOWN_BA					38
 #define DELBA_REASONCODE_TIMEOUT					39
 
-// reset all OneSecTx counters
+/* reset all OneSecTx counters */
 #define RESET_ONE_SEC_TX_CNT(__pEntry) \
 if (((__pEntry)) != NULL) \
 { \
@@ -183,38 +183,38 @@ if (((__pEntry)) != NULL) \
 	(__pEntry)->OneSecTxNoRetryOkCount = 0; \
 }
 
-//
-// 802.11 frame formats
-//
-//  HT Capability INFO field in HT Cap IE .
+/* */
+/* 802.11 frame formats */
+/* */
+/*  HT Capability INFO field in HT Cap IE . */
 typedef struct PACKED {
 	USHORT AdvCoding:1;
 	USHORT ChannelWidth:1;
-	USHORT MimoPs:2;	//momi power safe
-	USHORT GF:1;		//green field
+	USHORT MimoPs:2;	/*momi power safe */
+	USHORT GF:1;		/*green field */
 	USHORT ShortGIfor20:1;
-	USHORT ShortGIfor40:1;	//for40MHz
+	USHORT ShortGIfor40:1;	/*for40MHz */
 	USHORT TxSTBC:1;
 	USHORT RxSTBC:2;
-	USHORT DelayedBA:1;	//rt2860c not support
-	USHORT AMsduSize:1;	// only support as zero
+	USHORT DelayedBA:1;	/*rt2860c not support */
+	USHORT AMsduSize:1;	/* only support as zero */
 	USHORT CCKmodein40:1;
 	USHORT PSMP:1;
 	USHORT Forty_Mhz_Intolerant:1;
 	USHORT LSIGTxopProSup:1;
 } HT_CAP_INFO, *PHT_CAP_INFO;
 
-//  HT Capability INFO field in HT Cap IE .
+/*  HT Capability INFO field in HT Cap IE . */
 typedef struct PACKED {
 	UCHAR MaxRAmpduFactor:2;
 	UCHAR MpduDensity:3;
-	UCHAR rsv:3;		//momi power safe
+	UCHAR rsv:3;		/*momi power safe */
 } HT_CAP_PARM, *PHT_CAP_PARM;
 
-//  HT Capability INFO field in HT Cap IE .
+/*  HT Capability INFO field in HT Cap IE . */
 typedef struct PACKED {
 	UCHAR MCSSet[10];
-	UCHAR SupRate[2];	// unit : 1Mbps
+	UCHAR SupRate[2];	/* unit : 1Mbps */
 	UCHAR TxMCSSetDefined:1;
 	UCHAR TxRxNotEqual:1;
 	UCHAR TxStream:2;
@@ -223,18 +223,18 @@ typedef struct PACKED {
 	UCHAR rsv3[3];
 } HT_MCS_SET, *PHT_MCS_SET;
 
-//  HT Capability INFO field in HT Cap IE .
+/*  HT Capability INFO field in HT Cap IE . */
 typedef struct PACKED {
 	USHORT Pco:1;
 	USHORT TranTime:2;
-	USHORT rsv:5;		//momi power safe
-	USHORT MCSFeedback:2;	//0:no MCS feedback, 2:unsolicited MCS feedback, 3:Full MCS feedback,  1:rsv.
-	USHORT PlusHTC:1;	//+HTC control field support
-	USHORT RDGSupport:1;	//reverse Direction Grant  support
+	USHORT rsv:5;		/*momi power safe */
+	USHORT MCSFeedback:2;	/*0:no MCS feedback, 2:unsolicited MCS feedback, 3:Full MCS feedback,  1:rsv. */
+	USHORT PlusHTC:1;	/*+HTC control field support */
+	USHORT RDGSupport:1;	/*reverse Direction Grant  support */
 	USHORT rsv2:4;
 } EXT_HT_CAP_INFO, *PEXT_HT_CAP_INFO;
 
-//  HT Beamforming field in HT Cap IE .
+/*  HT Beamforming field in HT Cap IE . */
 typedef struct PACKED _HT_BF_CAP {
 	ULONG TxBFRecCapable:1;
 	ULONG RxSoundCapable:1;
@@ -258,7 +258,7 @@ typedef struct PACKED _HT_BF_CAP {
 	ULONG rsv:3;
 } HT_BF_CAP, *PHT_BF_CAP;
 
-//  HT antenna selection field in HT Cap IE .
+/*  HT antenna selection field in HT Cap IE . */
 typedef struct PACKED _HT_AS_CAP {
 	UCHAR AntSelect:1;
 	UCHAR ExpCSIFbkTxASEL:1;
@@ -270,48 +270,48 @@ typedef struct PACKED _HT_AS_CAP {
 	UCHAR rsv:1;
 } HT_AS_CAP, *PHT_AS_CAP;
 
-// Draft 1.0 set IE length 26, but is extensible..
+/* Draft 1.0 set IE length 26, but is extensible.. */
 #define SIZE_HT_CAP_IE		26
-// The structure for HT Capability IE.
+/* The structure for HT Capability IE. */
 typedef struct PACKED _HT_CAPABILITY_IE {
 	HT_CAP_INFO HtCapInfo;
 	HT_CAP_PARM HtCapParm;
-//      HT_MCS_SET              HtMCSSet;
+/*      HT_MCS_SET              HtMCSSet; */
 	UCHAR MCSSet[16];
 	EXT_HT_CAP_INFO ExtHtCapInfo;
-	HT_BF_CAP TxBFCap;	// beamforming cap. rt2860c not support beamforming.
-	HT_AS_CAP ASCap;	//antenna selection.
+	HT_BF_CAP TxBFCap;	/* beamforming cap. rt2860c not support beamforming. */
+	HT_AS_CAP ASCap;	/*antenna selection. */
 } HT_CAPABILITY_IE, *PHT_CAPABILITY_IE;
 
-// 802.11n draft3 related structure definitions.
-// 7.3.2.60
-#define dot11OBSSScanPassiveDwell							20	// in TU. min amount of time that the STA continously scans each channel when performing an active OBSS scan.
-#define dot11OBSSScanActiveDwell							10	// in TU.min amount of time that the STA continously scans each channel when performing an passive OBSS scan.
-#define dot11BSSWidthTriggerScanInterval					300	// in sec. max interval between scan operations to be performed to detect BSS channel width trigger events.
-#define dot11OBSSScanPassiveTotalPerChannel					200	// in TU. min total amount of time that the STA scans each channel when performing a passive OBSS scan.
-#define dot11OBSSScanActiveTotalPerChannel					20	//in TU. min total amount of time that the STA scans each channel when performing a active OBSS scan
-#define dot11BSSWidthChannelTransactionDelayFactor			5	// min ratio between the delay time in performing a switch from 20MHz BSS to 20/40 BSS operation and the maximum
-																//      interval between overlapping BSS scan operations.
-#define dot11BSSScanActivityThreshold						25	// in %%, max total time that a STA may be active on the medium during a period of
-																//      (dot11BSSWidthChannelTransactionDelayFactor * dot11BSSWidthTriggerScanInterval) seconds without
-																//      being obligated to perform OBSS Scan operations. default is 25(== 0.25%)
+/* 802.11n draft3 related structure definitions. */
+/* 7.3.2.60 */
+#define dot11OBSSScanPassiveDwell							20	/* in TU. min amount of time that the STA continously scans each channel when performing an active OBSS scan. */
+#define dot11OBSSScanActiveDwell							10	/* in TU.min amount of time that the STA continously scans each channel when performing an passive OBSS scan. */
+#define dot11BSSWidthTriggerScanInterval					300	/* in sec. max interval between scan operations to be performed to detect BSS channel width trigger events. */
+#define dot11OBSSScanPassiveTotalPerChannel					200	/* in TU. min total amount of time that the STA scans each channel when performing a passive OBSS scan. */
+#define dot11OBSSScanActiveTotalPerChannel					20	/*in TU. min total amount of time that the STA scans each channel when performing a active OBSS scan */
+#define dot11BSSWidthChannelTransactionDelayFactor			5	/* min ratio between the delay time in performing a switch from 20MHz BSS to 20/40 BSS operation and the maximum */
+																/*      interval between overlapping BSS scan operations. */
+#define dot11BSSScanActivityThreshold						25	/* in %%, max total time that a STA may be active on the medium during a period of */
+																/*      (dot11BSSWidthChannelTransactionDelayFactor * dot11BSSWidthTriggerScanInterval) seconds without */
+																/*      being obligated to perform OBSS Scan operations. default is 25(== 0.25%) */
 
 typedef struct PACKED _OVERLAP_BSS_SCAN_IE {
 	USHORT ScanPassiveDwell;
 	USHORT ScanActiveDwell;
-	USHORT TriggerScanInt;	// Trigger scan interval
-	USHORT PassiveTalPerChannel;	// passive total per channel
-	USHORT ActiveTalPerChannel;	// active total per channel
-	USHORT DelayFactor;	// BSS width channel transition delay factor
-	USHORT ScanActThre;	// Scan Activity threshold
+	USHORT TriggerScanInt;	/* Trigger scan interval */
+	USHORT PassiveTalPerChannel;	/* passive total per channel */
+	USHORT ActiveTalPerChannel;	/* active total per channel */
+	USHORT DelayFactor;	/* BSS width channel transition delay factor */
+	USHORT ScanActThre;	/* Scan Activity threshold */
 } OVERLAP_BSS_SCAN_IE, *POVERLAP_BSS_SCAN_IE;
 
-//  7.3.2.56. 20/40 Coexistence element used in  Element ID = 72 = IE_2040_BSS_COEXIST
+/*  7.3.2.56. 20/40 Coexistence element used in  Element ID = 72 = IE_2040_BSS_COEXIST */
 typedef union PACKED _BSS_2040_COEXIST_IE {
 	struct PACKED {
 		UCHAR InfoReq:1;
-		UCHAR Intolerant40:1;	// Inter-BSS. set 1 when prohibits a receiving BSS from operating as a 20/40 Mhz BSS.
-		UCHAR BSS20WidthReq:1;	// Intra-BSS set 1 when prohibits a receiving AP from operating its BSS as a 20/40MHz BSS.
+		UCHAR Intolerant40:1;	/* Inter-BSS. set 1 when prohibits a receiving BSS from operating as a 20/40 Mhz BSS. */
+		UCHAR BSS20WidthReq:1;	/* Intra-BSS set 1 when prohibits a receiving AP from operating its BSS as a 20/40MHz BSS. */
 		UCHAR rsv:5;
 	} field;
 	UCHAR word;
@@ -320,22 +320,22 @@ typedef union PACKED _BSS_2040_COEXIST_IE {
 typedef struct _TRIGGER_EVENTA {
 	BOOLEAN bValid;
 	UCHAR BSSID[6];
-	UCHAR RegClass;		// Regulatory Class
+	UCHAR RegClass;		/* Regulatory Class */
 	USHORT Channel;
-	ULONG CDCounter;	// Maintain a seperate count down counter for each Event A.
+	ULONG CDCounter;	/* Maintain a seperate count down counter for each Event A. */
 } TRIGGER_EVENTA, *PTRIGGER_EVENTA;
 
-// 20/40 trigger event table
-// If one Event A delete or created, or if Event B is detected or not detected, STA should send 2040BSSCoexistence to AP.
+/* 20/40 trigger event table */
+/* If one Event A delete or created, or if Event B is detected or not detected, STA should send 2040BSSCoexistence to AP. */
 #define MAX_TRIGGER_EVENT		64
 typedef struct _TRIGGER_EVENT_TAB {
 	UCHAR EventANo;
 	TRIGGER_EVENTA EventA[MAX_TRIGGER_EVENT];
-	ULONG EventBCountDown;	// Count down counter for Event B.
+	ULONG EventBCountDown;	/* Count down counter for Event B. */
 } TRIGGER_EVENT_TAB, *PTRIGGER_EVENT_TAB;
 
-// 7.3.27 20/40 Bss Coexistence Mgmt capability used in extended capabilities information IE( ID = 127 = IE_EXT_CAPABILITY).
-//      This is the first octet and was defined in 802.11n D3.03 and 802.11yD9.0
+/* 7.3.27 20/40 Bss Coexistence Mgmt capability used in extended capabilities information IE( ID = 127 = IE_EXT_CAPABILITY). */
+/*      This is the first octet and was defined in 802.11n D3.03 and 802.11yD9.0 */
 typedef struct PACKED _EXT_CAP_INFO_ELEMENT {
 	UCHAR BssCoexistMgmtSupport:1;
 	UCHAR rsv:1;
@@ -343,59 +343,59 @@ typedef struct PACKED _EXT_CAP_INFO_ELEMENT {
 	UCHAR rsv2:5;
 } EXT_CAP_INFO_ELEMENT, *PEXT_CAP_INFO_ELEMENT;
 
-// 802.11n 7.3.2.61
+/* 802.11n 7.3.2.61 */
 typedef struct PACKED _BSS_2040_COEXIST_ELEMENT {
-	UCHAR ElementID;	// ID = IE_2040_BSS_COEXIST = 72
+	UCHAR ElementID;	/* ID = IE_2040_BSS_COEXIST = 72 */
 	UCHAR Len;
 	BSS_2040_COEXIST_IE BssCoexistIe;
 } BSS_2040_COEXIST_ELEMENT, *PBSS_2040_COEXIST_ELEMENT;
 
-//802.11n 7.3.2.59
+/*802.11n 7.3.2.59 */
 typedef struct PACKED _BSS_2040_INTOLERANT_CH_REPORT {
-	UCHAR ElementID;	// ID = IE_2040_BSS_INTOLERANT_REPORT = 73
+	UCHAR ElementID;	/* ID = IE_2040_BSS_INTOLERANT_REPORT = 73 */
 	UCHAR Len;
 	UCHAR RegulatoryClass;
 	UCHAR ChList[0];
 } BSS_2040_INTOLERANT_CH_REPORT, *PBSS_2040_INTOLERANT_CH_REPORT;
 
-// The structure for channel switch annoucement IE. This is in 802.11n D3.03
+/* The structure for channel switch annoucement IE. This is in 802.11n D3.03 */
 typedef struct PACKED _CHA_SWITCH_ANNOUNCE_IE {
-	UCHAR SwitchMode;	//channel switch mode
-	UCHAR NewChannel;	//
-	UCHAR SwitchCount;	//
+	UCHAR SwitchMode;	/*channel switch mode */
+	UCHAR NewChannel;	/* */
+	UCHAR SwitchCount;	/* */
 } CHA_SWITCH_ANNOUNCE_IE, *PCHA_SWITCH_ANNOUNCE_IE;
 
-// The structure for channel switch annoucement IE. This is in 802.11n D3.03
+/* The structure for channel switch annoucement IE. This is in 802.11n D3.03 */
 typedef struct PACKED _SEC_CHA_OFFSET_IE {
-	UCHAR SecondaryChannelOffset;	// 1: Secondary above, 3: Secondary below, 0: no Secondary
+	UCHAR SecondaryChannelOffset;	/* 1: Secondary above, 3: Secondary below, 0: no Secondary */
 } SEC_CHA_OFFSET_IE, *PSEC_CHA_OFFSET_IE;
 
-// This structure is extracted from struct RT_HT_CAPABILITY
+/* This structure is extracted from struct RT_HT_CAPABILITY */
 typedef struct {
-	BOOLEAN bHtEnable;	// If we should use ht rate.
-	BOOLEAN bPreNHt;	// If we should use ht rate.
-	//Substract from HT Capability IE
+	BOOLEAN bHtEnable;	/* If we should use ht rate. */
+	BOOLEAN bPreNHt;	/* If we should use ht rate. */
+	/*Substract from HT Capability IE */
 	UCHAR MCSSet[16];
 } RT_HT_PHY_INFO, *PRT_HT_PHY_INFO;
 
-//This structure substracts ralink supports from all 802.11n-related features.
-//Features not listed here but contained in 802.11n spec are not supported in rt2860.
+/*This structure substracts ralink supports from all 802.11n-related features. */
+/*Features not listed here but contained in 802.11n spec are not supported in rt2860. */
 typedef struct {
 	USHORT ChannelWidth:1;
-	USHORT MimoPs:2;	//mimo power safe MMPS_
-	USHORT GF:1;		//green field
+	USHORT MimoPs:2;	/*mimo power safe MMPS_ */
+	USHORT GF:1;		/*green field */
 	USHORT ShortGIfor20:1;
-	USHORT ShortGIfor40:1;	//for40MHz
+	USHORT ShortGIfor40:1;	/*for40MHz */
 	USHORT TxSTBC:1;
-	USHORT RxSTBC:2;	// 2 bits
-	USHORT AmsduEnable:1;	// Enable to transmit A-MSDU. Suggest disable. We should use A-MPDU to gain best benifit of 802.11n
-	USHORT AmsduSize:1;	// Max receiving A-MSDU size
+	USHORT RxSTBC:2;	/* 2 bits */
+	USHORT AmsduEnable:1;	/* Enable to transmit A-MSDU. Suggest disable. We should use A-MPDU to gain best benifit of 802.11n */
+	USHORT AmsduSize:1;	/* Max receiving A-MSDU size */
 	USHORT rsv:5;
 
-	//Substract from Addiont HT INFO IE
+	/*Substract from Addiont HT INFO IE */
 	UCHAR MaxRAmpduFactor:2;
 	UCHAR MpduDensity:3;
-	UCHAR ExtChanOffset:2;	// Please not the difference with following     UCHAR   NewExtChannelOffset; from 802.11n
+	UCHAR ExtChanOffset:2;	/* Please not the difference with following     UCHAR   NewExtChannelOffset; from 802.11n */
 	UCHAR RecomWidth:1;
 
 	USHORT OperaionMode:2;
@@ -404,19 +404,19 @@ typedef struct {
 	USHORT OBSS_NonHTExist:1;
 	USHORT rsv2:11;
 
-	// New Extension Channel Offset IE
+	/* New Extension Channel Offset IE */
 	UCHAR NewExtChannelOffset;
-	// Extension Capability IE = 127
+	/* Extension Capability IE = 127 */
 	UCHAR BSSCoexist2040;
 } RT_HT_CAPABILITY, *PRT_HT_CAPABILITY;
 
-//   field in Addtional HT Information IE .
+/*   field in Addtional HT Information IE . */
 typedef struct PACKED {
 	UCHAR ExtChanOffset:2;
 	UCHAR RecomWidth:1;
 	UCHAR RifsMode:1;
-	UCHAR S_PSMPSup:1;	//Indicate support for scheduled PSMP
-	UCHAR SerInterGranu:3;	//service interval granularity
+	UCHAR S_PSMPSup:1;	/*Indicate support for scheduled PSMP */
+	UCHAR SerInterGranu:3;	/*service interval granularity */
 } ADD_HTINFO, *PADD_HTINFO;
 
 typedef struct PACKED {
@@ -427,13 +427,13 @@ typedef struct PACKED {
 	USHORT rsv2:11;
 } ADD_HTINFO2, *PADD_HTINFO2;
 
-// TODO: Need sync with spec about the definition of StbcMcs. In Draft 3.03, it's reserved.
+/* TODO: Need sync with spec about the definition of StbcMcs. In Draft 3.03, it's reserved. */
 typedef struct PACKED {
 	USHORT StbcMcs:6;
 	USHORT DualBeacon:1;
 	USHORT DualCTSProtect:1;
 	USHORT STBCBeacon:1;
-	USHORT LsigTxopProt:1;	// L-SIG TXOP protection full support
+	USHORT LsigTxopProt:1;	/* L-SIG TXOP protection full support */
 	USHORT PcoActive:1;
 	USHORT PcoPhase:1;
 	USHORT rsv:4;
@@ -445,7 +445,7 @@ typedef struct PACKED {
 	ADD_HTINFO AddHtInfo;
 	ADD_HTINFO2 AddHtInfo2;
 	ADD_HTINFO3 AddHtInfo3;
-	UCHAR MCSSet[16];	// Basic MCS set
+	UCHAR MCSSet[16];	/* Basic MCS set */
 } ADD_HT_INFO_IE, *PADD_HT_INFO_IE;
 
 typedef struct PACKED {
@@ -457,7 +457,7 @@ typedef struct PACKED _FRAME_802_11 {
 	UCHAR Octet[1];
 } FRAME_802_11, *PFRAME_802_11;
 
-// QoSNull embedding of management action. When HT Control MA field set to 1.
+/* QoSNull embedding of management action. When HT Control MA field set to 1. */
 typedef struct PACKED _MA_BODY {
 	UCHAR Category;
 	UCHAR Action;
@@ -469,51 +469,51 @@ typedef struct PACKED _HEADER_802_3 {
 	UCHAR SAAddr2[MAC_ADDR_LEN];
 	UCHAR Octet[2];
 } HEADER_802_3, *PHEADER_802_3;
-////Block ACK related format
-// 2-byte BA Parameter  field  in       DELBA frames to terminate an already set up bA
+/*//Block ACK related format */
+/* 2-byte BA Parameter  field  in       DELBA frames to terminate an already set up bA */
 typedef struct PACKED {
-	USHORT Rsv:11;		// always set to 0
-	USHORT Initiator:1;	// 1: originator    0:recipient
-	USHORT TID:4;		// value of TC os TS
+	USHORT Rsv:11;		/* always set to 0 */
+	USHORT Initiator:1;	/* 1: originator    0:recipient */
+	USHORT TID:4;		/* value of TC os TS */
 } DELBA_PARM, *PDELBA_PARM;
 
-// 2-byte BA Parameter Set field  in ADDBA frames to signal parm for setting up a BA
+/* 2-byte BA Parameter Set field  in ADDBA frames to signal parm for setting up a BA */
 typedef struct PACKED {
-	USHORT AMSDUSupported:1;	// 0: not permitted             1: permitted
-	USHORT BAPolicy:1;	// 1: immediately BA    0:delayed BA
-	USHORT TID:4;		// value of TC os TS
-	USHORT BufSize:10;	// number of buffe of size 2304 octetsr
+	USHORT AMSDUSupported:1;	/* 0: not permitted             1: permitted */
+	USHORT BAPolicy:1;	/* 1: immediately BA    0:delayed BA */
+	USHORT TID:4;		/* value of TC os TS */
+	USHORT BufSize:10;	/* number of buffe of size 2304 octetsr */
 } BA_PARM, *PBA_PARM;
 
-// 2-byte BA Starting Seq CONTROL field
+/* 2-byte BA Starting Seq CONTROL field */
 typedef union PACKED {
 	struct PACKED {
-		USHORT FragNum:4;	// always set to 0
-		USHORT StartSeq:12;	// sequence number of the 1st MSDU for which this BAR is sent
+		USHORT FragNum:4;	/* always set to 0 */
+		USHORT StartSeq:12;	/* sequence number of the 1st MSDU for which this BAR is sent */
 	} field;
 	USHORT word;
 } BASEQ_CONTROL, *PBASEQ_CONTROL;
 
-//BAControl and BARControl are the same
-// 2-byte BA CONTROL field in BA frame
+/*BAControl and BARControl are the same */
+/* 2-byte BA CONTROL field in BA frame */
 typedef struct PACKED {
-	USHORT ACKPolicy:1;	// only related to N-Delayed BA. But not support in RT2860b. 0:NormalACK  1:No ACK
-	USHORT MTID:1;		//EWC V1.24
+	USHORT ACKPolicy:1;	/* only related to N-Delayed BA. But not support in RT2860b. 0:NormalACK  1:No ACK */
+	USHORT MTID:1;		/*EWC V1.24 */
 	USHORT Compressed:1;
 	USHORT Rsv:9;
 	USHORT TID:4;
 } BA_CONTROL, *PBA_CONTROL;
 
-// 2-byte BAR CONTROL field in BAR frame
+/* 2-byte BAR CONTROL field in BAR frame */
 typedef struct PACKED {
-	USHORT ACKPolicy:1;	// 0:normal ack,  1:no ack.
-	USHORT MTID:1;		//if this bit1, use  FRAME_MTBA_REQ,  if 0, use FRAME_BA_REQ
+	USHORT ACKPolicy:1;	/* 0:normal ack,  1:no ack. */
+	USHORT MTID:1;		/*if this bit1, use  FRAME_MTBA_REQ,  if 0, use FRAME_BA_REQ */
 	USHORT Compressed:1;
 	USHORT Rsv1:9;
 	USHORT TID:4;
 } BAR_CONTROL, *PBAR_CONTROL;
 
-// BARControl in MTBAR frame
+/* BARControl in MTBAR frame */
 typedef struct PACKED {
 	USHORT ACKPolicy:1;
 	USHORT MTID:1;
@@ -532,7 +532,7 @@ typedef struct {
 	BASEQ_CONTROL BAStartingSeq;
 } EACH_TID, *PEACH_TID;
 
-// BAREQ AND MTBAREQ have the same subtype BAR, 802.11n BAR use compressed bitmap.
+/* BAREQ AND MTBAREQ have the same subtype BAR, 802.11n BAR use compressed bitmap. */
 typedef struct PACKED _FRAME_BA_REQ {
 	FRAME_CONTROL FC;
 	USHORT Duration;
@@ -552,7 +552,7 @@ typedef struct PACKED _FRAME_MTBA_REQ {
 	BASEQ_CONTROL BAStartingSeq;
 } FRAME_MTBA_REQ, *PFRAME_MTBA_REQ;
 
-// Compressed format is mandantory in HT STA
+/* Compressed format is mandantory in HT STA */
 typedef struct PACKED _FRAME_MTBA {
 	FRAME_CONTROL FC;
 	USHORT Duration;
@@ -567,7 +567,7 @@ typedef struct PACKED _FRAME_PSMP_ACTION {
 	HEADER_802_11 Hdr;
 	UCHAR Category;
 	UCHAR Action;
-	UCHAR Psmp;		// 7.3.1.25
+	UCHAR Psmp;		/* 7.3.1.25 */
 } FRAME_PSMP_ACTION, *PFRAME_PSMP_ACTION;
 
 typedef struct PACKED _FRAME_ACTION_HDR {
@@ -576,17 +576,17 @@ typedef struct PACKED _FRAME_ACTION_HDR {
 	UCHAR Action;
 } FRAME_ACTION_HDR, *PFRAME_ACTION_HDR;
 
-//Action Frame
-//Action Frame  Category:Spectrum,  Action:Channel Switch. 7.3.2.20
+/*Action Frame */
+/*Action Frame  Category:Spectrum,  Action:Channel Switch. 7.3.2.20 */
 typedef struct PACKED _CHAN_SWITCH_ANNOUNCE {
-	UCHAR ElementID;	// ID = IE_CHANNEL_SWITCH_ANNOUNCEMENT = 37
+	UCHAR ElementID;	/* ID = IE_CHANNEL_SWITCH_ANNOUNCEMENT = 37 */
 	UCHAR Len;
 	CHA_SWITCH_ANNOUNCE_IE CSAnnounceIe;
 } CHAN_SWITCH_ANNOUNCE, *PCHAN_SWITCH_ANNOUNCE;
 
-//802.11n : 7.3.2.20a
+/*802.11n : 7.3.2.20a */
 typedef struct PACKED _SECOND_CHAN_OFFSET {
-	UCHAR ElementID;	// ID = IE_SECONDARY_CH_OFFSET = 62
+	UCHAR ElementID;	/* ID = IE_SECONDARY_CH_OFFSET = 62 */
 	UCHAR Len;
 	SEC_CHA_OFFSET_IE SecChOffsetIe;
 } SECOND_CHAN_OFFSET, *PSECOND_CHAN_OFFSET;
@@ -603,10 +603,10 @@ typedef struct PACKED _FRAME_ADDBA_REQ {
 	HEADER_802_11 Hdr;
 	UCHAR Category;
 	UCHAR Action;
-	UCHAR Token;		// 1
-	BA_PARM BaParm;		//  2 - 10
-	USHORT TimeOutValue;	// 0 - 0
-	BASEQ_CONTROL BaStartSeq;	// 0-0
+	UCHAR Token;		/* 1 */
+	BA_PARM BaParm;		/*  2 - 10 */
+	USHORT TimeOutValue;	/* 0 - 0 */
+	BASEQ_CONTROL BaStartSeq;	/* 0-0 */
 } FRAME_ADDBA_REQ, *PFRAME_ADDBA_REQ;
 
 typedef struct PACKED _FRAME_ADDBA_RSP {
@@ -615,7 +615,7 @@ typedef struct PACKED _FRAME_ADDBA_RSP {
 	UCHAR Action;
 	UCHAR Token;
 	USHORT StatusCode;
-	BA_PARM BaParm;		//0 - 2
+	BA_PARM BaParm;		/*0 - 2 */
 	USHORT TimeOutValue;
 } FRAME_ADDBA_RSP, *PFRAME_ADDBA_RSP;
 
@@ -627,7 +627,7 @@ typedef struct PACKED _FRAME_DELBA_REQ {
 	USHORT ReasonCode;
 } FRAME_DELBA_REQ, *PFRAME_DELBA_REQ;
 
-//7.2.1.7
+/*7.2.1.7 */
 typedef struct PACKED _FRAME_BAR {
 	FRAME_CONTROL FC;
 	USHORT Duration;
@@ -637,7 +637,7 @@ typedef struct PACKED _FRAME_BAR {
 	BASEQ_CONTROL StartingSeq;
 } FRAME_BAR, *PFRAME_BAR;
 
-//7.2.1.7
+/*7.2.1.7 */
 typedef struct PACKED _FRAME_BA {
 	FRAME_CONTROL FC;
 	USHORT Duration;
@@ -648,7 +648,7 @@ typedef struct PACKED _FRAME_BA {
 	UCHAR bitmask[8];
 } FRAME_BA, *PFRAME_BA;
 
-// Radio Measuement Request Frame Format
+/* Radio Measuement Request Frame Format */
 typedef struct PACKED _FRAME_RM_REQ_ACTION {
 	HEADER_802_11 Hdr;
 	UCHAR Category;
@@ -668,21 +668,21 @@ typedef struct PACKED {
 } HT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE,
     *PHT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE;
 
-//
-// _Limit must be the 2**n - 1
-// _SEQ1 , _SEQ2 must be within 0 ~ _Limit
-//
+/* */
+/* _Limit must be the 2**n - 1 */
+/* _SEQ1 , _SEQ2 must be within 0 ~ _Limit */
+/* */
 #define SEQ_STEPONE(_SEQ1, _SEQ2, _Limit)	((_SEQ1 == ((_SEQ2+1) & _Limit)))
 #define SEQ_SMALLER(_SEQ1, _SEQ2, _Limit)	(((_SEQ1-_SEQ2) & ((_Limit+1)>>1)))
 #define SEQ_LARGER(_SEQ1, _SEQ2, _Limit)	((_SEQ1 != _SEQ2) && !(((_SEQ1-_SEQ2) & ((_Limit+1)>>1))))
 #define SEQ_WITHIN_WIN(_SEQ1, _SEQ2, _WIN, _Limit) (SEQ_LARGER(_SEQ1, _SEQ2, _Limit) &&  \
 												SEQ_SMALLER(_SEQ1, ((_SEQ2+_WIN+1)&_Limit), _Limit))
 
-//
-// Contention-free parameter (without ID and Length)
-//
+/* */
+/* Contention-free parameter (without ID and Length) */
+/* */
 typedef struct PACKED {
-	BOOLEAN bValid;		// 1: variable contains valid value
+	BOOLEAN bValid;		/* 1: variable contains valid value */
 	UCHAR CfpCount;
 	UCHAR CfpPeriod;
 	USHORT CfpMaxDuration;
@@ -690,39 +690,39 @@ typedef struct PACKED {
 } CF_PARM, *PCF_PARM;
 
 typedef struct _CIPHER_SUITE {
-	NDIS_802_11_ENCRYPTION_STATUS PairCipher;	// Unicast cipher 1, this one has more secured cipher suite
-	NDIS_802_11_ENCRYPTION_STATUS PairCipherAux;	// Unicast cipher 2 if AP announce two unicast cipher suite
-	NDIS_802_11_ENCRYPTION_STATUS GroupCipher;	// Group cipher
-	USHORT RsnCapability;	// RSN capability from beacon
-	BOOLEAN bMixMode;	// Indicate Pair & Group cipher might be different
+	NDIS_802_11_ENCRYPTION_STATUS PairCipher;	/* Unicast cipher 1, this one has more secured cipher suite */
+	NDIS_802_11_ENCRYPTION_STATUS PairCipherAux;	/* Unicast cipher 2 if AP announce two unicast cipher suite */
+	NDIS_802_11_ENCRYPTION_STATUS GroupCipher;	/* Group cipher */
+	USHORT RsnCapability;	/* RSN capability from beacon */
+	BOOLEAN bMixMode;	/* Indicate Pair & Group cipher might be different */
 } CIPHER_SUITE, *PCIPHER_SUITE;
 
-// EDCA configuration from AP's BEACON/ProbeRsp
+/* EDCA configuration from AP's BEACON/ProbeRsp */
 typedef struct {
-	BOOLEAN bValid;		// 1: variable contains valid value
-	BOOLEAN bAdd;		// 1: variable contains valid value
+	BOOLEAN bValid;		/* 1: variable contains valid value */
+	BOOLEAN bAdd;		/* 1: variable contains valid value */
 	BOOLEAN bQAck;
 	BOOLEAN bQueueRequest;
 	BOOLEAN bTxopRequest;
 	BOOLEAN bAPSDCapable;
-//  BOOLEAN     bMoreDataAck;
+/*  BOOLEAN     bMoreDataAck; */
 	UCHAR EdcaUpdateCount;
-	UCHAR Aifsn[4];		// 0:AC_BK, 1:AC_BE, 2:AC_VI, 3:AC_VO
+	UCHAR Aifsn[4];		/* 0:AC_BK, 1:AC_BE, 2:AC_VI, 3:AC_VO */
 	UCHAR Cwmin[4];
 	UCHAR Cwmax[4];
-	USHORT Txop[4];		// in unit of 32-us
-	BOOLEAN bACM[4];	// 1: Admission Control of AC_BK is mandattory
+	USHORT Txop[4];		/* in unit of 32-us */
+	BOOLEAN bACM[4];	/* 1: Admission Control of AC_BK is mandattory */
 } EDCA_PARM, *PEDCA_PARM;
 
-// QBSS LOAD information from QAP's BEACON/ProbeRsp
+/* QBSS LOAD information from QAP's BEACON/ProbeRsp */
 typedef struct {
-	BOOLEAN bValid;		// 1: variable contains valid value
+	BOOLEAN bValid;		/* 1: variable contains valid value */
 	USHORT StaNum;
 	UCHAR ChannelUtilization;
-	USHORT RemainingAdmissionControl;	// in unit of 32-us
+	USHORT RemainingAdmissionControl;	/* in unit of 32-us */
 } QBSS_LOAD_PARM, *PQBSS_LOAD_PARM;
 
-// QBSS Info field in QSTA's assoc req
+/* QBSS Info field in QSTA's assoc req */
 typedef struct PACKED {
 	UCHAR UAPSD_AC_VO:1;
 	UCHAR UAPSD_AC_VI:1;
@@ -733,21 +733,21 @@ typedef struct PACKED {
 	UCHAR Rsv2:1;
 } QBSS_STA_INFO_PARM, *PQBSS_STA_INFO_PARM;
 
-// QBSS Info field in QAP's Beacon/ProbeRsp
+/* QBSS Info field in QAP's Beacon/ProbeRsp */
 typedef struct PACKED {
 	UCHAR ParamSetCount:4;
 	UCHAR Rsv:3;
 	UCHAR UAPSD:1;
 } QBSS_AP_INFO_PARM, *PQBSS_AP_INFO_PARM;
 
-// QOS Capability reported in QAP's BEACON/ProbeRsp
-// QOS Capability sent out in QSTA's AssociateReq/ReAssociateReq
+/* QOS Capability reported in QAP's BEACON/ProbeRsp */
+/* QOS Capability sent out in QSTA's AssociateReq/ReAssociateReq */
 typedef struct {
-	BOOLEAN bValid;		// 1: variable contains valid value
+	BOOLEAN bValid;		/* 1: variable contains valid value */
 	BOOLEAN bQAck;
 	BOOLEAN bQueueRequest;
 	BOOLEAN bTxopRequest;
-//  BOOLEAN     bMoreDataAck;
+/*  BOOLEAN     bMoreDataAck; */
 	UCHAR EdcaUpdateCount;
 } QOS_CAPABILITY_PARM, *PQOS_CAPABILITY_PARM;
 
@@ -759,7 +759,7 @@ typedef struct {
 typedef struct {
 	UCHAR Bssid[MAC_ADDR_LEN];
 	UCHAR Channel;
-	UCHAR CentralChannel;	//Store the wide-band central channel for 40MHz.  .used in 40MHz AP. Or this is the same as Channel.
+	UCHAR CentralChannel;	/*Store the wide-band central channel for 40MHz.  .used in 40MHz AP. Or this is the same as Channel. */
 	UCHAR BssType;
 	USHORT AtimWin;
 	USHORT BeaconPeriod;
@@ -770,11 +770,11 @@ typedef struct {
 	UCHAR ExtRateLen;
 	HT_CAPABILITY_IE HtCapability;
 	UCHAR HtCapabilityLen;
-	ADD_HT_INFO_IE AddHtInfo;	// AP might use this additional ht info IE
+	ADD_HT_INFO_IE AddHtInfo;	/* AP might use this additional ht info IE */
 	UCHAR AddHtInfoLen;
 	UCHAR NewExtChanOffset;
 	CHAR Rssi;
-	UCHAR Privacy;		// Indicate security function ON/OFF. Don't mess up with auth mode.
+	UCHAR Privacy;		/* Indicate security function ON/OFF. Don't mess up with auth mode. */
 	UCHAR Hidden;
 
 	USHORT DtimPeriod;
@@ -787,30 +787,30 @@ typedef struct {
 	UCHAR SsidLen;
 	CHAR Ssid[MAX_LEN_OF_SSID];
 
-	ULONG LastBeaconRxTime;	// OS's timestamp
+	ULONG LastBeaconRxTime;	/* OS's timestamp */
 
 	BOOLEAN bSES;
 
-	// New for WPA2
-	CIPHER_SUITE WPA;	// AP announced WPA cipher suite
-	CIPHER_SUITE WPA2;	// AP announced WPA2 cipher suite
+	/* New for WPA2 */
+	CIPHER_SUITE WPA;	/* AP announced WPA cipher suite */
+	CIPHER_SUITE WPA2;	/* AP announced WPA2 cipher suite */
 
-	// New for microsoft WPA support
+	/* New for microsoft WPA support */
 	NDIS_802_11_FIXED_IEs FixIEs;
-	NDIS_802_11_AUTHENTICATION_MODE AuthModeAux;	// Addition mode for WPA2 / WPA capable AP
+	NDIS_802_11_AUTHENTICATION_MODE AuthModeAux;	/* Addition mode for WPA2 / WPA capable AP */
 	NDIS_802_11_AUTHENTICATION_MODE AuthMode;
-	NDIS_802_11_WEP_STATUS WepStatus;	// Unicast Encryption Algorithm extract from VAR_IE
-	USHORT VarIELen;	// Length of next VIE include EID & Length
+	NDIS_802_11_WEP_STATUS WepStatus;	/* Unicast Encryption Algorithm extract from VAR_IE */
+	USHORT VarIELen;	/* Length of next VIE include EID & Length */
 	UCHAR VarIEs[MAX_VIE_LEN];
 
-	// CCX Ckip information
+	/* CCX Ckip information */
 	UCHAR CkipFlag;
 
-	// CCX 2 TSF
-	UCHAR PTSF[4];		// Parent TSF
-	UCHAR TTSF[8];		// Target TSF
+	/* CCX 2 TSF */
+	UCHAR PTSF[4];		/* Parent TSF */
+	UCHAR TTSF[8];		/* Target TSF */
 
-	// 802.11e d9, and WMM
+	/* 802.11e d9, and WMM */
 	EDCA_PARM EdcaParm;
 	QOS_CAPABILITY_PARM QosCapability;
 	QBSS_LOAD_PARM QbssLoad;
@@ -857,12 +857,12 @@ typedef struct _STATE_MACHINE {
 	STATE_MACHINE_FUNC *TransFunc;
 } STATE_MACHINE, *PSTATE_MACHINE;
 
-// MLME AUX data structure that hold temporarliy settings during a connection attempt.
-// Once this attemp succeeds, all settings will be copy to pAd->StaActive.
-// A connection attempt (user set OID, roaming, CCX fast roaming,..) consists of
-// several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely
-// separate this under-trial settings away from pAd->StaActive so that once
-// this new attempt failed, driver can auto-recover back to the active settings.
+/* MLME AUX data structure that hold temporarliy settings during a connection attempt. */
+/* Once this attemp succeeds, all settings will be copy to pAd->StaActive. */
+/* A connection attempt (user set OID, roaming, CCX fast roaming,..) consists of */
+/* several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely */
+/* separate this under-trial settings away from pAd->StaActive so that once */
+/* this new attempt failed, driver can auto-recover back to the active settings. */
 typedef struct _MLME_AUX {
 	UCHAR BssType;
 	UCHAR Ssid[MAX_LEN_OF_SSID];
@@ -881,28 +881,28 @@ typedef struct _MLME_AUX {
 	USHORT CfpPeriod;
 	USHORT AtimWin;
 
-	// Copy supported rate from desired AP's beacon. We are trying to match
-	// AP's supported and extended rate settings.
+	/* Copy supported rate from desired AP's beacon. We are trying to match */
+	/* AP's supported and extended rate settings. */
 	UCHAR SupRate[MAX_LEN_OF_SUPPORTED_RATES];
 	UCHAR ExtRate[MAX_LEN_OF_SUPPORTED_RATES];
 	UCHAR SupRateLen;
 	UCHAR ExtRateLen;
 	HT_CAPABILITY_IE HtCapability;
 	UCHAR HtCapabilityLen;
-	ADD_HT_INFO_IE AddHtInfo;	// AP might use this additional ht info IE
+	ADD_HT_INFO_IE AddHtInfo;	/* AP might use this additional ht info IE */
 	UCHAR NewExtChannelOffset;
-	//RT_HT_CAPABILITY      SupportedHtPhy;
+	/*RT_HT_CAPABILITY      SupportedHtPhy; */
 
-	// new for QOS
-	QOS_CAPABILITY_PARM APQosCapability;	// QOS capability of the current associated AP
-	EDCA_PARM APEdcaParm;	// EDCA parameters of the current associated AP
-	QBSS_LOAD_PARM APQbssLoad;	// QBSS load of the current associated AP
+	/* new for QOS */
+	QOS_CAPABILITY_PARM APQosCapability;	/* QOS capability of the current associated AP */
+	EDCA_PARM APEdcaParm;	/* EDCA parameters of the current associated AP */
+	QBSS_LOAD_PARM APQbssLoad;	/* QBSS load of the current associated AP */
 
-	// new to keep Ralink specific feature
+	/* new to keep Ralink specific feature */
 	ULONG APRalinkIe;
 
-	BSS_TABLE SsidBssTab;	// AP list for the same SSID
-	BSS_TABLE RoamTab;	// AP list eligible for roaming
+	BSS_TABLE SsidBssTab;	/* AP list for the same SSID */
+	BSS_TABLE RoamTab;	/* AP list eligible for roaming */
 	ULONG BssIdx;
 	ULONG RoamIdx;
 
@@ -914,7 +914,7 @@ typedef struct _MLME_AUX {
 } MLME_AUX, *PMLME_AUX;
 
 typedef struct _MLME_ADDBA_REQ_STRUCT {
-	UCHAR Wcid;		//
+	UCHAR Wcid;		/* */
 	UCHAR pAddr[MAC_ADDR_LEN];
 	UCHAR BaBufSize;
 	USHORT TimeOutValue;
@@ -924,13 +924,13 @@ typedef struct _MLME_ADDBA_REQ_STRUCT {
 } MLME_ADDBA_REQ_STRUCT, *PMLME_ADDBA_REQ_STRUCT;
 
 typedef struct _MLME_DELBA_REQ_STRUCT {
-	UCHAR Wcid;		//
+	UCHAR Wcid;		/* */
 	UCHAR Addr[MAC_ADDR_LEN];
 	UCHAR TID;
 	UCHAR Initiator;
 } MLME_DELBA_REQ_STRUCT, *PMLME_DELBA_REQ_STRUCT;
 
-// assoc struct is equal to reassoc
+/* assoc struct is equal to reassoc */
 typedef struct _MLME_ASSOC_REQ_STRUCT {
 	UCHAR Addr[MAC_ADDR_LEN];
 	USHORT CapabilityInfo;
@@ -991,62 +991,62 @@ typedef struct PACKED _RTMP_TX_RATE_SWITCH {
 	UCHAR TrainDown;
 } RRTMP_TX_RATE_SWITCH, *PRTMP_TX_RATE_SWITCH;
 
-// ========================== AP mlme.h ===============================
-#define TBTT_PRELOAD_TIME       384	// usec. LomgPreamble + 24-byte at 1Mbps
+/* ========================== AP mlme.h =============================== */
+#define TBTT_PRELOAD_TIME       384	/* usec. LomgPreamble + 24-byte at 1Mbps */
 #define DEFAULT_DTIM_PERIOD     1
 
-#define MAC_TABLE_AGEOUT_TIME			300	// unit: sec
-#define MAC_TABLE_ASSOC_TIMEOUT			5	// unit: sec
+#define MAC_TABLE_AGEOUT_TIME			300	/* unit: sec */
+#define MAC_TABLE_ASSOC_TIMEOUT			5	/* unit: sec */
 #define MAC_TABLE_FULL(Tab)				((Tab).size == MAX_LEN_OF_MAC_TABLE)
 
-// AP shall drop the sta if contine Tx fail count reach it.
-#define MAC_ENTRY_LIFE_CHECK_CNT		20	// packet cnt.
+/* AP shall drop the sta if contine Tx fail count reach it. */
+#define MAC_ENTRY_LIFE_CHECK_CNT		20	/* packet cnt. */
 
-// Value domain of pMacEntry->Sst
+/* Value domain of pMacEntry->Sst */
 typedef enum _Sst {
-	SST_NOT_AUTH,		// 0: equivalent to IEEE 802.11/1999 state 1
-	SST_AUTH,		// 1: equivalent to IEEE 802.11/1999 state 2
-	SST_ASSOC		// 2: equivalent to IEEE 802.11/1999 state 3
+	SST_NOT_AUTH,		/* 0: equivalent to IEEE 802.11/1999 state 1 */
+	SST_AUTH,		/* 1: equivalent to IEEE 802.11/1999 state 2 */
+	SST_ASSOC		/* 2: equivalent to IEEE 802.11/1999 state 3 */
 } SST;
 
-// value domain of pMacEntry->AuthState
+/* value domain of pMacEntry->AuthState */
 typedef enum _AuthState {
 	AS_NOT_AUTH,
-	AS_AUTH_OPEN,		// STA has been authenticated using OPEN SYSTEM
-	AS_AUTH_KEY,		// STA has been authenticated using SHARED KEY
-	AS_AUTHENTICATING	// STA is waiting for AUTH seq#3 using SHARED KEY
+	AS_AUTH_OPEN,		/* STA has been authenticated using OPEN SYSTEM */
+	AS_AUTH_KEY,		/* STA has been authenticated using SHARED KEY */
+	AS_AUTHENTICATING	/* STA is waiting for AUTH seq#3 using SHARED KEY */
 } AUTH_STATE;
 
-//for-wpa value domain of pMacEntry->WpaState  802.1i D3   p.114
+/*for-wpa value domain of pMacEntry->WpaState  802.1i D3   p.114 */
 typedef enum _ApWpaState {
-	AS_NOTUSE,		// 0
-	AS_DISCONNECT,		// 1
-	AS_DISCONNECTED,	// 2
-	AS_INITIALIZE,		// 3
-	AS_AUTHENTICATION,	// 4
-	AS_AUTHENTICATION2,	// 5
-	AS_INITPMK,		// 6
-	AS_INITPSK,		// 7
-	AS_PTKSTART,		// 8
-	AS_PTKINIT_NEGOTIATING,	// 9
-	AS_PTKINITDONE,		// 10
-	AS_UPDATEKEYS,		// 11
-	AS_INTEGRITY_FAILURE,	// 12
-	AS_KEYUPDATE,		// 13
+	AS_NOTUSE,		/* 0 */
+	AS_DISCONNECT,		/* 1 */
+	AS_DISCONNECTED,	/* 2 */
+	AS_INITIALIZE,		/* 3 */
+	AS_AUTHENTICATION,	/* 4 */
+	AS_AUTHENTICATION2,	/* 5 */
+	AS_INITPMK,		/* 6 */
+	AS_INITPSK,		/* 7 */
+	AS_PTKSTART,		/* 8 */
+	AS_PTKINIT_NEGOTIATING,	/* 9 */
+	AS_PTKINITDONE,		/* 10 */
+	AS_UPDATEKEYS,		/* 11 */
+	AS_INTEGRITY_FAILURE,	/* 12 */
+	AS_KEYUPDATE,		/* 13 */
 } AP_WPA_STATE;
 
-// for-wpa value domain of pMacEntry->WpaState  802.1i D3   p.114
+/* for-wpa value domain of pMacEntry->WpaState  802.1i D3   p.114 */
 typedef enum _GTKState {
 	REKEY_NEGOTIATING,
 	REKEY_ESTABLISHED,
 	KEYERROR,
 } GTK_STATE;
 
-//  for-wpa  value domain of pMacEntry->WpaState  802.1i D3   p.114
+/*  for-wpa  value domain of pMacEntry->WpaState  802.1i D3   p.114 */
 typedef enum _WpaGTKState {
 	SETKEYS,
 	SETKEYS_DONE,
 } WPA_GTK_STATE;
-// ====================== end of AP mlme.h ============================
+/* ====================== end of AP mlme.h ============================ */
 
-#endif // MLME_H__
+#endif /* MLME_H__ */

+ 190 - 190
drivers/staging/rt2860/oid.h

@@ -37,7 +37,7 @@
 #ifndef _OID_H_
 #define _OID_H_
 
-//#include <linux/wireless.h>
+/*#include <linux/wireless.h> */
 
 #ifndef TRUE
 #define TRUE				1
@@ -45,9 +45,9 @@
 #ifndef FALSE
 #define FALSE				0
 #endif
-//
-// IEEE 802.11 Structures and definitions
-//
+/* */
+/* IEEE 802.11 Structures and definitions */
+/* */
 #define MAX_TX_POWER_LEVEL              100	/* mW */
 #define MAX_RSSI_TRIGGER                -10	/* dBm */
 #define MIN_RSSI_TRIGGER                -200	/* dBm */
@@ -55,19 +55,19 @@
 #define MIN_FRAG_THRESHOLD              256	/* byte count */
 #define MAX_RTS_THRESHOLD               2347	/* byte count */
 
-// new types for Media Specific Indications
-// Extension channel offset
+/* new types for Media Specific Indications */
+/* Extension channel offset */
 #define EXTCHA_NONE			0
 #define EXTCHA_ABOVE		0x1
 #define EXTCHA_BELOW		0x3
 
-// BW
+/* BW */
 #define BAND_WIDTH_20		0
 #define BAND_WIDTH_40		1
 #define BAND_WIDTH_BOTH		2
-#define BAND_WIDTH_10		3	// 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field.
-// SHORTGI
-#define GAP_INTERVAL_400	1	// only support in HT mode
+#define BAND_WIDTH_10		3	/* 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field. */
+/* SHORTGI */
+#define GAP_INTERVAL_400	1	/* only support in HT mode */
 #define GAP_INTERVAL_800	0
 #define GAP_INTERVAL_BOTH	2
 
@@ -78,12 +78,12 @@
 #define NDIS_802_11_LENGTH_RATES        8
 #define NDIS_802_11_LENGTH_RATES_EX     16
 #define MAC_ADDR_LENGTH                 6
-//#define MAX_NUM_OF_CHS                                        49 // 14 channels @2.4G +  12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL terminationc
-#define MAX_NUM_OF_CHS				54	// 14 channels @2.4G +  12@UNII(lower/middle) + 16@HiperLAN2 + 11@UNII(upper) + 0 @Japan + 1 as NULL termination
-#define MAX_NUMBER_OF_EVENT				10	// entry # in EVENT table
-#define MAX_NUMBER_OF_MAC				32	// if MAX_MBSSID_NUM is 8, this value can't be larger than 211
+/*#define MAX_NUM_OF_CHS                                        49 // 14 channels @2.4G +  12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL terminationc */
+#define MAX_NUM_OF_CHS				54	/* 14 channels @2.4G +  12@UNII(lower/middle) + 16@HiperLAN2 + 11@UNII(upper) + 0 @Japan + 1 as NULL termination */
+#define MAX_NUMBER_OF_EVENT				10	/* entry # in EVENT table */
+#define MAX_NUMBER_OF_MAC				32	/* if MAX_MBSSID_NUM is 8, this value can't be larger than 211 */
 #define MAX_NUMBER_OF_ACL				64
-#define MAX_LENGTH_OF_SUPPORT_RATES		12	// 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54
+#define MAX_LENGTH_OF_SUPPORT_RATES		12	/* 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 */
 #define MAX_NUMBER_OF_DLS_ENTRY			4
 
 #define RT_QUERY_SIGNAL_CONTEXT				0x0402
@@ -91,9 +91,9 @@
 #define RT_SET_APD_PID						0x0405
 #define RT_SET_DEL_MAC_ENTRY				0x0406
 #define RT_QUERY_EVENT_TABLE			0x0407
-//
-// IEEE 802.11 OIDs
-//
+/* */
+/* IEEE 802.11 OIDs */
+/* */
 #define	OID_GET_SET_TOGGLE			0x8000
 #define	OID_GET_SET_FROM_UI			0x4000
 
@@ -119,7 +119,7 @@
 #define	RT_OID_802_11_QUERY_LAST_RX_RATE			0x0613
 #define	RT_OID_802_11_TX_POWER_LEVEL_1				0x0614
 #define	RT_OID_802_11_QUERY_PIDVID					0x0615
-//for WPA_SUPPLICANT_SUPPORT
+/*for WPA_SUPPLICANT_SUPPORT */
 #define OID_SET_COUNTERMEASURES                     0x0616
 #define RT_OID_WPA_SUPPLICANT_SUPPORT               0x0621
 #define RT_OID_WE_VERSION_COMPILED                  0x0622
@@ -132,7 +132,7 @@ typedef enum _NDIS_802_11_STATUS_TYPE {
 	Ndis802_11StatusType_Authentication,
 	Ndis802_11StatusType_MediaStreamMode,
 	Ndis802_11StatusType_PMKID_CandidateList,
-	Ndis802_11StatusTypeMax	// not a real type, defined as an upper bound
+	Ndis802_11StatusTypeMax	/* not a real type, defined as an upper bound */
 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
 
 typedef UCHAR NDIS_802_11_MAC_ADDRESS[6];
@@ -141,7 +141,7 @@ typedef struct _NDIS_802_11_STATUS_INDICATION {
 	NDIS_802_11_STATUS_TYPE StatusType;
 } NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
 
-// mask for authentication/integrity fields
+/* mask for authentication/integrity fields */
 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS        0x0f
 
 #define NDIS_802_11_AUTH_REQUEST_REAUTH             0x01
@@ -150,27 +150,27 @@ typedef struct _NDIS_802_11_STATUS_INDICATION {
 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR        0x0E
 
 typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST {
-	ULONG Length;		// Length of structure
+	ULONG Length;		/* Length of structure */
 	NDIS_802_11_MAC_ADDRESS Bssid;
 	ULONG Flags;
 } NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
 
-//Added new types for PMKID Candidate lists.
+/*Added new types for PMKID Candidate lists. */
 typedef struct _PMKID_CANDIDATE {
 	NDIS_802_11_MAC_ADDRESS BSSID;
 	ULONG Flags;
 } PMKID_CANDIDATE, *PPMKID_CANDIDATE;
 
 typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST {
-	ULONG Version;		// Version of the structure
-	ULONG NumCandidates;	// No. of pmkid candidates
+	ULONG Version;		/* Version of the structure */
+	ULONG NumCandidates;	/* No. of pmkid candidates */
 	PMKID_CANDIDATE CandidateList[1];
 } NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
 
-//Flags for PMKID Candidate list structure
+/*Flags for PMKID Candidate list structure */
 #define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED	0x01
 
-// Added new types for OFDM 5G and 2.4G
+/* Added new types for OFDM 5G and 2.4G */
 typedef enum _NDIS_802_11_NETWORK_TYPE {
 	Ndis802_11FH,
 	Ndis802_11DS,
@@ -179,11 +179,11 @@ typedef enum _NDIS_802_11_NETWORK_TYPE {
 	Ndis802_11Automode,
 	Ndis802_11OFDM5_N,
 	Ndis802_11OFDM24_N,
-	Ndis802_11NetworkTypeMax	// not a real type, defined as an upper bound
+	Ndis802_11NetworkTypeMax	/* not a real type, defined as an upper bound */
 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
 
 typedef struct _NDIS_802_11_NETWORK_TYPE_LIST {
-	UINT NumberOfItems;	// in list below, at least 1
+	UINT NumberOfItems;	/* in list below, at least 1 */
 	NDIS_802_11_NETWORK_TYPE NetworkType[1];
 } NDIS_802_11_NETWORK_TYPE_LIST, *PNDIS_802_11_NETWORK_TYPE_LIST;
 
@@ -192,33 +192,33 @@ typedef enum _NDIS_802_11_POWER_MODE {
 	Ndis802_11PowerModeMAX_PSP,
 	Ndis802_11PowerModeFast_PSP,
 	Ndis802_11PowerModeLegacy_PSP,
-	Ndis802_11PowerModeMax	// not a real mode, defined as an upper bound
+	Ndis802_11PowerModeMax	/* not a real mode, defined as an upper bound */
 } NDIS_802_11_POWER_MODE, *PNDIS_802_11_POWER_MODE;
 
-typedef ULONG NDIS_802_11_TX_POWER_LEVEL;	// in milliwatts
+typedef ULONG NDIS_802_11_TX_POWER_LEVEL;	/* in milliwatts */
 
-//
-// Received Signal Strength Indication
-//
-typedef LONG NDIS_802_11_RSSI;	// in dBm
+/* */
+/* Received Signal Strength Indication */
+/* */
+typedef LONG NDIS_802_11_RSSI;	/* in dBm */
 
 typedef struct _NDIS_802_11_CONFIGURATION_FH {
-	ULONG Length;		// Length of structure
-	ULONG HopPattern;	// As defined by 802.11, MSB set
-	ULONG HopSet;		// to one if non-802.11
-	ULONG DwellTime;	// units are Kusec
+	ULONG Length;		/* Length of structure */
+	ULONG HopPattern;	/* As defined by 802.11, MSB set */
+	ULONG HopSet;		/* to one if non-802.11 */
+	ULONG DwellTime;	/* units are Kusec */
 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
 
 typedef struct _NDIS_802_11_CONFIGURATION {
-	ULONG Length;		// Length of structure
-	ULONG BeaconPeriod;	// units are Kusec
-	ULONG ATIMWindow;	// units are Kusec
-	ULONG DSConfig;		// Frequency, units are kHz
+	ULONG Length;		/* Length of structure */
+	ULONG BeaconPeriod;	/* units are Kusec */
+	ULONG ATIMWindow;	/* units are Kusec */
+	ULONG DSConfig;		/* Frequency, units are kHz */
 	NDIS_802_11_CONFIGURATION_FH FHConfig;
 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
 
 typedef struct _NDIS_802_11_STATISTICS {
-	ULONG Length;		// Length of structure
+	ULONG Length;		/* Length of structure */
 	LARGE_INTEGER TransmittedFragmentCount;
 	LARGE_INTEGER MulticastTransmittedFrameCount;
 	LARGE_INTEGER FailedCount;
@@ -245,7 +245,7 @@ typedef struct _NDIS_802_11_STATISTICS {
 typedef ULONG NDIS_802_11_KEY_INDEX;
 typedef ULONGLONG NDIS_802_11_KEY_RSC;
 
-#define MAX_RADIUS_SRV_NUM			2	// 802.1x failover number
+#define MAX_RADIUS_SRV_NUM			2	/* 802.1x failover number */
 
 typedef struct PACKED _RADIUS_SRV_INFO {
 	UINT32 radius_ip;
@@ -257,16 +257,16 @@ typedef struct PACKED _RADIUS_SRV_INFO {
 typedef struct PACKED _RADIUS_KEY_INFO {
 	UCHAR radius_srv_num;
 	RADIUS_SRV_INFO radius_srv_info[MAX_RADIUS_SRV_NUM];
-	UCHAR ieee8021xWEP;	// dynamic WEP
+	UCHAR ieee8021xWEP;	/* dynamic WEP */
 	UCHAR key_index;
-	UCHAR key_length;	// length of key in bytes
+	UCHAR key_length;	/* length of key in bytes */
 	UCHAR key_material[13];
 } RADIUS_KEY_INFO, *PRADIUS_KEY_INFO;
 
-// It's used by 802.1x daemon to require relative configuration
+/* It's used by 802.1x daemon to require relative configuration */
 typedef struct PACKED _RADIUS_CONF {
-	UINT32 Length;		// Length of this structure
-	UCHAR mbss_num;		// indicate multiple BSS number
+	UINT32 Length;		/* Length of this structure */
+	UCHAR mbss_num;		/* indicate multiple BSS number */
 	UINT32 own_ip_addr;
 	UINT32 retry_interval;
 	UINT32 session_timeout_interval;
@@ -277,34 +277,34 @@ typedef struct PACKED _RADIUS_CONF {
 	RADIUS_KEY_INFO RadiusInfo[8];
 } RADIUS_CONF, *PRADIUS_CONF;
 
-// Key mapping keys require a BSSID
+/* Key mapping keys require a BSSID */
 typedef struct _NDIS_802_11_KEY {
-	UINT Length;		// Length of this structure
+	UINT Length;		/* Length of this structure */
 	UINT KeyIndex;
-	UINT KeyLength;		// length of key in bytes
+	UINT KeyLength;		/* length of key in bytes */
 	NDIS_802_11_MAC_ADDRESS BSSID;
 	NDIS_802_11_KEY_RSC KeyRSC;
-	UCHAR KeyMaterial[1];	// variable length depending on above field
+	UCHAR KeyMaterial[1];	/* variable length depending on above field */
 } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
 
 typedef struct _NDIS_802_11_PASSPHRASE {
-	UINT KeyLength;		// length of key in bytes
+	UINT KeyLength;		/* length of key in bytes */
 	NDIS_802_11_MAC_ADDRESS BSSID;
-	UCHAR KeyMaterial[1];	// variable length depending on above field
+	UCHAR KeyMaterial[1];	/* variable length depending on above field */
 } NDIS_802_11_PASSPHRASE, *PNDIS_802_11_PASSPHRASE;
 
 typedef struct _NDIS_802_11_REMOVE_KEY {
-	UINT Length;		// Length of this structure
+	UINT Length;		/* Length of this structure */
 	UINT KeyIndex;
 	NDIS_802_11_MAC_ADDRESS BSSID;
 } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
 
 typedef struct _NDIS_802_11_WEP {
-	UINT Length;		// Length of this structure
-	UINT KeyIndex;		// 0 is the per-client key, 1-N are the
-	// global keys
-	UINT KeyLength;		// length of key in bytes
-	UCHAR KeyMaterial[1];	// variable length depending on above field
+	UINT Length;		/* Length of this structure */
+	UINT KeyIndex;		/* 0 is the per-client key, 1-N are the */
+	/* global keys */
+	UINT KeyLength;		/* length of key in bytes */
+	UCHAR KeyMaterial[1];	/* variable length depending on above field */
 } NDIS_802_11_WEP, *PNDIS_802_11_WEP;
 
 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
@@ -312,10 +312,10 @@ typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
 	Ndis802_11Infrastructure,
 	Ndis802_11AutoUnknown,
 	Ndis802_11Monitor,
-	Ndis802_11InfrastructureMax	// Not a real value, defined as upper bound
+	Ndis802_11InfrastructureMax	/* Not a real value, defined as upper bound */
 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
 
-// Add new authentication modes
+/* Add new authentication modes */
 typedef enum _NDIS_802_11_AUTHENTICATION_MODE {
 	Ndis802_11AuthModeOpen,
 	Ndis802_11AuthModeShared,
@@ -327,25 +327,25 @@ typedef enum _NDIS_802_11_AUTHENTICATION_MODE {
 	Ndis802_11AuthModeWPA2PSK,
 	Ndis802_11AuthModeWPA1WPA2,
 	Ndis802_11AuthModeWPA1PSKWPA2PSK,
-	Ndis802_11AuthModeMax	// Not a real mode, defined as upper bound
+	Ndis802_11AuthModeMax	/* Not a real mode, defined as upper bound */
 } NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
 
-typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES];	// Set of 8 data rates
-typedef UCHAR NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX];	// Set of 16 data rates
+typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES];	/* Set of 8 data rates */
+typedef UCHAR NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX];	/* Set of 16 data rates */
 
 typedef struct PACKED _NDIS_802_11_SSID {
-	UINT SsidLength;	// length of SSID field below, in bytes;
-	// this can be zero.
-	UCHAR Ssid[NDIS_802_11_LENGTH_SSID];	// SSID information field
+	UINT SsidLength;	/* length of SSID field below, in bytes; */
+	/* this can be zero. */
+	UCHAR Ssid[NDIS_802_11_LENGTH_SSID];	/* SSID information field */
 } NDIS_802_11_SSID, *PNDIS_802_11_SSID;
 
 typedef struct PACKED _NDIS_WLAN_BSSID {
-	ULONG Length;		// Length of this structure
-	NDIS_802_11_MAC_ADDRESS MacAddress;	// BSSID
+	ULONG Length;		/* Length of this structure */
+	NDIS_802_11_MAC_ADDRESS MacAddress;	/* BSSID */
 	UCHAR Reserved[2];
-	NDIS_802_11_SSID Ssid;	// SSID
-	ULONG Privacy;		// WEP encryption requirement
-	NDIS_802_11_RSSI Rssi;	// receive signal strength in dBm
+	NDIS_802_11_SSID Ssid;	/* SSID */
+	ULONG Privacy;		/* WEP encryption requirement */
+	NDIS_802_11_RSSI Rssi;	/* receive signal strength in dBm */
 	NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
 	NDIS_802_11_CONFIGURATION Configuration;
 	NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
@@ -353,19 +353,19 @@ typedef struct PACKED _NDIS_WLAN_BSSID {
 } NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID;
 
 typedef struct PACKED _NDIS_802_11_BSSID_LIST {
-	UINT NumberOfItems;	// in list below, at least 1
+	UINT NumberOfItems;	/* in list below, at least 1 */
 	NDIS_WLAN_BSSID Bssid[1];
 } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST;
 
-// Added Capabilities, IELength and IEs for each BSSID
+/* Added Capabilities, IELength and IEs for each BSSID */
 typedef struct PACKED _NDIS_WLAN_BSSID_EX {
-	ULONG Length;		// Length of this structure
-	NDIS_802_11_MAC_ADDRESS MacAddress;	// BSSID
+	ULONG Length;		/* Length of this structure */
+	NDIS_802_11_MAC_ADDRESS MacAddress;	/* BSSID */
 	UCHAR Reserved[2];
-	NDIS_802_11_SSID Ssid;	// SSID
-	UINT Privacy;		// WEP encryption requirement
-	NDIS_802_11_RSSI Rssi;	// receive signal
-	// strength in dBm
+	NDIS_802_11_SSID Ssid;	/* SSID */
+	UINT Privacy;		/* WEP encryption requirement */
+	NDIS_802_11_RSSI Rssi;	/* receive signal */
+	/* strength in dBm */
 	NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
 	NDIS_802_11_CONFIGURATION Configuration;
 	NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
@@ -375,7 +375,7 @@ typedef struct PACKED _NDIS_WLAN_BSSID_EX {
 } NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
 
 typedef struct PACKED _NDIS_802_11_BSSID_LIST_EX {
-	UINT NumberOfItems;	// in list below, at least 1
+	UINT NumberOfItems;	/* in list below, at least 1 */
 	NDIS_WLAN_BSSID_EX Bssid[1];
 } NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
 
@@ -387,7 +387,7 @@ typedef struct PACKED _NDIS_802_11_FIXED_IEs {
 
 typedef struct _NDIS_802_11_VARIABLE_IEs {
 	UCHAR ElementID;
-	UCHAR Length;		// Number of bytes in data field
+	UCHAR Length;		/* Number of bytes in data field */
 	UCHAR data[1];
 } NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
 
@@ -402,8 +402,8 @@ typedef enum _NDIS_802_11_PRIVACY_FILTER {
 	Ndis802_11PrivFilter8021xWEP
 } NDIS_802_11_PRIVACY_FILTER, *PNDIS_802_11_PRIVACY_FILTER;
 
-// Added new encryption types
-// Also aliased typedef to new name
+/* Added new encryption types */
+/* Also aliased typedef to new name */
 typedef enum _NDIS_802_11_WEP_STATUS {
 	Ndis802_11WEPEnabled,
 	Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
@@ -417,7 +417,7 @@ typedef enum _NDIS_802_11_WEP_STATUS {
 	Ndis802_11Encryption2KeyAbsent,
 	Ndis802_11Encryption3Enabled,
 	Ndis802_11Encryption3KeyAbsent,
-	Ndis802_11Encryption4Enabled,	// TKIP or AES mix
+	Ndis802_11Encryption4Enabled,	/* TKIP or AES mix */
 	Ndis802_11Encryption4KeyAbsent,
 	Ndis802_11GroupWEP40Enabled,
 	Ndis802_11GroupWEP104Enabled,
@@ -465,13 +465,13 @@ typedef struct _NDIS_802_11_AUTHENTICATION_EVENT {
 	NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
 } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
 
-// 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE
+/* 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE */
 typedef enum _NDIS_802_11_MEDIA_STREAM_MODE {
 	Ndis802_11MediaStreamOff,
 	Ndis802_11MediaStreamOn,
 } NDIS_802_11_MEDIA_STREAM_MODE, *PNDIS_802_11_MEDIA_STREAM_MODE;
 
-// PMKID Structures
+/* PMKID Structures */
 typedef UCHAR NDIS_802_11_PMKID_VALUE[16];
 
 typedef struct _BSSID_INFO {
@@ -500,14 +500,14 @@ typedef struct _NDIS_802_11_CAPABILITY {
 	    AuthenticationEncryptionSupported[1];
 } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
 
-#define RT_PRIV_IOCTL							(SIOCIWFIRSTPRIV + 0x01)	// Sync. with AP for wsc upnp daemon
+#define RT_PRIV_IOCTL							(SIOCIWFIRSTPRIV + 0x01)	/* Sync. with AP for wsc upnp daemon */
 #define RTPRIV_IOCTL_SET							(SIOCIWFIRSTPRIV + 0x02)
 
 #define RTPRIV_IOCTL_STATISTICS                     (SIOCIWFIRSTPRIV + 0x09)
 #define RTPRIV_IOCTL_ADD_PMKID_CACHE                (SIOCIWFIRSTPRIV + 0x0A)
 #define RTPRIV_IOCTL_RADIUS_DATA                    (SIOCIWFIRSTPRIV + 0x0C)
 #define RTPRIV_IOCTL_GSITESURVEY					(SIOCIWFIRSTPRIV + 0x0D)
-#define RT_PRIV_IOCTL_EXT							(SIOCIWFIRSTPRIV + 0x0E)	// Sync. with RT61 (for wpa_supplicant)
+#define RT_PRIV_IOCTL_EXT							(SIOCIWFIRSTPRIV + 0x0E)	/* Sync. with RT61 (for wpa_supplicant) */
 #define RTPRIV_IOCTL_GET_MAC_TABLE					(SIOCIWFIRSTPRIV + 0x0F)
 
 #define RTPRIV_IOCTL_SHOW							(SIOCIWFIRSTPRIV + 0x11)
@@ -519,7 +519,7 @@ enum {
 #ifdef RTMP_MAC_USB
 	SHOW_RXBULK_INFO = 8,
 	SHOW_TXBULK_INFO = 9,
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
 	RAIO_OFF = 10,
 	RAIO_ON = 11,
 	SHOW_CFG_VALUE = 20,
@@ -531,19 +531,19 @@ enum {
 #define OID_802_11_GET_COUNTRY_CODE				0x0716
 #define OID_802_11_GET_CHANNEL_GEOGRAPHY		0x0717
 
-#define RT_OID_WSC_SET_PASSPHRASE                   0x0740	// passphrase for wpa(2)-psk
+#define RT_OID_WSC_SET_PASSPHRASE                   0x0740	/* passphrase for wpa(2)-psk */
 #define RT_OID_WSC_DRIVER_AUTO_CONNECT              0x0741
 #define RT_OID_WSC_QUERY_DEFAULT_PROFILE            0x0742
 #define RT_OID_WSC_SET_CONN_BY_PROFILE_INDEX        0x0743
 #define RT_OID_WSC_SET_ACTION                       0x0744
 #define RT_OID_WSC_SET_SSID                         0x0745
 #define RT_OID_WSC_SET_PIN_CODE                     0x0746
-#define RT_OID_WSC_SET_MODE                         0x0747	// PIN or PBC
-#define RT_OID_WSC_SET_CONF_MODE                    0x0748	// Enrollee or Registrar
+#define RT_OID_WSC_SET_MODE                         0x0747	/* PIN or PBC */
+#define RT_OID_WSC_SET_CONF_MODE                    0x0748	/* Enrollee or Registrar */
 #define RT_OID_WSC_SET_PROFILE                      0x0749
 #define	RT_OID_WSC_CONFIG_STATUS					0x074F
 #define RT_OID_802_11_WSC_QUERY_PROFILE				0x0750
-// for consistency with RT61
+/* for consistency with RT61 */
 #define RT_OID_WSC_QUERY_STATUS						0x0751
 #define RT_OID_WSC_PIN_CODE							0x0752
 #define RT_OID_WSC_UUID								0x0753
@@ -555,20 +555,20 @@ enum {
 #define RT_OID_WSC_SERIAL_NO						0x0759
 #define RT_OID_WSC_MAC_ADDRESS						0x0760
 
-// New for MeetingHouse Api support
+/* New for MeetingHouse Api support */
 #define OID_MH_802_1X_SUPPORTED               0xFFEDC100
 
-// MIMO Tx parameter, ShortGI, MCS, STBC, etc.  these are fields in TXWI. Don't change this definition!!!
+/* MIMO Tx parameter, ShortGI, MCS, STBC, etc.  these are fields in TXWI. Don't change this definition!!! */
 typedef union _HTTRANSMIT_SETTING {
 	struct {
-		USHORT MCS:7;	// MCS
-		USHORT BW:1;	//channel bandwidth 20MHz or 40 MHz
+		USHORT MCS:7;	/* MCS */
+		USHORT BW:1;	/*channel bandwidth 20MHz or 40 MHz */
 		USHORT ShortGI:1;
-		USHORT STBC:2;	//SPACE
-//      USHORT          rsv:3;
+		USHORT STBC:2;	/*SPACE */
+/*      USHORT          rsv:3; */
 		USHORT rsv:2;
 		USHORT TxBF:1;
-		USHORT MODE:2;	// Use definition MODE_xxx.
+		USHORT MODE:2;	/* Use definition MODE_xxx. */
 	} field;
 	USHORT word;
 } HTTRANSMIT_SETTING, *PHTTRANSMIT_SETTING;
@@ -585,45 +585,45 @@ typedef enum _RT_802_11_PHY_MODE {
 	PHY_11A,
 	PHY_11ABG_MIXED,
 	PHY_11G,
-	PHY_11ABGN_MIXED,	// both band   5
-	PHY_11N_2_4G,		// 11n-only with 2.4G band      6
-	PHY_11GN_MIXED,		// 2.4G band      7
-	PHY_11AN_MIXED,		// 5G  band       8
-	PHY_11BGN_MIXED,	// if check 802.11b.      9
-	PHY_11AGN_MIXED,	// if check 802.11b.      10
-	PHY_11N_5G,		// 11n-only with 5G band                11
+	PHY_11ABGN_MIXED,	/* both band   5 */
+	PHY_11N_2_4G,		/* 11n-only with 2.4G band      6 */
+	PHY_11GN_MIXED,		/* 2.4G band      7 */
+	PHY_11AN_MIXED,		/* 5G  band       8 */
+	PHY_11BGN_MIXED,	/* if check 802.11b.      9 */
+	PHY_11AGN_MIXED,	/* if check 802.11b.      10 */
+	PHY_11N_5G,		/* 11n-only with 5G band                11 */
 } RT_802_11_PHY_MODE;
 
-// put all proprietery for-query objects here to reduce # of Query_OID
+/* put all proprietery for-query objects here to reduce # of Query_OID */
 typedef struct _RT_802_11_LINK_STATUS {
-	ULONG CurrTxRate;	// in units of 0.5Mbps
-	ULONG ChannelQuality;	// 0..100 %
-	ULONG TxByteCount;	// both ok and fail
-	ULONG RxByteCount;	// both ok and fail
-	ULONG CentralChannel;	// 40MHz central channel number
+	ULONG CurrTxRate;	/* in units of 0.5Mbps */
+	ULONG ChannelQuality;	/* 0..100 % */
+	ULONG TxByteCount;	/* both ok and fail */
+	ULONG RxByteCount;	/* both ok and fail */
+	ULONG CentralChannel;	/* 40MHz central channel number */
 } RT_802_11_LINK_STATUS, *PRT_802_11_LINK_STATUS;
 
 typedef struct _RT_802_11_EVENT_LOG {
-	LARGE_INTEGER SystemTime;	// timestammp via NdisGetCurrentSystemTime()
+	LARGE_INTEGER SystemTime;	/* timestammp via NdisGetCurrentSystemTime() */
 	UCHAR Addr[MAC_ADDR_LENGTH];
-	USHORT Event;		// EVENT_xxx
+	USHORT Event;		/* EVENT_xxx */
 } RT_802_11_EVENT_LOG, *PRT_802_11_EVENT_LOG;
 
 typedef struct _RT_802_11_EVENT_TABLE {
 	ULONG Num;
-	ULONG Rsv;		// to align Log[] at LARGE_INEGER boundary
+	ULONG Rsv;		/* to align Log[] at LARGE_INEGER boundary */
 	RT_802_11_EVENT_LOG Log[MAX_NUMBER_OF_EVENT];
 } RT_802_11_EVENT_TABLE, PRT_802_11_EVENT_TABLE;
 
-// MIMO Tx parameter, ShortGI, MCS, STBC, etc.  these are fields in TXWI. Don't change this definition!!!
+/* MIMO Tx parameter, ShortGI, MCS, STBC, etc.  these are fields in TXWI. Don't change this definition!!! */
 typedef union _MACHTTRANSMIT_SETTING {
 	struct {
-		USHORT MCS:7;	// MCS
-		USHORT BW:1;	//channel bandwidth 20MHz or 40 MHz
+		USHORT MCS:7;	/* MCS */
+		USHORT BW:1;	/*channel bandwidth 20MHz or 40 MHz */
 		USHORT ShortGI:1;
-		USHORT STBC:2;	//SPACE
+		USHORT STBC:2;	/*SPACE */
 		USHORT rsv:3;
-		USHORT MODE:2;	// Use definition MODE_xxx.
+		USHORT MODE:2;	/* Use definition MODE_xxx. */
 	} field;
 	USHORT word;
 } MACHTTRANSMIT_SETTING, *PMACHTTRANSMIT_SETTING;
@@ -631,8 +631,8 @@ typedef union _MACHTTRANSMIT_SETTING {
 typedef struct _RT_802_11_MAC_ENTRY {
 	UCHAR Addr[MAC_ADDR_LENGTH];
 	UCHAR Aid;
-	UCHAR Psm;		// 0:PWR_ACTIVE, 1:PWR_SAVE
-	UCHAR MimoPs;		// 0:MMPS_STATIC, 1:MMPS_DYNAMIC, 3:MMPS_Enabled
+	UCHAR Psm;		/* 0:PWR_ACTIVE, 1:PWR_SAVE */
+	UCHAR MimoPs;		/* 0:MMPS_STATIC, 1:MMPS_DYNAMIC, 3:MMPS_Enabled */
 	CHAR AvgRssi0;
 	CHAR AvgRssi1;
 	CHAR AvgRssi2;
@@ -645,48 +645,48 @@ typedef struct _RT_802_11_MAC_TABLE {
 	RT_802_11_MAC_ENTRY Entry[MAX_NUMBER_OF_MAC];
 } RT_802_11_MAC_TABLE, *PRT_802_11_MAC_TABLE;
 
-// structure for query/set hardware register - MAC, BBP, RF register
+/* structure for query/set hardware register - MAC, BBP, RF register */
 typedef struct _RT_802_11_HARDWARE_REGISTER {
-	ULONG HardwareType;	// 0:MAC, 1:BBP, 2:RF register, 3:EEPROM
-	ULONG Offset;		// Q/S register offset addr
-	ULONG Data;		// R/W data buffer
+	ULONG HardwareType;	/* 0:MAC, 1:BBP, 2:RF register, 3:EEPROM */
+	ULONG Offset;		/* Q/S register offset addr */
+	ULONG Data;		/* R/W data buffer */
 } RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER;
 
 typedef struct _RT_802_11_AP_CONFIG {
-	ULONG EnableTxBurst;	// 0-disable, 1-enable
-	ULONG EnableTurboRate;	// 0-disable, 1-enable 72/100mbps turbo rate
-	ULONG IsolateInterStaTraffic;	// 0-disable, 1-enable isolation
-	ULONG HideSsid;		// 0-disable, 1-enable hiding
-	ULONG UseBGProtection;	// 0-AUTO, 1-always ON, 2-always OFF
-	ULONG UseShortSlotTime;	// 0-no use, 1-use 9-us short slot time
-	ULONG Rsv1;		// must be 0
-	ULONG SystemErrorBitmap;	// ignore upon SET, return system error upon QUERY
+	ULONG EnableTxBurst;	/* 0-disable, 1-enable */
+	ULONG EnableTurboRate;	/* 0-disable, 1-enable 72/100mbps turbo rate */
+	ULONG IsolateInterStaTraffic;	/* 0-disable, 1-enable isolation */
+	ULONG HideSsid;		/* 0-disable, 1-enable hiding */
+	ULONG UseBGProtection;	/* 0-AUTO, 1-always ON, 2-always OFF */
+	ULONG UseShortSlotTime;	/* 0-no use, 1-use 9-us short slot time */
+	ULONG Rsv1;		/* must be 0 */
+	ULONG SystemErrorBitmap;	/* ignore upon SET, return system error upon QUERY */
 } RT_802_11_AP_CONFIG, *PRT_802_11_AP_CONFIG;
 
-// structure to query/set STA_CONFIG
+/* structure to query/set STA_CONFIG */
 typedef struct _RT_802_11_STA_CONFIG {
-	ULONG EnableTxBurst;	// 0-disable, 1-enable
-	ULONG EnableTurboRate;	// 0-disable, 1-enable 72/100mbps turbo rate
-	ULONG UseBGProtection;	// 0-AUTO, 1-always ON, 2-always OFF
-	ULONG UseShortSlotTime;	// 0-no use, 1-use 9-us short slot time when applicable
-	ULONG AdhocMode;	// 0-11b rates only (WIFI spec), 1 - b/g mixed, 2 - g only
-	ULONG HwRadioStatus;	// 0-OFF, 1-ON, default is 1, Read-Only
-	ULONG Rsv1;		// must be 0
-	ULONG SystemErrorBitmap;	// ignore upon SET, return system error upon QUERY
+	ULONG EnableTxBurst;	/* 0-disable, 1-enable */
+	ULONG EnableTurboRate;	/* 0-disable, 1-enable 72/100mbps turbo rate */
+	ULONG UseBGProtection;	/* 0-AUTO, 1-always ON, 2-always OFF */
+	ULONG UseShortSlotTime;	/* 0-no use, 1-use 9-us short slot time when applicable */
+	ULONG AdhocMode;	/* 0-11b rates only (WIFI spec), 1 - b/g mixed, 2 - g only */
+	ULONG HwRadioStatus;	/* 0-OFF, 1-ON, default is 1, Read-Only */
+	ULONG Rsv1;		/* must be 0 */
+	ULONG SystemErrorBitmap;	/* ignore upon SET, return system error upon QUERY */
 } RT_802_11_STA_CONFIG, *PRT_802_11_STA_CONFIG;
 
-//
-//  For OID Query or Set about BA structure
-//
+/* */
+/*  For OID Query or Set about BA structure */
+/* */
 typedef struct _OID_BACAP_STRUC {
 	UCHAR RxBAWinLimit;
 	UCHAR TxBAWinLimit;
-	UCHAR Policy;		// 0: DELAY_BA 1:IMMED_BA  (//BA Policy subfiled value in ADDBA frame)   2:BA-not use. other value invalid
-	UCHAR MpduDensity;	// 0: DELAY_BA 1:IMMED_BA  (//BA Policy subfiled value in ADDBA frame)   2:BA-not use. other value invalid
-	UCHAR AmsduEnable;	//Enable AMSDU transmisstion
-	UCHAR AmsduSize;	// 0:3839, 1:7935 bytes. UINT  MSDUSizeToBytes[]        = { 3839, 7935};
-	UCHAR MMPSmode;		// MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable
-	BOOLEAN AutoBA;		// Auto BA will automatically
+	UCHAR Policy;		/* 0: DELAY_BA 1:IMMED_BA  (//BA Policy subfiled value in ADDBA frame)   2:BA-not use. other value invalid */
+	UCHAR MpduDensity;	/* 0: DELAY_BA 1:IMMED_BA  (//BA Policy subfiled value in ADDBA frame)   2:BA-not use. other value invalid */
+	UCHAR AmsduEnable;	/*Enable AMSDU transmisstion */
+	UCHAR AmsduSize;	/* 0:3839, 1:7935 bytes. UINT  MSDUSizeToBytes[]        = { 3839, 7935}; */
+	UCHAR MMPSmode;		/* MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable */
+	BOOLEAN AutoBA;		/* Auto BA will automatically */
 } OID_BACAP_STRUC, *POID_BACAP_STRUC;
 
 typedef struct _RT_802_11_ACL_ENTRY {
@@ -695,7 +695,7 @@ typedef struct _RT_802_11_ACL_ENTRY {
 } RT_802_11_ACL_ENTRY, *PRT_802_11_ACL_ENTRY;
 
 typedef struct PACKED _RT_802_11_ACL {
-	ULONG Policy;		// 0-disable, 1-positive list, 2-negative list
+	ULONG Policy;		/* 0-disable, 1-positive list, 2-negative list */
 	ULONG Num;
 	RT_802_11_ACL_ENTRY Entry[MAX_NUMBER_OF_ACL];
 } RT_802_11_ACL, *PRT_802_11_ACL;
@@ -714,29 +714,29 @@ typedef struct _RT_802_11_TX_RATES_ {
 	UCHAR ExtRate[MAX_LENGTH_OF_SUPPORT_RATES];
 } RT_802_11_TX_RATES, *PRT_802_11_TX_RATES;
 
-// Definition of extra information code
-#define	GENERAL_LINK_UP			0x0	// Link is Up
-#define	GENERAL_LINK_DOWN		0x1	// Link is Down
-#define	HW_RADIO_OFF			0x2	// Hardware radio off
-#define	SW_RADIO_OFF			0x3	// Software radio off
-#define	AUTH_FAIL				0x4	// Open authentication fail
-#define	AUTH_FAIL_KEYS			0x5	// Shared authentication fail
-#define	ASSOC_FAIL				0x6	// Association failed
-#define	EAP_MIC_FAILURE			0x7	// Deauthencation because MIC failure
-#define	EAP_4WAY_TIMEOUT		0x8	// Deauthencation on 4-way handshake timeout
-#define	EAP_GROUP_KEY_TIMEOUT	0x9	// Deauthencation on group key handshake timeout
-#define	EAP_SUCCESS				0xa	// EAP succeed
-#define	DETECT_RADAR_SIGNAL		0xb	// Radar signal occur in current channel
-#define EXTRA_INFO_MAX			0xb	// Indicate Last OID
+/* Definition of extra information code */
+#define	GENERAL_LINK_UP			0x0	/* Link is Up */
+#define	GENERAL_LINK_DOWN		0x1	/* Link is Down */
+#define	HW_RADIO_OFF			0x2	/* Hardware radio off */
+#define	SW_RADIO_OFF			0x3	/* Software radio off */
+#define	AUTH_FAIL				0x4	/* Open authentication fail */
+#define	AUTH_FAIL_KEYS			0x5	/* Shared authentication fail */
+#define	ASSOC_FAIL				0x6	/* Association failed */
+#define	EAP_MIC_FAILURE			0x7	/* Deauthencation because MIC failure */
+#define	EAP_4WAY_TIMEOUT		0x8	/* Deauthencation on 4-way handshake timeout */
+#define	EAP_GROUP_KEY_TIMEOUT	0x9	/* Deauthencation on group key handshake timeout */
+#define	EAP_SUCCESS				0xa	/* EAP succeed */
+#define	DETECT_RADAR_SIGNAL		0xb	/* Radar signal occur in current channel */
+#define EXTRA_INFO_MAX			0xb	/* Indicate Last OID */
 
 #define EXTRA_INFO_CLEAR		0xffffffff
 
-// This is OID setting structure. So only GF or MM as Mode. This is valid when our wirelss mode has 802.11n in use.
+/* This is OID setting structure. So only GF or MM as Mode. This is valid when our wirelss mode has 802.11n in use. */
 typedef struct {
-	RT_802_11_PHY_MODE PhyMode;	//
+	RT_802_11_PHY_MODE PhyMode;	/* */
 	UCHAR TransmitNo;
-	UCHAR HtMode;		//HTMODE_GF or HTMODE_MM
-	UCHAR ExtOffset;	//extension channel above or below
+	UCHAR HtMode;		/*HTMODE_GF or HTMODE_MM */
+	UCHAR ExtOffset;	/*extension channel above or below */
 	UCHAR MCS;
 	UCHAR BW;
 	UCHAR STBC;
@@ -753,27 +753,27 @@ typedef enum _RT_802_11_D_CLIENT_MODE {
 } RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE;
 
 typedef struct _RT_CHANNEL_LIST_INFO {
-	UCHAR ChannelList[MAX_NUM_OF_CHS];	// list all supported channels for site survey
-	UCHAR ChannelListNum;	// number of channel in ChannelList[]
+	UCHAR ChannelList[MAX_NUM_OF_CHS];	/* list all supported channels for site survey */
+	UCHAR ChannelListNum;	/* number of channel in ChannelList[] */
 } RT_CHANNEL_LIST_INFO, *PRT_CHANNEL_LIST_INFO;
 
-// WSC configured credential
+/* WSC configured credential */
 typedef struct _WSC_CREDENTIAL {
-	NDIS_802_11_SSID SSID;	// mandatory
-	USHORT AuthType;	// mandatory, 1: open, 2: wpa-psk, 4: shared, 8:wpa, 0x10: wpa2, 0x20: wpa2-psk
-	USHORT EncrType;	// mandatory, 1: none, 2: wep, 4: tkip, 8: aes
-	UCHAR Key[64];		// mandatory, Maximum 64 byte
+	NDIS_802_11_SSID SSID;	/* mandatory */
+	USHORT AuthType;	/* mandatory, 1: open, 2: wpa-psk, 4: shared, 8:wpa, 0x10: wpa2, 0x20: wpa2-psk */
+	USHORT EncrType;	/* mandatory, 1: none, 2: wep, 4: tkip, 8: aes */
+	UCHAR Key[64];		/* mandatory, Maximum 64 byte */
 	USHORT KeyLength;
-	UCHAR MacAddr[6];	// mandatory, AP MAC address
-	UCHAR KeyIndex;		// optional, default is 1
-	UCHAR Rsvd[3];		// Make alignment
+	UCHAR MacAddr[6];	/* mandatory, AP MAC address */
+	UCHAR KeyIndex;		/* optional, default is 1 */
+	UCHAR Rsvd[3];		/* Make alignment */
 } WSC_CREDENTIAL, *PWSC_CREDENTIAL;
 
-// WSC configured profiles
+/* WSC configured profiles */
 typedef struct _WSC_PROFILE {
 	UINT ProfileCnt;
-	UINT ApplyProfileIdx;	// add by johnli, fix WPS test plan 5.1.1
-	WSC_CREDENTIAL Profile[8];	// Support up to 8 profiles
+	UINT ApplyProfileIdx;	/* add by johnli, fix WPS test plan 5.1.1 */
+	WSC_CREDENTIAL Profile[8];	/* Support up to 8 profiles */
 } WSC_PROFILE, *PWSC_PROFILE;
 
-#endif // _OID_H_
+#endif /* _OID_H_ */

+ 2 - 2
drivers/staging/rt2860/rt_config.h

@@ -66,6 +66,6 @@
 
 #ifdef IGMP_SNOOP_SUPPORT
 #include "igmp_snoop.h"
-#endif // IGMP_SNOOP_SUPPORT //
+#endif /* IGMP_SNOOP_SUPPORT // */
 
-#endif // __RT_CONFIG_H__
+#endif /* __RT_CONFIG_H__ */

+ 54 - 54
drivers/staging/rt2860/rt_linux.h

@@ -60,20 +60,20 @@
 
 #include <net/iw_handler.h>
 
-// load firmware
+/* load firmware */
 #define __KERNEL_SYSCALLS__
 #include <linux/unistd.h>
 #include <asm/uaccess.h>
 #include <asm/types.h>
-#include <asm/unaligned.h>	// for get_unaligned()
+#include <asm/unaligned.h>	/* for get_unaligned() */
 
 #define KTHREAD_SUPPORT 1
-// RT2870 2.1.0.0 has it disabled
+/* RT2870 2.1.0.0 has it disabled */
 
 #ifdef KTHREAD_SUPPORT
 #include <linux/err.h>
 #include <linux/kthread.h>
-#endif // KTHREAD_SUPPORT //
+#endif /* KTHREAD_SUPPORT // */
 
 /***********************************************************************************
  *	Profile related sections
@@ -82,12 +82,12 @@
 #ifdef RTMP_MAC_PCI
 #define STA_PROFILE_PATH			"/etc/Wireless/RT2860STA/RT2860STA.dat"
 #define STA_DRIVER_VERSION			"2.1.0.0"
-#endif // RTMP_MAC_PCI //
+#endif /* RTMP_MAC_PCI // */
 #ifdef RTMP_MAC_USB
 #define STA_PROFILE_PATH			"/etc/Wireless/RT2870STA/RT2870STA.dat"
 #define STA_DRIVER_VERSION			"2.1.0.0"
-// RT3070 version: 2.1.1.0
-#endif // RTMP_MAC_USB //
+/* RT3070 version: 2.1.1.0 */
+#endif /* RTMP_MAC_USB // */
 
 extern const struct iw_handler_def rt28xx_iw_handler_def;
 
@@ -124,8 +124,8 @@ typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff * skb,
 #define PCI_DEVICE(vend,dev) \
 	.vendor = (vend), .device = (dev), \
 	.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
-#endif // PCI_DEVICE //
-#endif // RTMP_MAC_PCI //
+#endif /* PCI_DEVICE // */
+#endif /* RTMP_MAC_PCI // */
 
 #define RT_MOD_INC_USE_COUNT() \
 	if (!try_module_get(THIS_MODULE)) \
@@ -140,7 +140,7 @@ typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff * skb,
 #define RTMP_DEC_REF(_A)		0
 #define RTMP_GET_REF(_A)		0
 
-// This function will be called when query /proc
+/* This function will be called when query /proc */
 struct iw_statistics *rt28xx_get_wireless_stats(IN struct net_device *net_dev);
 
 /***********************************************************************************
@@ -176,13 +176,13 @@ struct iw_statistics *rt28xx_get_wireless_stats(IN struct net_device *net_dev);
 /***********************************************************************************
  *	Ralink Specific network related constant definitions
  ***********************************************************************************/
-#define MIN_NET_DEVICE_FOR_AID			0x00	//0x00~0x3f
-#define MIN_NET_DEVICE_FOR_MBSSID		0x00	//0x00,0x10,0x20,0x30
-#define MIN_NET_DEVICE_FOR_WDS			0x10	//0x40,0x50,0x60,0x70
+#define MIN_NET_DEVICE_FOR_AID			0x00	/*0x00~0x3f */
+#define MIN_NET_DEVICE_FOR_MBSSID		0x00	/*0x00,0x10,0x20,0x30 */
+#define MIN_NET_DEVICE_FOR_WDS			0x10	/*0x40,0x50,0x60,0x70 */
 #define MIN_NET_DEVICE_FOR_APCLI		0x20
 #define MIN_NET_DEVICE_FOR_MESH			0x30
 #define MIN_NET_DEVICE_FOR_DLS			0x40
-#define NET_DEVICE_REAL_IDX_MASK		0x0f	// for each operation mode, we maximum support 15 entities.
+#define NET_DEVICE_REAL_IDX_MASK		0x0f	/* for each operation mode, we maximum support 15 entities. */
 
 #define NDIS_PACKET_TYPE_DIRECTED		0
 #define NDIS_PACKET_TYPE_MULTICAST		1
@@ -217,9 +217,9 @@ struct os_lock {
 
 typedef spinlock_t NDIS_SPIN_LOCK;
 
-//
-//  spin_lock enhanced for Nested spin lock
-//
+/* */
+/*  spin_lock enhanced for Nested spin lock */
+/* */
 #define NdisAllocateSpinLock(__lock)      \
 {                                       \
     spin_lock_init((spinlock_t *)(__lock));               \
@@ -238,7 +238,7 @@ typedef spinlock_t NDIS_SPIN_LOCK;
 	spin_unlock_bh((spinlock_t *)(__lock));		\
 }
 
-// sample, use semaphore lock to replace IRQ lock, 2007/11/15
+/* sample, use semaphore lock to replace IRQ lock, 2007/11/15 */
 #define RTMP_IRQ_LOCK(__lock, __irqflags)			\
 {													\
 	__irqflags = 0;									\
@@ -330,7 +330,7 @@ do { \
 /***********************************************************************************
  *	OS Memory Access related data structure and definitions
  ***********************************************************************************/
-#define MEM_ALLOC_FLAG      (GFP_ATOMIC)	//(GFP_DMA | GFP_ATOMIC)
+#define MEM_ALLOC_FLAG      (GFP_ATOMIC)	/*(GFP_DMA | GFP_ATOMIC) */
 
 #define NdisMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
 #define NdisCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length)
@@ -405,10 +405,10 @@ struct os_cookie {
 	struct pci_dev *parent_pci_dev;
 	USHORT DeviceID;
 	dma_addr_t pAd_pa;
-#endif				// RTMP_MAC_PCI //
+#endif				/* RTMP_MAC_PCI // */
 #ifdef RTMP_MAC_USB
 	struct usb_device *pUsb_Dev;
-#endif				// RTMP_MAC_USB //
+#endif				/* RTMP_MAC_USB // */
 
 	RTMP_NET_TASK_STRUCT rx_done_task;
 	RTMP_NET_TASK_STRUCT mgmt_dma_done_task;
@@ -419,14 +419,14 @@ struct os_cookie {
 	RTMP_NET_TASK_STRUCT tbtt_task;
 #ifdef RTMP_MAC_PCI
 	RTMP_NET_TASK_STRUCT fifo_statistic_full_task;
-#endif				// RTMP_MAC_PCI //
+#endif				/* RTMP_MAC_PCI // */
 #ifdef RTMP_MAC_USB
 	RTMP_NET_TASK_STRUCT null_frame_complete_task;
 	RTMP_NET_TASK_STRUCT rts_frame_complete_task;
 	RTMP_NET_TASK_STRUCT pspoll_frame_complete_task;
-#endif				// RTMP_MAC_USB //
+#endif				/* RTMP_MAC_USB // */
 
-	unsigned long apd_pid;	//802.1x daemon pid
+	unsigned long apd_pid;	/*802.1x daemon pid */
 	INT ioctl_if_type;
 	INT ioctl_if;
 };
@@ -501,12 +501,12 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 
 #define DEV_ALLOC_SKB(_length) \
 	dev_alloc_skb(_length)
-#endif // RTMP_MAC_PCI //
+#endif /* RTMP_MAC_PCI // */
 #ifdef RTMP_MAC_USB
 #define PCI_MAP_SINGLE(_handle, _ptr, _size, _dir) (ULONG)0
 
 #define PCI_UNMAP_SINGLE(_handle, _ptr, _size, _dir)
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
 
 /*
  * ULONG
@@ -545,7 +545,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
  * Device Register I/O Access related definitions and data structures.
  **********************************************************************************/
 #ifdef RTMP_MAC_PCI
-//Patch for ASIC turst read/write bug, needs to remove after metel fix
+/*Patch for ASIC turst read/write bug, needs to remove after metel fix */
 #define RTMP_IO_READ32(_A, _R, _pV)								\
 {																\
     if ((_A)->bPCIclkOff == FALSE)                                  \
@@ -603,7 +603,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 	Val = readl((void *)((_A)->CSRBaseAddress + MAC_CSR0));			\
 	writeb((_V), (PUCHAR)((_A)->CSRBaseAddress + (_R)));		\
 }
-#endif // #if defined(BRCM_6358) || defined(RALINK_2880) //
+#endif /* #if defined(BRCM_6358) || defined(RALINK_2880) // */
 
 #define RTMP_IO_WRITE16(_A, _R, _V)												\
 {																				\
@@ -611,9 +611,9 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 	Val = readl((void *)((_A)->CSRBaseAddress + MAC_CSR0));			\
 	writew((_V), (PUSHORT)((_A)->CSRBaseAddress + (_R)));	\
 }
-#endif // RTMP_MAC_PCI //
+#endif /* RTMP_MAC_PCI // */
 #ifdef RTMP_MAC_USB
-//Patch for ASIC turst read/write bug, needs to remove after metel fix
+/*Patch for ASIC turst read/write bug, needs to remove after metel fix */
 #define RTMP_IO_READ32(_A, _R, _pV)								\
 	RTUSBReadMACRegister((_A), (_R), (PUINT32) (_pV))
 
@@ -634,7 +634,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 {																\
 	RTUSBSingleWrite((_A), (_R), (USHORT) (_V));								\
 }
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
 
 /***********************************************************************************
  *	Network Related data structure and marco definitions
@@ -719,34 +719,34 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 
 #define CB_OFF  10
 
-// User Priority
+/* User Priority */
 #define RTMP_SET_PACKET_UP(_p, _prio)			(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+0] = _prio)
 #define RTMP_GET_PACKET_UP(_p)					(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+0])
 
-// Fragment #
+/* Fragment # */
 #define RTMP_SET_PACKET_FRAGMENTS(_p, _num)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+1] = _num)
 #define RTMP_GET_PACKET_FRAGMENTS(_p)			(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+1])
 
-// 0x0 ~0x7f: TX to AP's own BSS which has the specified AID. if AID>127, set bit 7 in RTMP_SET_PACKET_EMACTAB too.
-//(this value also as MAC(on-chip WCID) table index)
-// 0x80~0xff: TX to a WDS link. b0~6: WDS index
+/* 0x0 ~0x7f: TX to AP's own BSS which has the specified AID. if AID>127, set bit 7 in RTMP_SET_PACKET_EMACTAB too. */
+/*(this value also as MAC(on-chip WCID) table index) */
+/* 0x80~0xff: TX to a WDS link. b0~6: WDS index */
 #define RTMP_SET_PACKET_WCID(_p, _wdsidx)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+2] = _wdsidx)
 #define RTMP_GET_PACKET_WCID(_p)          		((UCHAR)(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+2]))
 
-// 0xff: PKTSRC_NDIS, others: local TX buffer index. This value affects how to a packet
+/* 0xff: PKTSRC_NDIS, others: local TX buffer index. This value affects how to a packet */
 #define RTMP_SET_PACKET_SOURCE(_p, _pktsrc)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+3] = _pktsrc)
 #define RTMP_GET_PACKET_SOURCE(_p)       		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+3])
 
-// RTS/CTS-to-self protection method
+/* RTS/CTS-to-self protection method */
 #define RTMP_SET_PACKET_RTS(_p, _num)      		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+4] = _num)
 #define RTMP_GET_PACKET_RTS(_p)          		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+4])
-// see RTMP_S(G)ET_PACKET_EMACTAB
+/* see RTMP_S(G)ET_PACKET_EMACTAB */
 
-// TX rate index
+/* TX rate index */
 #define RTMP_SET_PACKET_TXRATE(_p, _rate)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+5] = _rate)
 #define RTMP_GET_PACKET_TXRATE(_p)		  		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+5])
 
-// From which Interface
+/* From which Interface */
 #define RTMP_SET_PACKET_IF(_p, _ifdx)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+6] = _ifdx)
 #define RTMP_GET_PACKET_IF(_p)		  		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+6])
 #define RTMP_SET_PACKET_NET_DEVICE_MBSSID(_p, _bss)		RTMP_SET_PACKET_IF((_p), (_bss))
@@ -759,9 +759,9 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 #define RTMP_SET_PACKET_MOREDATA(_p, _morebit)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7] = _morebit)
 #define RTMP_GET_PACKET_MOREDATA(_p)				(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+7])
 
-//
-//      Sepcific Pakcet Type definition
-//
+/* */
+/*      Sepcific Pakcet Type definition */
+/* */
 #define RTMP_PACKET_SPECIFIC_CB_OFFSET	11
 
 #define RTMP_PACKET_SPECIFIC_DHCP		0x01
@@ -771,10 +771,10 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 #define RTMP_PACKET_SPECIFIC_VLAN		0x10
 #define RTMP_PACKET_SPECIFIC_LLCSNAP	0x20
 
-//Specific
+/*Specific */
 #define RTMP_SET_PACKET_SPECIFIC(_p, _flg)	   	(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] = _flg)
 
-//DHCP
+/*DHCP */
 #define RTMP_SET_PACKET_DHCP(_p, _flg)   													\
 			do{																				\
 				if (_flg)																	\
@@ -784,7 +784,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 			}while(0)
 #define RTMP_GET_PACKET_DHCP(_p)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_DHCP)
 
-//EAPOL
+/*EAPOL */
 #define RTMP_SET_PACKET_EAPOL(_p, _flg)   													\
 			do{																				\
 				if (_flg)																	\
@@ -794,7 +794,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 			}while(0)
 #define RTMP_GET_PACKET_EAPOL(_p)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_EAPOL)
 
-//WAI
+/*WAI */
 #define RTMP_SET_PACKET_WAI(_p, _flg)   													\
 			do{																				\
 				if (_flg)																	\
@@ -806,7 +806,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 
 #define RTMP_GET_PACKET_LOWRATE(_p)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & (RTMP_PACKET_SPECIFIC_EAPOL | RTMP_PACKET_SPECIFIC_DHCP | RTMP_PACKET_SPECIFIC_WAI))
 
-//VLAN
+/*VLAN */
 #define RTMP_SET_PACKET_VLAN(_p, _flg)   													\
 			do{																				\
 				if (_flg)																	\
@@ -816,7 +816,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 			}while(0)
 #define RTMP_GET_PACKET_VLAN(_p)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_VLAN)
 
-//LLC/SNAP
+/*LLC/SNAP */
 #define RTMP_SET_PACKET_LLCSNAP(_p, _flg)   													\
 			do{																				\
 				if (_flg)																	\
@@ -827,7 +827,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 
 #define RTMP_GET_PACKET_LLCSNAP(_p)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_LLCSNAP)
 
-// IP
+/* IP */
 #define RTMP_SET_PACKET_IPV4(_p, _flg)														\
 			do{																				\
 				if (_flg)																	\
@@ -838,7 +838,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
 
 #define RTMP_GET_PACKET_IPV4(_p)		(RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_IPV4)
 
-// If this flag is set, it indicates that this EAPoL frame MUST be clear.
+/* If this flag is set, it indicates that this EAPoL frame MUST be clear. */
 #define RTMP_SET_PACKET_CLEAR_EAP_FRAME(_p, _flg)   (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+12] = _flg)
 #define RTMP_GET_PACKET_CLEAR_EAP_FRAME(_p)         (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+12])
 
@@ -860,7 +860,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb);
 #define IRQ_HANDLE_TYPE  irqreturn_t
 
 IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance);
-#endif // RTMP_MAC_PCI //
+#endif /* RTMP_MAC_PCI // */
 
 INT rt28xx_sta_ioctl(IN PNET_DEV net_dev, IN OUT struct ifreq *rq, IN INT cmd);
 
@@ -869,4 +869,4 @@ extern int ra_mtd_read(int num, loff_t from, size_t len, u_char * buf);
 
 #define GET_PAD_FROM_NET_DEV(_pAd, _net_dev)	(_pAd) = (PRTMP_ADAPTER)(_net_dev)->ml_priv;
 
-#endif // __RT_LINUX_H__ //
+#endif /* __RT_LINUX_H__ // */

Fichier diff supprimé car celui-ci est trop grand
+ 312 - 312
drivers/staging/rt2860/rtmp.h


+ 97 - 97
drivers/staging/rt2860/rtmp_chip.h

@@ -42,30 +42,30 @@
 
 #ifdef RT2860
 #include "chip/rt2860.h"
-#endif // RT2860 //
+#endif /* RT2860 // */
 #ifdef RT2870
 #include "chip/rt2870.h"
-#endif // RT2870 //
+#endif /* RT2870 // */
 #ifdef RT3070
 #include "chip/rt3070.h"
-#endif // RT3070 //
+#endif /* RT3070 // */
 #ifdef RT3090
 #include "chip/rt3090.h"
-#endif // RT3090 //
+#endif /* RT3090 // */
 
-// We will have a cost down version which mac version is 0x3090xxxx
-//
-// RT3090A facts
-//
-// a) 2.4 GHz
-// b) Replacement for RT3090
-// c) Internal LNA
-// d) Interference over channel #14
-// e) New BBP features (e.g., SIG re-modulation)
-//
+/* We will have a cost down version which mac version is 0x3090xxxx */
+/* */
+/* RT3090A facts */
+/* */
+/* a) 2.4 GHz */
+/* b) Replacement for RT3090 */
+/* c) Internal LNA */
+/* d) Interference over channel #14 */
+/* e) New BBP features (e.g., SIG re-modulation) */
+/* */
 #define IS_RT3090A(_pAd)				((((_pAd)->MACVersion & 0xffff0000) == 0x30900000))
 
-// We will have a cost down version which mac version is 0x3090xxxx
+/* We will have a cost down version which mac version is 0x3090xxxx */
 #define IS_RT3090(_pAd)				((((_pAd)->MACVersion & 0xffff0000) == 0x30710000) || (IS_RT3090A(_pAd)))
 
 #define IS_RT3070(_pAd)		(((_pAd)->MACVersion & 0xffff0000) == 0x30700000)
@@ -73,28 +73,28 @@
 #define IS_RT2070(_pAd)		(((_pAd)->RfIcType == RFIC_2020) || ((_pAd)->EFuseTag == 0x27))
 
 #define IS_RT30xx(_pAd)		(((_pAd)->MACVersion & 0xfff00000) == 0x30700000||IS_RT3090A(_pAd))
-//#define IS_RT305X(_pAd)               ((_pAd)->MACVersion == 0x28720200)
+/*#define IS_RT305X(_pAd)               ((_pAd)->MACVersion == 0x28720200) */
 
 /* RT3572, 3592, 3562, 3062 share the same MAC version */
 #define IS_RT3572(_pAd)		(((_pAd)->MACVersion & 0xffff0000) == 0x35720000)
 #define IS_VERSION_BEFORE_F(_pAd)			(((_pAd)->MACVersion&0xffff) <= 0x0211)
-// F version is 0x0212, E version is 0x0211. 309x can save more power after F version.
+/* F version is 0x0212, E version is 0x0211. 309x can save more power after F version. */
 #define IS_VERSION_AFTER_F(_pAd)			((((_pAd)->MACVersion&0xffff) >= 0x0212) || (((_pAd)->b3090ESpecialChip == TRUE)))
-//
-// RT3390 facts
-//
-// a) Base on RT3090 (RF IC: RT3020)
-// b) 2.4 GHz
-// c) 1x1
-// d) Single chip
-// e) Internal components: PA and LNA
-//
-//RT3390,RT3370
+/* */
+/* RT3390 facts */
+/* */
+/* a) Base on RT3090 (RF IC: RT3020) */
+/* b) 2.4 GHz */
+/* c) 1x1 */
+/* d) Single chip */
+/* e) Internal components: PA and LNA */
+/* */
+/*RT3390,RT3370 */
 #define IS_RT3390(_pAd)				(((_pAd)->MACVersion & 0xFFFF0000) == 0x33900000)
 
-// ------------------------------------------------------
-// PCI registers - base address 0x0000
-// ------------------------------------------------------
+/* ------------------------------------------------------ */
+/* PCI registers - base address 0x0000 */
+/* ------------------------------------------------------ */
 #define CHIP_PCI_CFG		0x0000
 #define CHIP_PCI_EECTRL		0x0004
 #define CHIP_PCI_MCUCTRL	0x0008
@@ -103,15 +103,15 @@
 
 #define RETRY_LIMIT		10
 
-// ------------------------------------------------------
-// BBP & RF     definition
-// ------------------------------------------------------
+/* ------------------------------------------------------ */
+/* BBP & RF     definition */
+/* ------------------------------------------------------ */
 #define	BUSY		                1
 #define	IDLE		                0
 
-//-------------------------------------------------------------------------
-// EEPROM definition
-//-------------------------------------------------------------------------
+/*------------------------------------------------------------------------- */
+/* EEPROM definition */
+/*------------------------------------------------------------------------- */
 #define EEDO                        0x08
 #define EEDI                        0x04
 #define EECS                        0x02
@@ -123,11 +123,11 @@
 #define EEPROM_EWDS_OPCODE          0x10
 #define EEPROM_EWEN_OPCODE          0x13
 
-#define NUM_EEPROM_BBP_PARMS		19	// Include NIC Config 0, 1, CR, TX ALC step, BBPs
+#define NUM_EEPROM_BBP_PARMS		19	/* Include NIC Config 0, 1, CR, TX ALC step, BBPs */
 #define NUM_EEPROM_TX_G_PARMS		7
-#define EEPROM_NIC1_OFFSET          0x34	// The address is from NIC config 0, not BBP register ID
-#define EEPROM_NIC2_OFFSET          0x36	// The address is from NIC config 0, not BBP register ID
-#define EEPROM_BBP_BASE_OFFSET		0xf0	// The address is from NIC config 0, not BBP register ID
+#define EEPROM_NIC1_OFFSET          0x34	/* The address is from NIC config 0, not BBP register ID */
+#define EEPROM_NIC2_OFFSET          0x36	/* The address is from NIC config 0, not BBP register ID */
+#define EEPROM_BBP_BASE_OFFSET		0xf0	/* The address is from NIC config 0, not BBP register ID */
 #define EEPROM_G_TX_PWR_OFFSET		0x52
 #define EEPROM_G_TX2_PWR_OFFSET		0x60
 #define EEPROM_LED1_OFFSET			0x3c
@@ -139,22 +139,22 @@
 #define EEPROM_RSSI_A_OFFSET		0x4a
 #define EEPROM_TXMIXER_GAIN_5G		0x4c
 #define EEPROM_DEFINE_MAX_TXPWR		0x4e
-#define EEPROM_TXPOWER_BYRATE_20MHZ_2_4G	0xde	// 20MHZ 2.4G tx power.
-#define EEPROM_TXPOWER_BYRATE_40MHZ_2_4G	0xee	// 40MHZ 2.4G tx power.
-#define EEPROM_TXPOWER_BYRATE_20MHZ_5G		0xfa	// 20MHZ 5G tx power.
-#define EEPROM_TXPOWER_BYRATE_40MHZ_5G		0x10a	// 40MHZ 5G tx power.
+#define EEPROM_TXPOWER_BYRATE_20MHZ_2_4G	0xde	/* 20MHZ 2.4G tx power. */
+#define EEPROM_TXPOWER_BYRATE_40MHZ_2_4G	0xee	/* 40MHZ 2.4G tx power. */
+#define EEPROM_TXPOWER_BYRATE_20MHZ_5G		0xfa	/* 20MHZ 5G tx power. */
+#define EEPROM_TXPOWER_BYRATE_40MHZ_5G		0x10a	/* 40MHZ 5G tx power. */
 #define EEPROM_A_TX_PWR_OFFSET      0x78
 #define EEPROM_A_TX2_PWR_OFFSET      0xa6
-//#define EEPROM_Japan_TX_PWR_OFFSET      0x90 // 802.11j
-//#define EEPROM_Japan_TX2_PWR_OFFSET      0xbe
-//#define EEPROM_TSSI_REF_OFFSET        0x54
-//#define EEPROM_TSSI_DELTA_OFFSET      0x24
-//#define EEPROM_CCK_TX_PWR_OFFSET  0x62
-//#define EEPROM_CALIBRATE_OFFSET       0x7c
+/*#define EEPROM_Japan_TX_PWR_OFFSET      0x90 // 802.11j */
+/*#define EEPROM_Japan_TX2_PWR_OFFSET      0xbe */
+/*#define EEPROM_TSSI_REF_OFFSET        0x54 */
+/*#define EEPROM_TSSI_DELTA_OFFSET      0x24 */
+/*#define EEPROM_CCK_TX_PWR_OFFSET  0x62 */
+/*#define EEPROM_CALIBRATE_OFFSET       0x7c */
 #define EEPROM_VERSION_OFFSET       0x02
 #define EEPROM_FREQ_OFFSET			0x3a
-#define EEPROM_TXPOWER_BYRATE	0xde	// 20MHZ power.
-#define EEPROM_TXPOWER_DELTA		0x50	// 20MHZ AND 40 MHZ use different power. This is delta in 40MHZ.
+#define EEPROM_TXPOWER_BYRATE	0xde	/* 20MHZ power. */
+#define EEPROM_TXPOWER_DELTA		0x50	/* 20MHZ AND 40 MHZ use different power. This is delta in 40MHZ. */
 #define VALID_EEPROM_VERSION        1
 
 /*
@@ -163,13 +163,13 @@
 #define RT28xx_EEPROM_READ16(_pAd, _offset, _value)			\
 	(_pAd)->chipOps.eeread((RTMP_ADAPTER *)(_pAd), (USHORT)(_offset), (PUSHORT)&(_value))
 
-// -------------------------------------------------------------------
-//  E2PROM data layout
-// -------------------------------------------------------------------
+/* ------------------------------------------------------------------- */
+/*  E2PROM data layout */
+/* ------------------------------------------------------------------- */
 
-//
-// MCU_LEDCS: MCU LED Control Setting.
-//
+/* */
+/* MCU_LEDCS: MCU LED Control Setting. */
+/* */
 typedef union _MCU_LEDCS_STRUC {
 	struct {
 		UCHAR LedMode:7;
@@ -178,14 +178,14 @@ typedef union _MCU_LEDCS_STRUC {
 	UCHAR word;
 } MCU_LEDCS_STRUC, *PMCU_LEDCS_STRUC;
 
-//
-// EEPROM antenna select format
-//
+/* */
+/* EEPROM antenna select format */
+/* */
 typedef union _EEPROM_ANTENNA_STRUC {
 	struct {
-		USHORT RxPath:4;	// 1: 1R, 2: 2R, 3: 3R
-		USHORT TxPath:4;	// 1: 1T, 2: 2T
-		USHORT RfIcType:4;	// see E2PROM document
+		USHORT RxPath:4;	/* 1: 1R, 2: 2R, 3: 3R */
+		USHORT TxPath:4;	/* 1: 1T, 2: 2T */
+		USHORT RfIcType:4;	/* see E2PROM document */
 		USHORT Rsv:4;
 	} field;
 	USHORT word;
@@ -193,66 +193,66 @@ typedef union _EEPROM_ANTENNA_STRUC {
 
 typedef union _EEPROM_NIC_CINFIG2_STRUC {
 	struct {
-		USHORT HardwareRadioControl:1;	// 1:enable, 0:disable
-		USHORT DynamicTxAgcControl:1;	//
-		USHORT ExternalLNAForG:1;	//
-		USHORT ExternalLNAForA:1;	// external LNA enable for 2.4G
-		USHORT CardbusAcceleration:1;	// !!! NOTE: 0 - enable, 1 - disable
+		USHORT HardwareRadioControl:1;	/* 1:enable, 0:disable */
+		USHORT DynamicTxAgcControl:1;	/* */
+		USHORT ExternalLNAForG:1;	/* */
+		USHORT ExternalLNAForA:1;	/* external LNA enable for 2.4G */
+		USHORT CardbusAcceleration:1;	/* !!! NOTE: 0 - enable, 1 - disable */
 		USHORT BW40MSidebandForG:1;
 		USHORT BW40MSidebandForA:1;
-		USHORT EnableWPSPBC:1;	// WPS PBC Control bit
-		USHORT BW40MAvailForG:1;	// 0:enable, 1:disable
-		USHORT BW40MAvailForA:1;	// 0:enable, 1:disable
-		USHORT Rsv1:1;	// must be 0
-		USHORT AntDiversity:1;	// Antenna diversity
-		USHORT Rsv2:3;	// must be 0
-		USHORT DACTestBit:1;	// control if driver should patch the DAC issue
+		USHORT EnableWPSPBC:1;	/* WPS PBC Control bit */
+		USHORT BW40MAvailForG:1;	/* 0:enable, 1:disable */
+		USHORT BW40MAvailForA:1;	/* 0:enable, 1:disable */
+		USHORT Rsv1:1;	/* must be 0 */
+		USHORT AntDiversity:1;	/* Antenna diversity */
+		USHORT Rsv2:3;	/* must be 0 */
+		USHORT DACTestBit:1;	/* control if driver should patch the DAC issue */
 	} field;
 	USHORT word;
 } EEPROM_NIC_CONFIG2_STRUC, *PEEPROM_NIC_CONFIG2_STRUC;
 
-//
-// TX_PWR Value valid range 0xFA(-6) ~ 0x24(36)
-//
+/* */
+/* TX_PWR Value valid range 0xFA(-6) ~ 0x24(36) */
+/* */
 typedef union _EEPROM_TX_PWR_STRUC {
 	struct {
-		CHAR Byte0;	// Low Byte
-		CHAR Byte1;	// High Byte
+		CHAR Byte0;	/* Low Byte */
+		CHAR Byte1;	/* High Byte */
 	} field;
 	USHORT word;
 } EEPROM_TX_PWR_STRUC, *PEEPROM_TX_PWR_STRUC;
 
 typedef union _EEPROM_VERSION_STRUC {
 	struct {
-		UCHAR FaeReleaseNumber;	// Low Byte
-		UCHAR Version;	// High Byte
+		UCHAR FaeReleaseNumber;	/* Low Byte */
+		UCHAR Version;	/* High Byte */
 	} field;
 	USHORT word;
 } EEPROM_VERSION_STRUC, *PEEPROM_VERSION_STRUC;
 
 typedef union _EEPROM_LED_STRUC {
 	struct {
-		USHORT PolarityRDY_G:1;	// Polarity RDY_G setting.
-		USHORT PolarityRDY_A:1;	// Polarity RDY_A setting.
-		USHORT PolarityACT:1;	// Polarity ACT setting.
-		USHORT PolarityGPIO_0:1;	// Polarity GPIO#0 setting.
-		USHORT PolarityGPIO_1:1;	// Polarity GPIO#1 setting.
-		USHORT PolarityGPIO_2:1;	// Polarity GPIO#2 setting.
-		USHORT PolarityGPIO_3:1;	// Polarity GPIO#3 setting.
-		USHORT PolarityGPIO_4:1;	// Polarity GPIO#4 setting.
-		USHORT LedMode:5;	// Led mode.
-		USHORT Rsvd:3;	// Reserved
+		USHORT PolarityRDY_G:1;	/* Polarity RDY_G setting. */
+		USHORT PolarityRDY_A:1;	/* Polarity RDY_A setting. */
+		USHORT PolarityACT:1;	/* Polarity ACT setting. */
+		USHORT PolarityGPIO_0:1;	/* Polarity GPIO#0 setting. */
+		USHORT PolarityGPIO_1:1;	/* Polarity GPIO#1 setting. */
+		USHORT PolarityGPIO_2:1;	/* Polarity GPIO#2 setting. */
+		USHORT PolarityGPIO_3:1;	/* Polarity GPIO#3 setting. */
+		USHORT PolarityGPIO_4:1;	/* Polarity GPIO#4 setting. */
+		USHORT LedMode:5;	/* Led mode. */
+		USHORT Rsvd:3;	/* Reserved */
 	} field;
 	USHORT word;
 } EEPROM_LED_STRUC, *PEEPROM_LED_STRUC;
 
 typedef union _EEPROM_TXPOWER_DELTA_STRUC {
 	struct {
-		UCHAR DeltaValue:6;	// Tx Power dalta value (MAX=4)
-		UCHAR Type:1;	// 1: plus the delta value, 0: minus the delta value
-		UCHAR TxPowerEnable:1;	// Enable
+		UCHAR DeltaValue:6;	/* Tx Power dalta value (MAX=4) */
+		UCHAR Type:1;	/* 1: plus the delta value, 0: minus the delta value */
+		UCHAR TxPowerEnable:1;	/* Enable */
 	} field;
 	UCHAR value;
 } EEPROM_TXPOWER_DELTA_STRUC, *PEEPROM_TXPOWER_DELTA_STRUC;
 
-#endif // __RTMP_CHIP_H__ //
+#endif /* __RTMP_CHIP_H__ // */

+ 1 - 1
drivers/staging/rt2860/rtmp_ckipmic.h

@@ -60,4 +60,4 @@ VOID shift_row(IN PUCHAR in, OUT PUCHAR out);
 
 VOID mix_column(IN PUCHAR in, OUT PUCHAR out);
 
-#endif //__RTMP_CKIPMIC_H__
+#endif /*__RTMP_CKIPMIC_H__ */

Fichier diff supprimé car celui-ci est trop grand
+ 274 - 274
drivers/staging/rt2860/rtmp_def.h


+ 30 - 30
drivers/staging/rt2860/rtmp_dot11.h

@@ -30,46 +30,46 @@
 
 #include "rtmp_type.h"
 
-// 4-byte HTC field.  maybe included in any frame except non-QOS data frame.  The Order bit must set 1.
+/* 4-byte HTC field.  maybe included in any frame except non-QOS data frame.  The Order bit must set 1. */
 typedef struct PACKED {
-	UINT32 MA:1;		//management action payload exist in (QoS Null+HTC)
-	UINT32 TRQ:1;		//sounding request
-	UINT32 MRQ:1;		//MCS feedback. Request for a MCS feedback
-	UINT32 MRSorASI:3;	// MRQ Sequence identifier. unchanged during entire procedure. 0x000-0x110.
-	UINT32 MFS:3;		//SET to the received value of MRS. 0x111 for unsolicited MFB.
-	UINT32 MFBorASC:7;	//Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available
-	UINT32 CalPos:2;	// calibration position
-	UINT32 CalSeq:2;	//calibration sequence
-	UINT32 FBKReq:2;	//feedback request
-	UINT32 CSISTEERING:2;	//CSI/ STEERING
-	UINT32 ZLFAnnouce:1;	// ZLF announcement
-	UINT32 rsv:5;		//calibration sequence
-	UINT32 ACConstraint:1;	//feedback request
-	UINT32 RDG:1;		//RDG / More PPDU
+	UINT32 MA:1;		/*management action payload exist in (QoS Null+HTC) */
+	UINT32 TRQ:1;		/*sounding request */
+	UINT32 MRQ:1;		/*MCS feedback. Request for a MCS feedback */
+	UINT32 MRSorASI:3;	/* MRQ Sequence identifier. unchanged during entire procedure. 0x000-0x110. */
+	UINT32 MFS:3;		/*SET to the received value of MRS. 0x111 for unsolicited MFB. */
+	UINT32 MFBorASC:7;	/*Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available */
+	UINT32 CalPos:2;	/* calibration position */
+	UINT32 CalSeq:2;	/*calibration sequence */
+	UINT32 FBKReq:2;	/*feedback request */
+	UINT32 CSISTEERING:2;	/*CSI/ STEERING */
+	UINT32 ZLFAnnouce:1;	/* ZLF announcement */
+	UINT32 rsv:5;		/*calibration sequence */
+	UINT32 ACConstraint:1;	/*feedback request */
+	UINT32 RDG:1;		/*RDG / More PPDU */
 } HT_CONTROL, *PHT_CONTROL;
 
-// 2-byte QOS CONTROL field
+/* 2-byte QOS CONTROL field */
 typedef struct PACKED {
 	USHORT TID:4;
 	USHORT EOSP:1;
-	USHORT AckPolicy:2;	//0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP  3: BA
+	USHORT AckPolicy:2;	/*0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP  3: BA */
 	USHORT AMsduPresent:1;
 	USHORT Txop_QueueSize:8;
 } QOS_CONTROL, *PQOS_CONTROL;
 
-// 2-byte Frame control field
+/* 2-byte Frame control field */
 typedef struct PACKED {
-	USHORT Ver:2;		// Protocol version
-	USHORT Type:2;		// MSDU type
-	USHORT SubType:4;	// MSDU subtype
-	USHORT ToDs:1;		// To DS indication
-	USHORT FrDs:1;		// From DS indication
-	USHORT MoreFrag:1;	// More fragment bit
-	USHORT Retry:1;		// Retry status bit
-	USHORT PwrMgmt:1;	// Power management bit
-	USHORT MoreData:1;	// More data bit
-	USHORT Wep:1;		// Wep data
-	USHORT Order:1;		// Strict order expected
+	USHORT Ver:2;		/* Protocol version */
+	USHORT Type:2;		/* MSDU type */
+	USHORT SubType:4;	/* MSDU subtype */
+	USHORT ToDs:1;		/* To DS indication */
+	USHORT FrDs:1;		/* From DS indication */
+	USHORT MoreFrag:1;	/* More fragment bit */
+	USHORT Retry:1;		/* Retry status bit */
+	USHORT PwrMgmt:1;	/* Power management bit */
+	USHORT MoreData:1;	/* More data bit */
+	USHORT Wep:1;		/* Wep data */
+	USHORT Order:1;		/* Strict order expected */
 } FRAME_CONTROL, *PFRAME_CONTROL;
 
 typedef struct PACKED _HEADER_802_11 {
@@ -97,4 +97,4 @@ typedef struct PACKED _RTS_FRAME {
 	UCHAR Addr2[MAC_ADDR_LEN];
 } RTS_FRAME, *PRTS_FRAME;
 
-#endif // __DOT11_BASE_H__ //
+#endif /* __DOT11_BASE_H__ // */

+ 6 - 6
drivers/staging/rt2860/rtmp_iface.h

@@ -39,19 +39,19 @@
 
 #ifdef RTMP_PCI_SUPPORT
 #include "iface/rtmp_pci.h"
-#endif // RTMP_PCI_SUPPORT //
+#endif /* RTMP_PCI_SUPPORT // */
 #ifdef RTMP_USB_SUPPORT
 #include "iface/rtmp_usb.h"
-#endif // RTMP_USB_SUPPORT //
+#endif /* RTMP_USB_SUPPORT // */
 
 typedef struct _INF_PCI_CONFIG_ {
-	unsigned long CSRBaseAddress;	// PCI MMIO Base Address, all access will use
+	unsigned long CSRBaseAddress;	/* PCI MMIO Base Address, all access will use */
 	unsigned int irq_num;
 } INF_PCI_CONFIG;
 
 typedef struct _INF_USB_CONFIG_ {
-	UINT8 BulkInEpAddr;	// bulk-in endpoint address
-	UINT8 BulkOutEpAddr[6];	// bulk-out endpoint address
+	UINT8 BulkInEpAddr;	/* bulk-in endpoint address */
+	UINT8 BulkOutEpAddr[6];	/* bulk-out endpoint address */
 } INF_USB_CONFIG;
 
 typedef struct _INF_RBUS_CONFIG_ {
@@ -72,4 +72,4 @@ typedef union _RTMP_INF_CONFIG_ {
 	struct _INF_RBUS_CONFIG_ rbusConfig;
 } RTMP_INF_CONFIG;
 
-#endif // __RTMP_IFACE_H__ //
+#endif /* __RTMP_IFACE_H__ // */

+ 1 - 1
drivers/staging/rt2860/rtmp_mcu.h

@@ -46,4 +46,4 @@ INT RtmpAsicSendCommandToMcu(IN PRTMP_ADAPTER pAd,
 			     IN UCHAR Command,
 			     IN UCHAR Token, IN UCHAR Arg0, IN UCHAR Arg1);
 
-#endif // __RTMP_MCU_H__ //
+#endif /* __RTMP_MCU_H__ // */

+ 3 - 3
drivers/staging/rt2860/rtmp_os.h

@@ -39,7 +39,7 @@
 
 #ifdef LINUX
 #include "rt_linux.h"
-#endif // LINUX //
+#endif /* LINUX // */
 
 /*
 	This data structure mainly strip some callback function defined in
@@ -69,7 +69,7 @@ typedef enum _RTMP_TASK_STATUS_ {
 typedef struct _RTMP_OS_TASK_ {
 	char taskName[RTMP_OS_TASK_NAME_LEN];
 	void *priv;
-	//unsigned long         taskFlags;
+	/*unsigned long         taskFlags; */
 	RTMP_TASK_STATUS taskStatus;
 #ifndef KTHREAD_SUPPORT
 	RTMP_OS_SEM taskSema;
@@ -87,4 +87,4 @@ typedef struct _RTMP_OS_TASK_ {
 int RtmpOSIRQRequest(IN PNET_DEV pNetDev);
 int RtmpOSIRQRelease(IN PNET_DEV pNetDev);
 
-#endif // __RMTP_OS_H__ //
+#endif /* __RMTP_OS_H__ // */

+ 16 - 16
drivers/staging/rt2860/rtmp_timer.h

@@ -50,29 +50,29 @@
 	rtmp_timer_##_func
 
 /* ----------------- Timer Related MARCO ---------------*/
-// In some os or chipset, we have a lot of timer functions and will read/write register,
-//   it's not allowed in Linux USB sub-system to do it ( because of sleep issue when
-//  submit to ctrl pipe). So we need a wrapper function to take care it.
+/* In some os or chipset, we have a lot of timer functions and will read/write register, */
+/*   it's not allowed in Linux USB sub-system to do it ( because of sleep issue when */
+/*  submit to ctrl pipe). So we need a wrapper function to take care it. */
 
 #ifdef RTMP_TIMER_TASK_SUPPORT
 typedef VOID(*RTMP_TIMER_TASK_HANDLE) (IN PVOID SystemSpecific1,
 				       IN PVOID FunctionContext,
 				       IN PVOID SystemSpecific2,
 				       IN PVOID SystemSpecific3);
-#endif // RTMP_TIMER_TASK_SUPPORT //
+#endif /* RTMP_TIMER_TASK_SUPPORT // */
 
 typedef struct _RALINK_TIMER_STRUCT {
-	RTMP_OS_TIMER TimerObj;	// Ndis Timer object
-	BOOLEAN Valid;		// Set to True when call RTMPInitTimer
-	BOOLEAN State;		// True if timer cancelled
-	BOOLEAN PeriodicType;	// True if timer is periodic timer
-	BOOLEAN Repeat;		// True if periodic timer
-	ULONG TimerValue;	// Timer value in milliseconds
-	ULONG cookie;		// os specific object
+	RTMP_OS_TIMER TimerObj;	/* Ndis Timer object */
+	BOOLEAN Valid;		/* Set to True when call RTMPInitTimer */
+	BOOLEAN State;		/* True if timer cancelled */
+	BOOLEAN PeriodicType;	/* True if timer is periodic timer */
+	BOOLEAN Repeat;		/* True if periodic timer */
+	ULONG TimerValue;	/* Timer value in milliseconds */
+	ULONG cookie;		/* os specific object */
 #ifdef RTMP_TIMER_TASK_SUPPORT
 	RTMP_TIMER_TASK_HANDLE handle;
 	void *pAd;
-#endif				// RTMP_TIMER_TASK_SUPPORT //
+#endif				/* RTMP_TIMER_TASK_SUPPORT // */
 } RALINK_TIMER_STRUCT, *PRALINK_TIMER_STRUCT;
 
 #ifdef RTMP_TIMER_TASK_SUPPORT
@@ -113,7 +113,7 @@ void rtmp_timer_##_func(unsigned long data)										\
 	if (pTimer->Repeat)														\
 		RTMP_OS_Add_Timer(&pTimer->TimerObj, pTimer->TimerValue);			\
 }
-#endif // RTMP_TIMER_TASK_SUPPORT //
+#endif /* RTMP_TIMER_TASK_SUPPORT // */
 
 DECLARE_TIMER_FUNCTION(MlmePeriodicExec);
 DECLARE_TIMER_FUNCTION(MlmeRssiReportExec);
@@ -122,7 +122,7 @@ DECLARE_TIMER_FUNCTION(APSDPeriodicExec);
 DECLARE_TIMER_FUNCTION(AsicRfTuningExec);
 #ifdef RTMP_MAC_USB
 DECLARE_TIMER_FUNCTION(BeaconUpdateExec);
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
 
 DECLARE_TIMER_FUNCTION(BeaconTimeout);
 DECLARE_TIMER_FUNCTION(ScanTimeout);
@@ -138,10 +138,10 @@ DECLARE_TIMER_FUNCTION(RadioOnExec);
 
 #ifdef RTMP_MAC_USB
 DECLARE_TIMER_FUNCTION(RtmpUsbStaAsicForceWakeupTimeout);
-#endif // RTMP_MAC_USB //
+#endif /* RTMP_MAC_USB // */
 
 #if defined(AP_LED) || defined(STA_LED)
 DECLARE_TIMER_FUNCTION(LedCtrlMain);
 #endif
 
-#endif // __RTMP_TIMER_H__ //
+#endif /* __RTMP_TIMER_H__ // */

+ 13 - 13
drivers/staging/rt2860/rtmp_type.h

@@ -41,15 +41,15 @@
 #define PACKED  __attribute__ ((packed))
 
 #ifdef LINUX
-// Put platform dependent declaration here
-// For example, linux type definition
+/* Put platform dependent declaration here */
+/* For example, linux type definition */
 typedef unsigned char UINT8;
 typedef unsigned short UINT16;
 typedef unsigned int UINT32;
 typedef unsigned long long UINT64;
 typedef int INT32;
 typedef long long INT64;
-#endif // LINUX //
+#endif /* LINUX // */
 
 typedef unsigned char *PUINT8;
 typedef unsigned short *PUINT16;
@@ -58,7 +58,7 @@ typedef unsigned long long *PUINT64;
 typedef int *PINT32;
 typedef long long *PINT64;
 
-// modified for fixing compile warning on Sigma 8634 platform
+/* modified for fixing compile warning on Sigma 8634 platform */
 typedef char STRING;
 typedef signed char CHAR;
 
@@ -72,13 +72,13 @@ typedef unsigned char UCHAR;
 typedef unsigned short USHORT;
 typedef unsigned int UINT;
 typedef unsigned long ULONG;
-#endif // LINUX //
+#endif /* LINUX // */
 typedef unsigned long long ULONGLONG;
 
 typedef unsigned char BOOLEAN;
 #ifdef LINUX
 typedef void VOID;
-#endif // LINUX //
+#endif /* LINUX // */
 
 typedef char *PSTRING;
 typedef VOID *PVOID;
@@ -99,9 +99,9 @@ typedef union _LARGE_INTEGER {
 	INT64 QuadPart;
 } LARGE_INTEGER;
 
-//
-// Register set pair for initialzation register set definition
-//
+/* */
+/* Register set pair for initialzation register set definition */
+/* */
 typedef struct _RTMP_REG_PAIR {
 	ULONG Register;
 	ULONG Value;
@@ -112,9 +112,9 @@ typedef struct _REG_PAIR {
 	UCHAR Value;
 } REG_PAIR, *PREG_PAIR;
 
-//
-// Register set pair for initialzation register set definition
-//
+/* */
+/* Register set pair for initialzation register set definition */
+/* */
 typedef struct _RTMP_RF_REGS {
 	UCHAR Channel;
 	ULONG R1;
@@ -135,4 +135,4 @@ typedef int NTSTATUS;
 #define STATUS_SUCCESS				0x00
 #define STATUS_UNSUCCESSFUL		0x01
 
-#endif // __RTMP_TYPE_H__ //
+#endif /* __RTMP_TYPE_H__ // */

+ 59 - 59
drivers/staging/rt2860/rtusb_io.h

@@ -30,54 +30,54 @@
 
 #include "rtmp_type.h"
 
-// New for MeetingHouse Api support
-#define CMDTHREAD_VENDOR_RESET                      0x0D730101	// cmd
-#define CMDTHREAD_VENDOR_UNPLUG                     0x0D730102	// cmd
-#define CMDTHREAD_VENDOR_SWITCH_FUNCTION            0x0D730103	// cmd
-#define CMDTHREAD_MULTI_WRITE_MAC                   0x0D730107	// cmd
-#define CMDTHREAD_MULTI_READ_MAC                    0x0D730108	// cmd
-#define CMDTHREAD_VENDOR_EEPROM_WRITE               0x0D73010A	// cmd
-#define CMDTHREAD_VENDOR_EEPROM_READ                0x0D73010B	// cmd
-#define CMDTHREAD_VENDOR_ENTER_TESTMODE             0x0D73010C	// cmd
-#define CMDTHREAD_VENDOR_EXIT_TESTMODE              0x0D73010D	// cmd
-#define CMDTHREAD_VENDOR_WRITE_BBP                  0x0D730119	// cmd
-#define CMDTHREAD_VENDOR_READ_BBP                   0x0D730118	// cmd
-#define CMDTHREAD_VENDOR_WRITE_RF                   0x0D73011A	// cmd
-#define CMDTHREAD_VENDOR_FLIP_IQ                    0x0D73011D	// cmd
-#define CMDTHREAD_RESET_BULK_OUT                    0x0D730210	// cmd
-#define CMDTHREAD_RESET_BULK_IN                     0x0D730211	// cmd
-#define CMDTHREAD_SET_PSM_BIT				0x0D730212	// cmd
-#define CMDTHREAD_SET_RADIO                         0x0D730214	// cmd
-#define CMDTHREAD_UPDATE_TX_RATE                    0x0D730216	// cmd
-#define CMDTHREAD_802_11_ADD_KEY_WEP                0x0D730218	// cmd
-#define CMDTHREAD_RESET_FROM_ERROR                  0x0D73021A	// cmd
-#define CMDTHREAD_LINK_DOWN                         0x0D73021B	// cmd
-#define CMDTHREAD_RESET_FROM_NDIS                   0x0D73021C	// cmd
-#define CMDTHREAD_CHECK_GPIO                        0x0D730215	// cmd
-#define CMDTHREAD_FORCE_WAKE_UP                     0x0D730222	// cmd
-#define CMDTHREAD_SET_BW                            0x0D730225	// cmd
-#define CMDTHREAD_SET_ASIC_WCID                     0x0D730226	// cmd
-#define CMDTHREAD_SET_ASIC_WCID_CIPHER              0x0D730227	// cmd
-#define CMDTHREAD_QKERIODIC_EXECUT                  0x0D73023D	// cmd
-#define RT_CMD_SET_KEY_TABLE                        0x0D730228	// cmd
-#define RT_CMD_SET_RX_WCID_TABLE                    0x0D730229	// cmd
-#define CMDTHREAD_SET_CLIENT_MAC_ENTRY              0x0D73023E	// cmd
-#define CMDTHREAD_SET_GROUP_KEY						0x0D73023F	// cmd
-#define CMDTHREAD_SET_PAIRWISE_KEY					0x0D730240	// cmd
-
-#define CMDTHREAD_802_11_QUERY_HARDWARE_REGISTER    0x0D710105	// cmd
-#define CMDTHREAD_802_11_SET_PHY_MODE               0x0D79010C	// cmd
-#define CMDTHREAD_802_11_SET_STA_CONFIG             0x0D790111	// cmd
-#define CMDTHREAD_802_11_SET_PREAMBLE               0x0D790101	// cmd
-#define CMDTHREAD_802_11_COUNTER_MEASURE			0x0D790102	// cmd
-// add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet
-#define CMDTHREAD_UPDATE_PROTECT					0x0D790103	// cmd
-// end johnli
-
-//CMDTHREAD_MULTI_READ_MAC
-//CMDTHREAD_MULTI_WRITE_MAC
-//CMDTHREAD_VENDOR_EEPROM_READ
-//CMDTHREAD_VENDOR_EEPROM_WRITE
+/* New for MeetingHouse Api support */
+#define CMDTHREAD_VENDOR_RESET                      0x0D730101	/* cmd */
+#define CMDTHREAD_VENDOR_UNPLUG                     0x0D730102	/* cmd */
+#define CMDTHREAD_VENDOR_SWITCH_FUNCTION            0x0D730103	/* cmd */
+#define CMDTHREAD_MULTI_WRITE_MAC                   0x0D730107	/* cmd */
+#define CMDTHREAD_MULTI_READ_MAC                    0x0D730108	/* cmd */
+#define CMDTHREAD_VENDOR_EEPROM_WRITE               0x0D73010A	/* cmd */
+#define CMDTHREAD_VENDOR_EEPROM_READ                0x0D73010B	/* cmd */
+#define CMDTHREAD_VENDOR_ENTER_TESTMODE             0x0D73010C	/* cmd */
+#define CMDTHREAD_VENDOR_EXIT_TESTMODE              0x0D73010D	/* cmd */
+#define CMDTHREAD_VENDOR_WRITE_BBP                  0x0D730119	/* cmd */
+#define CMDTHREAD_VENDOR_READ_BBP                   0x0D730118	/* cmd */
+#define CMDTHREAD_VENDOR_WRITE_RF                   0x0D73011A	/* cmd */
+#define CMDTHREAD_VENDOR_FLIP_IQ                    0x0D73011D	/* cmd */
+#define CMDTHREAD_RESET_BULK_OUT                    0x0D730210	/* cmd */
+#define CMDTHREAD_RESET_BULK_IN                     0x0D730211	/* cmd */
+#define CMDTHREAD_SET_PSM_BIT				0x0D730212	/* cmd */
+#define CMDTHREAD_SET_RADIO                         0x0D730214	/* cmd */
+#define CMDTHREAD_UPDATE_TX_RATE                    0x0D730216	/* cmd */
+#define CMDTHREAD_802_11_ADD_KEY_WEP                0x0D730218	/* cmd */
+#define CMDTHREAD_RESET_FROM_ERROR                  0x0D73021A	/* cmd */
+#define CMDTHREAD_LINK_DOWN                         0x0D73021B	/* cmd */
+#define CMDTHREAD_RESET_FROM_NDIS                   0x0D73021C	/* cmd */
+#define CMDTHREAD_CHECK_GPIO                        0x0D730215	/* cmd */
+#define CMDTHREAD_FORCE_WAKE_UP                     0x0D730222	/* cmd */
+#define CMDTHREAD_SET_BW                            0x0D730225	/* cmd */
+#define CMDTHREAD_SET_ASIC_WCID                     0x0D730226	/* cmd */
+#define CMDTHREAD_SET_ASIC_WCID_CIPHER              0x0D730227	/* cmd */
+#define CMDTHREAD_QKERIODIC_EXECUT                  0x0D73023D	/* cmd */
+#define RT_CMD_SET_KEY_TABLE                        0x0D730228	/* cmd */
+#define RT_CMD_SET_RX_WCID_TABLE                    0x0D730229	/* cmd */
+#define CMDTHREAD_SET_CLIENT_MAC_ENTRY              0x0D73023E	/* cmd */
+#define CMDTHREAD_SET_GROUP_KEY						0x0D73023F	/* cmd */
+#define CMDTHREAD_SET_PAIRWISE_KEY					0x0D730240	/* cmd */
+
+#define CMDTHREAD_802_11_QUERY_HARDWARE_REGISTER    0x0D710105	/* cmd */
+#define CMDTHREAD_802_11_SET_PHY_MODE               0x0D79010C	/* cmd */
+#define CMDTHREAD_802_11_SET_STA_CONFIG             0x0D790111	/* cmd */
+#define CMDTHREAD_802_11_SET_PREAMBLE               0x0D790101	/* cmd */
+#define CMDTHREAD_802_11_COUNTER_MEASURE			0x0D790102	/* cmd */
+/* add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet */
+#define CMDTHREAD_UPDATE_PROTECT					0x0D790103	/* cmd */
+/* end johnli */
+
+/*CMDTHREAD_MULTI_READ_MAC */
+/*CMDTHREAD_MULTI_WRITE_MAC */
+/*CMDTHREAD_VENDOR_EEPROM_READ */
+/*CMDTHREAD_VENDOR_EEPROM_WRITE */
 typedef struct _CMDHandler_TLV {
 	USHORT Offset;
 	USHORT Length;
@@ -116,7 +116,7 @@ typedef struct _CmdQ {
 	USB Cmd to ASIC Related MACRO
 
 ******************************************************************************/
-// reset MAC of a station entry to 0xFFFFFFFFFFFF
+/* reset MAC of a station entry to 0xFFFFFFFFFFFF */
 #define RTMP_STA_ENTRY_MAC_RESET(pAd, Wcid)					\
 	{	RT_SET_ASIC_WCID	SetAsicWcid;						\
 		SetAsicWcid.WCID = Wcid;								\
@@ -125,22 +125,22 @@ typedef struct _CmdQ {
 		RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_ASIC_WCID,	\
 				&SetAsicWcid, sizeof(RT_SET_ASIC_WCID));	}
 
-// add this entry into ASIC RX WCID search table
+/* add this entry into ASIC RX WCID search table */
 #define RTMP_STA_ENTRY_ADD(pAd, pEntry)							\
 	RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_CLIENT_MAC_ENTRY,	\
 							pEntry, sizeof(MAC_TABLE_ENTRY));
 
-// add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet
-// Set MAC register value according operation mode
+/* add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet */
+/* Set MAC register value according operation mode */
 #define RTMP_UPDATE_PROTECT(pAd)	\
 	RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_UPDATE_PROTECT, NULL, 0);
-// end johnli
+/* end johnli */
 
-// remove Pair-wise key material from ASIC
-// yet implement
+/* remove Pair-wise key material from ASIC */
+/* yet implement */
 #define RTMP_STA_ENTRY_KEY_DEL(pAd, BssIdx, Wcid)
 
-// add Client security information into ASIC WCID table and IVEIV table
+/* add Client security information into ASIC WCID table and IVEIV table */
 #define RTMP_STA_SECURITY_INFO_ADD(pAd, apidx, KeyID, pEntry)						\
 	{	RTMP_STA_ENTRY_MAC_RESET(pAd, pEntry->Aid);								\
 		if (pEntry->Aid >= 1) {														\
@@ -160,7 +160,7 @@ typedef struct _CmdQ {
 			RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_ASIC_WCID_CIPHER,			\
 							&SetAsicWcidAttri, sizeof(RT_SET_ASIC_WCID_ATTRI)); } }
 
-// Insert the BA bitmap to ASIC for the Wcid entry
+/* Insert the BA bitmap to ASIC for the Wcid entry */
 #define RTMP_ADD_BA_SESSION_TO_ASIC(_pAd, _Aid, _TID)					\
 		do{																\
 			RT_SET_ASIC_WCID	SetAsicWcid;							\
@@ -170,7 +170,7 @@ typedef struct _CmdQ {
 			RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID));	\
 		}while(0)
 
-// Remove the BA bitmap from ASIC for the Wcid entry
+/* Remove the BA bitmap from ASIC for the Wcid entry */
 #define RTMP_DEL_BA_SESSION_FROM_ASIC(_pAd, _Wcid, _TID)				\
 		do{																\
 			RT_SET_ASIC_WCID	SetAsicWcid;							\
@@ -180,4 +180,4 @@ typedef struct _CmdQ {
 			RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID));	\
 		}while(0)
 
-#endif // __RTUSB_IO_H__ //
+#endif /* __RTUSB_IO_H__ // */

+ 1 - 1
drivers/staging/rt2860/spectrum.h

@@ -186,4 +186,4 @@ VOID NotifyChSwAnnToPeerAPs(IN PRTMP_ADAPTER pAd,
 
 VOID RguClass_BuildBcnChList(IN PRTMP_ADAPTER pAd,
 			     OUT PUCHAR pBuf, OUT PULONG pBufLen);
-#endif // __SPECTRUM_H__ //
+#endif /* __SPECTRUM_H__ // */

+ 2 - 2
drivers/staging/rt2860/spectrum_def.h

@@ -58,7 +58,7 @@ typedef struct _MEASURE_REQ_ENTRY {
 	ULONG lastTime;
 	BOOLEAN Valid;
 	UINT8 DialogToken;
-	UINT8 MeasureDialogToken[3];	// 0:basic measure, 1: CCA measure, 2: RPI_Histogram measure.
+	UINT8 MeasureDialogToken[3];	/* 0:basic measure, 1: CCA measure, 2: RPI_Histogram measure. */
 } MEASURE_REQ_ENTRY, *PMEASURE_REQ_ENTRY;
 
 typedef struct _MEASURE_REQ_TAB {
@@ -195,4 +195,4 @@ typedef struct PACKED _QUIET_INFO {
 	UINT16 QuietOffset;
 } QUIET_INFO, *PQUIET_INFO;
 
-#endif // __SPECTRUM_DEF_H__ //
+#endif /* __SPECTRUM_DEF_H__ // */

+ 60 - 60
drivers/staging/rt2860/wpa.h

@@ -38,7 +38,7 @@
 #ifndef	__WPA_H__
 #define	__WPA_H__
 
-// EAPOL Key descripter frame format related length
+/* EAPOL Key descripter frame format related length */
 #define LEN_KEY_DESC_NONCE			32
 #define LEN_KEY_DESC_IV				16
 #define LEN_KEY_DESC_RSC			8
@@ -46,25 +46,25 @@
 #define LEN_KEY_DESC_REPLAY			8
 #define LEN_KEY_DESC_MIC			16
 
-// The length is the EAPoL-Key frame except key data field.
-// Please refer to 802.11i-2004 ,Figure 43u in p.78
+/* The length is the EAPoL-Key frame except key data field. */
+/* Please refer to 802.11i-2004 ,Figure 43u in p.78 */
 #define LEN_EAPOL_KEY_MSG			(sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE)
 
-// EAP Code Type.
+/* EAP Code Type. */
 #define EAP_CODE_REQUEST	1
 #define EAP_CODE_RESPONSE	2
 #define EAP_CODE_SUCCESS    3
 #define EAP_CODE_FAILURE    4
 
-// EAPOL frame Protocol Version
+/* EAPOL frame Protocol Version */
 #define	EAPOL_VER					1
 #define	EAPOL_VER2					2
 
-// EAPOL-KEY Descriptor Type
+/* EAPOL-KEY Descriptor Type */
 #define	WPA1_KEY_DESC				0xfe
 #define WPA2_KEY_DESC               0x02
 
-// Key Descriptor Version of Key Information
+/* Key Descriptor Version of Key Information */
 #define	DESC_TYPE_TKIP				1
 #define	DESC_TYPE_AES				2
 
@@ -73,11 +73,11 @@
 
 #define LEN_MASTER_KEY				32
 
-// EAPOL EK, MK
+/* EAPOL EK, MK */
 #define LEN_EAP_EK					16
 #define LEN_EAP_MICK				16
 #define LEN_EAP_KEY					((LEN_EAP_EK)+(LEN_EAP_MICK))
-// TKIP key related
+/* TKIP key related */
 #define LEN_PMKID					16
 #define LEN_TKIP_EK					16
 #define LEN_TKIP_RXMICK				8
@@ -94,13 +94,13 @@
 #define LEN_PMK_NAME				16
 #define LEN_NONCE					32
 
-// RSN IE Length definition
+/* RSN IE Length definition */
 #define MAX_LEN_OF_RSNIE		255
 #define MIN_LEN_OF_RSNIE         	8
 
 #define KEY_LIFETIME				3600
 
-//EAP Packet Type
+/*EAP Packet Type */
 #define	EAPPacket		0
 #define	EAPOLStart		1
 #define	EAPOLLogoff		2
@@ -119,28 +119,28 @@
 #define PAIRWISEKEY					1
 #define GROUPKEY					0
 
-// Retry timer counter initial value
+/* Retry timer counter initial value */
 #define PEER_MSG1_RETRY_TIMER_CTR           0
 #define PEER_MSG3_RETRY_TIMER_CTR           10
 #define GROUP_MSG1_RETRY_TIMER_CTR          20
 
-//#ifdef CONFIG_AP_SUPPORT
-// WPA mechanism retry timer interval
-#define PEER_MSG1_RETRY_EXEC_INTV           1000	// 1 sec
-#define PEER_MSG3_RETRY_EXEC_INTV           3000	// 3 sec
-#define GROUP_KEY_UPDATE_EXEC_INTV          1000	// 1 sec
-#define PEER_GROUP_KEY_UPDATE_INIV			2000	// 2 sec
+/*#ifdef CONFIG_AP_SUPPORT */
+/* WPA mechanism retry timer interval */
+#define PEER_MSG1_RETRY_EXEC_INTV           1000	/* 1 sec */
+#define PEER_MSG3_RETRY_EXEC_INTV           3000	/* 3 sec */
+#define GROUP_KEY_UPDATE_EXEC_INTV          1000	/* 1 sec */
+#define PEER_GROUP_KEY_UPDATE_INIV			2000	/* 2 sec */
 
-#define ENQUEUE_EAPOL_START_TIMER			200	// 200 ms
+#define ENQUEUE_EAPOL_START_TIMER			200	/* 200 ms */
 
-// group rekey interval
+/* group rekey interval */
 #define TIME_REKEY                          0
 #define PKT_REKEY                           1
 #define DISABLE_REKEY                       2
 #define MAX_REKEY                           2
 
 #define MAX_REKEY_INTER                     0x3ffffff
-//#endif // CONFIG_AP_SUPPORT //
+/*#endif // CONFIG_AP_SUPPORT // */
 
 #define GROUP_SUITE					0
 #define PAIRWISE_SUITE				1
@@ -194,13 +194,13 @@
 
 #define IS_WPA_CAPABILITY(a)       (((a) >= Ndis802_11AuthModeWPA) && ((a) <= Ndis802_11AuthModeWPA1PSKWPA2PSK))
 
-// EAPOL Key Information definition within Key descriptor format
+/* EAPOL Key Information definition within Key descriptor format */
 typedef struct PACKED _KEY_INFO {
 	UCHAR KeyMic:1;
 	UCHAR Secure:1;
 	UCHAR Error:1;
 	UCHAR Request:1;
-	UCHAR EKD_DL:1;		// EKD for AP; DL for STA
+	UCHAR EKD_DL:1;		/* EKD for AP; DL for STA */
 	UCHAR Rsvd:3;
 	UCHAR KeyDescVer:3;
 	UCHAR KeyType:1;
@@ -209,7 +209,7 @@ typedef struct PACKED _KEY_INFO {
 	UCHAR KeyAck:1;
 } KEY_INFO, *PKEY_INFO;
 
-// EAPOL Key descriptor format
+/* EAPOL Key descriptor format */
 typedef struct PACKED _KEY_DESCRIPTER {
 	UCHAR Type;
 	KEY_INFO KeyInfo;
@@ -231,7 +231,7 @@ typedef struct PACKED _EAPOL_PACKET {
 	KEY_DESCRIPTER KeyDesc;
 } EAPOL_PACKET, *PEAPOL_PACKET;
 
-//802.11i D10 page 83
+/*802.11i D10 page 83 */
 typedef struct PACKED _GTK_ENCAP {
 	UCHAR Kid:2;
 	UCHAR tx:1;
@@ -248,7 +248,7 @@ typedef struct PACKED _KDE_ENCAP {
 	GTK_ENCAP GTKEncap;
 } KDE_ENCAP, *PKDE_ENCAP;
 
-// For WPA1
+/* For WPA1 */
 typedef struct PACKED _RSNIE {
 	UCHAR oui[4];
 	USHORT version;
@@ -259,7 +259,7 @@ typedef struct PACKED _RSNIE {
 	} ucast[1];
 } RSNIE, *PRSNIE;
 
-// For WPA2
+/* For WPA2 */
 typedef struct PACKED _RSNIE2 {
 	USHORT version;
 	UCHAR mcast[4];
@@ -269,7 +269,7 @@ typedef struct PACKED _RSNIE2 {
 	} ucast[1];
 } RSNIE2, *PRSNIE2;
 
-// AKM Suite
+/* AKM Suite */
 typedef struct PACKED _RSNIE_AUTH {
 	USHORT acount;
 	struct PACKED {
@@ -294,45 +294,45 @@ typedef struct PACKED _EAP_HDR {
 	UCHAR Body_Len[2];
 	UCHAR code;
 	UCHAR identifier;
-	UCHAR length[2];	// including code and identifier, followed by length-2 octets of data
+	UCHAR length[2];	/* including code and identifier, followed by length-2 octets of data */
 } EAP_HDR, *PEAP_HDR;
 
-// For supplicant state machine states. 802.11i Draft 4.1, p. 97
-// We simplified it
+/* For supplicant state machine states. 802.11i Draft 4.1, p. 97 */
+/* We simplified it */
 typedef enum _WpaState {
-	SS_NOTUSE,		// 0
-	SS_START,		// 1
-	SS_WAIT_MSG_3,		// 2
-	SS_WAIT_GROUP,		// 3
-	SS_FINISH,		// 4
-	SS_KEYUPDATE,		// 5
+	SS_NOTUSE,		/* 0 */
+	SS_START,		/* 1 */
+	SS_WAIT_MSG_3,		/* 2 */
+	SS_WAIT_GROUP,		/* 3 */
+	SS_FINISH,		/* 4 */
+	SS_KEYUPDATE,		/* 5 */
 } WPA_STATE;
 
-//
-//      The definition of the cipher combination
-//
-//       bit3   bit2  bit1   bit0
-//      +------------+------------+
-//      |         WPA    |         WPA2   |
-//      +------+-----+------+-----+
-//      | TKIP | AES | TKIP | AES |
-//      |       0  |  1  |   1  |  0  | -> 0x06
-//      |       0  |  1  |   1  |  1  | -> 0x07
-//      |       1  |  0  |   0  |  1  | -> 0x09
-//      |       1  |  0  |   1  |  1  | -> 0x0B
-//      |       1  |  1  |   0  |  1  | -> 0x0D
-//      |       1  |  1  |   1  |  0  | -> 0x0E
-//      |       1  |  1  |   1  |  1  | -> 0x0F
-//      +------+-----+------+-----+
-//
+/* */
+/*      The definition of the cipher combination */
+/* */
+/*       bit3   bit2  bit1   bit0 */
+/*      +------------+------------+ */
+/*      |         WPA    |         WPA2   | */
+/*      +------+-----+------+-----+ */
+/*      | TKIP | AES | TKIP | AES | */
+/*      |       0  |  1  |   1  |  0  | -> 0x06 */
+/*      |       0  |  1  |   1  |  1  | -> 0x07 */
+/*      |       1  |  0  |   0  |  1  | -> 0x09 */
+/*      |       1  |  0  |   1  |  1  | -> 0x0B */
+/*      |       1  |  1  |   0  |  1  | -> 0x0D */
+/*      |       1  |  1  |   1  |  0  | -> 0x0E */
+/*      |       1  |  1  |   1  |  1  | -> 0x0F */
+/*      +------+-----+------+-----+ */
+/* */
 typedef enum _WpaMixPairCipher {
 	MIX_CIPHER_NOTUSE = 0x00,
-	WPA_NONE_WPA2_TKIPAES = 0x03,	// WPA2-TKIPAES
+	WPA_NONE_WPA2_TKIPAES = 0x03,	/* WPA2-TKIPAES */
 	WPA_AES_WPA2_TKIP = 0x06,
 	WPA_AES_WPA2_TKIPAES = 0x07,
 	WPA_TKIP_WPA2_AES = 0x09,
 	WPA_TKIP_WPA2_TKIPAES = 0x0B,
-	WPA_TKIPAES_WPA2_NONE = 0x0C,	// WPA-TKIPAES
+	WPA_TKIPAES_WPA2_NONE = 0x0C,	/* WPA-TKIPAES */
 	WPA_TKIPAES_WPA2_AES = 0x0D,
 	WPA_TKIPAES_WPA2_TKIP = 0x0E,
 	WPA_TKIPAES_WPA2_TKIPAES = 0x0F,
@@ -341,22 +341,22 @@ typedef enum _WpaMixPairCipher {
 typedef struct PACKED _RSN_IE_HEADER_STRUCT {
 	UCHAR Eid;
 	UCHAR Length;
-	USHORT Version;		// Little endian format
+	USHORT Version;		/* Little endian format */
 } RSN_IE_HEADER_STRUCT, *PRSN_IE_HEADER_STRUCT;
 
-// Cipher suite selector types
+/* Cipher suite selector types */
 typedef struct PACKED _CIPHER_SUITE_STRUCT {
 	UCHAR Oui[3];
 	UCHAR Type;
 } CIPHER_SUITE_STRUCT, *PCIPHER_SUITE_STRUCT;
 
-// Authentication and Key Management suite selector
+/* Authentication and Key Management suite selector */
 typedef struct PACKED _AKM_SUITE_STRUCT {
 	UCHAR Oui[3];
 	UCHAR Type;
 } AKM_SUITE_STRUCT, *PAKM_SUITE_STRUCT;
 
-// RSN capability
+/* RSN capability */
 typedef struct PACKED _RSN_CAPABILITY {
 	USHORT Rsv:10;
 	USHORT GTKSAReplayCnt:2;

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff