1#ifndef CNTRL_SIGNALING_INTERFACE_
2#define CNTRL_SIGNALING_INTERFACE_
3
4#define DSA_REQ			11
5#define DSA_RSP			12
6#define DSA_ACK			13
7#define DSC_REQ			14
8#define DSC_RSP			15
9#define DSC_ACK			16
10#define DSD_REQ			17
11#define DSD_RSP			18
12#define DSD_ACK			19
13#define MAX_CLASSIFIERS_IN_SF	4
14
15#define MAX_STRING_LEN			20
16#define MAX_PHS_LENGTHS			255
17#define VENDOR_PHS_PARAM_LENGTH		10
18#define MAX_NUM_ACTIVE_BS		10
19#define AUTH_TOKEN_LENGTH		10
20#define NUM_HARQ_CHANNELS		16 /* Changed from 10 to 16 to accommodate all HARQ channels */
21#define VENDOR_CLASSIFIER_PARAM_LENGTH	1  /* Changed the size to 1 byte since we dnt use it */
22#define  VENDOR_SPECIF_QOS_PARAM	1
23#define VENDOR_PHS_PARAM_LENGTH		10
24#define MBS_CONTENTS_ID_LENGTH		10
25#define GLOBAL_SF_CLASSNAME_LENGTH	6
26
27#define TYPE_OF_SERVICE_LENGTH		3
28#define IP_MASKED_SRC_ADDRESS_LENGTH	32
29#define IP_MASKED_DEST_ADDRESS_LENGTH	32
30#define PROTOCOL_SRC_PORT_RANGE_LENGTH	4
31#define PROTOCOL_DEST_PORT_RANGE_LENGTH	4
32#define ETHERNET_DEST_MAC_ADDR_LENGTH	12
33#define ETHERNET_SRC_MAC_ADDR_LENGTH	12
34#define NUM_ETHERTYPE_BYTES		3
35#define NUM_IPV6_FLOWLABLE_BYTES	3
36
37struct bcm_packet_class_rules {
38	/* 16bit UserPriority Of The Service Flow */
39	u16 u16UserPriority;
40	/* 16bit VLANID Of The Service Flow */
41	u16 u16VLANID;
42	/* 16bit Packet Classification RuleIndex Of The Service Flow */
43	u16 u16PacketClassificationRuleIndex;
44	/* 8bit Classifier Rule Priority Of The Service Flow */
45	u8 u8ClassifierRulePriority;
46	/* Length of IP TypeOfService field */
47	u8 u8IPTypeOfServiceLength;
48	/* 3bytes IP TypeOfService */
49	u8 u8IPTypeOfService[TYPE_OF_SERVICE_LENGTH];
50	/* Protocol used in classification of Service Flow */
51	u8 u8Protocol;
52	/* Length of IP Masked Source Address */
53	u8 u8IPMaskedSourceAddressLength;
54	/* IP Masked Source Address used in classification for the Service Flow */
55	u8 u8IPMaskedSourceAddress[IP_MASKED_SRC_ADDRESS_LENGTH];
56	/* Length of IP Destination Address */
57	u8 u8IPDestinationAddressLength;
58	/* IP Destination Address used in classification for the Service Flow */
59	u8 u8IPDestinationAddress[IP_MASKED_DEST_ADDRESS_LENGTH];
60	/* Length of Protocol Source Port Range */
61	u8 u8ProtocolSourcePortRangeLength;
62	/* Protocol Source Port Range used in the Service Flow */
63	u8 u8ProtocolSourcePortRange[PROTOCOL_SRC_PORT_RANGE_LENGTH];
64	/* Length of Protocol Dest Port Range */
65	u8 u8ProtocolDestPortRangeLength;
66	/* Protocol Dest Port Range used in the Service Flow */
67	u8 u8ProtocolDestPortRange[PROTOCOL_DEST_PORT_RANGE_LENGTH];
68	/* Length of Ethernet Destination MAC Address */
69	u8 u8EthernetDestMacAddressLength;
70	/* Ethernet Destination MAC Address  used in classification of the Service Flow */
71	u8 u8EthernetDestMacAddress[ETHERNET_DEST_MAC_ADDR_LENGTH];
72	/* Length of Ethernet Source MAC Address */
73	u8 u8EthernetSourceMACAddressLength;
74	/* Ethernet Source MAC Address  used in classification of the Service Flow */
75	u8 u8EthernetSourceMACAddress[ETHERNET_SRC_MAC_ADDR_LENGTH];
76	/* Length of Ethertype */
77	u8 u8EthertypeLength;
78	/* 3bytes Ethertype Of The Service Flow */
79	u8 u8Ethertype[NUM_ETHERTYPE_BYTES];
80	/* 8bit Associated PHSI Of The Service Flow */
81	u8 u8AssociatedPHSI;
82	/* Length of Vendor Specific Classifier Param length Of The Service Flow */
83	u8 u8VendorSpecificClassifierParamLength;
84	/* Vendor Specific Classifier Param Of The Service Flow */
85	u8 u8VendorSpecificClassifierParam[VENDOR_CLASSIFIER_PARAM_LENGTH];
86	/* Length Of IPv6 Flow Lable of the Service Flow */
87	u8 u8IPv6FlowLableLength;
88	/* IPv6 Flow Lable Of The Service Flow */
89	u8 u8IPv6FlowLable[NUM_IPV6_FLOWLABLE_BYTES];
90	/* Action associated with the classifier rule */
91	u8 u8ClassifierActionRule;
92	u16 u16ValidityBitMap;
93};
94
95struct bcm_phs_rules {
96	/* 8bit PHS Index Of The Service Flow */
97	u8 u8PHSI;
98	/* PHSF Length Of The Service Flow */
99	u8 u8PHSFLength;
100	/* String of bytes containing header information to be suppressed by the sending CS and reconstructed by the receiving CS */
101	u8 u8PHSF[MAX_PHS_LENGTHS];
102	/* PHSM Length Of The Service Flow */
103	u8 u8PHSMLength;
104	/* PHS Mask for the SF */
105	u8 u8PHSM[MAX_PHS_LENGTHS];
106	/* 8bit Total number of bytes to be suppressed for the Service Flow */
107	u8 u8PHSS;
108	/* 8bit Indicates whether or not Packet Header contents need to be verified prior to suppression */
109	u8 u8PHSV;
110	/* Vendor Specific PHS param Length Of The Service Flow */
111	u8 u8VendorSpecificPHSParamsLength;
112	/* Vendor Specific PHS param Of The Service Flow */
113	u8 u8VendorSpecificPHSParams[VENDOR_PHS_PARAM_LENGTH];
114	u8 u8Padding[2];
115};
116
117struct bcm_convergence_types {
118	/* 8bit Phs Classfier Action Of The Service Flow */
119	u8 u8ClassfierDSCAction;
120	/* 8bit Phs DSC Action Of The Service Flow */
121	u8 u8PhsDSCAction;
122	/* 16bit Padding */
123	u8 u8Padding[2];
124	/* Packet classification rules structure */
125	struct bcm_packet_class_rules cCPacketClassificationRule;
126	/* Payload header suppression rules structure */
127	struct bcm_phs_rules cPhsRule;
128};
129
130struct bcm_connect_mgr_params {
131	/* 32bitSFID Of The Service Flow */
132	u32 u32SFID;
133	/* 32bit Maximum Sustained Traffic Rate of the Service Flow */
134	u32 u32MaxSustainedTrafficRate;
135	/* 32bit Maximum Traffic Burst allowed for the Service Flow */
136	u32 u32MaxTrafficBurst;
137	/* 32bit Minimum Reserved Traffic Rate of the Service Flow */
138	u32 u32MinReservedTrafficRate;
139	/* 32bit Tolerated Jitter of the Service Flow */
140	u32 u32ToleratedJitter;
141	/* 32bit Maximum Latency of the Service Flow */
142	u32 u32MaximumLatency;
143	/* 16bitCID Of The Service Flow */
144	u16 u16CID;
145	/* 16bit SAID on which the service flow being set up shall be mapped */
146	u16 u16TargetSAID;
147	/* 16bit  ARQ window size negotiated */
148	u16 u16ARQWindowSize;
149	/* 16bit Total Tx delay incl sending, receiving & processing delays */
150	u16 u16ARQRetryTxTimeOut;
151	/* 16bit Total Rx delay incl sending, receiving & processing delays */
152	u16 u16ARQRetryRxTimeOut;
153	/* 16bit ARQ block lifetime */
154	u16 u16ARQBlockLifeTime;
155	/* 16bit ARQ Sync loss timeout */
156	u16 u16ARQSyncLossTimeOut;
157	/* 16bit ARQ Purge timeout */
158	u16 u16ARQRxPurgeTimeOut;
159	/* TODO::Remove this once we move to a new CORR2 driver
160	 * brief Size of an ARQ block
161	 */
162	u16 u16ARQBlockSize;
163	/* #endif */
164	/* 16bit Nominal interval b/w consecutive SDU arrivals at MAC SAP */
165	u16 u16SDUInterArrivalTime;
166	/* 16bit Specifies the time base for rate measurement */
167	u16 u16TimeBase;
168	/* 16bit Interval b/w Successive Grant oppurtunities */
169	u16 u16UnsolicitedGrantInterval;
170	/* 16bit Interval b/w Successive Polling grant oppurtunities */
171	u16 u16UnsolicitedPollingInterval;
172	/* internal var to get the overhead */
173	u16 u16MacOverhead;
174	/* MBS contents Identifier */
175	u16 u16MBSContentsID[MBS_CONTENTS_ID_LENGTH];
176	/* MBS contents Identifier length */
177	u8 u8MBSContentsIDLength;
178	/* ServiceClassName Length Of The Service Flow */
179	u8 u8ServiceClassNameLength;
180	/* 32bytes ServiceClassName Of The Service Flow */
181	u8 u8ServiceClassName[32];
182	/* 8bit Indicates whether or not MBS service is requested for this Serivce Flow */
183	u8 u8MBSService;
184	/* 8bit QOS Parameter Set specifies proper application of QoS parameters to Provisioned, Admitted and Active sets */
185	u8 u8QosParamSet;
186	/* 8bit Traffic Priority Of the Service Flow */
187	u8 u8TrafficPriority;
188	/* 8bit Uplink Grant Scheduling Type of The Service Flow */
189	u8 u8ServiceFlowSchedulingType;
190	/* 8bit Request transmission Policy of the Service Flow */
191	u8 u8RequesttransmissionPolicy;
192	/* 8bit Specifies whether SDUs for this Service flow are of FixedLength or Variable length */
193	u8 u8FixedLengthVSVariableLengthSDUIndicator;
194	/* 8bit Length of the SDU for a fixed length SDU service flow */
195	u8 u8SDUSize;
196	/* 8bit Indicates whether or not ARQ is requested for this connection */
197	u8 u8ARQEnable;
198	/* < 8bit Indicates whether or not data has tobe delivered in order to higher layer */
199	u8 u8ARQDeliverInOrder;
200	/* 8bit Receiver ARQ ACK processing time */
201	u8 u8RxARQAckProcessingTime;
202	/* 8bit Convergence Sublayer Specification Of The Service Flow */
203	u8 u8CSSpecification;
204	/* 8 bit Type of data delivery service */
205	u8 u8TypeOfDataDeliveryService;
206	/* 8bit Specifies whether a service flow may generate Paging */
207	u8 u8PagingPreference;
208	/* 8bit Indicates the MBS Zone through which the connection or virtual connection is valid */
209	u8 u8MBSZoneIdentifierassignment;
210	/* 8bit Specifies whether traffic on SF should generate MOB_TRF_IND to MS in sleep mode */
211	u8 u8TrafficIndicationPreference;
212	/* 8bit Speciifes the length of predefined Global QoS parameter set encoding for this SF */
213	u8 u8GlobalServicesClassNameLength;
214	/* 6 byte Speciifes the predefined Global QoS parameter set encoding for this SF */
215	u8 u8GlobalServicesClassName[GLOBAL_SF_CLASSNAME_LENGTH];
216	/* 8bit Indicates whether or not SN feedback is enabled for the conn */
217	u8 u8SNFeedbackEnabled;
218	/* Indicates the size of the Fragment Sequence Number for the connection */
219	u8 u8FSNSize;
220	/* 8bit Number of CIDs in active BS list */
221	u8 u8CIDAllocation4activeBSsLength;
222	/* CIDs of BS in the active list */
223	u8 u8CIDAllocation4activeBSs[MAX_NUM_ACTIVE_BS];
224	/* Specifies if PDU extended subheader should be applied on every PDU on this conn */
225	u8 u8PDUSNExtendedSubheader4HarqReordering;
226	/* 8bit Specifies whether the connection uses HARQ or not */
227	u8 u8HARQServiceFlows;
228	/* Specifies the length of Authorization token */
229	u8 u8AuthTokenLength;
230	/* Specifies the Authorization token */
231	u8 u8AuthToken[AUTH_TOKEN_LENGTH];
232	/* specifes Number of HARQ channels used to carry data length */
233	u8 u8HarqChannelMappingLength;
234	/* specifes HARQ channels used to carry data */
235	u8 u8HARQChannelMapping[NUM_HARQ_CHANNELS];
236	/* 8bit Length of Vendor Specific QoS Params */
237	u8 u8VendorSpecificQoSParamLength;
238	/* 1byte  Vendor Specific QoS Param Of The Service Flow */
239	u8 u8VendorSpecificQoSParam[VENDOR_SPECIF_QOS_PARAM];
240	/* indicates total classifiers in the SF */
241	u8 u8TotalClassifiers;  /* < Total number of valid classifiers */
242	u8 bValid;	/* < Validity flag */
243	u8 u8Padding;	 /* < Padding byte */
244	/*
245	 * Structure for Convergence SubLayer Types with a maximum of 4 classifiers
246	 */
247	struct bcm_convergence_types cConvergenceSLTypes[MAX_CLASSIFIERS_IN_SF];
248};
249
250struct bcm_add_request {
251	u8 u8Type;	/* < Type */
252	u8 eConnectionDir; /* < Connection direction */
253	/* brief 16 bit TID */
254	u16 u16TID; /* < 16bit TID */
255	/* brief 16bitCID */
256	u16 u16CID; /* < 16bit CID */
257	/* brief 16bitVCID */
258	u16 u16VCID; /* < 16bit VCID */
259	struct bcm_connect_mgr_params *psfParameterSet; /* < connection manager parameters */
260};
261
262struct bcm_add_indication {
263	u8 u8Type;	/* < Type */
264	u8 eConnectionDir;	/* < Connection Direction */
265	/* brief 16 bit TID */
266	u16 u16TID; /* < TID */
267	/* brief 16bitCID */
268	u16 u16CID; /* < 16bitCID */
269	/* brief 16bitVCID */
270	u16 u16VCID; /* < 16bitVCID */
271	struct bcm_connect_mgr_params *psfAuthorizedSet; /* Authorized set of connection manager parameters */
272	struct bcm_connect_mgr_params *psfAdmittedSet; /* Admitted set of connection manager parameters */
273	struct bcm_connect_mgr_params *psfActiveSet; /* Activeset of connection manager parameters */
274	u8 u8CC; /* <Confirmation Code */
275	u8 u8Padd; /* < 8-bit Padding */
276	u16 u16Padd; /* < 16 bit Padding */
277};
278
279struct bcm_del_request {
280	u8 u8Type; /* < Type */
281	u8 u8Padding; /* < Padding byte */
282	u16 u16TID; /* < TID */
283	/* brief 32bitSFID */
284	u32 u32SFID; /* < SFID */
285};
286
287struct bcm_del_indication {
288	u8 u8Type;	/* < Type */
289	u8 u8Padding; /* < Padding */
290	u16 u16TID; /* < TID */
291	/* brief 16bitCID */
292	u16 u16CID; /* < CID */
293	/* brief 16bitVCID */
294	u16 u16VCID; /* < VCID */
295	/* brief 32bitSFID */
296	u32 u32SFID; /* < SFID */
297	/* brief 8bit Confirmation code */
298	u8 u8ConfirmationCode; /* < Confirmation code */
299	u8 u8Padding1[3]; /* < 3 byte Padding */
300};
301
302struct bcm_stim_sfhostnotify {
303	u32 SFID; /* SFID of the service flow */
304	u16 newCID; /* the new/changed CID */
305	u16 VCID; /* Get new Vcid if the flow has been made active in CID update TLV, but was inactive earlier or the orig vcid */
306	u8 RetainSF; /* Indication to Host if the SF is to be retained or deleted; if TRUE-retain else delete */
307	u8 QoSParamSet; /* QoS paramset of the retained SF */
308	u16 u16reserved; /* For byte alignment */
309};
310
311#endif
312