提交 cc277069 编写于 作者: B Bartlomiej Zolnierkiewicz 提交者: Greg Kroah-Hartman

Staging: rt28x0: fix comments in *.h files

Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 8281958b
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#ifndef __AP_H__ #ifndef __AP_H__
#define __AP_H__ #define __AP_H__
// ap_wpa.c /* ap_wpa.c */
VOID WpaStateMachineInit(IN PRTMP_ADAPTER pAd, VOID WpaStateMachineInit(IN PRTMP_ADAPTER pAd,
IN STATE_MACHINE * Sm, OUT STATE_MACHINE_FUNC Trans[]); IN STATE_MACHINE * Sm, OUT STATE_MACHINE_FUNC Trans[]);
...@@ -48,7 +48,7 @@ VOID WpaStateMachineInit(IN PRTMP_ADAPTER pAd, ...@@ -48,7 +48,7 @@ VOID WpaStateMachineInit(IN PRTMP_ADAPTER pAd,
VOID BeaconUpdateExec(IN PVOID SystemSpecific1, VOID BeaconUpdateExec(IN PVOID SystemSpecific1,
IN PVOID FunctionContext, IN PVOID FunctionContext,
IN PVOID SystemSpecific2, IN PVOID SystemSpecific3); IN PVOID SystemSpecific2, IN PVOID SystemSpecific3);
#endif // RTMP_MAC_USB // #endif /* RTMP_MAC_USB // */
VOID RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack); VOID RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack);
...@@ -63,4 +63,4 @@ BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd, ...@@ -63,4 +63,4 @@ BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd,
MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, IN PUCHAR pAddr); MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, IN PUCHAR pAddr);
#endif // __AP_H__ #endif /* __AP_H__ */
...@@ -178,7 +178,6 @@ typedef union _TX_ATTENUATION_CTRL_STRUC { ...@@ -178,7 +178,6 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
#define NEED_QUEUE_BACK_FOR_AGG(pAd, QueIdx, freeNum, _TxFrameType) \ #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 == 0)) || (freeNum<3))
//(((freeNum) != (TX_RING_SIZE-1)) && (pAd->TxSwQueue[QueIdx].Number == 1 /*0*/))
#define HAL_KickOutMgmtTx(_pAd, _QueIdx, _pPacket, _pSrcBufVA, _SrcBufLen) \ #define HAL_KickOutMgmtTx(_pAd, _QueIdx, _pPacket, _pSrcBufVA, _SrcBufLen) \
RtmpPCIMgmtKickOut(_pAd, _QueIdx, _pPacket, _pSrcBufVA, _SrcBufLen) RtmpPCIMgmtKickOut(_pAd, _QueIdx, _pPacket, _pSrcBufVA, _SrcBufLen)
......
...@@ -46,18 +46,18 @@ ...@@ -46,18 +46,18 @@
#define USB_CYC_CFG 0x02a4 #define USB_CYC_CFG 0x02a4
#define BEACON_RING_SIZE 2 #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 \ #define fRTMP_ADAPTER_NEED_STOP_TX \
(fRTMP_ADAPTER_NIC_NOT_EXIST | fRTMP_ADAPTER_HALT_IN_PROGRESS | \ (fRTMP_ADAPTER_NIC_NOT_EXIST | fRTMP_ADAPTER_HALT_IN_PROGRESS | \
fRTMP_ADAPTER_RESET_IN_PROGRESS | fRTMP_ADAPTER_BULKOUT_RESET | \ fRTMP_ADAPTER_RESET_IN_PROGRESS | fRTMP_ADAPTER_BULKOUT_RESET | \
fRTMP_ADAPTER_RADIO_OFF | fRTMP_ADAPTER_REMOVE_IN_PROGRESS) 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 RXINFO_SIZE 4
#define RT2870_RXDMALEN_FIELD_SIZE 4 #define RT2870_RXDMALEN_FIELD_SIZE 4
...@@ -66,17 +66,17 @@ typedef struct PACKED _RXINFO_STRUC { ...@@ -66,17 +66,17 @@ typedef struct PACKED _RXINFO_STRUC {
UINT32 DATA:1; UINT32 DATA:1;
UINT32 NULLDATA:1; UINT32 NULLDATA:1;
UINT32 FRAG:1; UINT32 FRAG:1;
UINT32 U2M:1; // 1: this RX frame is unicast to me UINT32 U2M:1; /* 1: this RX frame is unicast to me */
UINT32 Mcast:1; // 1: this is a multicast frame UINT32 Mcast:1; /* 1: this is a multicast frame */
UINT32 Bcast:1; // 1: this is a broadcast frame UINT32 Bcast:1; /* 1: this is a broadcast frame */
UINT32 MyBss:1; // 1: this frame belongs to the same BSSID UINT32 MyBss:1; /* 1: this frame belongs to the same BSSID */
UINT32 Crc:1; // 1: CRC error UINT32 Crc:1; /* 1: CRC error */
UINT32 CipherErr:2; // 0: decryption okay, 1:ICV error, 2:MIC error, 3:KEY not valid 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 AMSDU:1; /* rx with 802.3 header, not 802.11 header. */
UINT32 HTC:1; UINT32 HTC:1;
UINT32 RSSI:1; UINT32 RSSI:1;
UINT32 L2PAD:1; UINT32 L2PAD:1;
UINT32 AMPDU:1; // To be moved UINT32 AMPDU:1; /* To be moved */
UINT32 Decrypted:1; UINT32 Decrypted:1;
UINT32 PlcpRssil:1; UINT32 PlcpRssil:1;
UINT32 CipherAlg:1; UINT32 CipherAlg:1;
...@@ -84,35 +84,35 @@ typedef struct PACKED _RXINFO_STRUC { ...@@ -84,35 +84,35 @@ typedef struct PACKED _RXINFO_STRUC {
UINT32 PlcpSignal:12; UINT32 PlcpSignal:12;
} RXINFO_STRUC, *PRXINFO_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC; } RXINFO_STRUC, *PRXINFO_STRUC, RT28XX_RXD_STRUC, *PRT28XX_RXD_STRUC;
// /* */
// TXINFO /* TXINFO */
// /* */
#define TXINFO_SIZE 4 #define TXINFO_SIZE 4
typedef struct _TXINFO_STRUC { typedef struct _TXINFO_STRUC {
// Word 0 /* Word 0 */
UINT32 USBDMATxPktLen:16; //used ONLY in USB bulk Aggregation, Total byte counts of all sub-frame. UINT32 USBDMATxPktLen:16; /*used ONLY in USB bulk Aggregation, Total byte counts of all sub-frame. */
UINT32 rsv:8; 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 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 QSEL:2; /* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */
UINT32 SwUseLastRound:1; // Software use. UINT32 SwUseLastRound:1; /* Software use. */
UINT32 rsv2:2; // Software use. UINT32 rsv2:2; /* Software use. */
UINT32 USBDMANextVLD:1; //used ONLY in USB bulk Aggregation, NextValid 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 USBDMATxburst:1; /*used ONLY in USB bulk Aggre. Force USB DMA transmit frame from current selected endpoint */
} TXINFO_STRUC, *PTXINFO_STRUC; } TXINFO_STRUC, *PTXINFO_STRUC;
// /* */
// Management ring buffer format /* Management ring buffer format */
// /* */
typedef struct _MGMT_STRUC { typedef struct _MGMT_STRUC {
BOOLEAN Valid; BOOLEAN Valid;
PUCHAR pBuffer; PUCHAR pBuffer;
ULONG Length; ULONG Length;
} MGMT_STRUC, *PMGMT_STRUC; } 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 { typedef struct __TX_BUFFER {
union { union {
UCHAR WirelessPacket[TX_BUFFER_NORMSIZE]; UCHAR WirelessPacket[TX_BUFFER_NORMSIZE];
...@@ -120,7 +120,7 @@ typedef struct __TX_BUFFER { ...@@ -120,7 +120,7 @@ typedef struct __TX_BUFFER {
PSPOLL_FRAME PsPollPacket; PSPOLL_FRAME PsPollPacket;
RTS_FRAME RTSFrame; RTS_FRAME RTSFrame;
} field; } field;
UCHAR Aggregation[4]; //Buffer for save Aggregation size. UCHAR Aggregation[4]; /*Buffer for save Aggregation size. */
} TX_BUFFER, *PTX_BUFFER; } TX_BUFFER, *PTX_BUFFER;
typedef struct __HTTX_BUFFER { typedef struct __HTTX_BUFFER {
...@@ -130,22 +130,22 @@ typedef struct __HTTX_BUFFER { ...@@ -130,22 +130,22 @@ typedef struct __HTTX_BUFFER {
PSPOLL_FRAME PsPollPacket; PSPOLL_FRAME PsPollPacket;
RTS_FRAME RTSFrame; RTS_FRAME RTSFrame;
} field; } field;
UCHAR Aggregation[4]; //Buffer for save Aggregation size. UCHAR Aggregation[4]; /*Buffer for save Aggregation size. */
} HTTX_BUFFER, *PHTTX_BUFFER; } HTTX_BUFFER, *PHTTX_BUFFER;
// used to track driver-generated write irps /* used to track driver-generated write irps */
typedef struct _TX_CONTEXT { typedef struct _TX_CONTEXT {
PVOID pAd; //Initialized in MiniportInitialize PVOID pAd; /*Initialized in MiniportInitialize */
PURB pUrb; //Initialized in MiniportInitialize PURB pUrb; /*Initialized in MiniportInitialize */
PIRP pIrp; //used to cancel pending bulk out. PIRP pIrp; /*used to cancel pending bulk out. */
//Initialized in MiniportInitialize /*Initialized in MiniportInitialize */
PTX_BUFFER TransferBuffer; //Initialized in MiniportInitialize PTX_BUFFER TransferBuffer; /*Initialized in MiniportInitialize */
ULONG BulkOutSize; ULONG BulkOutSize;
UCHAR BulkOutPipeId; UCHAR BulkOutPipeId;
UCHAR SelfIdx; UCHAR SelfIdx;
BOOLEAN InUse; BOOLEAN InUse;
BOOLEAN bWaitingBulkOut; // at least one packet is in this TxContext, ready for making IRP anytime. 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 bFullForBulkOut; /* all tx buffer are full , so waiting for tx bulkout. */
BOOLEAN IRPPending; BOOLEAN IRPPending;
BOOLEAN LastOne; BOOLEAN LastOne;
BOOLEAN bAggregatible; BOOLEAN bAggregatible;
...@@ -153,18 +153,18 @@ typedef struct _TX_CONTEXT { ...@@ -153,18 +153,18 @@ typedef struct _TX_CONTEXT {
UCHAR Rsv[2]; UCHAR Rsv[2];
ULONG DataOffset; ULONG DataOffset;
UINT TxRate; 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; } 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 { typedef struct _HT_TX_CONTEXT {
PVOID pAd; //Initialized in MiniportInitialize PVOID pAd; /*Initialized in MiniportInitialize */
PURB pUrb; //Initialized in MiniportInitialize PURB pUrb; /*Initialized in MiniportInitialize */
PIRP pIrp; //used to cancel pending bulk out. PIRP pIrp; /*used to cancel pending bulk out. */
//Initialized in MiniportInitialize /*Initialized in MiniportInitialize */
PHTTX_BUFFER TransferBuffer; //Initialized in MiniportInitialize PHTTX_BUFFER TransferBuffer; /*Initialized in MiniportInitialize */
ULONG BulkOutSize; // Indicate the total bulk-out size in bytes in one bulk-transmission ULONG BulkOutSize; /* Indicate the total bulk-out size in bytes in one bulk-transmission */
UCHAR BulkOutPipeId; UCHAR BulkOutPipeId;
BOOLEAN IRPPending; BOOLEAN IRPPending;
BOOLEAN LastOne; BOOLEAN LastOne;
...@@ -173,33 +173,33 @@ typedef struct _HT_TX_CONTEXT { ...@@ -173,33 +173,33 @@ typedef struct _HT_TX_CONTEXT {
BOOLEAN bCopySavePad; BOOLEAN bCopySavePad;
UCHAR SavedPad[8]; UCHAR SavedPad[8];
UCHAR Header_802_3[LENGTH_802_3]; UCHAR Header_802_3[LENGTH_802_3];
ULONG CurWritePosition; // Indicate the buffer offset which packet will be inserted start from. 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 CurWriteRealPos; /* Indicate the buffer offset which packet now are writing to. */
ULONG NextBulkOutPosition; // Indicate the buffer start offset of a bulk-transmission ULONG NextBulkOutPosition; /* Indicate the buffer start offset of a bulk-transmission */
ULONG ENextBulkOutPosition; // Indicate the buffer end offset of a bulk-transmission ULONG ENextBulkOutPosition; /* Indicate the buffer end offset of a bulk-transmission */
UINT TxRate; 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; } HT_TX_CONTEXT, *PHT_TX_CONTEXT, **PPHT_TX_CONTEXT;
// /* */
// Structure to keep track of receive packets and buffers to indicate /* Structure to keep track of receive packets and buffers to indicate */
// receive data to the protocol. /* receive data to the protocol. */
// /* */
typedef struct _RX_CONTEXT { typedef struct _RX_CONTEXT {
PUCHAR TransferBuffer; PUCHAR TransferBuffer;
PVOID pAd; PVOID pAd;
PIRP pIrp; //used to cancel pending bulk in. PIRP pIrp; /*used to cancel pending bulk in. */
PURB pUrb; PURB pUrb;
//These 2 Boolean shouldn't both be 1 at the same time. /*These 2 Boolean shouldn't both be 1 at the same time. */
ULONG BulkInOffset; // number of packets waiting for reordering . 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 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 bRxHandling; /* Notify this packet is being process now. */
BOOLEAN InUse; // USB Hardware Occupied. Wait for USB HW to put packet. 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 Readable; /* Receive Complete back. OK for driver to indicate receiving packet. */
BOOLEAN IRPPending; // TODO: To be removed BOOLEAN IRPPending; /* TODO: To be removed */
atomic_t IrpLock; atomic_t IrpLock;
NDIS_SPIN_LOCK RxContextLock; 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; } RX_CONTEXT, *PRX_CONTEXT;
/****************************************************************************** /******************************************************************************
...@@ -207,9 +207,9 @@ typedef struct _RX_CONTEXT { ...@@ -207,9 +207,9 @@ typedef struct _RX_CONTEXT {
USB Frimware Related MACRO 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 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) \ #define RTMP_WRITE_FIRMWARE(_pAd, _pFwImage, _FwLen) \
RTUSBFirmwareWrite(_pAd, _pFwImage, _FwLen) RTUSBFirmwareWrite(_pAd, _pFwImage, _FwLen)
...@@ -278,7 +278,7 @@ typedef struct _RX_CONTEXT { ...@@ -278,7 +278,7 @@ typedef struct _RX_CONTEXT {
#define HAL_KickOutNullFrameTx(_pAd, _QueIdx, _pNullFrame, _frameLen) \ #define HAL_KickOutNullFrameTx(_pAd, _QueIdx, _pNullFrame, _frameLen) \
RtmpUSBNullFrameKickOut(_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) #define GET_MGMTRING_FREENO(_pAd) (_pAd->MgmtRing.TxSwFreeIdx)
/* ----------------- RX Related MACRO ----------------- */ /* ----------------- RX Related MACRO ----------------- */
...@@ -344,4 +344,4 @@ typedef struct _RX_CONTEXT { ...@@ -344,4 +344,4 @@ typedef struct _RX_CONTEXT {
#define RTMP_MLME_RADIO_OFF(pAd) \ #define RTMP_MLME_RADIO_OFF(pAd) \
RT28xxUsbMlmeRadioOFF(pAd); RT28xxUsbMlmeRadioOFF(pAd);
#endif //__MAC_USB_H__ // #endif /*__MAC_USB_H__ // */
...@@ -38,17 +38,17 @@ ...@@ -38,17 +38,17 @@
#error "For RT2880, you should define the compile flag -DRTMP_MAC_PCI" #error "For RT2880, you should define the compile flag -DRTMP_MAC_PCI"
#endif #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_PCI_DEVICE_ID 0x0601
#define NIC2860_PCIe_DEVICE_ID 0x0681 #define NIC2860_PCIe_DEVICE_ID 0x0681
#define NIC2760_PCI_DEVICE_ID 0x0701 // 1T/2R Cardbus ??? #define NIC2760_PCI_DEVICE_ID 0x0701 /* 1T/2R Cardbus ??? */
#define NIC2790_PCIe_DEVICE_ID 0x0781 // 1T/2R miniCard #define NIC2790_PCIe_DEVICE_ID 0x0781 /* 1T/2R miniCard */
#define VEN_AWT_PCIe_DEVICE_ID 0x1059 #define VEN_AWT_PCIe_DEVICE_ID 0x1059
#define VEN_AWT_PCI_VENDOR_ID 0x1A3B #define VEN_AWT_PCI_VENDOR_ID 0x1A3B
#define EDIMAX_PCI_VENDOR_ID 0x1432 #define EDIMAX_PCI_VENDOR_ID 0x1432
#endif //__RT2860_H__ // #endif /*__RT2860_H__ // */
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "../rtmp_type.h" #include "../rtmp_type.h"
#include "mac_usb.h" #include "mac_usb.h"
//#define RTMP_CHIP_NAME "RT2870" /*#define RTMP_CHIP_NAME "RT2870" */
#endif // RT2870 // #endif /* RT2870 // */
#endif //__RT2870_H__ // #endif /*__RT2870_H__ // */
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
#include "mac_usb.h" #include "mac_usb.h"
#include "rt30xx.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__ // */
...@@ -60,13 +60,13 @@ ...@@ -60,13 +60,13 @@
#include "mac_pci.h" #include "mac_pci.h"
#include "rt30xx.h" #include "rt30xx.h"
// /* */
// Device ID & Vendor ID, these values should match EEPROM value /* Device ID & Vendor ID, these values should match EEPROM value */
// /* */
#define NIC3090_PCIe_DEVICE_ID 0x3090 // 1T/1R miniCard #define NIC3090_PCIe_DEVICE_ID 0x3090 /* 1T/1R miniCard */
#define NIC3091_PCIe_DEVICE_ID 0x3091 // 1T/2R miniCard #define NIC3091_PCIe_DEVICE_ID 0x3091 /* 1T/2R miniCard */
#define NIC3092_PCIe_DEVICE_ID 0x3092 // 2T/2R miniCard #define NIC3092_PCIe_DEVICE_ID 0x3092 /* 2T/2R miniCard */
#endif // RT3090 // #endif /* RT3090 // */
#endif //__RT3090_H__ // #endif /*__RT3090_H__ // */
...@@ -42,6 +42,6 @@ ...@@ -42,6 +42,6 @@
extern REG_PAIR RT30xx_RFRegTable[]; extern REG_PAIR RT30xx_RFRegTable[];
extern UCHAR NUM_RF_REG_PARMS; extern UCHAR NUM_RF_REG_PARMS;
#endif // RT30xx // #endif /* RT30xx // */
#endif //__RT30XX_H__ // #endif /*__RT30XX_H__ // */
...@@ -74,30 +74,30 @@ ...@@ -74,30 +74,30 @@
#define RF_R30 30 #define RF_R30 30
#define RF_R31 31 #define RF_R31 31
// value domain of pAd->RfIcType /* value domain of pAd->RfIcType */
#define RFIC_2820 1 // 2.4G 2T3R #define RFIC_2820 1 /* 2.4G 2T3R */
#define RFIC_2850 2 // 2.4G/5G 2T3R #define RFIC_2850 2 /* 2.4G/5G 2T3R */
#define RFIC_2720 3 // 2.4G 1T2R #define RFIC_2720 3 /* 2.4G 1T2R */
#define RFIC_2750 4 // 2.4G/5G 1T2R #define RFIC_2750 4 /* 2.4G/5G 1T2R */
#define RFIC_3020 5 // 2.4G 1T1R #define RFIC_3020 5 /* 2.4G 1T1R */
#define RFIC_2020 6 // 2.4G B/G #define RFIC_2020 6 /* 2.4G B/G */
#define RFIC_3021 7 // 2.4G 1T2R #define RFIC_3021 7 /* 2.4G 1T2R */
#define RFIC_3022 8 // 2.4G 2T2R #define RFIC_3022 8 /* 2.4G 2T2R */
#define RFIC_3052 9 // 2.4G/5G 2T2R #define RFIC_3052 9 /* 2.4G/5G 2T2R */
/* /*
BBP sections BBP sections
*/ */
#define BBP_R0 0 // version #define BBP_R0 0 /* version */
#define BBP_R1 1 // TSSI #define BBP_R1 1 /* TSSI */
#define BBP_R2 2 // TX configure #define BBP_R2 2 /* TX configure */
#define BBP_R3 3 #define BBP_R3 3
#define BBP_R4 4 #define BBP_R4 4
#define BBP_R5 5 #define BBP_R5 5
#define BBP_R6 6 #define BBP_R6 6
#define BBP_R14 14 // RX configure #define BBP_R14 14 /* RX configure */
#define BBP_R16 16 #define BBP_R16 16
#define BBP_R17 17 // RX sensibility #define BBP_R17 17 /* RX sensibility */
#define BBP_R18 18 #define BBP_R18 18
#define BBP_R21 21 #define BBP_R21 21
#define BBP_R22 22 #define BBP_R22 22
...@@ -106,12 +106,12 @@ ...@@ -106,12 +106,12 @@
#define BBP_R26 26 #define BBP_R26 26
#define BBP_R27 27 #define BBP_R27 27
#define BBP_R31 31 #define BBP_R31 31
#define BBP_R49 49 //TSSI #define BBP_R49 49 /*TSSI */
#define BBP_R50 50 #define BBP_R50 50
#define BBP_R51 51 #define BBP_R51 51
#define BBP_R52 52 #define BBP_R52 52
#define BBP_R55 55 #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_R63 63
#define BBP_R64 64 #define BBP_R64 64
#define BBP_R65 65 #define BBP_R65 65
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
#define BBP_R67 67 #define BBP_R67 67
#define BBP_R68 68 #define BBP_R68 68
#define BBP_R69 69 #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_R73 73
#define BBP_R75 75 #define BBP_R75 75
#define BBP_R77 77 #define BBP_R77 77
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
#define BBP_R86 86 #define BBP_R86 86
#define BBP_R91 91 #define BBP_R91 91
#define BBP_R92 92 #define BBP_R92 92
#define BBP_R94 94 // Tx Gain Control #define BBP_R94 94 /* Tx Gain Control */
#define BBP_R103 103 #define BBP_R103 103
#define BBP_R105 105 #define BBP_R105 105
#define BBP_R106 106 #define BBP_R106 106
...@@ -149,22 +149,22 @@ ...@@ -149,22 +149,22 @@
#define BBP_R122 122 #define BBP_R122 122
#define BBP_R123 123 #define BBP_R123 123
#ifdef RT30xx #ifdef RT30xx
#define BBP_R138 138 // add by johnli, RF power sequence setup, ADC dynamic on/off control #define BBP_R138 138 /* add by johnli, RF power sequence setup, ADC dynamic on/off control */
#endif // RT30xx // #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. /* 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. /* 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 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_LOW_SENSIBILITY 0x50 */
//#define BBP_R17_MID_SENSIBILITY 0x41 /*#define BBP_R17_MID_SENSIBILITY 0x41 */
//#define BBP_R17_DYNAMIC_UP_BOUND 0x40 /*#define BBP_R17_DYNAMIC_UP_BOUND 0x40 */
#define RSSI_FOR_VERY_LOW_SENSIBILITY -35 #define RSSI_FOR_VERY_LOW_SENSIBILITY -35
#define RSSI_FOR_LOW_SENSIBILITY -58 #define RSSI_FOR_LOW_SENSIBILITY -58
...@@ -194,15 +194,15 @@ ...@@ -194,15 +194,15 @@
} \ } \
} \ } \
} }
#endif // RTMP_MAC_PCI // #endif /* RTMP_MAC_PCI // */
#ifdef RTMP_MAC_USB #ifdef RTMP_MAC_USB
#define RTMP_RF_IO_WRITE32(_A, _V) RTUSBWriteRFRegister(_A, _V) #define RTMP_RF_IO_WRITE32(_A, _V) RTUSBWriteRFRegister(_A, _V)
#endif // RTMP_MAC_USB // #endif /* RTMP_MAC_USB // */
#ifdef RT30xx #ifdef RT30xx
#define RTMP_RF_IO_READ8_BY_REG_ID(_A, _I, _pV) RT30xxReadRFRegister(_A, _I, _pV) #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) #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. BBP register Read/Write marco definitions.
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
But for some chipset which didn't have mcu (e.g., RBUS based chipset), we 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. 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) \ #define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) \
{ \ { \
BBP_CSR_CFG_STRUC BbpCsr; \ BBP_CSR_CFG_STRUC BbpCsr; \
...@@ -425,7 +425,7 @@ ...@@ -425,7 +425,7 @@
But for some chipset which didn't have mcu (e.g., RBUS based chipset), we 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. 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) \ #define RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) \
{ \ { \
BBP_CSR_CFG_STRUC BbpCsr; \ BBP_CSR_CFG_STRUC BbpCsr; \
...@@ -510,7 +510,7 @@ ...@@ -510,7 +510,7 @@
DBGPRINT_ERR(("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n")); \ DBGPRINT_ERR(("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n")); \
} \ } \
} }
#endif // RTMP_MAC_PCI // #endif /* RTMP_MAC_PCI // */
#ifdef RTMP_MAC_USB #ifdef RTMP_MAC_USB
#define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) RTUSBReadBBPRegister(_A, _I, _pV) #define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) RTUSBReadBBPRegister(_A, _I, _pV)
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,7 @@
#define BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) RTUSBWriteBBPRegister(_A, _I, _V) #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) #define BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) RTUSBReadBBPRegister(_A, _I, _pV)
#endif // RTMP_MAC_USB // #endif /* RTMP_MAC_USB // */
#ifdef RT30xx #ifdef RT30xx
#define RTMP_ASIC_MMPS_DISABLE(_pAd) \ #define RTMP_ASIC_MMPS_DISABLE(_pAd) \
...@@ -551,6 +551,6 @@ ...@@ -551,6 +551,6 @@
RTMP_IO_WRITE32(_pAd, 0x1210, _macData); \ RTMP_IO_WRITE32(_pAd, 0x1210, _macData); \
}while(0) }while(0)
#endif // RT30xx // #endif /* RT30xx // */
#endif // __RTMP_PHY_H__ // #endif /* __RTMP_PHY_H__ // */
...@@ -52,14 +52,14 @@ ...@@ -52,14 +52,14 @@
typedef struct _CH_DESP { typedef struct _CH_DESP {
UCHAR FirstChannel; UCHAR FirstChannel;
UCHAR NumOfCh; UCHAR NumOfCh;
CHAR MaxTxPwr; // dBm CHAR MaxTxPwr; /* dBm */
UCHAR Geography; // 0:out door, 1:in door, 2:both UCHAR Geography; /* 0:out door, 1:in door, 2:both */
BOOLEAN DfsReq; // Dfs require, 0: No, 1: yes. BOOLEAN DfsReq; /* Dfs require, 0: No, 1: yes. */
} CH_DESP, *PCH_DESP; } CH_DESP, *PCH_DESP;
typedef struct _CH_REGION { typedef struct _CH_REGION {
UCHAR CountReg[3]; 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_DESP ChDesp[10];
} CH_REGION, *PCH_REGION; } CH_REGION, *PCH_REGION;
...@@ -114,4 +114,4 @@ VOID N_SetCenCh(IN PRTMP_ADAPTER pAd); ...@@ -114,4 +114,4 @@ VOID N_SetCenCh(IN PRTMP_ADAPTER pAd);
UINT8 GetCuntryMaxTxPwr(IN PRTMP_ADAPTER pAd, IN UINT8 channel); UINT8 GetCuntryMaxTxPwr(IN PRTMP_ADAPTER pAd, IN UINT8 channel);
#endif // __CHLIST_H__ #endif /* __CHLIST_H__ */
...@@ -43,25 +43,25 @@ ...@@ -43,25 +43,25 @@
************************************************************************/ ************************************************************************/
int rtmp_ee_prom_read16(IN PRTMP_ADAPTER pAd, int rtmp_ee_prom_read16(IN PRTMP_ADAPTER pAd,
IN USHORT Offset, OUT USHORT * pValue); IN USHORT Offset, OUT USHORT * pValue);
#endif // RTMP_PCI_SUPPORT // #endif /* RTMP_PCI_SUPPORT // */
#ifdef RTMP_USB_SUPPORT #ifdef RTMP_USB_SUPPORT
/************************************************************************* /*************************************************************************
* Public function declarations for usb-based prom chipset * Public function declarations for usb-based prom chipset
************************************************************************/ ************************************************************************/
NTSTATUS RTUSBReadEEPROM16(IN PRTMP_ADAPTER pAd, NTSTATUS RTUSBReadEEPROM16(IN PRTMP_ADAPTER pAd,
IN USHORT offset, OUT PUSHORT pData); IN USHORT offset, OUT PUSHORT pData);
#endif // RTMP_USB_SUPPORT // #endif /* RTMP_USB_SUPPORT // */
#ifdef RT30xx #ifdef RT30xx
#ifdef RTMP_EFUSE_SUPPORT #ifdef RTMP_EFUSE_SUPPORT
int rtmp_ee_efuse_read16(IN RTMP_ADAPTER * pAd, int rtmp_ee_efuse_read16(IN RTMP_ADAPTER * pAd,
IN USHORT Offset, OUT USHORT * pValue); IN USHORT Offset, OUT USHORT * pValue);
#endif // RTMP_EFUSE_SUPPORT // #endif /* RTMP_EFUSE_SUPPORT // */
#endif // RT30xx // #endif /* RT30xx // */
/************************************************************************* /*************************************************************************
* Public function declarations for prom operation callback functions setting * Public function declarations for prom operation callback functions setting
************************************************************************/ ************************************************************************/
INT RtmpChipOpsEepromHook(IN RTMP_ADAPTER * pAd, IN INT infType); INT RtmpChipOpsEepromHook(IN RTMP_ADAPTER * pAd, IN INT infType);
#endif // __EEPROM_H__ // #endif /* __EEPROM_H__ // */
此差异已折叠。
此差异已折叠。
...@@ -66,6 +66,6 @@ ...@@ -66,6 +66,6 @@
#ifdef IGMP_SNOOP_SUPPORT #ifdef IGMP_SNOOP_SUPPORT
#include "igmp_snoop.h" #include "igmp_snoop.h"
#endif // IGMP_SNOOP_SUPPORT // #endif /* IGMP_SNOOP_SUPPORT // */
#endif // __RT_CONFIG_H__ #endif /* __RT_CONFIG_H__ */
...@@ -60,20 +60,20 @@ ...@@ -60,20 +60,20 @@
#include <net/iw_handler.h> #include <net/iw_handler.h>
// load firmware /* load firmware */
#define __KERNEL_SYSCALLS__ #define __KERNEL_SYSCALLS__
#include <linux/unistd.h> #include <linux/unistd.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/unaligned.h> // for get_unaligned() #include <asm/unaligned.h> /* for get_unaligned() */
#define KTHREAD_SUPPORT 1 #define KTHREAD_SUPPORT 1
// RT2870 2.1.0.0 has it disabled /* RT2870 2.1.0.0 has it disabled */
#ifdef KTHREAD_SUPPORT #ifdef KTHREAD_SUPPORT
#include <linux/err.h> #include <linux/err.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#endif // KTHREAD_SUPPORT // #endif /* KTHREAD_SUPPORT // */
/*********************************************************************************** /***********************************************************************************
* Profile related sections * Profile related sections
...@@ -82,12 +82,12 @@ ...@@ -82,12 +82,12 @@
#ifdef RTMP_MAC_PCI #ifdef RTMP_MAC_PCI
#define STA_PROFILE_PATH "/etc/Wireless/RT2860STA/RT2860STA.dat" #define STA_PROFILE_PATH "/etc/Wireless/RT2860STA/RT2860STA.dat"
#define STA_DRIVER_VERSION "2.1.0.0" #define STA_DRIVER_VERSION "2.1.0.0"
#endif // RTMP_MAC_PCI // #endif /* RTMP_MAC_PCI // */
#ifdef RTMP_MAC_USB #ifdef RTMP_MAC_USB
#define STA_PROFILE_PATH "/etc/Wireless/RT2870STA/RT2870STA.dat" #define STA_PROFILE_PATH "/etc/Wireless/RT2870STA/RT2870STA.dat"
#define STA_DRIVER_VERSION "2.1.0.0" #define STA_DRIVER_VERSION "2.1.0.0"
// RT3070 version: 2.1.1.0 /* RT3070 version: 2.1.1.0 */
#endif // RTMP_MAC_USB // #endif /* RTMP_MAC_USB // */
extern const struct iw_handler_def rt28xx_iw_handler_def; extern const struct iw_handler_def rt28xx_iw_handler_def;
...@@ -124,8 +124,8 @@ typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff * skb, ...@@ -124,8 +124,8 @@ typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff * skb,
#define PCI_DEVICE(vend,dev) \ #define PCI_DEVICE(vend,dev) \
.vendor = (vend), .device = (dev), \ .vendor = (vend), .device = (dev), \
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
#endif // PCI_DEVICE // #endif /* PCI_DEVICE // */
#endif // RTMP_MAC_PCI // #endif /* RTMP_MAC_PCI // */
#define RT_MOD_INC_USE_COUNT() \ #define RT_MOD_INC_USE_COUNT() \
if (!try_module_get(THIS_MODULE)) \ if (!try_module_get(THIS_MODULE)) \
...@@ -140,7 +140,7 @@ typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff * skb, ...@@ -140,7 +140,7 @@ typedef int (*HARD_START_XMIT_FUNC) (struct sk_buff * skb,
#define RTMP_DEC_REF(_A) 0 #define RTMP_DEC_REF(_A) 0
#define RTMP_GET_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); 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); ...@@ -176,13 +176,13 @@ struct iw_statistics *rt28xx_get_wireless_stats(IN struct net_device *net_dev);
/*********************************************************************************** /***********************************************************************************
* Ralink Specific network related constant definitions * Ralink Specific network related constant definitions
***********************************************************************************/ ***********************************************************************************/
#define MIN_NET_DEVICE_FOR_AID 0x00 //0x00~0x3f #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_MBSSID 0x00 /*0x00,0x10,0x20,0x30 */
#define MIN_NET_DEVICE_FOR_WDS 0x10 //0x40,0x50,0x60,0x70 #define MIN_NET_DEVICE_FOR_WDS 0x10 /*0x40,0x50,0x60,0x70 */
#define MIN_NET_DEVICE_FOR_APCLI 0x20 #define MIN_NET_DEVICE_FOR_APCLI 0x20
#define MIN_NET_DEVICE_FOR_MESH 0x30 #define MIN_NET_DEVICE_FOR_MESH 0x30
#define MIN_NET_DEVICE_FOR_DLS 0x40 #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_DIRECTED 0
#define NDIS_PACKET_TYPE_MULTICAST 1 #define NDIS_PACKET_TYPE_MULTICAST 1
...@@ -217,9 +217,9 @@ struct os_lock { ...@@ -217,9 +217,9 @@ struct os_lock {
typedef spinlock_t NDIS_SPIN_LOCK; typedef spinlock_t NDIS_SPIN_LOCK;
// /* */
// spin_lock enhanced for Nested spin lock /* spin_lock enhanced for Nested spin lock */
// /* */
#define NdisAllocateSpinLock(__lock) \ #define NdisAllocateSpinLock(__lock) \
{ \ { \
spin_lock_init((spinlock_t *)(__lock)); \ spin_lock_init((spinlock_t *)(__lock)); \
...@@ -238,7 +238,7 @@ typedef spinlock_t NDIS_SPIN_LOCK; ...@@ -238,7 +238,7 @@ typedef spinlock_t NDIS_SPIN_LOCK;
spin_unlock_bh((spinlock_t *)(__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) \ #define RTMP_IRQ_LOCK(__lock, __irqflags) \
{ \ { \
__irqflags = 0; \ __irqflags = 0; \
...@@ -330,7 +330,7 @@ do { \ ...@@ -330,7 +330,7 @@ do { \
/*********************************************************************************** /***********************************************************************************
* OS Memory Access related data structure and definitions * 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 NdisMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
#define NdisCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length) #define NdisCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length)
...@@ -405,10 +405,10 @@ struct os_cookie { ...@@ -405,10 +405,10 @@ struct os_cookie {
struct pci_dev *parent_pci_dev; struct pci_dev *parent_pci_dev;
USHORT DeviceID; USHORT DeviceID;
dma_addr_t pAd_pa; dma_addr_t pAd_pa;
#endif // RTMP_MAC_PCI // #endif /* RTMP_MAC_PCI // */
#ifdef RTMP_MAC_USB #ifdef RTMP_MAC_USB
struct usb_device *pUsb_Dev; struct usb_device *pUsb_Dev;
#endif // RTMP_MAC_USB // #endif /* RTMP_MAC_USB // */
RTMP_NET_TASK_STRUCT rx_done_task; RTMP_NET_TASK_STRUCT rx_done_task;
RTMP_NET_TASK_STRUCT mgmt_dma_done_task; RTMP_NET_TASK_STRUCT mgmt_dma_done_task;
...@@ -419,14 +419,14 @@ struct os_cookie { ...@@ -419,14 +419,14 @@ struct os_cookie {
RTMP_NET_TASK_STRUCT tbtt_task; RTMP_NET_TASK_STRUCT tbtt_task;
#ifdef RTMP_MAC_PCI #ifdef RTMP_MAC_PCI
RTMP_NET_TASK_STRUCT fifo_statistic_full_task; RTMP_NET_TASK_STRUCT fifo_statistic_full_task;
#endif // RTMP_MAC_PCI // #endif /* RTMP_MAC_PCI // */
#ifdef RTMP_MAC_USB #ifdef RTMP_MAC_USB
RTMP_NET_TASK_STRUCT null_frame_complete_task; RTMP_NET_TASK_STRUCT null_frame_complete_task;
RTMP_NET_TASK_STRUCT rts_frame_complete_task; RTMP_NET_TASK_STRUCT rts_frame_complete_task;
RTMP_NET_TASK_STRUCT pspoll_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_type;
INT ioctl_if; INT ioctl_if;
}; };
...@@ -501,12 +501,12 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -501,12 +501,12 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
#define DEV_ALLOC_SKB(_length) \ #define DEV_ALLOC_SKB(_length) \
dev_alloc_skb(_length) dev_alloc_skb(_length)
#endif // RTMP_MAC_PCI // #endif /* RTMP_MAC_PCI // */
#ifdef RTMP_MAC_USB #ifdef RTMP_MAC_USB
#define PCI_MAP_SINGLE(_handle, _ptr, _size, _dir) (ULONG)0 #define PCI_MAP_SINGLE(_handle, _ptr, _size, _dir) (ULONG)0
#define PCI_UNMAP_SINGLE(_handle, _ptr, _size, _dir) #define PCI_UNMAP_SINGLE(_handle, _ptr, _size, _dir)
#endif // RTMP_MAC_USB // #endif /* RTMP_MAC_USB // */
/* /*
* ULONG * ULONG
...@@ -545,7 +545,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -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. * Device Register I/O Access related definitions and data structures.
**********************************************************************************/ **********************************************************************************/
#ifdef RTMP_MAC_PCI #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) \ #define RTMP_IO_READ32(_A, _R, _pV) \
{ \ { \
if ((_A)->bPCIclkOff == FALSE) \ if ((_A)->bPCIclkOff == FALSE) \
...@@ -603,7 +603,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -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)); \ Val = readl((void *)((_A)->CSRBaseAddress + MAC_CSR0)); \
writeb((_V), (PUCHAR)((_A)->CSRBaseAddress + (_R))); \ 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) \ #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, ...@@ -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)); \ Val = readl((void *)((_A)->CSRBaseAddress + MAC_CSR0)); \
writew((_V), (PUSHORT)((_A)->CSRBaseAddress + (_R))); \ writew((_V), (PUSHORT)((_A)->CSRBaseAddress + (_R))); \
} }
#endif // RTMP_MAC_PCI // #endif /* RTMP_MAC_PCI // */
#ifdef RTMP_MAC_USB #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) \ #define RTMP_IO_READ32(_A, _R, _pV) \
RTUSBReadMACRegister((_A), (_R), (PUINT32) (_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, ...@@ -634,7 +634,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
{ \ { \
RTUSBSingleWrite((_A), (_R), (USHORT) (_V)); \ RTUSBSingleWrite((_A), (_R), (USHORT) (_V)); \
} }
#endif // RTMP_MAC_USB // #endif /* RTMP_MAC_USB // */
/*********************************************************************************** /***********************************************************************************
* Network Related data structure and marco definitions * 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, ...@@ -719,34 +719,34 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
#define CB_OFF 10 #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_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]) #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_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]) #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. /* 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) /*(this value also as MAC(on-chip WCID) table index) */
// 0x80~0xff: TX to a WDS link. b0~6: WDS 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_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])) #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_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]) #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_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]) #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_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]) #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_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_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)) #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, ...@@ -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_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]) #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_CB_OFFSET 11
#define RTMP_PACKET_SPECIFIC_DHCP 0x01 #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, ...@@ -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_VLAN 0x10
#define RTMP_PACKET_SPECIFIC_LLCSNAP 0x20 #define RTMP_PACKET_SPECIFIC_LLCSNAP 0x20
//Specific /*Specific */
#define RTMP_SET_PACKET_SPECIFIC(_p, _flg) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] = _flg) #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) \ #define RTMP_SET_PACKET_DHCP(_p, _flg) \
do{ \ do{ \
if (_flg) \ if (_flg) \
...@@ -784,7 +784,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -784,7 +784,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
}while(0) }while(0)
#define RTMP_GET_PACKET_DHCP(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_DHCP) #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) \ #define RTMP_SET_PACKET_EAPOL(_p, _flg) \
do{ \ do{ \
if (_flg) \ if (_flg) \
...@@ -794,7 +794,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -794,7 +794,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
}while(0) }while(0)
#define RTMP_GET_PACKET_EAPOL(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_EAPOL) #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) \ #define RTMP_SET_PACKET_WAI(_p, _flg) \
do{ \ do{ \
if (_flg) \ if (_flg) \
...@@ -806,7 +806,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -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)) #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) \ #define RTMP_SET_PACKET_VLAN(_p, _flg) \
do{ \ do{ \
if (_flg) \ if (_flg) \
...@@ -816,7 +816,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -816,7 +816,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
}while(0) }while(0)
#define RTMP_GET_PACKET_VLAN(_p) (RTPKT_TO_OSPKT(_p)->cb[CB_OFF+11] & RTMP_PACKET_SPECIFIC_VLAN) #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) \ #define RTMP_SET_PACKET_LLCSNAP(_p, _flg) \
do{ \ do{ \
if (_flg) \ if (_flg) \
...@@ -827,7 +827,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -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) #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) \ #define RTMP_SET_PACKET_IPV4(_p, _flg) \
do{ \ do{ \
if (_flg) \ if (_flg) \
...@@ -838,7 +838,7 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, ...@@ -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) #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_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]) #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); ...@@ -860,7 +860,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb);
#define IRQ_HANDLE_TYPE irqreturn_t #define IRQ_HANDLE_TYPE irqreturn_t
IRQ_HANDLE_TYPE rt2860_interrupt(int irq, void *dev_instance); 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); 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); ...@@ -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; #define GET_PAD_FROM_NET_DEV(_pAd, _net_dev) (_pAd) = (PRTMP_ADAPTER)(_net_dev)->ml_priv;
#endif // __RT_LINUX_H__ // #endif /* __RT_LINUX_H__ // */
此差异已折叠。
...@@ -42,30 +42,30 @@ ...@@ -42,30 +42,30 @@
#ifdef RT2860 #ifdef RT2860
#include "chip/rt2860.h" #include "chip/rt2860.h"
#endif // RT2860 // #endif /* RT2860 // */
#ifdef RT2870 #ifdef RT2870
#include "chip/rt2870.h" #include "chip/rt2870.h"
#endif // RT2870 // #endif /* RT2870 // */
#ifdef RT3070 #ifdef RT3070
#include "chip/rt3070.h" #include "chip/rt3070.h"
#endif // RT3070 // #endif /* RT3070 // */
#ifdef RT3090 #ifdef RT3090
#include "chip/rt3090.h" #include "chip/rt3090.h"
#endif // RT3090 // #endif /* RT3090 // */
// We will have a cost down version which mac version is 0x3090xxxx /* We will have a cost down version which mac version is 0x3090xxxx */
// /* */
// RT3090A facts /* RT3090A facts */
// /* */
// a) 2.4 GHz /* a) 2.4 GHz */
// b) Replacement for RT3090 /* b) Replacement for RT3090 */
// c) Internal LNA /* c) Internal LNA */
// d) Interference over channel #14 /* d) Interference over channel #14 */
// e) New BBP features (e.g., SIG re-modulation) /* e) New BBP features (e.g., SIG re-modulation) */
// /* */
#define IS_RT3090A(_pAd) ((((_pAd)->MACVersion & 0xffff0000) == 0x30900000)) #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_RT3090(_pAd) ((((_pAd)->MACVersion & 0xffff0000) == 0x30710000) || (IS_RT3090A(_pAd)))
#define IS_RT3070(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x30700000) #define IS_RT3070(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x30700000)
...@@ -73,28 +73,28 @@ ...@@ -73,28 +73,28 @@
#define IS_RT2070(_pAd) (((_pAd)->RfIcType == RFIC_2020) || ((_pAd)->EFuseTag == 0x27)) #define IS_RT2070(_pAd) (((_pAd)->RfIcType == RFIC_2020) || ((_pAd)->EFuseTag == 0x27))
#define IS_RT30xx(_pAd) (((_pAd)->MACVersion & 0xfff00000) == 0x30700000||IS_RT3090A(_pAd)) #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 */ /* RT3572, 3592, 3562, 3062 share the same MAC version */
#define IS_RT3572(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x35720000) #define IS_RT3572(_pAd) (((_pAd)->MACVersion & 0xffff0000) == 0x35720000)
#define IS_VERSION_BEFORE_F(_pAd) (((_pAd)->MACVersion&0xffff) <= 0x0211) #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))) #define IS_VERSION_AFTER_F(_pAd) ((((_pAd)->MACVersion&0xffff) >= 0x0212) || (((_pAd)->b3090ESpecialChip == TRUE)))
// /* */
// RT3390 facts /* RT3390 facts */
// /* */
// a) Base on RT3090 (RF IC: RT3020) /* a) Base on RT3090 (RF IC: RT3020) */
// b) 2.4 GHz /* b) 2.4 GHz */
// c) 1x1 /* c) 1x1 */
// d) Single chip /* d) Single chip */
// e) Internal components: PA and LNA /* e) Internal components: PA and LNA */
// /* */
//RT3390,RT3370 /*RT3390,RT3370 */
#define IS_RT3390(_pAd) (((_pAd)->MACVersion & 0xFFFF0000) == 0x33900000) #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_CFG 0x0000
#define CHIP_PCI_EECTRL 0x0004 #define CHIP_PCI_EECTRL 0x0004
#define CHIP_PCI_MCUCTRL 0x0008 #define CHIP_PCI_MCUCTRL 0x0008
...@@ -103,15 +103,15 @@ ...@@ -103,15 +103,15 @@
#define RETRY_LIMIT 10 #define RETRY_LIMIT 10
// ------------------------------------------------------ /* ------------------------------------------------------ */
// BBP & RF definition /* BBP & RF definition */
// ------------------------------------------------------ /* ------------------------------------------------------ */
#define BUSY 1 #define BUSY 1
#define IDLE 0 #define IDLE 0
//------------------------------------------------------------------------- /*------------------------------------------------------------------------- */
// EEPROM definition /* EEPROM definition */
//------------------------------------------------------------------------- /*------------------------------------------------------------------------- */
#define EEDO 0x08 #define EEDO 0x08
#define EEDI 0x04 #define EEDI 0x04
#define EECS 0x02 #define EECS 0x02
...@@ -123,11 +123,11 @@ ...@@ -123,11 +123,11 @@
#define EEPROM_EWDS_OPCODE 0x10 #define EEPROM_EWDS_OPCODE 0x10
#define EEPROM_EWEN_OPCODE 0x13 #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 NUM_EEPROM_TX_G_PARMS 7
#define EEPROM_NIC1_OFFSET 0x34 // 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_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_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_TX_PWR_OFFSET 0x52
#define EEPROM_G_TX2_PWR_OFFSET 0x60 #define EEPROM_G_TX2_PWR_OFFSET 0x60
#define EEPROM_LED1_OFFSET 0x3c #define EEPROM_LED1_OFFSET 0x3c
...@@ -139,22 +139,22 @@ ...@@ -139,22 +139,22 @@
#define EEPROM_RSSI_A_OFFSET 0x4a #define EEPROM_RSSI_A_OFFSET 0x4a
#define EEPROM_TXMIXER_GAIN_5G 0x4c #define EEPROM_TXMIXER_GAIN_5G 0x4c
#define EEPROM_DEFINE_MAX_TXPWR 0x4e #define EEPROM_DEFINE_MAX_TXPWR 0x4e
#define EEPROM_TXPOWER_BYRATE_20MHZ_2_4G 0xde // 20MHZ 2.4G 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_40MHZ_2_4G 0xee /* 40MHZ 2.4G tx power. */
#define EEPROM_TXPOWER_BYRATE_20MHZ_5G 0xfa // 20MHZ 5G 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_40MHZ_5G 0x10a /* 40MHZ 5G tx power. */
#define EEPROM_A_TX_PWR_OFFSET 0x78 #define EEPROM_A_TX_PWR_OFFSET 0x78
#define EEPROM_A_TX2_PWR_OFFSET 0xa6 #define EEPROM_A_TX2_PWR_OFFSET 0xa6
//#define EEPROM_Japan_TX_PWR_OFFSET 0x90 // 802.11j /*#define EEPROM_Japan_TX_PWR_OFFSET 0x90 // 802.11j */
//#define EEPROM_Japan_TX2_PWR_OFFSET 0xbe /*#define EEPROM_Japan_TX2_PWR_OFFSET 0xbe */
//#define EEPROM_TSSI_REF_OFFSET 0x54 /*#define EEPROM_TSSI_REF_OFFSET 0x54 */
//#define EEPROM_TSSI_DELTA_OFFSET 0x24 /*#define EEPROM_TSSI_DELTA_OFFSET 0x24 */
//#define EEPROM_CCK_TX_PWR_OFFSET 0x62 /*#define EEPROM_CCK_TX_PWR_OFFSET 0x62 */
//#define EEPROM_CALIBRATE_OFFSET 0x7c /*#define EEPROM_CALIBRATE_OFFSET 0x7c */
#define EEPROM_VERSION_OFFSET 0x02 #define EEPROM_VERSION_OFFSET 0x02
#define EEPROM_FREQ_OFFSET 0x3a #define EEPROM_FREQ_OFFSET 0x3a
#define EEPROM_TXPOWER_BYRATE 0xde // 20MHZ power. #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_DELTA 0x50 /* 20MHZ AND 40 MHZ use different power. This is delta in 40MHZ. */
#define VALID_EEPROM_VERSION 1 #define VALID_EEPROM_VERSION 1
/* /*
...@@ -163,13 +163,13 @@ ...@@ -163,13 +163,13 @@
#define RT28xx_EEPROM_READ16(_pAd, _offset, _value) \ #define RT28xx_EEPROM_READ16(_pAd, _offset, _value) \
(_pAd)->chipOps.eeread((RTMP_ADAPTER *)(_pAd), (USHORT)(_offset), (PUSHORT)&(_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 { typedef union _MCU_LEDCS_STRUC {
struct { struct {
UCHAR LedMode:7; UCHAR LedMode:7;
...@@ -178,14 +178,14 @@ typedef union _MCU_LEDCS_STRUC { ...@@ -178,14 +178,14 @@ typedef union _MCU_LEDCS_STRUC {
UCHAR word; UCHAR word;
} MCU_LEDCS_STRUC, *PMCU_LEDCS_STRUC; } MCU_LEDCS_STRUC, *PMCU_LEDCS_STRUC;
// /* */
// EEPROM antenna select format /* EEPROM antenna select format */
// /* */
typedef union _EEPROM_ANTENNA_STRUC { typedef union _EEPROM_ANTENNA_STRUC {
struct { struct {
USHORT RxPath:4; // 1: 1R, 2: 2R, 3: 3R USHORT RxPath:4; /* 1: 1R, 2: 2R, 3: 3R */
USHORT TxPath:4; // 1: 1T, 2: 2T USHORT TxPath:4; /* 1: 1T, 2: 2T */
USHORT RfIcType:4; // see E2PROM document USHORT RfIcType:4; /* see E2PROM document */
USHORT Rsv:4; USHORT Rsv:4;
} field; } field;
USHORT word; USHORT word;
...@@ -193,66 +193,66 @@ typedef union _EEPROM_ANTENNA_STRUC { ...@@ -193,66 +193,66 @@ typedef union _EEPROM_ANTENNA_STRUC {
typedef union _EEPROM_NIC_CINFIG2_STRUC { typedef union _EEPROM_NIC_CINFIG2_STRUC {
struct { struct {
USHORT HardwareRadioControl:1; // 1:enable, 0:disable USHORT HardwareRadioControl:1; /* 1:enable, 0:disable */
USHORT DynamicTxAgcControl:1; // USHORT DynamicTxAgcControl:1; /* */
USHORT ExternalLNAForG:1; // USHORT ExternalLNAForG:1; /* */
USHORT ExternalLNAForA:1; // external LNA enable for 2.4G USHORT ExternalLNAForA:1; /* external LNA enable for 2.4G */
USHORT CardbusAcceleration:1; // !!! NOTE: 0 - enable, 1 - disable USHORT CardbusAcceleration:1; /* !!! NOTE: 0 - enable, 1 - disable */
USHORT BW40MSidebandForG:1; USHORT BW40MSidebandForG:1;
USHORT BW40MSidebandForA:1; USHORT BW40MSidebandForA:1;
USHORT EnableWPSPBC:1; // WPS PBC Control bit USHORT EnableWPSPBC:1; /* WPS PBC Control bit */
USHORT BW40MAvailForG:1; // 0:enable, 1:disable USHORT BW40MAvailForG:1; /* 0:enable, 1:disable */
USHORT BW40MAvailForA:1; // 0:enable, 1:disable USHORT BW40MAvailForA:1; /* 0:enable, 1:disable */
USHORT Rsv1:1; // must be 0 USHORT Rsv1:1; /* must be 0 */
USHORT AntDiversity:1; // Antenna diversity USHORT AntDiversity:1; /* Antenna diversity */
USHORT Rsv2:3; // must be 0 USHORT Rsv2:3; /* must be 0 */
USHORT DACTestBit:1; // control if driver should patch the DAC issue USHORT DACTestBit:1; /* control if driver should patch the DAC issue */
} field; } field;
USHORT word; USHORT word;
} EEPROM_NIC_CONFIG2_STRUC, *PEEPROM_NIC_CONFIG2_STRUC; } 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 { typedef union _EEPROM_TX_PWR_STRUC {
struct { struct {
CHAR Byte0; // Low Byte CHAR Byte0; /* Low Byte */
CHAR Byte1; // High Byte CHAR Byte1; /* High Byte */
} field; } field;
USHORT word; USHORT word;
} EEPROM_TX_PWR_STRUC, *PEEPROM_TX_PWR_STRUC; } EEPROM_TX_PWR_STRUC, *PEEPROM_TX_PWR_STRUC;
typedef union _EEPROM_VERSION_STRUC { typedef union _EEPROM_VERSION_STRUC {
struct { struct {
UCHAR FaeReleaseNumber; // Low Byte UCHAR FaeReleaseNumber; /* Low Byte */
UCHAR Version; // High Byte UCHAR Version; /* High Byte */
} field; } field;
USHORT word; USHORT word;
} EEPROM_VERSION_STRUC, *PEEPROM_VERSION_STRUC; } EEPROM_VERSION_STRUC, *PEEPROM_VERSION_STRUC;
typedef union _EEPROM_LED_STRUC { typedef union _EEPROM_LED_STRUC {
struct { struct {
USHORT PolarityRDY_G:1; // Polarity RDY_G setting. USHORT PolarityRDY_G:1; /* Polarity RDY_G setting. */
USHORT PolarityRDY_A:1; // Polarity RDY_A setting. USHORT PolarityRDY_A:1; /* Polarity RDY_A setting. */
USHORT PolarityACT:1; // Polarity ACT setting. USHORT PolarityACT:1; /* Polarity ACT setting. */
USHORT PolarityGPIO_0:1; // Polarity GPIO#0 setting. USHORT PolarityGPIO_0:1; /* Polarity GPIO#0 setting. */
USHORT PolarityGPIO_1:1; // Polarity GPIO#1 setting. USHORT PolarityGPIO_1:1; /* Polarity GPIO#1 setting. */
USHORT PolarityGPIO_2:1; // Polarity GPIO#2 setting. USHORT PolarityGPIO_2:1; /* Polarity GPIO#2 setting. */
USHORT PolarityGPIO_3:1; // Polarity GPIO#3 setting. USHORT PolarityGPIO_3:1; /* Polarity GPIO#3 setting. */
USHORT PolarityGPIO_4:1; // Polarity GPIO#4 setting. USHORT PolarityGPIO_4:1; /* Polarity GPIO#4 setting. */
USHORT LedMode:5; // Led mode. USHORT LedMode:5; /* Led mode. */
USHORT Rsvd:3; // Reserved USHORT Rsvd:3; /* Reserved */
} field; } field;
USHORT word; USHORT word;
} EEPROM_LED_STRUC, *PEEPROM_LED_STRUC; } EEPROM_LED_STRUC, *PEEPROM_LED_STRUC;
typedef union _EEPROM_TXPOWER_DELTA_STRUC { typedef union _EEPROM_TXPOWER_DELTA_STRUC {
struct { struct {
UCHAR DeltaValue:6; // Tx Power dalta value (MAX=4) UCHAR DeltaValue:6; /* Tx Power dalta value (MAX=4) */
UCHAR Type:1; // 1: plus the delta value, 0: minus the delta value UCHAR Type:1; /* 1: plus the delta value, 0: minus the delta value */
UCHAR TxPowerEnable:1; // Enable UCHAR TxPowerEnable:1; /* Enable */
} field; } field;
UCHAR value; UCHAR value;
} EEPROM_TXPOWER_DELTA_STRUC, *PEEPROM_TXPOWER_DELTA_STRUC; } EEPROM_TXPOWER_DELTA_STRUC, *PEEPROM_TXPOWER_DELTA_STRUC;
#endif // __RTMP_CHIP_H__ // #endif /* __RTMP_CHIP_H__ // */
...@@ -60,4 +60,4 @@ VOID shift_row(IN PUCHAR in, OUT PUCHAR out); ...@@ -60,4 +60,4 @@ VOID shift_row(IN PUCHAR in, OUT PUCHAR out);
VOID mix_column(IN PUCHAR in, OUT PUCHAR out); VOID mix_column(IN PUCHAR in, OUT PUCHAR out);
#endif //__RTMP_CKIPMIC_H__ #endif /*__RTMP_CKIPMIC_H__ */
此差异已折叠。
...@@ -30,46 +30,46 @@ ...@@ -30,46 +30,46 @@
#include "rtmp_type.h" #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 { typedef struct PACKED {
UINT32 MA:1; //management action payload exist in (QoS Null+HTC) UINT32 MA:1; /*management action payload exist in (QoS Null+HTC) */
UINT32 TRQ:1; //sounding request UINT32 TRQ:1; /*sounding request */
UINT32 MRQ:1; //MCS feedback. Request for a MCS feedback UINT32 MRQ:1; /*MCS feedback. Request for a MCS feedback */
UINT32 MRSorASI:3; // MRQ Sequence identifier. unchanged during entire procedure. 0x000-0x110. 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 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 MFBorASC:7; /*Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available */
UINT32 CalPos:2; // calibration position UINT32 CalPos:2; /* calibration position */
UINT32 CalSeq:2; //calibration sequence UINT32 CalSeq:2; /*calibration sequence */
UINT32 FBKReq:2; //feedback request UINT32 FBKReq:2; /*feedback request */
UINT32 CSISTEERING:2; //CSI/ STEERING UINT32 CSISTEERING:2; /*CSI/ STEERING */
UINT32 ZLFAnnouce:1; // ZLF announcement UINT32 ZLFAnnouce:1; /* ZLF announcement */
UINT32 rsv:5; //calibration sequence UINT32 rsv:5; /*calibration sequence */
UINT32 ACConstraint:1; //feedback request UINT32 ACConstraint:1; /*feedback request */
UINT32 RDG:1; //RDG / More PPDU UINT32 RDG:1; /*RDG / More PPDU */
} HT_CONTROL, *PHT_CONTROL; } HT_CONTROL, *PHT_CONTROL;
// 2-byte QOS CONTROL field /* 2-byte QOS CONTROL field */
typedef struct PACKED { typedef struct PACKED {
USHORT TID:4; USHORT TID:4;
USHORT EOSP:1; 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 AMsduPresent:1;
USHORT Txop_QueueSize:8; USHORT Txop_QueueSize:8;
} QOS_CONTROL, *PQOS_CONTROL; } QOS_CONTROL, *PQOS_CONTROL;
// 2-byte Frame control field /* 2-byte Frame control field */
typedef struct PACKED { typedef struct PACKED {
USHORT Ver:2; // Protocol version USHORT Ver:2; /* Protocol version */
USHORT Type:2; // MSDU type USHORT Type:2; /* MSDU type */
USHORT SubType:4; // MSDU subtype USHORT SubType:4; /* MSDU subtype */
USHORT ToDs:1; // To DS indication USHORT ToDs:1; /* To DS indication */
USHORT FrDs:1; // From DS indication USHORT FrDs:1; /* From DS indication */
USHORT MoreFrag:1; // More fragment bit USHORT MoreFrag:1; /* More fragment bit */
USHORT Retry:1; // Retry status bit USHORT Retry:1; /* Retry status bit */
USHORT PwrMgmt:1; // Power management bit USHORT PwrMgmt:1; /* Power management bit */
USHORT MoreData:1; // More data bit USHORT MoreData:1; /* More data bit */
USHORT Wep:1; // Wep data USHORT Wep:1; /* Wep data */
USHORT Order:1; // Strict order expected USHORT Order:1; /* Strict order expected */
} FRAME_CONTROL, *PFRAME_CONTROL; } FRAME_CONTROL, *PFRAME_CONTROL;
typedef struct PACKED _HEADER_802_11 { typedef struct PACKED _HEADER_802_11 {
...@@ -97,4 +97,4 @@ typedef struct PACKED _RTS_FRAME { ...@@ -97,4 +97,4 @@ typedef struct PACKED _RTS_FRAME {
UCHAR Addr2[MAC_ADDR_LEN]; UCHAR Addr2[MAC_ADDR_LEN];
} RTS_FRAME, *PRTS_FRAME; } RTS_FRAME, *PRTS_FRAME;
#endif // __DOT11_BASE_H__ // #endif /* __DOT11_BASE_H__ // */
...@@ -39,19 +39,19 @@ ...@@ -39,19 +39,19 @@
#ifdef RTMP_PCI_SUPPORT #ifdef RTMP_PCI_SUPPORT
#include "iface/rtmp_pci.h" #include "iface/rtmp_pci.h"
#endif // RTMP_PCI_SUPPORT // #endif /* RTMP_PCI_SUPPORT // */
#ifdef RTMP_USB_SUPPORT #ifdef RTMP_USB_SUPPORT
#include "iface/rtmp_usb.h" #include "iface/rtmp_usb.h"
#endif // RTMP_USB_SUPPORT // #endif /* RTMP_USB_SUPPORT // */
typedef struct _INF_PCI_CONFIG_ { 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; unsigned int irq_num;
} INF_PCI_CONFIG; } INF_PCI_CONFIG;
typedef struct _INF_USB_CONFIG_ { typedef struct _INF_USB_CONFIG_ {
UINT8 BulkInEpAddr; // bulk-in endpoint address UINT8 BulkInEpAddr; /* bulk-in endpoint address */
UINT8 BulkOutEpAddr[6]; // bulk-out endpoint address UINT8 BulkOutEpAddr[6]; /* bulk-out endpoint address */
} INF_USB_CONFIG; } INF_USB_CONFIG;
typedef struct _INF_RBUS_CONFIG_ { typedef struct _INF_RBUS_CONFIG_ {
...@@ -72,4 +72,4 @@ typedef union _RTMP_INF_CONFIG_ { ...@@ -72,4 +72,4 @@ typedef union _RTMP_INF_CONFIG_ {
struct _INF_RBUS_CONFIG_ rbusConfig; struct _INF_RBUS_CONFIG_ rbusConfig;
} RTMP_INF_CONFIG; } RTMP_INF_CONFIG;
#endif // __RTMP_IFACE_H__ // #endif /* __RTMP_IFACE_H__ // */
...@@ -46,4 +46,4 @@ INT RtmpAsicSendCommandToMcu(IN PRTMP_ADAPTER pAd, ...@@ -46,4 +46,4 @@ INT RtmpAsicSendCommandToMcu(IN PRTMP_ADAPTER pAd,
IN UCHAR Command, IN UCHAR Command,
IN UCHAR Token, IN UCHAR Arg0, IN UCHAR Arg1); IN UCHAR Token, IN UCHAR Arg0, IN UCHAR Arg1);
#endif // __RTMP_MCU_H__ // #endif /* __RTMP_MCU_H__ // */
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#ifdef LINUX #ifdef LINUX
#include "rt_linux.h" #include "rt_linux.h"
#endif // LINUX // #endif /* LINUX // */
/* /*
This data structure mainly strip some callback function defined in This data structure mainly strip some callback function defined in
...@@ -69,7 +69,7 @@ typedef enum _RTMP_TASK_STATUS_ { ...@@ -69,7 +69,7 @@ typedef enum _RTMP_TASK_STATUS_ {
typedef struct _RTMP_OS_TASK_ { typedef struct _RTMP_OS_TASK_ {
char taskName[RTMP_OS_TASK_NAME_LEN]; char taskName[RTMP_OS_TASK_NAME_LEN];
void *priv; void *priv;
//unsigned long taskFlags; /*unsigned long taskFlags; */
RTMP_TASK_STATUS taskStatus; RTMP_TASK_STATUS taskStatus;
#ifndef KTHREAD_SUPPORT #ifndef KTHREAD_SUPPORT
RTMP_OS_SEM taskSema; RTMP_OS_SEM taskSema;
...@@ -87,4 +87,4 @@ typedef struct _RTMP_OS_TASK_ { ...@@ -87,4 +87,4 @@ typedef struct _RTMP_OS_TASK_ {
int RtmpOSIRQRequest(IN PNET_DEV pNetDev); int RtmpOSIRQRequest(IN PNET_DEV pNetDev);
int RtmpOSIRQRelease(IN PNET_DEV pNetDev); int RtmpOSIRQRelease(IN PNET_DEV pNetDev);
#endif // __RMTP_OS_H__ // #endif /* __RMTP_OS_H__ // */
...@@ -50,29 +50,29 @@ ...@@ -50,29 +50,29 @@
rtmp_timer_##_func rtmp_timer_##_func
/* ----------------- Timer Related MARCO ---------------*/ /* ----------------- Timer Related MARCO ---------------*/
// In some os or chipset, we have a lot of timer functions and will read/write register, /* 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 /* 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. /* submit to ctrl pipe). So we need a wrapper function to take care it. */
#ifdef RTMP_TIMER_TASK_SUPPORT #ifdef RTMP_TIMER_TASK_SUPPORT
typedef VOID(*RTMP_TIMER_TASK_HANDLE) (IN PVOID SystemSpecific1, typedef VOID(*RTMP_TIMER_TASK_HANDLE) (IN PVOID SystemSpecific1,
IN PVOID FunctionContext, IN PVOID FunctionContext,
IN PVOID SystemSpecific2, IN PVOID SystemSpecific2,
IN PVOID SystemSpecific3); IN PVOID SystemSpecific3);
#endif // RTMP_TIMER_TASK_SUPPORT // #endif /* RTMP_TIMER_TASK_SUPPORT // */
typedef struct _RALINK_TIMER_STRUCT { typedef struct _RALINK_TIMER_STRUCT {
RTMP_OS_TIMER TimerObj; // Ndis Timer object RTMP_OS_TIMER TimerObj; /* Ndis Timer object */
BOOLEAN Valid; // Set to True when call RTMPInitTimer BOOLEAN Valid; /* Set to True when call RTMPInitTimer */
BOOLEAN State; // True if timer cancelled BOOLEAN State; /* True if timer cancelled */
BOOLEAN PeriodicType; // True if timer is periodic timer BOOLEAN PeriodicType; /* True if timer is periodic timer */
BOOLEAN Repeat; // True if periodic timer BOOLEAN Repeat; /* True if periodic timer */
ULONG TimerValue; // Timer value in milliseconds ULONG TimerValue; /* Timer value in milliseconds */
ULONG cookie; // os specific object ULONG cookie; /* os specific object */
#ifdef RTMP_TIMER_TASK_SUPPORT #ifdef RTMP_TIMER_TASK_SUPPORT
RTMP_TIMER_TASK_HANDLE handle; RTMP_TIMER_TASK_HANDLE handle;
void *pAd; void *pAd;
#endif // RTMP_TIMER_TASK_SUPPORT // #endif /* RTMP_TIMER_TASK_SUPPORT // */
} RALINK_TIMER_STRUCT, *PRALINK_TIMER_STRUCT; } RALINK_TIMER_STRUCT, *PRALINK_TIMER_STRUCT;
#ifdef RTMP_TIMER_TASK_SUPPORT #ifdef RTMP_TIMER_TASK_SUPPORT
...@@ -113,7 +113,7 @@ void rtmp_timer_##_func(unsigned long data) \ ...@@ -113,7 +113,7 @@ void rtmp_timer_##_func(unsigned long data) \
if (pTimer->Repeat) \ if (pTimer->Repeat) \
RTMP_OS_Add_Timer(&pTimer->TimerObj, pTimer->TimerValue); \ 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(MlmePeriodicExec);
DECLARE_TIMER_FUNCTION(MlmeRssiReportExec); DECLARE_TIMER_FUNCTION(MlmeRssiReportExec);
...@@ -122,7 +122,7 @@ DECLARE_TIMER_FUNCTION(APSDPeriodicExec); ...@@ -122,7 +122,7 @@ DECLARE_TIMER_FUNCTION(APSDPeriodicExec);
DECLARE_TIMER_FUNCTION(AsicRfTuningExec); DECLARE_TIMER_FUNCTION(AsicRfTuningExec);
#ifdef RTMP_MAC_USB #ifdef RTMP_MAC_USB
DECLARE_TIMER_FUNCTION(BeaconUpdateExec); DECLARE_TIMER_FUNCTION(BeaconUpdateExec);
#endif // RTMP_MAC_USB // #endif /* RTMP_MAC_USB // */
DECLARE_TIMER_FUNCTION(BeaconTimeout); DECLARE_TIMER_FUNCTION(BeaconTimeout);
DECLARE_TIMER_FUNCTION(ScanTimeout); DECLARE_TIMER_FUNCTION(ScanTimeout);
...@@ -138,10 +138,10 @@ DECLARE_TIMER_FUNCTION(RadioOnExec); ...@@ -138,10 +138,10 @@ DECLARE_TIMER_FUNCTION(RadioOnExec);
#ifdef RTMP_MAC_USB #ifdef RTMP_MAC_USB
DECLARE_TIMER_FUNCTION(RtmpUsbStaAsicForceWakeupTimeout); DECLARE_TIMER_FUNCTION(RtmpUsbStaAsicForceWakeupTimeout);
#endif // RTMP_MAC_USB // #endif /* RTMP_MAC_USB // */
#if defined(AP_LED) || defined(STA_LED) #if defined(AP_LED) || defined(STA_LED)
DECLARE_TIMER_FUNCTION(LedCtrlMain); DECLARE_TIMER_FUNCTION(LedCtrlMain);
#endif #endif
#endif // __RTMP_TIMER_H__ // #endif /* __RTMP_TIMER_H__ // */
...@@ -41,15 +41,15 @@ ...@@ -41,15 +41,15 @@
#define PACKED __attribute__ ((packed)) #define PACKED __attribute__ ((packed))
#ifdef LINUX #ifdef LINUX
// Put platform dependent declaration here /* Put platform dependent declaration here */
// For example, linux type definition /* For example, linux type definition */
typedef unsigned char UINT8; typedef unsigned char UINT8;
typedef unsigned short UINT16; typedef unsigned short UINT16;
typedef unsigned int UINT32; typedef unsigned int UINT32;
typedef unsigned long long UINT64; typedef unsigned long long UINT64;
typedef int INT32; typedef int INT32;
typedef long long INT64; typedef long long INT64;
#endif // LINUX // #endif /* LINUX // */
typedef unsigned char *PUINT8; typedef unsigned char *PUINT8;
typedef unsigned short *PUINT16; typedef unsigned short *PUINT16;
...@@ -58,7 +58,7 @@ typedef unsigned long long *PUINT64; ...@@ -58,7 +58,7 @@ typedef unsigned long long *PUINT64;
typedef int *PINT32; typedef int *PINT32;
typedef long long *PINT64; 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 char STRING;
typedef signed char CHAR; typedef signed char CHAR;
...@@ -72,13 +72,13 @@ typedef unsigned char UCHAR; ...@@ -72,13 +72,13 @@ typedef unsigned char UCHAR;
typedef unsigned short USHORT; typedef unsigned short USHORT;
typedef unsigned int UINT; typedef unsigned int UINT;
typedef unsigned long ULONG; typedef unsigned long ULONG;
#endif // LINUX // #endif /* LINUX // */
typedef unsigned long long ULONGLONG; typedef unsigned long long ULONGLONG;
typedef unsigned char BOOLEAN; typedef unsigned char BOOLEAN;
#ifdef LINUX #ifdef LINUX
typedef void VOID; typedef void VOID;
#endif // LINUX // #endif /* LINUX // */
typedef char *PSTRING; typedef char *PSTRING;
typedef VOID *PVOID; typedef VOID *PVOID;
...@@ -99,9 +99,9 @@ typedef union _LARGE_INTEGER { ...@@ -99,9 +99,9 @@ typedef union _LARGE_INTEGER {
INT64 QuadPart; INT64 QuadPart;
} LARGE_INTEGER; } LARGE_INTEGER;
// /* */
// Register set pair for initialzation register set definition /* Register set pair for initialzation register set definition */
// /* */
typedef struct _RTMP_REG_PAIR { typedef struct _RTMP_REG_PAIR {
ULONG Register; ULONG Register;
ULONG Value; ULONG Value;
...@@ -112,9 +112,9 @@ typedef struct _REG_PAIR { ...@@ -112,9 +112,9 @@ typedef struct _REG_PAIR {
UCHAR Value; UCHAR Value;
} REG_PAIR, *PREG_PAIR; } 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 { typedef struct _RTMP_RF_REGS {
UCHAR Channel; UCHAR Channel;
ULONG R1; ULONG R1;
...@@ -135,4 +135,4 @@ typedef int NTSTATUS; ...@@ -135,4 +135,4 @@ typedef int NTSTATUS;
#define STATUS_SUCCESS 0x00 #define STATUS_SUCCESS 0x00
#define STATUS_UNSUCCESSFUL 0x01 #define STATUS_UNSUCCESSFUL 0x01
#endif // __RTMP_TYPE_H__ // #endif /* __RTMP_TYPE_H__ // */
...@@ -30,54 +30,54 @@ ...@@ -30,54 +30,54 @@
#include "rtmp_type.h" #include "rtmp_type.h"
// New for MeetingHouse Api support /* New for MeetingHouse Api support */
#define CMDTHREAD_VENDOR_RESET 0x0D730101 // cmd #define CMDTHREAD_VENDOR_RESET 0x0D730101 /* cmd */
#define CMDTHREAD_VENDOR_UNPLUG 0x0D730102 // cmd #define CMDTHREAD_VENDOR_UNPLUG 0x0D730102 /* cmd */
#define CMDTHREAD_VENDOR_SWITCH_FUNCTION 0x0D730103 // cmd #define CMDTHREAD_VENDOR_SWITCH_FUNCTION 0x0D730103 /* cmd */
#define CMDTHREAD_MULTI_WRITE_MAC 0x0D730107 // cmd #define CMDTHREAD_MULTI_WRITE_MAC 0x0D730107 /* cmd */
#define CMDTHREAD_MULTI_READ_MAC 0x0D730108 // cmd #define CMDTHREAD_MULTI_READ_MAC 0x0D730108 /* cmd */
#define CMDTHREAD_VENDOR_EEPROM_WRITE 0x0D73010A // cmd #define CMDTHREAD_VENDOR_EEPROM_WRITE 0x0D73010A /* cmd */
#define CMDTHREAD_VENDOR_EEPROM_READ 0x0D73010B // cmd #define CMDTHREAD_VENDOR_EEPROM_READ 0x0D73010B /* cmd */
#define CMDTHREAD_VENDOR_ENTER_TESTMODE 0x0D73010C // cmd #define CMDTHREAD_VENDOR_ENTER_TESTMODE 0x0D73010C /* cmd */
#define CMDTHREAD_VENDOR_EXIT_TESTMODE 0x0D73010D // cmd #define CMDTHREAD_VENDOR_EXIT_TESTMODE 0x0D73010D /* cmd */
#define CMDTHREAD_VENDOR_WRITE_BBP 0x0D730119 // cmd #define CMDTHREAD_VENDOR_WRITE_BBP 0x0D730119 /* cmd */
#define CMDTHREAD_VENDOR_READ_BBP 0x0D730118 // cmd #define CMDTHREAD_VENDOR_READ_BBP 0x0D730118 /* cmd */
#define CMDTHREAD_VENDOR_WRITE_RF 0x0D73011A // cmd #define CMDTHREAD_VENDOR_WRITE_RF 0x0D73011A /* cmd */
#define CMDTHREAD_VENDOR_FLIP_IQ 0x0D73011D // cmd #define CMDTHREAD_VENDOR_FLIP_IQ 0x0D73011D /* cmd */
#define CMDTHREAD_RESET_BULK_OUT 0x0D730210 // cmd #define CMDTHREAD_RESET_BULK_OUT 0x0D730210 /* cmd */
#define CMDTHREAD_RESET_BULK_IN 0x0D730211 // cmd #define CMDTHREAD_RESET_BULK_IN 0x0D730211 /* cmd */
#define CMDTHREAD_SET_PSM_BIT 0x0D730212 // cmd #define CMDTHREAD_SET_PSM_BIT 0x0D730212 /* cmd */
#define CMDTHREAD_SET_RADIO 0x0D730214 // cmd #define CMDTHREAD_SET_RADIO 0x0D730214 /* cmd */
#define CMDTHREAD_UPDATE_TX_RATE 0x0D730216 // cmd #define CMDTHREAD_UPDATE_TX_RATE 0x0D730216 /* cmd */
#define CMDTHREAD_802_11_ADD_KEY_WEP 0x0D730218 // cmd #define CMDTHREAD_802_11_ADD_KEY_WEP 0x0D730218 /* cmd */
#define CMDTHREAD_RESET_FROM_ERROR 0x0D73021A // cmd #define CMDTHREAD_RESET_FROM_ERROR 0x0D73021A /* cmd */
#define CMDTHREAD_LINK_DOWN 0x0D73021B // cmd #define CMDTHREAD_LINK_DOWN 0x0D73021B /* cmd */
#define CMDTHREAD_RESET_FROM_NDIS 0x0D73021C // cmd #define CMDTHREAD_RESET_FROM_NDIS 0x0D73021C /* cmd */
#define CMDTHREAD_CHECK_GPIO 0x0D730215 // cmd #define CMDTHREAD_CHECK_GPIO 0x0D730215 /* cmd */
#define CMDTHREAD_FORCE_WAKE_UP 0x0D730222 // cmd #define CMDTHREAD_FORCE_WAKE_UP 0x0D730222 /* cmd */
#define CMDTHREAD_SET_BW 0x0D730225 // cmd #define CMDTHREAD_SET_BW 0x0D730225 /* cmd */
#define CMDTHREAD_SET_ASIC_WCID 0x0D730226 // cmd #define CMDTHREAD_SET_ASIC_WCID 0x0D730226 /* cmd */
#define CMDTHREAD_SET_ASIC_WCID_CIPHER 0x0D730227 // cmd #define CMDTHREAD_SET_ASIC_WCID_CIPHER 0x0D730227 /* cmd */
#define CMDTHREAD_QKERIODIC_EXECUT 0x0D73023D // cmd #define CMDTHREAD_QKERIODIC_EXECUT 0x0D73023D /* cmd */
#define RT_CMD_SET_KEY_TABLE 0x0D730228 // cmd #define RT_CMD_SET_KEY_TABLE 0x0D730228 /* cmd */
#define RT_CMD_SET_RX_WCID_TABLE 0x0D730229 // cmd #define RT_CMD_SET_RX_WCID_TABLE 0x0D730229 /* cmd */
#define CMDTHREAD_SET_CLIENT_MAC_ENTRY 0x0D73023E // cmd #define CMDTHREAD_SET_CLIENT_MAC_ENTRY 0x0D73023E /* cmd */
#define CMDTHREAD_SET_GROUP_KEY 0x0D73023F // cmd #define CMDTHREAD_SET_GROUP_KEY 0x0D73023F /* cmd */
#define CMDTHREAD_SET_PAIRWISE_KEY 0x0D730240 // cmd #define CMDTHREAD_SET_PAIRWISE_KEY 0x0D730240 /* cmd */
#define CMDTHREAD_802_11_QUERY_HARDWARE_REGISTER 0x0D710105 // cmd #define CMDTHREAD_802_11_QUERY_HARDWARE_REGISTER 0x0D710105 /* cmd */
#define CMDTHREAD_802_11_SET_PHY_MODE 0x0D79010C // cmd #define CMDTHREAD_802_11_SET_PHY_MODE 0x0D79010C /* cmd */
#define CMDTHREAD_802_11_SET_STA_CONFIG 0x0D790111 // cmd #define CMDTHREAD_802_11_SET_STA_CONFIG 0x0D790111 /* cmd */
#define CMDTHREAD_802_11_SET_PREAMBLE 0x0D790101 // cmd #define CMDTHREAD_802_11_SET_PREAMBLE 0x0D790101 /* cmd */
#define CMDTHREAD_802_11_COUNTER_MEASURE 0x0D790102 // cmd #define CMDTHREAD_802_11_COUNTER_MEASURE 0x0D790102 /* cmd */
// add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet /* add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet */
#define CMDTHREAD_UPDATE_PROTECT 0x0D790103 // cmd #define CMDTHREAD_UPDATE_PROTECT 0x0D790103 /* cmd */
// end johnli /* end johnli */
//CMDTHREAD_MULTI_READ_MAC /*CMDTHREAD_MULTI_READ_MAC */
//CMDTHREAD_MULTI_WRITE_MAC /*CMDTHREAD_MULTI_WRITE_MAC */
//CMDTHREAD_VENDOR_EEPROM_READ /*CMDTHREAD_VENDOR_EEPROM_READ */
//CMDTHREAD_VENDOR_EEPROM_WRITE /*CMDTHREAD_VENDOR_EEPROM_WRITE */
typedef struct _CMDHandler_TLV { typedef struct _CMDHandler_TLV {
USHORT Offset; USHORT Offset;
USHORT Length; USHORT Length;
...@@ -116,7 +116,7 @@ typedef struct _CmdQ { ...@@ -116,7 +116,7 @@ typedef struct _CmdQ {
USB Cmd to ASIC Related MACRO 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) \ #define RTMP_STA_ENTRY_MAC_RESET(pAd, Wcid) \
{ RT_SET_ASIC_WCID SetAsicWcid; \ { RT_SET_ASIC_WCID SetAsicWcid; \
SetAsicWcid.WCID = Wcid; \ SetAsicWcid.WCID = Wcid; \
...@@ -125,22 +125,22 @@ typedef struct _CmdQ { ...@@ -125,22 +125,22 @@ typedef struct _CmdQ {
RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_ASIC_WCID, \ RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_ASIC_WCID, \
&SetAsicWcid, sizeof(RT_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) \ #define RTMP_STA_ENTRY_ADD(pAd, pEntry) \
RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_CLIENT_MAC_ENTRY, \ RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_CLIENT_MAC_ENTRY, \
pEntry, sizeof(MAC_TABLE_ENTRY)); pEntry, sizeof(MAC_TABLE_ENTRY));
// add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet /* add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet */
// Set MAC register value according operation mode /* Set MAC register value according operation mode */
#define RTMP_UPDATE_PROTECT(pAd) \ #define RTMP_UPDATE_PROTECT(pAd) \
RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_UPDATE_PROTECT, NULL, 0); RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_UPDATE_PROTECT, NULL, 0);
// end johnli /* end johnli */
// remove Pair-wise key material from ASIC /* remove Pair-wise key material from ASIC */
// yet implement /* yet implement */
#define RTMP_STA_ENTRY_KEY_DEL(pAd, BssIdx, Wcid) #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) \ #define RTMP_STA_SECURITY_INFO_ADD(pAd, apidx, KeyID, pEntry) \
{ RTMP_STA_ENTRY_MAC_RESET(pAd, pEntry->Aid); \ { RTMP_STA_ENTRY_MAC_RESET(pAd, pEntry->Aid); \
if (pEntry->Aid >= 1) { \ if (pEntry->Aid >= 1) { \
...@@ -160,7 +160,7 @@ typedef struct _CmdQ { ...@@ -160,7 +160,7 @@ typedef struct _CmdQ {
RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_ASIC_WCID_CIPHER, \ RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_SET_ASIC_WCID_CIPHER, \
&SetAsicWcidAttri, sizeof(RT_SET_ASIC_WCID_ATTRI)); } } &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) \ #define RTMP_ADD_BA_SESSION_TO_ASIC(_pAd, _Aid, _TID) \
do{ \ do{ \
RT_SET_ASIC_WCID SetAsicWcid; \ RT_SET_ASIC_WCID SetAsicWcid; \
...@@ -170,7 +170,7 @@ typedef struct _CmdQ { ...@@ -170,7 +170,7 @@ typedef struct _CmdQ {
RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); \ RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); \
}while(0) }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) \ #define RTMP_DEL_BA_SESSION_FROM_ASIC(_pAd, _Wcid, _TID) \
do{ \ do{ \
RT_SET_ASIC_WCID SetAsicWcid; \ RT_SET_ASIC_WCID SetAsicWcid; \
...@@ -180,4 +180,4 @@ typedef struct _CmdQ { ...@@ -180,4 +180,4 @@ typedef struct _CmdQ {
RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); \ RTUSBEnqueueInternalCmd((_pAd), CMDTHREAD_SET_ASIC_WCID, &SetAsicWcid, sizeof(RT_SET_ASIC_WCID)); \
}while(0) }while(0)
#endif // __RTUSB_IO_H__ // #endif /* __RTUSB_IO_H__ // */
...@@ -186,4 +186,4 @@ VOID NotifyChSwAnnToPeerAPs(IN PRTMP_ADAPTER pAd, ...@@ -186,4 +186,4 @@ VOID NotifyChSwAnnToPeerAPs(IN PRTMP_ADAPTER pAd,
VOID RguClass_BuildBcnChList(IN PRTMP_ADAPTER pAd, VOID RguClass_BuildBcnChList(IN PRTMP_ADAPTER pAd,
OUT PUCHAR pBuf, OUT PULONG pBufLen); OUT PUCHAR pBuf, OUT PULONG pBufLen);
#endif // __SPECTRUM_H__ // #endif /* __SPECTRUM_H__ // */
...@@ -58,7 +58,7 @@ typedef struct _MEASURE_REQ_ENTRY { ...@@ -58,7 +58,7 @@ typedef struct _MEASURE_REQ_ENTRY {
ULONG lastTime; ULONG lastTime;
BOOLEAN Valid; BOOLEAN Valid;
UINT8 DialogToken; 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; } MEASURE_REQ_ENTRY, *PMEASURE_REQ_ENTRY;
typedef struct _MEASURE_REQ_TAB { typedef struct _MEASURE_REQ_TAB {
...@@ -195,4 +195,4 @@ typedef struct PACKED _QUIET_INFO { ...@@ -195,4 +195,4 @@ typedef struct PACKED _QUIET_INFO {
UINT16 QuietOffset; UINT16 QuietOffset;
} QUIET_INFO, *PQUIET_INFO; } QUIET_INFO, *PQUIET_INFO;
#endif // __SPECTRUM_DEF_H__ // #endif /* __SPECTRUM_DEF_H__ // */
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册