• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //============================================================================
2 // wb35rx.h --
3 //============================================================================
4 
5 // Definition for this module used
6 #define MAX_USB_RX_BUFFER	4096	// This parameter must be 4096 931130.4.f
7 
8 #define MAX_USB_RX_BUFFER_NUMBER	ETHERNET_RX_DESCRIPTORS		// Maximum 254, 255 is RESERVED ID
9 #define RX_INTERFACE				0	// Interface 1
10 #define RX_PIPE						2	// Pipe 3
11 #define MAX_PACKET_SIZE				1600 //1568	// 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g
12 #define RX_END_TAG					0x0badbeef
13 
14 
15 //====================================
16 // Internal variable for module
17 //====================================
18 typedef struct _WB35RX
19 {
20 	u32			ByteReceived;// For calculating throughput of BulkIn
21 	atomic_t		RxFireCounter;// Does Wb35Rx module fire?
22 
23 	u8	RxBuffer[ MAX_USB_RX_BUFFER_NUMBER ][ ((MAX_USB_RX_BUFFER+3) & ~0x03 ) ];
24 	u16	RxBufferSize[ ((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01) ];
25 	u8	RxOwner[ ((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03 ) ];//Ownership of buffer  0: SW 1:HW
26 
27 	u32	RxProcessIndex;//The next index to process
28 	u32	RxBufferId;
29 	u32	EP3vm_state;
30 
31 	u32	rx_halt; // For VM stopping
32 
33 	u16	MoreDataSize;
34 	u16	PacketSize;
35 
36 	u32	CurrentRxBufferId; // For complete routine usage
37 	u32	Rx3UrbCancel;
38 
39 	u32	LastR1; // For RSSI reporting
40 	struct urb *				RxUrb;
41 	u32		Ep3ErrorCount2; // 20060625.1 Usbd for Rx DMA error count
42 
43 	int		EP3VM_status;
44 	u8 *	pDRx;
45 
46 } WB35RX, *PWB35RX;
47 
48 
49