Skip to content

Commit

Permalink
Staging: rt28x0: fix comments in *.h files
Browse files Browse the repository at this point in the history
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 8281958 commit cc27706
Show file tree
Hide file tree
Showing 30 changed files with 2,672 additions and 2,673 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/rt2860/ap.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
#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[]);

#ifdef RTMP_MAC_USB
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);

Expand All @@ -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__ */
1 change: 0 additions & 1 deletion drivers/staging/rt2860/chip/mac_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
140 changes: 70 additions & 70 deletions drivers/staging/rt2860/chip/mac_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -66,61 +66,61 @@ 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;
UINT32 LastAMSDU:1;
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];
HEADER_802_11 NullFrame;
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 {
Expand All @@ -130,41 +130,41 @@ 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;
UCHAR Header_802_3[LENGTH_802_3];
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;
Expand All @@ -173,43 +173,43 @@ 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;

/******************************************************************************
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)
Expand Down Expand Up @@ -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 ----------------- */
Expand Down Expand Up @@ -344,4 +344,4 @@ typedef struct _RX_CONTEXT {
#define RTMP_MLME_RADIO_OFF(pAd) \
RT28xxUsbMlmeRadioOFF(pAd);

#endif //__MAC_USB_H__ //
#endif /*__MAC_USB_H__ // */
12 changes: 6 additions & 6 deletions drivers/staging/rt2860/chip/rt2860.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ // */
6 changes: 3 additions & 3 deletions drivers/staging/rt2860/chip/rt2870.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ // */
10 changes: 5 additions & 5 deletions drivers/staging/rt2860/chip/rt3070.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ // */
16 changes: 8 additions & 8 deletions drivers/staging/rt2860/chip/rt3090.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ // */
4 changes: 2 additions & 2 deletions drivers/staging/rt2860/chip/rt30xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ // */
Loading

0 comments on commit cc27706

Please sign in to comment.