Adding support for MOXA ART SoC. Testing port of linux-2.6.32.60-moxart.
[linux-3.6.7-moxart.git] / drivers / staging / bcm / PHSDefines.h
blob6016fc502d2d7e73d2aa3d432dedc6250c8dc55a
1 #ifndef BCM_PHS_DEFINES_H
2 #define BCM_PHS_DEFINES_H
4 #define PHS_INVALID_TABLE_INDEX 0xffffffff
6 /************************* MACROS **********************************************/
7 #define PHS_MEM_TAG "_SHP"
11 //PHS Defines
12 #define STATUS_PHS_COMPRESSED 0xa1
13 #define STATUS_PHS_NOCOMPRESSION 0xa2
14 #define APPLY_PHS 1
15 #define MAX_NO_BIT 7
16 #define ZERO_PHSI 0
17 #define VERIFY 0
18 #define SIZE_MULTIPLE_32 4
19 #define UNCOMPRESSED_PACKET 0
20 #define DYNAMIC 0
21 #define SUPPRESS 0x80
22 #define NO_CLASSIFIER_MATCH 0
23 #define SEND_PACKET_UNCOMPRESSED 0
24 #define PHSI_IS_ZERO 0
25 #define PHSI_LEN 1
26 #define ERROR_LEN 0
27 #define PHS_BUFFER_SIZE 1532
30 #define MAX_PHSRULE_PER_SF 20
31 #define MAX_SERVICEFLOWS 17
33 //PHS Error Defines
34 #define PHS_SUCCESS 0
35 #define ERR_PHS_INVALID_DEVICE_EXETENSION 0x800
36 #define ERR_PHS_INVALID_PHS_RULE 0x801
37 #define ERR_PHS_RULE_ALREADY_EXISTS 0x802
38 #define ERR_SF_MATCH_FAIL 0x803
39 #define ERR_INVALID_CLASSIFIERTABLE_FOR_SF 0x804
40 #define ERR_SFTABLE_FULL 0x805
41 #define ERR_CLSASSIFIER_TABLE_FULL 0x806
42 #define ERR_PHSRULE_MEMALLOC_FAIL 0x807
43 #define ERR_CLSID_MATCH_FAIL 0x808
44 #define ERR_PHSRULE_MATCH_FAIL 0x809
46 typedef struct _S_PHS_RULE
48 /// brief 8bit PHSI Of The Service Flow
49 B_UINT8 u8PHSI;
50 /// brief PHSF Of The Service Flow
51 B_UINT8 u8PHSFLength;
52 B_UINT8 u8PHSF[MAX_PHS_LENGTHS];
53 /// brief PHSM Of The Service Flow
54 B_UINT8 u8PHSMLength;
55 B_UINT8 u8PHSM[MAX_PHS_LENGTHS];
56 /// brief 8bit PHSS Of The Service Flow
57 B_UINT8 u8PHSS;
58 /// brief 8bit PHSV Of The Service Flow
59 B_UINT8 u8PHSV;
60 //Reference Count for this PHS Rule
61 B_UINT8 u8RefCnt;
62 //Flag to Store Unclassified PHS rules only in DL
63 B_UINT8 bUnclassifiedPHSRule;
65 B_UINT8 u8Reserved[3];
67 LONG PHSModifiedBytes;
68 ULONG PHSModifiedNumPackets;
69 ULONG PHSErrorNumPackets;
70 }S_PHS_RULE;
73 typedef enum _E_CLASSIFIER_ENTRY_CONTEXT
75 eActiveClassifierRuleContext,
76 eOldClassifierRuleContext
77 }E_CLASSIFIER_ENTRY_CONTEXT;
79 typedef struct _S_CLASSIFIER_ENTRY
81 B_UINT8 bUsed;
82 B_UINT16 uiClassifierRuleId;
83 B_UINT8 u8PHSI;
84 S_PHS_RULE *pstPhsRule;
85 B_UINT8 bUnclassifiedPHSRule;
87 }S_CLASSIFIER_ENTRY;
90 typedef struct _S_CLASSIFIER_TABLE
92 B_UINT16 uiTotalClassifiers;
93 S_CLASSIFIER_ENTRY stActivePhsRulesList[MAX_PHSRULE_PER_SF];
94 S_CLASSIFIER_ENTRY stOldPhsRulesList[MAX_PHSRULE_PER_SF];
95 B_UINT16 uiOldestPhsRuleIndex;
97 }S_CLASSIFIER_TABLE;
100 typedef struct _S_SERVICEFLOW_ENTRY
102 B_UINT8 bUsed;
103 B_UINT16 uiVcid;
104 S_CLASSIFIER_TABLE *pstClassifierTable;
105 }S_SERVICEFLOW_ENTRY;
107 typedef struct _S_SERVICEFLOW_TABLE
109 B_UINT16 uiTotalServiceFlows;
110 S_SERVICEFLOW_ENTRY stSFList[MAX_SERVICEFLOWS];
112 }S_SERVICEFLOW_TABLE;
115 typedef struct _PHS_DEVICE_EXTENSION
117 /* PHS Specific data*/
118 S_SERVICEFLOW_TABLE *pstServiceFlowPhsRulesTable;
119 void *CompressedTxBuffer;
120 void *UnCompressedRxBuffer;
121 }PHS_DEVICE_EXTENSION,*PPHS_DEVICE_EXTENSION;
124 #endif