Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Adapter.h
Go to the documentation of this file.
1 /***********************************
2 * Adapter.h
3 ************************************/
4 #ifndef __ADAPTER_H__
5 #define __ADAPTER_H__
6 
7 #define MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES 256
8 #include "Debug.h"
9 
10 struct bcm_leader {
15 } __packed;
16 
20 } __packed;
21 
26 } __packed;
27 
31 } __packed;
32 
33 #define MAX_IP_RANGE_LENGTH 4
34 #define MAX_PORT_RANGE 4
35 #define MAX_PROTOCOL_LENGTH 32
36 #define IPV6_ADDRESS_SIZEINBYTES 0x10
37 
38 typedef union _U_IP_ADDRESS {
39  struct {
40  ULONG ulIpv4Addr[MAX_IP_RANGE_LENGTH]; /* Source Ip Address Range */
41  ULONG ulIpv4Mask[MAX_IP_RANGE_LENGTH]; /* Source Ip Mask Address Range */
42  };
43  struct {
44  ULONG ulIpv6Addr[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Address Range */
45  ULONG ulIpv6Mask[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Mask Address Range */
46  };
47  struct {
50  };
51  struct {
54  };
55 } U_IP_ADDRESS;
56 
58  UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS]; /* Intermediate buffer to accumulate pkt Header for PHS */
59  UCHAR ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN]; /* Intermediate buffer containing pkt Header after PHS */
60 };
61 
68  B_UINT8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */
70  UCHAR ucIPSourceAddressLength; /* Ip Source Address Length */
71 
73  UCHAR ucIPDestinationAddressLength; /* Ip Destination Address Length */
74  UCHAR ucIPTypeOfServiceLength; /* Type of service Length */
75  UCHAR ucTosLow; /* Tos Low */
76  UCHAR ucTosHigh; /* Tos High */
77  UCHAR ucTosMask; /* Tos Mask */
78 
79  UCHAR ucProtocolLength; /* protocol Length */
80  UCHAR ucProtocol[MAX_PROTOCOL_LENGTH]; /* protocol Length */
84 
88 
93 
94  /* For IPv6 Addressing */
100 
101  /* Classification fields for ETH CS */
113 };
114 
121 };
122 
124  /* classification extension Rule */
128  /* This field determines the priority of the SF Queues */
130 
134 
135  B_UINT8 u8QueueType; /* BE or rtPS */
136 
137  UINT uiMaxBucketSize; /* maximum size of the bucket for the queue */
161 
162  union {
163  struct {
166  };
167  struct {
170  };
171  };
172 
177 
191 };
192 
203 };
204 
209 };
210 
212 
214 
215 /*
216  * Driver adapter data structure
217  */
220  struct net_device *dev;
237 
238  /* the pointer to the first packet we have queued in send
239  * deserialized miniport support variables
240  */
243 
244  /* this to keep track of the Tx and Rx MailBox Registers. */
246  /* to keep track the no of byte received */
253 
254  /*************** qos ******************/
261 
262  int major;
263  int minor;
268 
276 
281  unsigned long chip_id;
300  /* Thread for control packet handling */
302  /* thread for transmitting packets. */
304 
305  /* LED Related Structures */
307 
308  /* Driver State for LED Blinking */
310  /* Interface Specific */
313  struct file *,
314  unsigned int);
316  struct file *,
317  unsigned int);
319  UINT,
320  PVOID,
321  int);
323  UINT,
324  PVOID,
325  int);
332  unsigned int usIdleModePattern;
333  /* BOOLEAN bTriedToWakeUpFromShutdown; */
355  /* it will always represent chosen DSD at any point of time.
356  * Generally it is Active DSD but in case of NVM RD/WR it might be different.
357  */
364 
367 
368  /* BOOLEAN InterfaceUpStatus; */
372  UINT uiFlashBaseAdd; /* Flash start address */
373  UINT uiActiveISOOffset; /* Active ISO offset chosen before f/w download */
374  FLASH2X_SECTION_VAL eActiveISO; /* Active ISO section val */
375  FLASH2X_SECTION_VAL eActiveDSD; /* Active DSD val chosen before f/w download */
376  UINT uiActiveDSDOffsetAtFwDld; /* For accessing Active DSD chosen before f/w download */
381  /* this should be set who so ever want to change the Headers. after Wrtie it should be reset immediately. */
385  /* while bFlashRawRead will be true, Driver ignore map lay out and consider flash as of without any map. */
391  UINT32 liTimeSinceLastNetEntry; /* Used to Support extended CAPI requirements from */
396 };
397 
398 #define GET_BCM_ADAPTER(net_dev) netdev_priv(net_dev)
399 
404 } __packed;
405 
410 } __packed;
411 
412 /* holds the value of net_device structure.. */
413 extern struct net_device *gblpnetdev;
414 
418 };
419 int InitAdapter(struct bcm_mini_adapter *psAdapter);
420 
421 /* =====================================================================
422  * Beceem vendor request codes for EP0
423  * =====================================================================
424  */
425 
426 #define BCM_REQUEST_READ 0x2
427 #define BCM_REQUEST_WRITE 0x1
428 #define EP2_MPS_REG 0x0F0110A0
429 #define EP2_MPS 0x40
430 
431 #define EP2_CFG_REG 0x0F0110A8
432 #define EP2_CFG_INT 0x27
433 #define EP2_CFG_BULK 0x25
434 
435 #define EP4_MPS_REG 0x0F0110F0
436 #define EP4_MPS 0x8C
437 
438 #define EP4_CFG_REG 0x0F0110F8
439 
440 #define ISO_MPS_REG 0x0F0110C8
441 #define ISO_MPS 0x00000000
442 
443 #define EP1 0
444 #define EP2 1
445 #define EP3 2
446 #define EP4 3
447 #define EP5 4
448 #define EP6 5
449 
453 };
454 
455 #endif /* __ADAPTER_H__ */