1 /************************************************************
3 * This file contains the routines for handling Connnection
5 ************************************************************/
10 typedef enum _E_CLASSIFIER_ACTION
12 eInvalidClassifierAction
,
18 static ULONG
GetNextTargetBufferLocation(PMINI_ADAPTER Adapter
,B_UINT16 tid
);
20 /************************************************************
21 * Function - SearchSfid
23 * Description - This routinue would search QOS queues having
24 * specified SFID as input parameter.
26 * Parameters - Adapter: Pointer to the Adapter structure
27 * uiSfid : Given SFID for matching
29 * Returns - Queue index for this SFID(If matched)
30 Else Invalid Queue Index(If Not matched)
31 ************************************************************/
32 INT
SearchSfid(PMINI_ADAPTER Adapter
,UINT uiSfid
)
35 for(iIndex
=(NO_OF_QUEUES
-1); iIndex
>=0; iIndex
--)
36 if(Adapter
->PackInfo
[iIndex
].ulSFID
==uiSfid
)
38 return NO_OF_QUEUES
+1;
41 /***************************************************************
42 * Function - SearchFreeSfid
44 * Description - This routinue would search Free available SFID.
46 * Parameter - Adapter: Pointer to the Adapter structure
48 * Returns - Queue index for the free SFID
49 * Else returns Invalid Index.
50 ****************************************************************/
51 static INT
SearchFreeSfid(PMINI_ADAPTER Adapter
)
55 for(uiIndex
=0; uiIndex
< (NO_OF_QUEUES
-1); uiIndex
++)
56 if(Adapter
->PackInfo
[uiIndex
].ulSFID
==0)
58 return NO_OF_QUEUES
+1;
63 Description: This routinue would search Classifier having specified ClassifierID as input parameter
64 Input parameters: PMINI_ADAPTER Adapter - Adapter Context
65 unsigned int uiSfid - The SF in which the classifier is to searched
66 B_UINT16 uiClassifierID - The classifier ID to be searched
67 Return: int :Classifier table index of matching entry
70 static int SearchClsid(PMINI_ADAPTER Adapter
,ULONG ulSFID
,B_UINT16 uiClassifierID
)
72 unsigned int uiClassifierIndex
= 0;
73 for(uiClassifierIndex
=0;uiClassifierIndex
<MAX_CLASSIFIERS
;uiClassifierIndex
++)
75 if((Adapter
->astClassifierTable
[uiClassifierIndex
].bUsed
) &&
76 (Adapter
->astClassifierTable
[uiClassifierIndex
].uiClassifierRuleIndex
== uiClassifierID
)&&
77 (Adapter
->astClassifierTable
[uiClassifierIndex
].ulSFID
== ulSFID
))
78 return uiClassifierIndex
;
80 return MAX_CLASSIFIERS
+1;
84 @ingroup ctrl_pkt_functions
85 This routinue would search Free available Classifier entry in classifier table.
86 @return free Classifier Entry index in classifier table for specified SF
88 static int SearchFreeClsid(PMINI_ADAPTER Adapter
/**Adapter Context*/
91 unsigned int uiClassifierIndex
= 0;
92 for(uiClassifierIndex
=0;uiClassifierIndex
<MAX_CLASSIFIERS
;uiClassifierIndex
++)
94 if(!Adapter
->astClassifierTable
[uiClassifierIndex
].bUsed
)
95 return uiClassifierIndex
;
97 return MAX_CLASSIFIERS
+1;
100 static VOID
deleteSFBySfid(PMINI_ADAPTER Adapter
, UINT uiSearchRuleIndex
)
102 //deleting all the packet held in the SF
103 flush_queue(Adapter
,uiSearchRuleIndex
);
105 //Deleting the all classifiers for this SF
106 DeleteAllClassifiersForSF(Adapter
,uiSearchRuleIndex
);
108 //Resetting only MIBS related entries in the SF
109 memset((PVOID
)&Adapter
->PackInfo
[uiSearchRuleIndex
], 0, sizeof(S_MIBS_SERVICEFLOW_TABLE
));
113 CopyIpAddrToClassifier(S_CLASSIFIER_RULE
*pstClassifierEntry
,
114 B_UINT8 u8IpAddressLen
, B_UINT8
*pu8IpAddressMaskSrc
,
115 BOOLEAN bIpVersion6
, E_IPADDR_CONTEXT eIpAddrContext
)
118 UINT nSizeOfIPAddressInBytes
= IP_LENGTH_OF_ADDRESS
;
119 UCHAR
*ptrClassifierIpAddress
= NULL
;
120 UCHAR
*ptrClassifierIpMask
= NULL
;
121 PMINI_ADAPTER Adapter
= GET_BCM_ADAPTER(gblpnetdev
);
125 nSizeOfIPAddressInBytes
= IPV6_ADDRESS_SIZEINBYTES
;
127 //Destination Ip Address
128 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Ip Address Range Length:0x%X ",
130 if((bIpVersion6
?(IPV6_ADDRESS_SIZEINBYTES
* MAX_IP_RANGE_LENGTH
* 2):
131 (TOTAL_MASKED_ADDRESS_IN_BYTES
)) >= u8IpAddressLen
)
134 //checking both the mask and address togethor in Classification.
135 //So length will be : TotalLengthInBytes/nSizeOfIPAddressInBytes * 2
136 //(nSizeOfIPAddressInBytes for address and nSizeOfIPAddressInBytes for mask)
138 if(eIpAddrContext
== eDestIpAddress
)
140 pstClassifierEntry
->ucIPDestinationAddressLength
=
141 u8IpAddressLen
/(nSizeOfIPAddressInBytes
* 2);
144 ptrClassifierIpAddress
=
145 pstClassifierEntry
->stDestIpAddress
.ucIpv6Address
;
146 ptrClassifierIpMask
=
147 pstClassifierEntry
->stDestIpAddress
.ucIpv6Mask
;
151 ptrClassifierIpAddress
=
152 pstClassifierEntry
->stDestIpAddress
.ucIpv4Address
;
153 ptrClassifierIpMask
=
154 pstClassifierEntry
->stDestIpAddress
.ucIpv4Mask
;
157 else if(eIpAddrContext
== eSrcIpAddress
)
159 pstClassifierEntry
->ucIPSourceAddressLength
=
160 u8IpAddressLen
/(nSizeOfIPAddressInBytes
* 2);
163 ptrClassifierIpAddress
=
164 pstClassifierEntry
->stSrcIpAddress
.ucIpv6Address
;
165 ptrClassifierIpMask
=
166 pstClassifierEntry
->stSrcIpAddress
.ucIpv6Mask
;
170 ptrClassifierIpAddress
=
171 pstClassifierEntry
->stSrcIpAddress
.ucIpv4Address
;
172 ptrClassifierIpMask
=
173 pstClassifierEntry
->stSrcIpAddress
.ucIpv4Mask
;
176 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Address Length:0x%X \n",
177 pstClassifierEntry
->ucIPDestinationAddressLength
);
178 while((u8IpAddressLen
>= nSizeOfIPAddressInBytes
) &&
179 (ucLoopIndex
< MAX_IP_RANGE_LENGTH
))
181 memcpy(ptrClassifierIpAddress
+
182 (ucLoopIndex
* nSizeOfIPAddressInBytes
),
183 (pu8IpAddressMaskSrc
+(ucLoopIndex
*nSizeOfIPAddressInBytes
*2)),
184 nSizeOfIPAddressInBytes
);
187 if(eIpAddrContext
== eSrcIpAddress
)
189 pstClassifierEntry
->stSrcIpAddress
.ulIpv4Addr
[ucLoopIndex
]=
190 ntohl(pstClassifierEntry
->stSrcIpAddress
.
191 ulIpv4Addr
[ucLoopIndex
]);
192 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Src Ip Address:0x%luX ",pstClassifierEntry
->stSrcIpAddress
.ulIpv4Addr
[ucLoopIndex
]);
194 else if(eIpAddrContext
== eDestIpAddress
)
196 pstClassifierEntry
->stDestIpAddress
.ulIpv4Addr
[ucLoopIndex
]= ntohl(pstClassifierEntry
->stDestIpAddress
.
197 ulIpv4Addr
[ucLoopIndex
]);
198 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Dest Ip Address:0x%luX ",pstClassifierEntry
->stDestIpAddress
.ulIpv4Addr
[ucLoopIndex
]);
201 u8IpAddressLen
-=nSizeOfIPAddressInBytes
;
202 if(u8IpAddressLen
>= nSizeOfIPAddressInBytes
)
204 memcpy(ptrClassifierIpMask
+
205 (ucLoopIndex
* nSizeOfIPAddressInBytes
),
206 (pu8IpAddressMaskSrc
+nSizeOfIPAddressInBytes
+
207 (ucLoopIndex
*nSizeOfIPAddressInBytes
*2)),
208 nSizeOfIPAddressInBytes
);
211 if(eIpAddrContext
== eSrcIpAddress
)
213 pstClassifierEntry
->stSrcIpAddress
.
214 ulIpv4Mask
[ucLoopIndex
]=
215 ntohl(pstClassifierEntry
->stSrcIpAddress
.
216 ulIpv4Mask
[ucLoopIndex
]);
217 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Src Ip Mask Address:0x%luX ",pstClassifierEntry
->stSrcIpAddress
.ulIpv4Mask
[ucLoopIndex
]);
219 else if(eIpAddrContext
== eDestIpAddress
)
221 pstClassifierEntry
->stDestIpAddress
.
222 ulIpv4Mask
[ucLoopIndex
] =
223 ntohl(pstClassifierEntry
->stDestIpAddress
.
224 ulIpv4Mask
[ucLoopIndex
]);
225 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Dest Ip Mask Address:0x%luX ",pstClassifierEntry
->stDestIpAddress
.ulIpv4Mask
[ucLoopIndex
]);
228 u8IpAddressLen
-=nSizeOfIPAddressInBytes
;
230 if(0==u8IpAddressLen
)
232 pstClassifierEntry
->bDestIpValid
=TRUE
;
238 //Restore EndianNess of Struct
239 for(ucLoopIndex
=0 ; ucLoopIndex
< MAX_IP_RANGE_LENGTH
* 4 ;
242 if(eIpAddrContext
== eSrcIpAddress
)
244 pstClassifierEntry
->stSrcIpAddress
.ulIpv6Addr
[ucLoopIndex
]=
245 ntohl(pstClassifierEntry
->stSrcIpAddress
.
246 ulIpv6Addr
[ucLoopIndex
]);
247 pstClassifierEntry
->stSrcIpAddress
.ulIpv6Mask
[ucLoopIndex
]= ntohl(pstClassifierEntry
->stSrcIpAddress
.
248 ulIpv6Mask
[ucLoopIndex
]);
250 else if(eIpAddrContext
== eDestIpAddress
)
252 pstClassifierEntry
->stDestIpAddress
.ulIpv6Addr
[ucLoopIndex
]= ntohl(pstClassifierEntry
->stDestIpAddress
.
253 ulIpv6Addr
[ucLoopIndex
]);
254 pstClassifierEntry
->stDestIpAddress
.ulIpv6Mask
[ucLoopIndex
]= ntohl(pstClassifierEntry
->stDestIpAddress
.
255 ulIpv6Mask
[ucLoopIndex
]);
263 void ClearTargetDSXBuffer(PMINI_ADAPTER Adapter
,B_UINT16 TID
,BOOLEAN bFreeAll
)
266 for(ulIndex
=0; ulIndex
< Adapter
->ulTotalTargetBuffersAvailable
; ulIndex
++)
268 if(Adapter
->astTargetDsxBuffer
[ulIndex
].valid
)
270 if ((bFreeAll
) || (Adapter
->astTargetDsxBuffer
[ulIndex
].tid
== TID
)){
271 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_PRINTK
, 0, 0, "ClearTargetDSXBuffer: found tid %d buffer cleared %lx\n",
272 TID
, Adapter
->astTargetDsxBuffer
[ulIndex
].ulTargetDsxBuffer
);
273 Adapter
->astTargetDsxBuffer
[ulIndex
].valid
=1;
274 Adapter
->astTargetDsxBuffer
[ulIndex
].tid
=0;
275 Adapter
->ulFreeTargetBufferCnt
++;
281 @ingroup ctrl_pkt_functions
282 copy classifier rule into the specified SF index
284 static inline VOID
CopyClassifierRuleToSF(PMINI_ADAPTER Adapter
,stConvergenceSLTypes
*psfCSType
,UINT uiSearchRuleIndex
,UINT nClassifierIndex
)
286 S_CLASSIFIER_RULE
*pstClassifierEntry
= NULL
;
287 //VOID *pvPhsContext = NULL;
289 //UCHAR ucProtocolLength=0;
293 if(Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
== 0 ||
294 nClassifierIndex
> (MAX_CLASSIFIERS
-1))
298 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Storing Classifier Rule Index : %X",ntohs(psfCSType
->cCPacketClassificationRule
.u16PacketClassificationRuleIndex
));
300 if(nClassifierIndex
> MAX_CLASSIFIERS
-1)
303 pstClassifierEntry
= &Adapter
->astClassifierTable
[nClassifierIndex
];
304 if(pstClassifierEntry
)
307 pstClassifierEntry
->bIpv6Protocol
=
308 (Adapter
->PackInfo
[uiSearchRuleIndex
].ucIpVersion
== IPV6
)?TRUE
:FALSE
;
311 pstClassifierEntry
->ucDestPortRangeLength
=psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRangeLength
/4;
312 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Destination Port Range Length:0x%X ",pstClassifierEntry
->ucDestPortRangeLength
);
313 if( MAX_PORT_RANGE
>= psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRangeLength
)
315 for(ucLoopIndex
=0;ucLoopIndex
<(pstClassifierEntry
->ucDestPortRangeLength
);ucLoopIndex
++)
317 pstClassifierEntry
->usDestPortRangeLo
[ucLoopIndex
] =
318 *((PUSHORT
)(psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
+ucLoopIndex
));
319 pstClassifierEntry
->usDestPortRangeHi
[ucLoopIndex
] =
320 *((PUSHORT
)(psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
+2+ucLoopIndex
));
321 pstClassifierEntry
->usDestPortRangeLo
[ucLoopIndex
]=ntohs(pstClassifierEntry
->usDestPortRangeLo
[ucLoopIndex
]);
322 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Destination Port Range Lo:0x%X ",pstClassifierEntry
->usDestPortRangeLo
[ucLoopIndex
]);
323 pstClassifierEntry
->usDestPortRangeHi
[ucLoopIndex
]=ntohs(pstClassifierEntry
->usDestPortRangeHi
[ucLoopIndex
]);
328 pstClassifierEntry
->ucDestPortRangeLength
=0;
331 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Source Port Range Length:0x%X ",psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRangeLength
);
333 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRangeLength
)
335 pstClassifierEntry
->ucSrcPortRangeLength
=
336 psfCSType
->cCPacketClassificationRule
.
337 u8ProtocolSourcePortRangeLength
/4;
338 for(ucLoopIndex
= 0; ucLoopIndex
<
339 (pstClassifierEntry
->ucSrcPortRangeLength
); ucLoopIndex
++)
341 pstClassifierEntry
->usSrcPortRangeLo
[ucLoopIndex
] =
342 *((PUSHORT
)(psfCSType
->cCPacketClassificationRule
.
343 u8ProtocolSourcePortRange
+ucLoopIndex
));
344 pstClassifierEntry
->usSrcPortRangeHi
[ucLoopIndex
] =
345 *((PUSHORT
)(psfCSType
->cCPacketClassificationRule
.
346 u8ProtocolSourcePortRange
+2+ucLoopIndex
));
347 pstClassifierEntry
->usSrcPortRangeLo
[ucLoopIndex
] =
348 ntohs(pstClassifierEntry
->usSrcPortRangeLo
[ucLoopIndex
]);
349 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Source Port Range Lo:0x%X ",pstClassifierEntry
->usSrcPortRangeLo
[ucLoopIndex
]);
350 pstClassifierEntry
->usSrcPortRangeHi
[ucLoopIndex
]=ntohs(pstClassifierEntry
->usSrcPortRangeHi
[ucLoopIndex
]);
353 //Destination Ip Address and Mask
354 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Ip Destination Parameters : ");
356 CopyIpAddrToClassifier(pstClassifierEntry
,
357 psfCSType
->cCPacketClassificationRule
.u8IPDestinationAddressLength
,
358 psfCSType
->cCPacketClassificationRule
.u8IPDestinationAddress
,
359 (Adapter
->PackInfo
[uiSearchRuleIndex
].ucIpVersion
== IPV6
)?
360 TRUE
:FALSE
, eDestIpAddress
);
362 //Source Ip Address and Mask
363 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Ip Source Parameters : ");
365 CopyIpAddrToClassifier(pstClassifierEntry
,
366 psfCSType
->cCPacketClassificationRule
.u8IPMaskedSourceAddressLength
,
367 psfCSType
->cCPacketClassificationRule
.u8IPMaskedSourceAddress
,
368 (Adapter
->PackInfo
[uiSearchRuleIndex
].ucIpVersion
== IPV6
)?TRUE
:FALSE
,
372 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"TOS Length:0x%X ",psfCSType
->cCPacketClassificationRule
.u8IPTypeOfServiceLength
);
373 if(3 == psfCSType
->cCPacketClassificationRule
.u8IPTypeOfServiceLength
)
375 pstClassifierEntry
->ucIPTypeOfServiceLength
=
376 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfServiceLength
;
377 pstClassifierEntry
->ucTosLow
=
378 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[0];
379 pstClassifierEntry
->ucTosHigh
=
380 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[1];
381 pstClassifierEntry
->ucTosMask
=
382 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[2];
383 pstClassifierEntry
->bTOSValid
= TRUE
;
385 if(psfCSType
->cCPacketClassificationRule
.u8Protocol
== 0)
387 //we didnt get protocol field filled in by the BS
388 pstClassifierEntry
->ucProtocolLength
=0;
392 pstClassifierEntry
->ucProtocolLength
=1;// 1 valid protocol
395 pstClassifierEntry
->ucProtocol
[0] =
396 psfCSType
->cCPacketClassificationRule
.u8Protocol
;
398 pstClassifierEntry
->u8ClassifierRulePriority
=
399 psfCSType
->cCPacketClassificationRule
.u8ClassifierRulePriority
;
401 //store the classifier rule ID and set this classifier entry as valid
402 pstClassifierEntry
->ucDirection
=
403 Adapter
->PackInfo
[uiSearchRuleIndex
].ucDirection
;
404 pstClassifierEntry
->uiClassifierRuleIndex
= ntohs(psfCSType
->
405 cCPacketClassificationRule
.u16PacketClassificationRuleIndex
);
406 pstClassifierEntry
->usVCID_Value
=
407 Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
;
408 pstClassifierEntry
->ulSFID
=
409 Adapter
->PackInfo
[uiSearchRuleIndex
].ulSFID
;
410 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Search Index %d Dir: %d, Index: %d, Vcid: %d\n",
411 uiSearchRuleIndex
, pstClassifierEntry
->ucDirection
,
412 pstClassifierEntry
->uiClassifierRuleIndex
,
413 pstClassifierEntry
->usVCID_Value
);
415 if(psfCSType
->cCPacketClassificationRule
.u8AssociatedPHSI
)
417 pstClassifierEntry
->u8AssociatedPHSI
= psfCSType
->cCPacketClassificationRule
.u8AssociatedPHSI
;
420 //Copy ETH CS Parameters
421 pstClassifierEntry
->ucEthCSSrcMACLen
= (psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddressLength
);
422 memcpy(pstClassifierEntry
->au8EThCSSrcMAC
,psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
,MAC_ADDRESS_SIZE
);
423 memcpy(pstClassifierEntry
->au8EThCSSrcMACMask
,psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
+MAC_ADDRESS_SIZE
,MAC_ADDRESS_SIZE
);
424 pstClassifierEntry
->ucEthCSDestMACLen
= (psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddressLength
);
425 memcpy(pstClassifierEntry
->au8EThCSDestMAC
,psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
,MAC_ADDRESS_SIZE
);
426 memcpy(pstClassifierEntry
->au8EThCSDestMACMask
,psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
+MAC_ADDRESS_SIZE
,MAC_ADDRESS_SIZE
);
427 pstClassifierEntry
->ucEtherTypeLen
= (psfCSType
->cCPacketClassificationRule
.u8EthertypeLength
);
428 memcpy(pstClassifierEntry
->au8EthCSEtherType
,psfCSType
->cCPacketClassificationRule
.u8Ethertype
,NUM_ETHERTYPE_BYTES
);
429 memcpy(pstClassifierEntry
->usUserPriority
, &psfCSType
->cCPacketClassificationRule
.u16UserPriority
, 2);
430 pstClassifierEntry
->usVLANID
= ntohs(psfCSType
->cCPacketClassificationRule
.u16VLANID
);
431 pstClassifierEntry
->usValidityBitMap
= ntohs(psfCSType
->cCPacketClassificationRule
.u16ValidityBitMap
);
433 pstClassifierEntry
->bUsed
= TRUE
;
439 @ingroup ctrl_pkt_functions
441 static inline VOID
DeleteClassifierRuleFromSF(PMINI_ADAPTER Adapter
,UINT uiSearchRuleIndex
,UINT nClassifierIndex
)
443 S_CLASSIFIER_RULE
*pstClassifierEntry
= NULL
;
444 B_UINT16 u16PacketClassificationRuleIndex
;
446 //VOID *pvPhsContext = NULL;
449 usVCID
= Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
;
451 if(nClassifierIndex
> MAX_CLASSIFIERS
-1)
457 u16PacketClassificationRuleIndex
= Adapter
->astClassifierTable
[nClassifierIndex
].uiClassifierRuleIndex
;
460 pstClassifierEntry
= &Adapter
->astClassifierTable
[nClassifierIndex
];
461 if(pstClassifierEntry
)
463 pstClassifierEntry
->bUsed
= FALSE
;
464 pstClassifierEntry
->uiClassifierRuleIndex
= 0;
465 memset(pstClassifierEntry
,0,sizeof(S_CLASSIFIER_RULE
));
467 //Delete the PHS Rule for this classifier
468 PhsDeleteClassifierRule(
469 &Adapter
->stBCMPhsContext
,
471 u16PacketClassificationRuleIndex
);
476 @ingroup ctrl_pkt_functions
478 VOID
DeleteAllClassifiersForSF(PMINI_ADAPTER Adapter
,UINT uiSearchRuleIndex
)
480 S_CLASSIFIER_RULE
*pstClassifierEntry
= NULL
;
481 UINT nClassifierIndex
;
482 //B_UINT16 u16PacketClassificationRuleIndex;
484 //VOID *pvPhsContext = NULL;
487 ulVCID
= Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
;
493 for(nClassifierIndex
=0 ; nClassifierIndex
< MAX_CLASSIFIERS
; nClassifierIndex
++)
495 if(Adapter
->astClassifierTable
[nClassifierIndex
].usVCID_Value
== ulVCID
)
497 pstClassifierEntry
= &Adapter
->astClassifierTable
[nClassifierIndex
];
498 if(pstClassifierEntry
->bUsed
)
500 DeleteClassifierRuleFromSF(Adapter
,uiSearchRuleIndex
,nClassifierIndex
);
505 //Delete All Phs Rules Associated with this SF
507 &Adapter
->stBCMPhsContext
,
514 This routinue copies the Connection Management
515 related data into the Adapter structure.
516 @ingroup ctrl_pkt_functions
519 static VOID
CopyToAdapter( register PMINI_ADAPTER Adapter
, /**<Pointer to the Adapter structure*/
520 register pstServiceFlowParamSI psfLocalSet
, /**<Pointer to the ServiceFlowParamSI structure*/
521 register UINT uiSearchRuleIndex
, /**<Index of Queue, to which this data belongs*/
522 register UCHAR ucDsxType
,
523 stLocalSFAddIndicationAlt
*pstAddIndication
)
525 //UCHAR ucProtocolLength=0;
527 UINT nClassifierIndex
= 0;
528 E_CLASSIFIER_ACTION eClassifierAction
= eInvalidClassifierAction
;
529 B_UINT16 u16PacketClassificationRuleIndex
=0;
531 stConvergenceSLTypes
*psfCSType
= NULL
;
533 USHORT uVCID
= Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
;
537 Adapter
->PackInfo
[uiSearchRuleIndex
].bValid
=TRUE
;
538 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Search Rule Index = %d\n", uiSearchRuleIndex
);
539 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"%s: SFID= %x ",__FUNCTION__
, ntohl(psfLocalSet
->u32SFID
));
540 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Updating Queue %d",uiSearchRuleIndex
);
542 ulSFID
= ntohl(psfLocalSet
->u32SFID
);
543 //Store IP Version used
544 //Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF
546 Adapter
->PackInfo
[uiSearchRuleIndex
].bIPCSSupport
= 0;
547 Adapter
->PackInfo
[uiSearchRuleIndex
].bEthCSSupport
= 0;
549 /*Enable IP/ETh CS Support As Required*/
550 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"CopyToAdapter : u8CSSpecification : %X\n",psfLocalSet
->u8CSSpecification
);
551 switch(psfLocalSet
->u8CSSpecification
)
555 Adapter
->PackInfo
[uiSearchRuleIndex
].bIPCSSupport
= IPV4_CS
;
560 Adapter
->PackInfo
[uiSearchRuleIndex
].bIPCSSupport
= IPV6_CS
;
564 case eCS802_3PacketEthernet
:
565 case eCS802_1QPacketVLAN
:
567 Adapter
->PackInfo
[uiSearchRuleIndex
].bEthCSSupport
= ETH_CS_802_3
;
571 case eCSPacketIPV4Over802_1QVLAN
:
572 case eCSPacketIPV4Over802_3Ethernet
:
574 Adapter
->PackInfo
[uiSearchRuleIndex
].bIPCSSupport
= IPV4_CS
;
575 Adapter
->PackInfo
[uiSearchRuleIndex
].bEthCSSupport
= ETH_CS_802_3
;
579 case eCSPacketIPV6Over802_1QVLAN
:
580 case eCSPacketIPV6Over802_3Ethernet
:
582 Adapter
->PackInfo
[uiSearchRuleIndex
].bIPCSSupport
= IPV6_CS
;
583 Adapter
->PackInfo
[uiSearchRuleIndex
].bEthCSSupport
= ETH_CS_802_3
;
589 BCM_DEBUG_PRINT (Adapter
, DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Error in value of CS Classification.. setting default to IP CS\n");
590 Adapter
->PackInfo
[uiSearchRuleIndex
].bIPCSSupport
= IPV4_CS
;
595 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"CopyToAdapter : Queue No : %X ETH CS Support : %X , IP CS Support : %X \n",
597 Adapter
->PackInfo
[uiSearchRuleIndex
].bEthCSSupport
,
598 Adapter
->PackInfo
[uiSearchRuleIndex
].bIPCSSupport
);
600 //Store IP Version used
601 //Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF
602 if(Adapter
->PackInfo
[uiSearchRuleIndex
].bIPCSSupport
== IPV6_CS
)
604 Adapter
->PackInfo
[uiSearchRuleIndex
].ucIpVersion
= IPV6
;
608 Adapter
->PackInfo
[uiSearchRuleIndex
].ucIpVersion
= IPV4
;
611 /* To ensure that the ETH CS code doesn't gets executed if the BS doesn't supports ETH CS */
612 if(!Adapter
->bETHCSEnabled
)
613 Adapter
->PackInfo
[uiSearchRuleIndex
].bEthCSSupport
= 0;
615 if(psfLocalSet
->u8ServiceClassNameLength
> 0 &&
616 psfLocalSet
->u8ServiceClassNameLength
< 32)
618 memcpy(Adapter
->PackInfo
[uiSearchRuleIndex
].ucServiceClassName
,
619 psfLocalSet
->u8ServiceClassName
,
620 psfLocalSet
->u8ServiceClassNameLength
);
622 Adapter
->PackInfo
[uiSearchRuleIndex
].u8QueueType
=
623 psfLocalSet
->u8ServiceFlowSchedulingType
;
625 if(Adapter
->PackInfo
[uiSearchRuleIndex
].u8QueueType
==BE
&&
626 Adapter
->PackInfo
[uiSearchRuleIndex
].ucDirection
)
628 Adapter
->usBestEffortQueueIndex
=uiSearchRuleIndex
;
631 Adapter
->PackInfo
[uiSearchRuleIndex
].ulSFID
= ntohl(psfLocalSet
->u32SFID
);
633 Adapter
->PackInfo
[uiSearchRuleIndex
].u8TrafficPriority
= psfLocalSet
->u8TrafficPriority
;
635 //copy all the classifier in the Service Flow param structure
636 for(nIndex
=0; nIndex
<psfLocalSet
->u8TotalClassifiers
; nIndex
++)
638 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Classifier index =%d",nIndex
);
639 psfCSType
= &psfLocalSet
->cConvergenceSLTypes
[nIndex
];
640 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Classifier index =%d",nIndex
);
642 if(psfCSType
->cCPacketClassificationRule
.u8ClassifierRulePriority
)
644 Adapter
->PackInfo
[uiSearchRuleIndex
].bClassifierPriority
=TRUE
;
647 if(psfCSType
->cCPacketClassificationRule
.u8ClassifierRulePriority
)
649 Adapter
->PackInfo
[uiSearchRuleIndex
].bClassifierPriority
=TRUE
;
653 if(ucDsxType
== DSA_ACK
)
655 eClassifierAction
= eAddClassifier
;
657 else if(ucDsxType
== DSC_ACK
)
659 switch(psfCSType
->u8ClassfierDSCAction
)
661 case 0://DSC Add Classifier
663 eClassifierAction
= eAddClassifier
;
666 case 1://DSC Replace Classifier
668 eClassifierAction
= eReplaceClassifier
;
671 case 2://DSC Delete Classifier
673 eClassifierAction
= eDeleteClassifier
;
679 eClassifierAction
= eInvalidClassifierAction
;
684 u16PacketClassificationRuleIndex
= ntohs(psfCSType
->cCPacketClassificationRule
.u16PacketClassificationRuleIndex
);
686 switch(eClassifierAction
)
690 //Get a Free Classifier Index From Classifier table for this SF to add the Classifier
691 //Contained in this message
692 nClassifierIndex
= SearchClsid(Adapter
,ulSFID
,u16PacketClassificationRuleIndex
);
694 if(nClassifierIndex
> MAX_CLASSIFIERS
)
696 nClassifierIndex
= SearchFreeClsid(Adapter
);
697 if(nClassifierIndex
> MAX_CLASSIFIERS
)
699 //Failed To get a free Entry
700 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Error Failed To get a free Classifier Entry");
703 //Copy the Classifier Rule for this service flow into our Classifier table maintained per SF.
704 CopyClassifierRuleToSF(Adapter
,psfCSType
,uiSearchRuleIndex
,nClassifierIndex
);
709 //This Classifier Already Exists and it is invalid to Add Classifier with existing PCRI
710 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"CopyToAdapter : Error The Specified Classifier Already Exists \
711 and attempted To Add Classifier with Same PCRI : 0x%x\n", u16PacketClassificationRuleIndex
);
716 case eReplaceClassifier
:
718 //Get the Classifier Index From Classifier table for this SF and replace existing Classifier
719 //with the new classifier Contained in this message
720 nClassifierIndex
= SearchClsid(Adapter
,ulSFID
,u16PacketClassificationRuleIndex
);
721 if(nClassifierIndex
> MAX_CLASSIFIERS
)
723 //Failed To search the classifier
724 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Error Search for Classifier To be replaced failed");
727 //Copy the Classifier Rule for this service flow into our Classifier table maintained per SF.
728 CopyClassifierRuleToSF(Adapter
,psfCSType
,uiSearchRuleIndex
,nClassifierIndex
);
732 case eDeleteClassifier
:
734 //Get the Classifier Index From Classifier table for this SF and replace existing Classifier
735 //with the new classifier Contained in this message
736 nClassifierIndex
= SearchClsid(Adapter
,ulSFID
,u16PacketClassificationRuleIndex
);
737 if(nClassifierIndex
> MAX_CLASSIFIERS
)
739 //Failed To search the classifier
740 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Error Search for Classifier To be deleted failed");
744 //Delete This classifier
745 DeleteClassifierRuleFromSF(Adapter
,uiSearchRuleIndex
,nClassifierIndex
);
751 //Invalid Action for classifier
757 //Repeat parsing Classification Entries to process PHS Rules
758 for(nIndex
=0; nIndex
< psfLocalSet
->u8TotalClassifiers
; nIndex
++)
760 psfCSType
= &psfLocalSet
->cConvergenceSLTypes
[nIndex
];
762 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "psfCSType->u8PhsDSCAction : 0x%x\n",
763 psfCSType
->u8PhsDSCAction
);
765 switch (psfCSType
->u8PhsDSCAction
)
767 case eDeleteAllPHSRules
:
769 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Deleting All PHS Rules For VCID: 0x%X\n",uVCID
);
771 //Delete All the PHS rules for this Service flow
774 &Adapter
->stBCMPhsContext
,
781 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"PHS DSC Action = Delete PHS Rule \n");
783 if(psfCSType
->cPhsRule
.u8PHSI
)
786 &Adapter
->stBCMPhsContext
,
788 psfCSType
->cCPacketClassificationRule
.u8AssociatedPHSI
);
792 //BCM_DEBUG_PRINT(CONN_MSG,("Error CPHSRule.PHSI is ZERO \n"));
798 if(ucDsxType
== DSC_ACK
)
800 //BCM_DEBUG_PRINT(CONN_MSG,("Invalid PHS DSC Action For DSC \n",psfCSType->cPhsRule.u8PHSI));
801 break; //FOr DSC ACK Case PHS DSC Action must be in valid set
804 //Proceed To Add PHS rule for DSA_ACK case even if PHS DSC action is unspecified
805 //No Break Here . Intentionally!
810 if(psfCSType
->cPhsRule
.u8PHSI
)
812 //Apply This PHS Rule to all classifiers whose Associated PHSI Match
813 unsigned int uiClassifierIndex
= 0;
814 if(pstAddIndication
->u8Direction
== UPLINK_DIR
)
816 for(uiClassifierIndex
=0;uiClassifierIndex
<MAX_CLASSIFIERS
;uiClassifierIndex
++)
818 if((Adapter
->astClassifierTable
[uiClassifierIndex
].bUsed
) &&
819 (Adapter
->astClassifierTable
[uiClassifierIndex
].ulSFID
== Adapter
->PackInfo
[uiSearchRuleIndex
].ulSFID
) &&
820 (Adapter
->astClassifierTable
[uiClassifierIndex
].u8AssociatedPHSI
== psfCSType
->cPhsRule
.u8PHSI
))
822 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Adding PHS Rule For Classifier : 0x%x cPhsRule.u8PHSI : 0x%x\n",
823 Adapter
->astClassifierTable
[uiClassifierIndex
].uiClassifierRuleIndex
,
824 psfCSType
->cPhsRule
.u8PHSI
);
825 //Update The PHS Rule for this classifier as Associated PHSI id defined
828 sPhsRule
.u8PHSI
= psfCSType
->cPhsRule
.u8PHSI
;
829 sPhsRule
.u8PHSFLength
= psfCSType
->cPhsRule
.u8PHSFLength
;
830 sPhsRule
.u8PHSMLength
= psfCSType
->cPhsRule
.u8PHSMLength
;
831 sPhsRule
.u8PHSS
= psfCSType
->cPhsRule
.u8PHSS
;
832 sPhsRule
.u8PHSV
= psfCSType
->cPhsRule
.u8PHSV
;
833 memcpy(sPhsRule
.u8PHSF
,psfCSType
->cPhsRule
.u8PHSF
,MAX_PHS_LENGTHS
);
834 memcpy(sPhsRule
.u8PHSM
,psfCSType
->cPhsRule
.u8PHSM
,MAX_PHS_LENGTHS
);
835 sPhsRule
.u8RefCnt
= 0;
836 sPhsRule
.bUnclassifiedPHSRule
= FALSE
;
837 sPhsRule
.PHSModifiedBytes
= 0;
838 sPhsRule
.PHSModifiedNumPackets
= 0;
839 sPhsRule
.PHSErrorNumPackets
= 0;
841 //bPHSRuleAssociated = TRUE;
842 //Store The PHS Rule for this classifier
844 PhsUpdateClassifierRule(
845 &Adapter
->stBCMPhsContext
,
847 Adapter
->astClassifierTable
[uiClassifierIndex
].uiClassifierRuleIndex
,
849 Adapter
->astClassifierTable
[uiClassifierIndex
].u8AssociatedPHSI
);
851 //Update PHS Rule For the Classifier
854 Adapter
->astClassifierTable
[uiClassifierIndex
].u32PHSRuleID
= sPhsRule
.u8PHSI
;
855 memcpy(&Adapter
->astClassifierTable
[uiClassifierIndex
].sPhsRule
,&sPhsRule
,sizeof(S_PHS_RULE
));
863 //Error PHS Rule specified in signaling could not be applied to any classifier
866 sPhsRule
.u8PHSI
= psfCSType
->cPhsRule
.u8PHSI
;
867 sPhsRule
.u8PHSFLength
= psfCSType
->cPhsRule
.u8PHSFLength
;
868 sPhsRule
.u8PHSMLength
= psfCSType
->cPhsRule
.u8PHSMLength
;
869 sPhsRule
.u8PHSS
= psfCSType
->cPhsRule
.u8PHSS
;
870 sPhsRule
.u8PHSV
= psfCSType
->cPhsRule
.u8PHSV
;
871 memcpy(sPhsRule
.u8PHSF
,psfCSType
->cPhsRule
.u8PHSF
,MAX_PHS_LENGTHS
);
872 memcpy(sPhsRule
.u8PHSM
,psfCSType
->cPhsRule
.u8PHSM
,MAX_PHS_LENGTHS
);
873 sPhsRule
.u8RefCnt
= 0;
874 sPhsRule
.bUnclassifiedPHSRule
= TRUE
;
875 sPhsRule
.PHSModifiedBytes
= 0;
876 sPhsRule
.PHSModifiedNumPackets
= 0;
877 sPhsRule
.PHSErrorNumPackets
= 0;
878 //Store The PHS Rule for this classifier
881 Passing the argument u8PHSI instead of clsid. Because for DL with no classifier rule,
882 clsid will be zero hence we cant have multiple PHS rules for the same SF.
883 To support multiple PHS rule, passing u8PHSI.
886 PhsUpdateClassifierRule(
887 &Adapter
->stBCMPhsContext
,
901 if(psfLocalSet
->u32MaxSustainedTrafficRate
== 0 )
903 //No Rate Limit . Set Max Sustained Traffic Rate to Maximum
904 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxAllowedRate
=
905 WIMAX_MAX_ALLOWED_RATE
;
908 else if (ntohl(psfLocalSet
->u32MaxSustainedTrafficRate
) >
909 WIMAX_MAX_ALLOWED_RATE
)
911 //Too large Allowed Rate specified. Limiting to Wi Max Allowed rate
912 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxAllowedRate
=
913 WIMAX_MAX_ALLOWED_RATE
;
917 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxAllowedRate
=
918 ntohl(psfLocalSet
->u32MaxSustainedTrafficRate
);
921 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxLatency
= ntohl(psfLocalSet
->u32MaximumLatency
);
923 if(Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxLatency
== 0) /* 0 should be treated as infinite */
924 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxLatency
= MAX_LATENCY_ALLOWED
;
927 if(( Adapter
->PackInfo
[uiSearchRuleIndex
].u8QueueType
== ERTPS
||
928 Adapter
->PackInfo
[uiSearchRuleIndex
].u8QueueType
== UGS
) )
929 UGIValue
= ntohs(psfLocalSet
->u16UnsolicitedGrantInterval
);
932 UGIValue
= DEFAULT_UG_INTERVAL
;
935 For UGI based connections...
936 DEFAULT_UGI_FACTOR*UGIInterval worth of data is the max token count at host...
937 The extra amount of token is to ensure that a large amount of jitter won't have loss in throughput...
938 In case of non-UGI based connection, 200 frames worth of data is the max token count at host...
941 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxBucketSize
=
942 (DEFAULT_UGI_FACTOR
*Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxAllowedRate
*UGIValue
)/1000;
944 if(Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxBucketSize
< WIMAX_MAX_MTU
*8)
947 /* Special Handling to ensure the biggest size of packet can go out from host to FW as follows:
948 1. Any packet from Host to FW can go out in different packet size.
949 2. So in case the Bucket count is smaller than MTU, the packets of size (Size > TokenCount), will get dropped.
950 3. We can allow packets of MaxSize from Host->FW that can go out from FW in multiple SDUs by fragmentation at Wimax Layer
952 UGIFactor
= (Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxLatency
/UGIValue
+ 1);
954 if(UGIFactor
> DEFAULT_UGI_FACTOR
)
955 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxBucketSize
=
956 (UGIFactor
*Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxAllowedRate
*UGIValue
)/1000;
958 if(Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxBucketSize
> WIMAX_MAX_MTU
*8)
959 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxBucketSize
= WIMAX_MAX_MTU
*8;
963 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"LAT: %d, UGI: %d \n", Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxLatency
, UGIValue
);
964 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"uiMaxAllowedRate: 0x%x, u32MaxSustainedTrafficRate: 0x%x ,uiMaxBucketSize: 0x%x",
965 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxAllowedRate
,
966 ntohl(psfLocalSet
->u32MaxSustainedTrafficRate
),
967 Adapter
->PackInfo
[uiSearchRuleIndex
].uiMaxBucketSize
);
969 //copy the extended SF Parameters to Support MIBS
970 CopyMIBSExtendedSFParameters(Adapter
,psfLocalSet
,uiSearchRuleIndex
);
972 //store header suppression enabled flag per SF
973 Adapter
->PackInfo
[uiSearchRuleIndex
].bHeaderSuppressionEnabled
=
974 !(psfLocalSet
->u8RequesttransmissionPolicy
&
975 MASK_DISABLE_HEADER_SUPPRESSION
);
977 if(Adapter
->PackInfo
[uiSearchRuleIndex
].pstSFIndication
)
979 kfree(Adapter
->PackInfo
[uiSearchRuleIndex
].pstSFIndication
);
980 Adapter
->PackInfo
[uiSearchRuleIndex
].pstSFIndication
= NULL
;
982 Adapter
->PackInfo
[uiSearchRuleIndex
].pstSFIndication
= pstAddIndication
;
984 //Re Sort the SF list in PackInfo according to Traffic Priority
985 SortPackInfo(Adapter
);
987 /* Re Sort the Classifier Rules table and re - arrange
988 according to Classifier Rule Priority */
989 SortClassifiers(Adapter
);
991 DumpPhsRules(&Adapter
->stBCMPhsContext
);
993 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"%s <=====", __FUNCTION__
);
997 /***********************************************************************
998 * Function - DumpCmControlPacket
1000 * Description - This routinue Dumps the Contents of the AddIndication
1001 * Structure in the Connection Management Control Packet
1003 * Parameter - pvBuffer: Pointer to the buffer containing the
1004 * AddIndication data.
1007 *************************************************************************/
1008 static VOID
DumpCmControlPacket(PVOID pvBuffer
)
1012 stLocalSFAddIndicationAlt
*pstAddIndication
;
1013 UINT nCurClassifierCnt
;
1014 PMINI_ADAPTER Adapter
= GET_BCM_ADAPTER(gblpnetdev
);
1016 pstAddIndication
= (stLocalSFAddIndicationAlt
*)pvBuffer
;
1017 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "======>");
1019 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8Type : 0x%X",pstAddIndication
->u8Type
);
1020 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8Direction : 0x%X",pstAddIndication
->u8Direction
);
1021 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16TID: 0x%X", ntohs(pstAddIndication
->u16TID
));
1022 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16CID : 0x%X",ntohs(pstAddIndication
->u16CID
));
1023 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16VCID : 0x%X",ntohs(pstAddIndication
->u16VCID
));
1025 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " AuthorizedSet--->");
1027 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32SFID : 0x%X",htonl(pstAddIndication
->sfAuthorizedSet
.u32SFID
));
1028 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16CID : 0x%X",htons(pstAddIndication
->sfAuthorizedSet
.u16CID
));
1029 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ServiceClassNameLength : 0x%X",
1030 pstAddIndication
->sfAuthorizedSet
.u8ServiceClassNameLength
);
1032 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ServiceClassName : 0x%X ,0x%X , 0x%X, 0x%X, 0x%X, 0x%X",
1033 pstAddIndication
->sfAuthorizedSet
.u8ServiceClassName
[0],
1034 pstAddIndication
->sfAuthorizedSet
.u8ServiceClassName
[1],
1035 pstAddIndication
->sfAuthorizedSet
.u8ServiceClassName
[2],
1036 pstAddIndication
->sfAuthorizedSet
.u8ServiceClassName
[3],
1037 pstAddIndication
->sfAuthorizedSet
.u8ServiceClassName
[4],
1038 pstAddIndication
->sfAuthorizedSet
.u8ServiceClassName
[5]);
1040 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8MBSService : 0x%X",
1041 pstAddIndication
->sfAuthorizedSet
.u8MBSService
);
1042 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8QosParamSet : 0x%X",
1043 pstAddIndication
->sfAuthorizedSet
.u8QosParamSet
);
1044 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8TrafficPriority : 0x%X, %p",
1045 pstAddIndication
->sfAuthorizedSet
.u8TrafficPriority
, &pstAddIndication
->sfAuthorizedSet
.u8TrafficPriority
);
1047 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MaxSustainedTrafficRate : 0x%X 0x%p",
1048 pstAddIndication
->sfAuthorizedSet
.u32MaxSustainedTrafficRate
,
1049 &pstAddIndication
->sfAuthorizedSet
.u32MaxSustainedTrafficRate
);
1051 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MaxTrafficBurst : 0x%X",
1052 pstAddIndication
->sfAuthorizedSet
.u32MaxTrafficBurst
);
1053 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MinReservedTrafficRate : 0x%X",
1054 pstAddIndication
->sfAuthorizedSet
.u32MinReservedTrafficRate
);
1055 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificQoSParamLength : 0x%X",
1056 pstAddIndication
->sfAuthorizedSet
.u8VendorSpecificQoSParamLength
);
1057 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificQoSParam : 0x%X",
1058 pstAddIndication
->sfAuthorizedSet
.u8VendorSpecificQoSParam
[0]);
1059 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ServiceFlowSchedulingType : 0x%X",
1060 pstAddIndication
->sfAuthorizedSet
.u8ServiceFlowSchedulingType
);
1061 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32ToleratedJitter : 0x%X",
1062 pstAddIndication
->sfAuthorizedSet
.u32ToleratedJitter
);
1063 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MaximumLatency : 0x%X",
1064 pstAddIndication
->sfAuthorizedSet
.u32MaximumLatency
);
1065 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%X",
1066 pstAddIndication
->sfAuthorizedSet
.u8FixedLengthVSVariableLengthSDUIndicator
);
1068 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8SDUSize : 0x%X",
1069 pstAddIndication
->sfAuthorizedSet
.u8SDUSize
);
1070 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16TargetSAID : 0x%X",
1071 pstAddIndication
->sfAuthorizedSet
.u16TargetSAID
);
1072 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ARQEnable : 0x%X",
1073 pstAddIndication
->sfAuthorizedSet
.u8ARQEnable
);
1074 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQWindowSize : 0x%X",
1075 pstAddIndication
->sfAuthorizedSet
.u16ARQWindowSize
);
1076 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQRetryTxTimeOut : 0x%X",
1077 pstAddIndication
->sfAuthorizedSet
.u16ARQRetryTxTimeOut
);
1078 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQRetryRxTimeOut : 0x%X",
1079 pstAddIndication
->sfAuthorizedSet
.u16ARQRetryRxTimeOut
);
1080 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQBlockLifeTime : 0x%X",
1081 pstAddIndication
->sfAuthorizedSet
.u16ARQBlockLifeTime
);
1082 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQSyncLossTimeOut : 0x%X",
1083 pstAddIndication
->sfAuthorizedSet
.u16ARQSyncLossTimeOut
);
1084 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ARQDeliverInOrder : 0x%X",
1085 pstAddIndication
->sfAuthorizedSet
.u8ARQDeliverInOrder
);
1086 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQRxPurgeTimeOut : 0x%X",
1087 pstAddIndication
->sfAuthorizedSet
.u16ARQRxPurgeTimeOut
);
1088 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQBlockSize : 0x%X",
1089 pstAddIndication
->sfAuthorizedSet
.u16ARQBlockSize
);
1090 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8CSSpecification : 0x%X",
1091 pstAddIndication
->sfAuthorizedSet
.u8CSSpecification
);
1092 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8TypeOfDataDeliveryService : 0x%X",
1093 pstAddIndication
->sfAuthorizedSet
.u8TypeOfDataDeliveryService
);
1094 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16SDUInterArrivalTime : 0x%X",
1095 pstAddIndication
->sfAuthorizedSet
.u16SDUInterArrivalTime
);
1096 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16TimeBase : 0x%X",
1097 pstAddIndication
->sfAuthorizedSet
.u16TimeBase
);
1098 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8PagingPreference : 0x%X",
1099 pstAddIndication
->sfAuthorizedSet
.u8PagingPreference
);
1100 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16UnsolicitedPollingInterval : 0x%X",
1101 pstAddIndication
->sfAuthorizedSet
.u16UnsolicitedPollingInterval
);
1103 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "sfAuthorizedSet.u8HARQChannelMapping %x %x %x ",
1104 *(unsigned int*)pstAddIndication
->sfAuthorizedSet
.u8HARQChannelMapping
,
1105 *(unsigned int*)&pstAddIndication
->sfAuthorizedSet
.u8HARQChannelMapping
[4],
1106 *(USHORT
*) &pstAddIndication
->sfAuthorizedSet
.u8HARQChannelMapping
[8]);
1107 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8TrafficIndicationPreference : 0x%X",
1108 pstAddIndication
->sfAuthorizedSet
.u8TrafficIndicationPreference
);
1110 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " Total Classifiers Recieved : 0x%X",pstAddIndication
->sfAuthorizedSet
.u8TotalClassifiers
);
1112 nCurClassifierCnt
= pstAddIndication
->sfAuthorizedSet
.u8TotalClassifiers
;
1114 if(nCurClassifierCnt
> MAX_CLASSIFIERS_IN_SF
)
1116 nCurClassifierCnt
= MAX_CLASSIFIERS_IN_SF
;
1118 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "pstAddIndication->sfAuthorizedSet.bValid %d", pstAddIndication
->sfAuthorizedSet
.bValid
);
1119 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "pstAddIndication->sfAuthorizedSet.u16MacOverhead %x", pstAddIndication
->sfAuthorizedSet
.u16MacOverhead
);
1120 if(!pstAddIndication
->sfAuthorizedSet
.bValid
)
1121 pstAddIndication
->sfAuthorizedSet
.bValid
=1;
1122 for(nIndex
= 0 ; nIndex
< nCurClassifierCnt
; nIndex
++)
1124 stConvergenceSLTypes
*psfCSType
= NULL
;
1125 psfCSType
= &pstAddIndication
->sfAuthorizedSet
.cConvergenceSLTypes
[nIndex
];
1127 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "psfCSType = %p", psfCSType
);
1128 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "CCPacketClassificationRuleSI====>");
1130 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ClassifierRulePriority :0x%X ",
1131 psfCSType
->cCPacketClassificationRule
.u8ClassifierRulePriority
);
1132 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPTypeOfServiceLength :0x%X ",
1133 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfServiceLength
);
1135 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPTypeOfService[3] :0x%X ,0x%X ,0x%X ",
1136 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[0],
1137 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[1],
1138 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[2]);
1140 for(uiLoopIndex
=0; uiLoopIndex
< 1; uiLoopIndex
++)
1141 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8Protocol : 0x%02X ",
1142 psfCSType
->cCPacketClassificationRule
.u8Protocol
);
1144 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPMaskedSourceAddressLength :0x%X ",
1145 psfCSType
->cCPacketClassificationRule
.u8IPMaskedSourceAddressLength
);
1147 for(uiLoopIndex
=0; uiLoopIndex
< 32; uiLoopIndex
++)
1148 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPMaskedSourceAddress[32] : 0x%02X ",
1149 psfCSType
->cCPacketClassificationRule
.u8IPMaskedSourceAddress
[uiLoopIndex
]);
1151 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPDestinationAddressLength : 0x%X ",
1152 psfCSType
->cCPacketClassificationRule
.u8IPDestinationAddressLength
);
1154 for(uiLoopIndex
=0; uiLoopIndex
< 32; uiLoopIndex
++)
1155 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPDestinationAddress[32] : 0x%02X ",
1156 psfCSType
->cCPacketClassificationRule
.u8IPDestinationAddress
[uiLoopIndex
]);
1158 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ProtocolSourcePortRangeLength:0x%X ",
1159 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRangeLength
);
1160 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ProtocolSourcePortRange[4]: 0x%02X ,0x%02X ,0x%02X ,0x%02X ",
1161 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[0],
1162 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[1],
1163 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[2],
1164 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[3]);
1166 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ProtocolDestPortRangeLength : 0x%02X ",
1167 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRangeLength
);
1168 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ProtocolDestPortRange[4]: 0x%02X ,0x%02X ,0x%02X ,0x%02X ",
1169 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[0],
1170 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[1],
1171 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[2],
1172 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[3]);
1174 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthernetDestMacAddressLength : 0x%02X ",
1175 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddressLength
);
1177 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthernetDestMacAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1178 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[0],
1179 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[1],
1180 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[2],
1181 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[3],
1182 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[4],
1183 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[5]);
1185 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthernetSourceMACAddressLength : 0x%02X ",
1186 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddressLength
);
1188 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthernetSourceMACAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1189 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[0],
1190 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[1],
1191 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[2],
1192 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[3],
1193 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[4],
1194 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[5]);
1196 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthertypeLength : 0x%02X ",
1197 psfCSType
->cCPacketClassificationRule
.u8EthertypeLength
);
1198 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8Ethertype[3] : 0x%02X ,0x%02X ,0x%02X ",
1199 psfCSType
->cCPacketClassificationRule
.u8Ethertype
[0],
1200 psfCSType
->cCPacketClassificationRule
.u8Ethertype
[1],
1201 psfCSType
->cCPacketClassificationRule
.u8Ethertype
[2]);
1203 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16UserPriority : 0x%X ",
1204 psfCSType
->cCPacketClassificationRule
.u16UserPriority
);
1206 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16VLANID : 0x%X ",
1207 psfCSType
->cCPacketClassificationRule
.u16VLANID
);
1209 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8AssociatedPHSI : 0x%02X ",
1210 psfCSType
->cCPacketClassificationRule
.u8AssociatedPHSI
);
1212 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16PacketClassificationRuleIndex : 0x%X ",
1213 psfCSType
->cCPacketClassificationRule
.u16PacketClassificationRuleIndex
);
1215 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificClassifierParamLength : 0x%X ",
1216 psfCSType
->cCPacketClassificationRule
.u8VendorSpecificClassifierParamLength
);
1218 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificClassifierParam[1] : 0x%X ",
1219 psfCSType
->cCPacketClassificationRule
.u8VendorSpecificClassifierParam
[0]);
1221 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPv6FlowLableLength :0x%X ",
1222 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLableLength
);
1223 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPv6FlowLable[6] : 0x %02X %02X %02X %02X %02X %02X ",
1224 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[0],
1225 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[1],
1226 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[2],
1227 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[3],
1228 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[4],
1229 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[5]);
1233 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "bValid : 0x%02X",pstAddIndication
->sfAuthorizedSet
.bValid
);
1235 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "AdmittedSet--->");
1236 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32SFID : 0x%X",pstAddIndication
->sfAdmittedSet
.u32SFID
);
1237 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16CID : 0x%X",pstAddIndication
->sfAdmittedSet
.u16CID
);
1238 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ServiceClassNameLength : 0x%X",
1239 pstAddIndication
->sfAdmittedSet
.u8ServiceClassNameLength
);
1240 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ServiceClassName : 0x %02X %02X %02X %02X %02X %02X",
1241 pstAddIndication
->sfAdmittedSet
.u8ServiceClassName
[0],
1242 pstAddIndication
->sfAdmittedSet
.u8ServiceClassName
[1],
1243 pstAddIndication
->sfAdmittedSet
.u8ServiceClassName
[2],
1244 pstAddIndication
->sfAdmittedSet
.u8ServiceClassName
[3],
1245 pstAddIndication
->sfAdmittedSet
.u8ServiceClassName
[4],
1246 pstAddIndication
->sfAdmittedSet
.u8ServiceClassName
[5]);
1248 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8MBSService : 0x%02X",
1249 pstAddIndication
->sfAdmittedSet
.u8MBSService
);
1250 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8QosParamSet : 0x%02X",
1251 pstAddIndication
->sfAdmittedSet
.u8QosParamSet
);
1252 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8TrafficPriority : 0x%02X",
1253 pstAddIndication
->sfAdmittedSet
.u8TrafficPriority
);
1254 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MaxTrafficBurst : 0x%X",
1255 pstAddIndication
->sfAdmittedSet
.u32MaxTrafficBurst
);
1256 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MinReservedTrafficRate : 0x%X",
1257 pstAddIndication
->sfAdmittedSet
.u32MinReservedTrafficRate
);
1259 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificQoSParamLength : 0x%02X",
1260 pstAddIndication
->sfAdmittedSet
.u8VendorSpecificQoSParamLength
);
1261 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificQoSParam : 0x%02X",
1262 pstAddIndication
->sfAdmittedSet
.u8VendorSpecificQoSParam
[0]);
1263 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ServiceFlowSchedulingType : 0x%02X",
1264 pstAddIndication
->sfAdmittedSet
.u8ServiceFlowSchedulingType
);
1266 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32ToleratedJitter : 0x%X",
1267 pstAddIndication
->sfAdmittedSet
.u32ToleratedJitter
);
1268 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MaximumLatency : 0x%X",
1269 pstAddIndication
->sfAdmittedSet
.u32MaximumLatency
);
1271 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%02X",
1272 pstAddIndication
->sfAdmittedSet
.u8FixedLengthVSVariableLengthSDUIndicator
);
1273 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8SDUSize : 0x%02X",
1274 pstAddIndication
->sfAdmittedSet
.u8SDUSize
);
1275 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16TargetSAID : 0x%02X",
1276 pstAddIndication
->sfAdmittedSet
.u16TargetSAID
);
1277 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ARQEnable : 0x%02X",
1278 pstAddIndication
->sfAdmittedSet
.u8ARQEnable
);
1280 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQWindowSize : 0x%X",
1281 pstAddIndication
->sfAdmittedSet
.u16ARQWindowSize
);
1282 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQRetryTxTimeOut : 0x%X",
1283 pstAddIndication
->sfAdmittedSet
.u16ARQRetryTxTimeOut
);
1284 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQRetryRxTimeOut : 0x%X",
1285 pstAddIndication
->sfAdmittedSet
.u16ARQRetryRxTimeOut
);
1286 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQBlockLifeTime : 0x%X",
1287 pstAddIndication
->sfAdmittedSet
.u16ARQBlockLifeTime
);
1288 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQSyncLossTimeOut : 0x%X",
1289 pstAddIndication
->sfAdmittedSet
.u16ARQSyncLossTimeOut
);
1291 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ARQDeliverInOrder : 0x%02X",
1292 pstAddIndication
->sfAdmittedSet
.u8ARQDeliverInOrder
);
1293 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQRxPurgeTimeOut : 0x%X",
1294 pstAddIndication
->sfAdmittedSet
.u16ARQRxPurgeTimeOut
);
1295 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16ARQBlockSize : 0x%X",
1296 pstAddIndication
->sfAdmittedSet
.u16ARQBlockSize
);
1297 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8CSSpecification : 0x%02X",
1298 pstAddIndication
->sfAdmittedSet
.u8CSSpecification
);
1299 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8TypeOfDataDeliveryService : 0x%02X",
1300 pstAddIndication
->sfAdmittedSet
.u8TypeOfDataDeliveryService
);
1301 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16SDUInterArrivalTime : 0x%X",
1302 pstAddIndication
->sfAdmittedSet
.u16SDUInterArrivalTime
);
1303 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16TimeBase : 0x%X",
1304 pstAddIndication
->sfAdmittedSet
.u16TimeBase
);
1305 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8PagingPreference : 0x%X",
1306 pstAddIndication
->sfAdmittedSet
.u8PagingPreference
);
1309 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8TrafficIndicationPreference : 0x%02X",
1310 pstAddIndication
->sfAdmittedSet
.u8TrafficIndicationPreference
);
1312 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " Total Classifiers Recieved : 0x%X",pstAddIndication
->sfAdmittedSet
.u8TotalClassifiers
);
1314 nCurClassifierCnt
= pstAddIndication
->sfAdmittedSet
.u8TotalClassifiers
;
1316 if(nCurClassifierCnt
> MAX_CLASSIFIERS_IN_SF
)
1318 nCurClassifierCnt
= MAX_CLASSIFIERS_IN_SF
;
1322 for(nIndex
= 0 ; nIndex
< nCurClassifierCnt
; nIndex
++)
1325 stConvergenceSLTypes
*psfCSType
= NULL
;
1326 psfCSType
= &pstAddIndication
->sfAdmittedSet
.cConvergenceSLTypes
[nIndex
];
1328 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " CCPacketClassificationRuleSI====>");
1330 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ClassifierRulePriority :0x%02X ",
1331 psfCSType
->cCPacketClassificationRule
.u8ClassifierRulePriority
);
1332 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPTypeOfServiceLength :0x%02X",
1333 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfServiceLength
);
1335 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPTypeOfService[3] :0x%02X %02X %02X",
1336 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[0],
1337 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[1],
1338 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[2]);
1339 for(uiLoopIndex
=0; uiLoopIndex
< 1; uiLoopIndex
++)
1340 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8Protocol: 0x%02X ",
1341 psfCSType
->cCPacketClassificationRule
.u8Protocol
);
1343 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPMaskedSourceAddressLength :0x%02X ",
1344 psfCSType
->cCPacketClassificationRule
.u8IPMaskedSourceAddressLength
);
1346 for(uiLoopIndex
=0; uiLoopIndex
< 32; uiLoopIndex
++)
1347 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPMaskedSourceAddress[32] : 0x%02X ",
1348 psfCSType
->cCPacketClassificationRule
.u8IPMaskedSourceAddress
[uiLoopIndex
]);
1350 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPDestinationAddressLength : 0x%02X ",
1351 psfCSType
->cCPacketClassificationRule
.u8IPDestinationAddressLength
);
1353 for(uiLoopIndex
=0; uiLoopIndex
< 32; uiLoopIndex
++)
1354 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPDestinationAddress[32] : 0x%02X ",
1355 psfCSType
->cCPacketClassificationRule
.u8IPDestinationAddress
[uiLoopIndex
]);
1357 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ProtocolSourcePortRangeLength : 0x%02X ",
1358 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRangeLength
);
1360 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ProtocolSourcePortRange[4] : 0x %02X %02X %02X %02X ",
1361 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[0],
1362 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[1],
1363 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[2],
1364 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[3]);
1366 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ProtocolDestPortRangeLength : 0x%02X ",
1367 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRangeLength
);
1369 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ProtocolDestPortRange[4] : 0x %02X %02X %02X %02X ",
1370 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[0],
1371 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[1],
1372 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[2],
1373 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[3]);
1375 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthernetDestMacAddressLength : 0x%02X ",
1376 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddressLength
);
1378 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthernetDestMacAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1379 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[0],
1380 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[1],
1381 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[2],
1382 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[3],
1383 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[4],
1384 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[5]);
1386 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthernetSourceMACAddressLength : 0x%02X ",
1387 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddressLength
);
1389 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthernetSourceMACAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1390 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[0],
1391 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[1],
1392 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[2],
1393 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[3],
1394 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[4],
1395 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[5]);
1397 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthertypeLength : 0x%02X ",
1398 psfCSType
->cCPacketClassificationRule
.u8EthertypeLength
);
1399 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8Ethertype[3] : 0x%02X %02X %02X",
1400 psfCSType
->cCPacketClassificationRule
.u8Ethertype
[0],
1401 psfCSType
->cCPacketClassificationRule
.u8Ethertype
[1],
1402 psfCSType
->cCPacketClassificationRule
.u8Ethertype
[2]);
1404 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16UserPriority : 0x%X ",
1405 psfCSType
->cCPacketClassificationRule
.u16UserPriority
);
1406 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16VLANID : 0x%X ",
1407 psfCSType
->cCPacketClassificationRule
.u16VLANID
);
1408 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8AssociatedPHSI : 0x%02X ",
1409 psfCSType
->cCPacketClassificationRule
.u8AssociatedPHSI
);
1410 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16PacketClassificationRuleIndex : 0x%X ",
1411 psfCSType
->cCPacketClassificationRule
.u16PacketClassificationRuleIndex
);
1413 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificClassifierParamLength : 0x%02X",
1414 psfCSType
->cCPacketClassificationRule
.u8VendorSpecificClassifierParamLength
);
1415 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificClassifierParam[1] : 0x%02X ",
1416 psfCSType
->cCPacketClassificationRule
.u8VendorSpecificClassifierParam
[0]);
1418 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPv6FlowLableLength : 0x%X ",
1419 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLableLength
);
1420 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPv6FlowLable[6] : 0x %02X %02X %02X %02X %02X %02X ",
1421 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[0],
1422 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[1],
1423 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[2],
1424 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[3],
1425 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[4],
1426 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[5]);
1430 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "bValid : 0x%X",pstAddIndication
->sfAdmittedSet
.bValid
);
1432 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " ActiveSet--->");
1433 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32SFID : 0x%X",pstAddIndication
->sfActiveSet
.u32SFID
);
1434 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u16CID : 0x%X",pstAddIndication
->sfActiveSet
.u16CID
);
1436 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ServiceClassNameLength : 0x%X",
1437 pstAddIndication
->sfActiveSet
.u8ServiceClassNameLength
);
1439 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ServiceClassName : 0x %02X %02X %02X %02X %02X %02X",
1440 pstAddIndication
->sfActiveSet
.u8ServiceClassName
[0],
1441 pstAddIndication
->sfActiveSet
.u8ServiceClassName
[1],
1442 pstAddIndication
->sfActiveSet
.u8ServiceClassName
[2],
1443 pstAddIndication
->sfActiveSet
.u8ServiceClassName
[3],
1444 pstAddIndication
->sfActiveSet
.u8ServiceClassName
[4],
1445 pstAddIndication
->sfActiveSet
.u8ServiceClassName
[5]);
1447 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8MBSService : 0x%02X",
1448 pstAddIndication
->sfActiveSet
.u8MBSService
);
1449 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8QosParamSet : 0x%02X",
1450 pstAddIndication
->sfActiveSet
.u8QosParamSet
);
1451 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8TrafficPriority : 0x%02X",
1452 pstAddIndication
->sfActiveSet
.u8TrafficPriority
);
1453 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MaxTrafficBurst : 0x%X",
1454 pstAddIndication
->sfActiveSet
.u32MaxTrafficBurst
);
1455 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MinReservedTrafficRate : 0x%X",
1456 pstAddIndication
->sfActiveSet
.u32MinReservedTrafficRate
);
1457 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificQoSParamLength : 0x%02X",
1458 pstAddIndication
->sfActiveSet
.u8VendorSpecificQoSParamLength
);
1459 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8VendorSpecificQoSParam : 0x%02X",
1460 pstAddIndication
->sfActiveSet
.u8VendorSpecificQoSParam
[0]);
1461 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8ServiceFlowSchedulingType : 0x%02X",
1462 pstAddIndication
->sfActiveSet
.u8ServiceFlowSchedulingType
);
1464 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32ToleratedJitter : 0x%X",
1465 pstAddIndication
->sfActiveSet
.u32ToleratedJitter
);
1466 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u32MaximumLatency : 0x%X",
1467 pstAddIndication
->sfActiveSet
.u32MaximumLatency
);
1469 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%02X",
1470 pstAddIndication
->sfActiveSet
.u8FixedLengthVSVariableLengthSDUIndicator
);
1472 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8SDUSize : 0x%X",
1473 pstAddIndication
->sfActiveSet
.u8SDUSize
);
1474 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16TargetSAID : 0x%X",
1475 pstAddIndication
->sfActiveSet
.u16TargetSAID
);
1476 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8ARQEnable : 0x%X",
1477 pstAddIndication
->sfActiveSet
.u8ARQEnable
);
1478 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16ARQWindowSize : 0x%X",
1479 pstAddIndication
->sfActiveSet
.u16ARQWindowSize
);
1480 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16ARQRetryTxTimeOut : 0x%X",
1481 pstAddIndication
->sfActiveSet
.u16ARQRetryTxTimeOut
);
1482 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16ARQRetryRxTimeOut : 0x%X",
1483 pstAddIndication
->sfActiveSet
.u16ARQRetryRxTimeOut
);
1484 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16ARQBlockLifeTime : 0x%X",
1485 pstAddIndication
->sfActiveSet
.u16ARQBlockLifeTime
);
1486 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16ARQSyncLossTimeOut : 0x%X",
1487 pstAddIndication
->sfActiveSet
.u16ARQSyncLossTimeOut
);
1488 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8ARQDeliverInOrder : 0x%X",
1489 pstAddIndication
->sfActiveSet
.u8ARQDeliverInOrder
);
1490 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16ARQRxPurgeTimeOut : 0x%X",
1491 pstAddIndication
->sfActiveSet
.u16ARQRxPurgeTimeOut
);
1492 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16ARQBlockSize : 0x%X",
1493 pstAddIndication
->sfActiveSet
.u16ARQBlockSize
);
1494 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8CSSpecification : 0x%X",
1495 pstAddIndication
->sfActiveSet
.u8CSSpecification
);
1496 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8TypeOfDataDeliveryService : 0x%X",
1497 pstAddIndication
->sfActiveSet
.u8TypeOfDataDeliveryService
);
1498 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16SDUInterArrivalTime : 0x%X",
1499 pstAddIndication
->sfActiveSet
.u16SDUInterArrivalTime
);
1500 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16TimeBase : 0x%X",
1501 pstAddIndication
->sfActiveSet
.u16TimeBase
);
1502 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8PagingPreference : 0x%X",
1503 pstAddIndication
->sfActiveSet
.u8PagingPreference
);
1506 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8TrafficIndicationPreference : 0x%X",
1507 pstAddIndication
->sfActiveSet
.u8TrafficIndicationPreference
);
1509 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " Total Classifiers Recieved : 0x%X",pstAddIndication
->sfActiveSet
.u8TotalClassifiers
);
1511 nCurClassifierCnt
= pstAddIndication
->sfActiveSet
.u8TotalClassifiers
;
1513 if(nCurClassifierCnt
> MAX_CLASSIFIERS_IN_SF
)
1515 nCurClassifierCnt
= MAX_CLASSIFIERS_IN_SF
;
1518 for(nIndex
= 0 ; nIndex
< nCurClassifierCnt
; nIndex
++)
1521 stConvergenceSLTypes
*psfCSType
= NULL
;
1522 psfCSType
= &pstAddIndication
->sfActiveSet
.cConvergenceSLTypes
[nIndex
];
1525 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " CCPacketClassificationRuleSI====>");
1527 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8ClassifierRulePriority :0x%X ",
1528 psfCSType
->cCPacketClassificationRule
.u8ClassifierRulePriority
);
1529 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8IPTypeOfServiceLength :0x%X ",
1530 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfServiceLength
);
1532 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8IPTypeOfService[3] :0x%X ,0x%X ,0x%X ",
1533 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[0],
1534 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[1],
1535 psfCSType
->cCPacketClassificationRule
.u8IPTypeOfService
[2]);
1536 for(uiLoopIndex
=0; uiLoopIndex
< 1; uiLoopIndex
++)
1537 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8Protocol : 0x%X ",
1538 psfCSType
->cCPacketClassificationRule
.u8Protocol
);
1540 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPMaskedSourceAddressLength :0x%X ",
1541 psfCSType
->cCPacketClassificationRule
.u8IPMaskedSourceAddressLength
);
1543 for(uiLoopIndex
=0; uiLoopIndex
< 32; uiLoopIndex
++)
1544 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPMaskedSourceAddress[32]:0x%X ",
1545 psfCSType
->cCPacketClassificationRule
.u8IPMaskedSourceAddress
[uiLoopIndex
]);
1547 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8IPDestinationAddressLength : 0x%02X ",
1548 psfCSType
->cCPacketClassificationRule
.u8IPDestinationAddressLength
);
1550 for(uiLoopIndex
=0;uiLoopIndex
<32;uiLoopIndex
++)
1551 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8IPDestinationAddress[32]:0x%X ",
1552 psfCSType
->cCPacketClassificationRule
.u8IPDestinationAddress
[uiLoopIndex
]);
1554 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8ProtocolSourcePortRangeLength:0x%X ",
1555 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRangeLength
);
1557 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8ProtocolSourcePortRange[4]:0x%X ,0x%X ,0x%X ,0x%X ",
1558 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[0],
1559 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[1],
1560 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[2],
1561 psfCSType
->cCPacketClassificationRule
.u8ProtocolSourcePortRange
[3]);
1563 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8ProtocolDestPortRangeLength:0x%X ",
1564 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRangeLength
);
1566 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8ProtocolDestPortRange[4]:0x%X ,0x%X ,0x%X ,0x%X ",
1567 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[0],
1568 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[1],
1569 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[2],
1570 psfCSType
->cCPacketClassificationRule
.u8ProtocolDestPortRange
[3]);
1572 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8EthernetDestMacAddressLength:0x%X ",
1573 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddressLength
);
1575 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8EthernetDestMacAddress[6]:0x%X ,0x%X ,0x%X ,0x%X ,0x%X ,0x%X",
1576 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[0],
1577 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[1],
1578 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[2],
1579 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[3],
1580 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[4],
1581 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddress
[5]);
1583 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8EthernetSourceMACAddressLength:0x%X ",
1584 psfCSType
->cCPacketClassificationRule
.u8EthernetDestMacAddressLength
);
1586 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, "u8EthernetSourceMACAddress[6]:0x%X ,0x%X ,0x%X ,0x%X ,0x%X ,0x%X",
1587 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[0],
1588 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[1],
1589 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[2],
1590 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[3],
1591 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[4],
1592 psfCSType
->cCPacketClassificationRule
.u8EthernetSourceMACAddress
[5]);
1594 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8EthertypeLength :0x%X ",
1595 psfCSType
->cCPacketClassificationRule
.u8EthertypeLength
);
1596 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8Ethertype[3] :0x%X ,0x%X ,0x%X ",
1597 psfCSType
->cCPacketClassificationRule
.u8Ethertype
[0],
1598 psfCSType
->cCPacketClassificationRule
.u8Ethertype
[1],
1599 psfCSType
->cCPacketClassificationRule
.u8Ethertype
[2]);
1600 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16UserPriority :0x%X ",
1601 psfCSType
->cCPacketClassificationRule
.u16UserPriority
);
1602 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16VLANID :0x%X ",
1603 psfCSType
->cCPacketClassificationRule
.u16VLANID
);
1604 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8AssociatedPHSI :0x%X ",
1605 psfCSType
->cCPacketClassificationRule
.u8AssociatedPHSI
);
1606 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u16PacketClassificationRuleIndex:0x%X ",
1607 psfCSType
->cCPacketClassificationRule
.u16PacketClassificationRuleIndex
);
1609 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8VendorSpecificClassifierParamLength:0x%X ",
1610 psfCSType
->cCPacketClassificationRule
.u8VendorSpecificClassifierParamLength
);
1611 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8VendorSpecificClassifierParam[1]:0x%X ",
1612 psfCSType
->cCPacketClassificationRule
.u8VendorSpecificClassifierParam
[0]);
1614 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8IPv6FlowLableLength :0x%X ",
1615 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLableLength
);
1616 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " u8IPv6FlowLable[6] :0x%X ,0x%X ,0x%X ,0x%X ,0x%X ,0x%X ",
1617 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[0],
1618 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[1],
1619 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[2],
1620 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[3],
1621 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[4],
1622 psfCSType
->cCPacketClassificationRule
.u8IPv6FlowLable
[5]);
1626 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, DUMP_CONTROL
, DBG_LVL_ALL
, " bValid : 0x%X",pstAddIndication
->sfActiveSet
.bValid
);
1630 static inline ULONG
RestoreSFParam(PMINI_ADAPTER Adapter
, ULONG ulAddrSFParamSet
,PUCHAR pucDestBuffer
)
1632 UINT nBytesToRead
= sizeof(stServiceFlowParamSI
);
1634 if(ulAddrSFParamSet
== 0 || NULL
== pucDestBuffer
)
1636 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Got Param address as 0!!");
1639 ulAddrSFParamSet
= ntohl(ulAddrSFParamSet
);
1641 //Read out the SF Param Set At the indicated Location
1642 if(rdm(Adapter
, ulAddrSFParamSet
, (PUCHAR
)pucDestBuffer
, nBytesToRead
) < 0)
1643 return STATUS_FAILURE
;
1649 static ULONG
StoreSFParam(PMINI_ADAPTER Adapter
,PUCHAR pucSrcBuffer
,ULONG ulAddrSFParamSet
)
1651 UINT nBytesToWrite
= sizeof(stServiceFlowParamSI
);
1654 if(ulAddrSFParamSet
== 0 || NULL
== pucSrcBuffer
)
1659 ret
= wrm(Adapter
, ulAddrSFParamSet
, (u8
*)pucSrcBuffer
, nBytesToWrite
);
1661 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "%s:%d WRM failed",__FUNCTION__
, __LINE__
);
1667 ULONG
StoreCmControlResponseMessage(PMINI_ADAPTER Adapter
,PVOID pvBuffer
,UINT
*puBufferLength
)
1669 stLocalSFAddIndicationAlt
*pstAddIndicationAlt
= NULL
;
1670 stLocalSFAddIndication
* pstAddIndication
= NULL
;
1671 stLocalSFDeleteRequest
*pstDeletionRequest
;
1672 UINT uiSearchRuleIndex
;
1675 pstAddIndicationAlt
= (stLocalSFAddIndicationAlt
*)(pvBuffer
);
1678 * In case of DSD Req By MS, we should immediately delete this SF so that
1679 * we can stop the further classifying the pkt for this SF.
1681 if(pstAddIndicationAlt
->u8Type
== DSD_REQ
)
1683 pstDeletionRequest
= (stLocalSFDeleteRequest
*)pvBuffer
;
1685 ulSFID
= ntohl(pstDeletionRequest
->u32SFID
);
1686 uiSearchRuleIndex
=SearchSfid(Adapter
,ulSFID
);
1688 if(uiSearchRuleIndex
< NO_OF_QUEUES
)
1690 deleteSFBySfid(Adapter
,uiSearchRuleIndex
);
1691 Adapter
->u32TotalDSD
++;
1697 if( (pstAddIndicationAlt
->u8Type
== DSD_RSP
) ||
1698 (pstAddIndicationAlt
->u8Type
== DSD_ACK
))
1700 //No Special handling send the message as it is
1703 // For DSA_REQ, only upto "psfAuthorizedSet" parameter should be accessed by driver!
1705 pstAddIndication
=kmalloc(sizeof(*pstAddIndication
), GFP_KERNEL
);
1706 if(NULL
==pstAddIndication
)
1709 /* AUTHORIZED SET */
1710 pstAddIndication
->psfAuthorizedSet
= (stServiceFlowParamSI
*)
1711 GetNextTargetBufferLocation(Adapter
, pstAddIndicationAlt
->u16TID
);
1712 if(!pstAddIndication
->psfAuthorizedSet
)
1715 if(StoreSFParam(Adapter
,(PUCHAR
)&pstAddIndicationAlt
->sfAuthorizedSet
,
1716 (ULONG
)pstAddIndication
->psfAuthorizedSet
)!= 1)
1719 /* this can't possibly be right */
1720 pstAddIndication
->psfAuthorizedSet
= (stServiceFlowParamSI
*)ntohl((ULONG
)pstAddIndication
->psfAuthorizedSet
);
1722 if(pstAddIndicationAlt
->u8Type
== DSA_REQ
)
1724 stLocalSFAddRequest AddRequest
;
1726 AddRequest
.u8Type
= pstAddIndicationAlt
->u8Type
;
1727 AddRequest
.eConnectionDir
= pstAddIndicationAlt
->u8Direction
;
1728 AddRequest
.u16TID
= pstAddIndicationAlt
->u16TID
;
1729 AddRequest
.u16CID
= pstAddIndicationAlt
->u16CID
;
1730 AddRequest
.u16VCID
= pstAddIndicationAlt
->u16VCID
;
1731 AddRequest
.psfParameterSet
=pstAddIndication
->psfAuthorizedSet
;
1732 (*puBufferLength
) = sizeof(stLocalSFAddRequest
);
1733 memcpy(pvBuffer
,&AddRequest
,sizeof(stLocalSFAddRequest
));
1737 // Since it's not DSA_REQ, we can access all field in pstAddIndicationAlt
1739 //We need to extract the structure from the buffer and pack it differently
1741 pstAddIndication
->u8Type
= pstAddIndicationAlt
->u8Type
;
1742 pstAddIndication
->eConnectionDir
= pstAddIndicationAlt
->u8Direction
;
1743 pstAddIndication
->u16TID
= pstAddIndicationAlt
->u16TID
;
1744 pstAddIndication
->u16CID
= pstAddIndicationAlt
->u16CID
;
1745 pstAddIndication
->u16VCID
= pstAddIndicationAlt
->u16VCID
;
1746 pstAddIndication
->u8CC
= pstAddIndicationAlt
->u8CC
;
1749 pstAddIndication
->psfAdmittedSet
= (stServiceFlowParamSI
*)
1750 GetNextTargetBufferLocation(Adapter
, pstAddIndicationAlt
->u16TID
);
1751 if(!pstAddIndication
->psfAdmittedSet
)
1753 if(StoreSFParam(Adapter
,(PUCHAR
)&pstAddIndicationAlt
->sfAdmittedSet
,(ULONG
)pstAddIndication
->psfAdmittedSet
) != 1)
1756 pstAddIndication
->psfAdmittedSet
= (stServiceFlowParamSI
*)ntohl((ULONG
)pstAddIndication
->psfAdmittedSet
);
1760 pstAddIndication
->psfActiveSet
= (stServiceFlowParamSI
*)
1761 GetNextTargetBufferLocation(Adapter
, pstAddIndicationAlt
->u16TID
);
1762 if(!pstAddIndication
->psfActiveSet
)
1764 if(StoreSFParam(Adapter
,(PUCHAR
)&pstAddIndicationAlt
->sfActiveSet
,(ULONG
)pstAddIndication
->psfActiveSet
) != 1)
1767 pstAddIndication
->psfActiveSet
= (stServiceFlowParamSI
*)ntohl((ULONG
)pstAddIndication
->psfActiveSet
);
1769 (*puBufferLength
) = sizeof(stLocalSFAddIndication
);
1770 *(stLocalSFAddIndication
*)pvBuffer
= *pstAddIndication
;
1771 kfree(pstAddIndication
);
1776 static inline stLocalSFAddIndicationAlt
1777 *RestoreCmControlResponseMessage(register PMINI_ADAPTER Adapter
,register PVOID pvBuffer
)
1780 stLocalSFAddIndication
*pstAddIndication
= NULL
;
1781 stLocalSFAddIndicationAlt
*pstAddIndicationDest
= NULL
;
1782 pstAddIndication
= (stLocalSFAddIndication
*)(pvBuffer
);
1784 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "=====>" );
1785 if ((pstAddIndication
->u8Type
== DSD_REQ
) ||
1786 (pstAddIndication
->u8Type
== DSD_RSP
) ||
1787 (pstAddIndication
->u8Type
== DSD_ACK
))
1789 return (stLocalSFAddIndicationAlt
*)pvBuffer
;
1792 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Inside RestoreCmControlResponseMessage ");
1794 //Need to Allocate memory to contain the SUPER Large structures
1795 //Our driver cant create these structures on Stack :(
1797 pstAddIndicationDest
=kmalloc(sizeof(stLocalSFAddIndicationAlt
), GFP_KERNEL
);
1799 if(pstAddIndicationDest
)
1801 memset(pstAddIndicationDest
,0,sizeof(stLocalSFAddIndicationAlt
));
1805 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Failed to allocate memory for SF Add Indication Structure ");
1808 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "AddIndication-u8Type : 0x%X",pstAddIndication
->u8Type
);
1809 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "AddIndication-u8Direction : 0x%X",pstAddIndication
->eConnectionDir
);
1810 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "AddIndication-u8TID : 0x%X",ntohs(pstAddIndication
->u16TID
));
1811 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "AddIndication-u8CID : 0x%X",ntohs(pstAddIndication
->u16CID
));
1812 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "AddIndication-u16VCID : 0x%X",ntohs(pstAddIndication
->u16VCID
));
1813 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "AddIndication-autorized set loc : %p",pstAddIndication
->psfAuthorizedSet
);
1814 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "AddIndication-admitted set loc : %p",pstAddIndication
->psfAdmittedSet
);
1815 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "AddIndication-Active set loc : %p",pstAddIndication
->psfActiveSet
);
1817 pstAddIndicationDest
->u8Type
= pstAddIndication
->u8Type
;
1818 pstAddIndicationDest
->u8Direction
= pstAddIndication
->eConnectionDir
;
1819 pstAddIndicationDest
->u16TID
= pstAddIndication
->u16TID
;
1820 pstAddIndicationDest
->u16CID
= pstAddIndication
->u16CID
;
1821 pstAddIndicationDest
->u16VCID
= pstAddIndication
->u16VCID
;
1822 pstAddIndicationDest
->u8CC
= pstAddIndication
->u8CC
;
1824 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Restoring Active Set ");
1825 ulStatus
=RestoreSFParam(Adapter
,(ULONG
)pstAddIndication
->psfActiveSet
, (PUCHAR
)&pstAddIndicationDest
->sfActiveSet
);
1828 goto failed_restore_sf_param
;
1830 if(pstAddIndicationDest
->sfActiveSet
.u8TotalClassifiers
> MAX_CLASSIFIERS_IN_SF
)
1831 pstAddIndicationDest
->sfActiveSet
.u8TotalClassifiers
= MAX_CLASSIFIERS_IN_SF
;
1833 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Restoring Admitted Set ");
1834 ulStatus
=RestoreSFParam(Adapter
,(ULONG
)pstAddIndication
->psfAdmittedSet
,(PUCHAR
)&pstAddIndicationDest
->sfAdmittedSet
);
1837 goto failed_restore_sf_param
;
1839 if(pstAddIndicationDest
->sfAdmittedSet
.u8TotalClassifiers
> MAX_CLASSIFIERS_IN_SF
)
1840 pstAddIndicationDest
->sfAdmittedSet
.u8TotalClassifiers
= MAX_CLASSIFIERS_IN_SF
;
1842 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Restoring Authorized Set ");
1843 ulStatus
=RestoreSFParam(Adapter
,(ULONG
)pstAddIndication
->psfAuthorizedSet
,(PUCHAR
)&pstAddIndicationDest
->sfAuthorizedSet
);
1846 goto failed_restore_sf_param
;
1848 if(pstAddIndicationDest
->sfAuthorizedSet
.u8TotalClassifiers
> MAX_CLASSIFIERS_IN_SF
)
1849 pstAddIndicationDest
->sfAuthorizedSet
.u8TotalClassifiers
= MAX_CLASSIFIERS_IN_SF
;
1851 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Dumping the whole raw packet");
1852 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "============================================================");
1853 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, " pstAddIndicationDest->sfActiveSet size %zx %p", sizeof(*pstAddIndicationDest
), pstAddIndicationDest
);
1854 //BCM_DEBUG_PRINT_BUFFER(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, (unsigned char *)pstAddIndicationDest, sizeof(*pstAddIndicationDest));
1855 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "============================================================");
1856 return pstAddIndicationDest
;
1857 failed_restore_sf_param
:
1858 kfree(pstAddIndicationDest
);
1859 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "<=====" );
1863 ULONG
SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter
)
1865 ULONG ulTargetDsxBuffersBase
= 0;
1866 ULONG ulCntTargetBuffers
;
1871 BCM_DEBUG_PRINT(Adapter
, DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Adapter was NULL!!!");
1875 if(Adapter
->astTargetDsxBuffer
[0].ulTargetDsxBuffer
)
1878 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Size of Each DSX Buffer(Also size of ServiceFlowParamSI): %zx ",sizeof(stServiceFlowParamSI
));
1879 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Reading DSX buffer From Target location %x ",DSX_MESSAGE_EXCHANGE_BUFFER
);
1881 Status
= rdmalt(Adapter
, DSX_MESSAGE_EXCHANGE_BUFFER
,
1882 (PUINT
)&ulTargetDsxBuffersBase
, sizeof(UINT
));
1885 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "RDM failed!!");
1889 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Base Address Of DSX Target Buffer : 0x%lx",ulTargetDsxBuffersBase
);
1891 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Tgt Buffer is Now %lx :",ulTargetDsxBuffersBase
);
1893 ulCntTargetBuffers
= DSX_MESSAGE_EXCHANGE_BUFFER_SIZE
/sizeof(stServiceFlowParamSI
);
1895 Adapter
->ulTotalTargetBuffersAvailable
=
1896 ulCntTargetBuffers
> MAX_TARGET_DSX_BUFFERS
?
1897 MAX_TARGET_DSX_BUFFERS
: ulCntTargetBuffers
;
1899 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, " Total Target DSX Buffer setup %lx ",Adapter
->ulTotalTargetBuffersAvailable
);
1901 for(ulIndex
=0; ulIndex
< Adapter
->ulTotalTargetBuffersAvailable
; ulIndex
++)
1903 Adapter
->astTargetDsxBuffer
[ulIndex
].ulTargetDsxBuffer
= ulTargetDsxBuffersBase
;
1904 Adapter
->astTargetDsxBuffer
[ulIndex
].valid
=1;
1905 Adapter
->astTargetDsxBuffer
[ulIndex
].tid
=0;
1906 ulTargetDsxBuffersBase
+=sizeof(stServiceFlowParamSI
);
1907 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, " Target DSX Buffer %lx setup at 0x%lx",
1908 ulIndex
, Adapter
->astTargetDsxBuffer
[ulIndex
].ulTargetDsxBuffer
);
1910 Adapter
->ulCurrentTargetBuffer
= 0;
1911 Adapter
->ulFreeTargetBufferCnt
= Adapter
->ulTotalTargetBuffersAvailable
;
1915 static ULONG
GetNextTargetBufferLocation(PMINI_ADAPTER Adapter
,B_UINT16 tid
)
1917 ULONG ulTargetDSXBufferAddress
;
1918 ULONG ulTargetDsxBufferIndexToUse
,ulMaxTry
;
1920 if((Adapter
->ulTotalTargetBuffersAvailable
== 0)||
1921 (Adapter
->ulFreeTargetBufferCnt
== 0))
1923 ClearTargetDSXBuffer(Adapter
,tid
,FALSE
);
1927 ulTargetDsxBufferIndexToUse
= Adapter
->ulCurrentTargetBuffer
;
1928 ulMaxTry
= Adapter
->ulTotalTargetBuffersAvailable
;
1929 while((ulMaxTry
)&&(Adapter
->astTargetDsxBuffer
[ulTargetDsxBufferIndexToUse
].valid
!= 1))
1931 ulTargetDsxBufferIndexToUse
= (ulTargetDsxBufferIndexToUse
+1)%
1932 Adapter
->ulTotalTargetBuffersAvailable
;
1938 BCM_DEBUG_PRINT (Adapter
, DBG_TYPE_PRINTK
, 0, 0, "\n GetNextTargetBufferLocation : Error No Free Target DSX Buffers FreeCnt : %lx ",Adapter
->ulFreeTargetBufferCnt
);
1939 ClearTargetDSXBuffer(Adapter
,tid
,FALSE
);
1944 ulTargetDSXBufferAddress
=
1945 Adapter
->astTargetDsxBuffer
[ulTargetDsxBufferIndexToUse
].ulTargetDsxBuffer
;
1946 Adapter
->astTargetDsxBuffer
[ulTargetDsxBufferIndexToUse
].valid
=0;
1947 Adapter
->astTargetDsxBuffer
[ulTargetDsxBufferIndexToUse
].tid
=tid
;
1948 Adapter
->ulFreeTargetBufferCnt
--;
1951 ulTargetDsxBufferIndexToUse
=
1952 (ulTargetDsxBufferIndexToUse
+1)%Adapter
->ulTotalTargetBuffersAvailable
;
1953 Adapter
->ulCurrentTargetBuffer
= ulTargetDsxBufferIndexToUse
;
1954 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_PRINTK
, 0, 0, "GetNextTargetBufferLocation :Returning address %lx tid %d\n",
1955 ulTargetDSXBufferAddress
,tid
);
1956 return ulTargetDSXBufferAddress
;
1960 INT
AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter
)
1963 //Need to Allocate memory to contain the SUPER Large structures
1964 //Our driver cant create these structures on Stack
1966 Adapter
->caDsxReqResp
=kmalloc(sizeof(stLocalSFAddIndicationAlt
)+LEADER_SIZE
, GFP_KERNEL
);
1967 if(!Adapter
->caDsxReqResp
)
1972 INT
FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter
)
1974 if(Adapter
->caDsxReqResp
)
1976 kfree(Adapter
->caDsxReqResp
);
1982 @ingroup ctrl_pkt_functions
1983 This routinue would process the Control responses
1984 for the Connection Management.
1985 @return - Queue index for the free SFID else returns Invalid Index.
1987 BOOLEAN
CmControlResponseMessage(PMINI_ADAPTER Adapter
, /**<Pointer to the Adapter structure*/
1988 PVOID pvBuffer
/**Starting Address of the Buffer, that contains the AddIndication Data*/
1991 stServiceFlowParamSI
*psfLocalSet
=NULL
;
1992 stLocalSFAddIndicationAlt
*pstAddIndication
= NULL
;
1993 stLocalSFChangeIndicationAlt
*pstChangeIndication
= NULL
;
1994 PLEADER pLeader
=NULL
;
1996 //Otherwise the message contains a target address from where we need to
1997 //read out the rest of the service flow param structure
1999 if((pstAddIndication
= RestoreCmControlResponseMessage(Adapter
,pvBuffer
))
2002 ClearTargetDSXBuffer(Adapter
,((stLocalSFAddIndication
*)pvBuffer
)->u16TID
, FALSE
);
2003 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_PRINTK
, 0, 0, "Error in restoring Service Flow param structure from DSx message");
2007 DumpCmControlPacket(pstAddIndication
);
2008 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "====>");
2009 pLeader
= (PLEADER
)Adapter
->caDsxReqResp
;
2011 pLeader
->Status
=CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ
;
2014 ClearTargetDSXBuffer(Adapter
,pstAddIndication
->u16TID
,FALSE
);
2015 BCM_DEBUG_PRINT (Adapter
, DBG_TYPE_PRINTK
, 0, 0, "### TID RECEIVED %d\n",pstAddIndication
->u16TID
);
2016 switch(pstAddIndication
->u8Type
)
2020 pLeader
->PLength
= sizeof(stLocalSFAddIndicationAlt
);
2021 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "Sending DSA Response....\n");
2022 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "SENDING DSA RESPONSE TO MAC %d", pLeader
->PLength
);
2023 *((stLocalSFAddIndicationAlt
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
]))
2024 = *pstAddIndication
;
2025 ((stLocalSFAddIndicationAlt
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
]))->u8Type
= DSA_RSP
;
2027 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, " VCID = %x", ntohs(pstAddIndication
->u16VCID
));
2028 CopyBufferToControlPacket(Adapter
,(PVOID
)Adapter
->caDsxReqResp
);
2029 kfree(pstAddIndication
);
2034 pLeader
->PLength
= sizeof(stLocalSFAddIndicationAlt
);
2035 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "SENDING DSA ACK TO MAC %d",
2037 *((stLocalSFAddIndicationAlt
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
]))
2038 = *pstAddIndication
;
2039 ((stLocalSFAddIndicationAlt
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
]))->u8Type
= DSA_ACK
;
2041 }//no break here..we should go down.
2044 UINT uiSearchRuleIndex
=0;
2046 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "VCID:0x%X",
2047 ntohs(pstAddIndication
->u16VCID
));
2048 uiSearchRuleIndex
=SearchFreeSfid(Adapter
);
2049 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"uiSearchRuleIndex:0x%X ",
2051 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Direction:0x%X ",
2052 pstAddIndication
->u8Direction
);
2053 if((uiSearchRuleIndex
< NO_OF_QUEUES
) )
2055 Adapter
->PackInfo
[uiSearchRuleIndex
].ucDirection
=
2056 pstAddIndication
->u8Direction
;
2057 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "bValid:0x%X ",
2058 pstAddIndication
->sfActiveSet
.bValid
);
2059 if(pstAddIndication
->sfActiveSet
.bValid
==TRUE
)
2061 Adapter
->PackInfo
[uiSearchRuleIndex
].bActiveSet
=TRUE
;
2063 if(pstAddIndication
->sfAuthorizedSet
.bValid
==TRUE
)
2065 Adapter
->PackInfo
[uiSearchRuleIndex
].bAuthorizedSet
=TRUE
;
2067 if(pstAddIndication
->sfAdmittedSet
.bValid
==TRUE
)
2069 Adapter
->PackInfo
[uiSearchRuleIndex
].bAdmittedSet
=TRUE
;
2071 if(FALSE
== pstAddIndication
->sfActiveSet
.bValid
)
2073 Adapter
->PackInfo
[uiSearchRuleIndex
].bActive
= FALSE
;
2074 Adapter
->PackInfo
[uiSearchRuleIndex
].bActivateRequestSent
= FALSE
;
2075 if(pstAddIndication
->sfAdmittedSet
.bValid
)
2077 psfLocalSet
= &pstAddIndication
->sfAdmittedSet
;
2079 else if(pstAddIndication
->sfAuthorizedSet
.bValid
)
2081 psfLocalSet
= &pstAddIndication
->sfAuthorizedSet
;
2086 psfLocalSet
= &pstAddIndication
->sfActiveSet
;
2087 Adapter
->PackInfo
[uiSearchRuleIndex
].bActive
=TRUE
;
2092 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_PRINTK
, 0, 0, "No set is valid\n");
2093 Adapter
->PackInfo
[uiSearchRuleIndex
].bActive
=FALSE
;
2094 Adapter
->PackInfo
[uiSearchRuleIndex
].bValid
=FALSE
;
2095 Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
=0;
2096 kfree(pstAddIndication
);
2099 else if(psfLocalSet
->bValid
&& (pstAddIndication
->u8CC
== 0))
2101 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "DSA ACK");
2102 Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
=
2103 ntohs(pstAddIndication
->u16VCID
);
2104 Adapter
->PackInfo
[uiSearchRuleIndex
].usCID
=
2105 ntohs(pstAddIndication
->u16CID
);
2107 if(UPLINK_DIR
== pstAddIndication
->u8Direction
)
2108 atomic_set(&Adapter
->PackInfo
[uiSearchRuleIndex
].uiPerSFTxResourceCount
, DEFAULT_PERSFCOUNT
);
2109 CopyToAdapter(Adapter
,psfLocalSet
,uiSearchRuleIndex
,
2110 DSA_ACK
, pstAddIndication
);
2111 // don't free pstAddIndication
2113 /* Inside CopyToAdapter, Sorting of all the SFs take place.
2114 Hence any access to the newly added SF through uiSearchRuleIndex is invalid.
2115 SHOULD BE STRICTLY AVOIDED.
2117 // *(PULONG)(((PUCHAR)pvBuffer)+1)=psfLocalSet->u32SFID;
2118 memcpy((((PUCHAR
)pvBuffer
)+1), &psfLocalSet
->u32SFID
, 4);
2120 if(pstAddIndication
->sfActiveSet
.bValid
== TRUE
)
2122 if(UPLINK_DIR
== pstAddIndication
->u8Direction
)
2124 if(!Adapter
->LinkUpStatus
)
2126 netif_carrier_on(Adapter
->dev
);
2127 netif_start_queue(Adapter
->dev
);
2128 Adapter
->LinkUpStatus
= 1;
2129 if (netif_msg_link(Adapter
))
2130 pr_info(PFX
"%s: link up\n", Adapter
->dev
->name
);
2131 atomic_set(&Adapter
->TxPktAvail
, 1);
2132 wake_up(&Adapter
->tx_packet_wait_queue
);
2133 Adapter
->liTimeSinceLastNetEntry
= get_seconds();
2141 Adapter
->PackInfo
[uiSearchRuleIndex
].bActive
=FALSE
;
2142 Adapter
->PackInfo
[uiSearchRuleIndex
].bValid
=FALSE
;
2143 Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
=0;
2144 kfree(pstAddIndication
);
2149 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_PRINTK
, 0, 0, "DSA ACK did not get valid SFID");
2150 kfree(pstAddIndication
);
2157 pLeader
->PLength
= sizeof(stLocalSFChangeIndicationAlt
);
2158 pstChangeIndication
= (stLocalSFChangeIndicationAlt
*)pstAddIndication
;
2159 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "SENDING DSC RESPONSE TO MAC %d", pLeader
->PLength
);
2161 *((stLocalSFChangeIndicationAlt
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
])) = *pstChangeIndication
;
2162 ((stLocalSFChangeIndicationAlt
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
]))->u8Type
= DSC_RSP
;
2164 CopyBufferToControlPacket(Adapter
,(PVOID
)Adapter
->caDsxReqResp
);
2165 kfree(pstAddIndication
);
2170 pLeader
->PLength
= sizeof(stLocalSFChangeIndicationAlt
);
2171 pstChangeIndication
= (stLocalSFChangeIndicationAlt
*)pstAddIndication
;
2172 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "SENDING DSC ACK TO MAC %d", pLeader
->PLength
);
2173 *((stLocalSFChangeIndicationAlt
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
])) = *pstChangeIndication
;
2174 ((stLocalSFChangeIndicationAlt
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
]))->u8Type
= DSC_ACK
;
2178 UINT uiSearchRuleIndex
=0;
2180 pstChangeIndication
= (stLocalSFChangeIndicationAlt
*)pstAddIndication
;
2181 uiSearchRuleIndex
=SearchSfid(Adapter
,ntohl(pstChangeIndication
->sfActiveSet
.u32SFID
));
2182 if(uiSearchRuleIndex
> NO_OF_QUEUES
-1)
2184 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_PRINTK
, 0, 0, "SF doesn't exist for which DSC_ACK is received");
2186 if((uiSearchRuleIndex
< NO_OF_QUEUES
))
2188 Adapter
->PackInfo
[uiSearchRuleIndex
].ucDirection
= pstChangeIndication
->u8Direction
;
2189 if(pstChangeIndication
->sfActiveSet
.bValid
==TRUE
)
2191 Adapter
->PackInfo
[uiSearchRuleIndex
].bActiveSet
=TRUE
;
2193 if(pstChangeIndication
->sfAuthorizedSet
.bValid
==TRUE
)
2195 Adapter
->PackInfo
[uiSearchRuleIndex
].bAuthorizedSet
=TRUE
;
2197 if(pstChangeIndication
->sfAdmittedSet
.bValid
==TRUE
)
2199 Adapter
->PackInfo
[uiSearchRuleIndex
].bAdmittedSet
=TRUE
;
2202 if(FALSE
==pstChangeIndication
->sfActiveSet
.bValid
)
2204 Adapter
->PackInfo
[uiSearchRuleIndex
].bActive
= FALSE
;
2205 Adapter
->PackInfo
[uiSearchRuleIndex
].bActivateRequestSent
= FALSE
;
2206 if(pstChangeIndication
->sfAdmittedSet
.bValid
)
2208 psfLocalSet
= &pstChangeIndication
->sfAdmittedSet
;
2210 else if(pstChangeIndication
->sfAuthorizedSet
.bValid
)
2212 psfLocalSet
= &pstChangeIndication
->sfAuthorizedSet
;
2218 psfLocalSet
= &pstChangeIndication
->sfActiveSet
;
2219 Adapter
->PackInfo
[uiSearchRuleIndex
].bActive
=TRUE
;
2221 if(psfLocalSet
->bValid
&& (pstChangeIndication
->u8CC
== 0))
2223 Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
=
2224 ntohs(pstChangeIndication
->u16VCID
);
2225 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_PRINTK
, 0, 0, "CC field is %d bvalid = %d\n",
2226 pstChangeIndication
->u8CC
, psfLocalSet
->bValid
);
2227 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_PRINTK
, 0, 0, "VCID= %d\n", ntohs(pstChangeIndication
->u16VCID
));
2228 Adapter
->PackInfo
[uiSearchRuleIndex
].usCID
=
2229 ntohs(pstChangeIndication
->u16CID
);
2230 CopyToAdapter(Adapter
,psfLocalSet
,uiSearchRuleIndex
,
2231 DSC_ACK
, pstAddIndication
);
2233 *(PULONG
)(((PUCHAR
)pvBuffer
)+1)=psfLocalSet
->u32SFID
;
2235 else if(pstChangeIndication
->u8CC
== 6)
2237 deleteSFBySfid(Adapter
,uiSearchRuleIndex
);
2238 kfree(pstAddIndication
);
2243 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_PRINTK
, 0, 0, "DSC ACK did not get valid SFID");
2244 kfree(pstAddIndication
);
2251 UINT uiSearchRuleIndex
;
2254 pLeader
->PLength
= sizeof(stLocalSFDeleteIndication
);
2255 *((stLocalSFDeleteIndication
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
])) = *((stLocalSFDeleteIndication
*)pstAddIndication
);
2257 ulSFID
= ntohl(((stLocalSFDeleteIndication
*)pstAddIndication
)->u32SFID
);
2258 uiSearchRuleIndex
=SearchSfid(Adapter
,ulSFID
);
2259 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "DSD - Removing connection %x",uiSearchRuleIndex
);
2261 if(uiSearchRuleIndex
< NO_OF_QUEUES
)
2263 //Delete All Classifiers Associated with this SFID
2264 deleteSFBySfid(Adapter
,uiSearchRuleIndex
);
2265 Adapter
->u32TotalDSD
++;
2268 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "SENDING DSD RESPONSE TO MAC");
2269 ((stLocalSFDeleteIndication
*)&(Adapter
->caDsxReqResp
[LEADER_SIZE
]))->u8Type
= DSD_RSP
;
2270 CopyBufferToControlPacket(Adapter
,(PVOID
)Adapter
->caDsxReqResp
);
2274 //Do nothing as SF has already got Deleted
2278 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "DSD ACK Rcd, let App handle it\n");
2281 kfree(pstAddIndication
);
2287 int get_dsx_sf_data_to_application(PMINI_ADAPTER Adapter
, UINT uiSFId
, void __user
*user_buffer
)
2290 struct _packet_info
*psSfInfo
=NULL
;
2291 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "status =%d",status
);
2292 status
= SearchSfid(Adapter
, uiSFId
);
2293 if (status
>= NO_OF_QUEUES
) {
2294 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "SFID %d not present in queue !!!", uiSFId
);
2297 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "status =%d",status
);
2298 psSfInfo
=&Adapter
->PackInfo
[status
];
2299 if(psSfInfo
->pstSFIndication
&& copy_to_user(user_buffer
,
2300 psSfInfo
->pstSFIndication
, sizeof(stLocalSFAddIndicationAlt
)))
2302 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_PRINTK
, 0, 0, "copy to user failed SFID %d, present in queue !!!", uiSFId
);
2306 return STATUS_SUCCESS
;
2309 VOID
OverrideServiceFlowParams(PMINI_ADAPTER Adapter
,PUINT puiBuffer
)
2311 B_UINT32 u32NumofSFsinMsg
= ntohl(*(puiBuffer
+ 1));
2312 stIM_SFHostNotify
*pHostInfo
= NULL
;
2313 UINT uiSearchRuleIndex
= 0;
2318 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "u32NumofSFsinMsg: 0x%x\n",u32NumofSFsinMsg
);
2320 while(u32NumofSFsinMsg
!= 0 && u32NumofSFsinMsg
< NO_OF_QUEUES
)
2323 pHostInfo
= (stIM_SFHostNotify
*)puiBuffer
;
2324 puiBuffer
= (PUINT
)(pHostInfo
+ 1);
2326 ulSFID
= ntohl(pHostInfo
->SFID
);
2327 uiSearchRuleIndex
=SearchSfid(Adapter
,ulSFID
);
2328 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"SFID: 0x%lx\n",ulSFID
);
2330 if(uiSearchRuleIndex
>= NO_OF_QUEUES
|| uiSearchRuleIndex
== HiPriority
)
2332 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"The SFID <%lx> doesn't exist in host entry or is Invalid\n", ulSFID
);
2336 if(pHostInfo
->RetainSF
== FALSE
)
2338 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"Going to Delete SF");
2339 deleteSFBySfid(Adapter
,uiSearchRuleIndex
);
2344 Adapter
->PackInfo
[uiSearchRuleIndex
].usVCID_Value
= ntohs(pHostInfo
->VCID
);
2345 Adapter
->PackInfo
[uiSearchRuleIndex
].usCID
= ntohs(pHostInfo
->newCID
);
2346 Adapter
->PackInfo
[uiSearchRuleIndex
].bActive
=FALSE
;
2348 BCM_DEBUG_PRINT(Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
,"pHostInfo->QoSParamSet: 0x%x\n",pHostInfo
->QoSParamSet
);
2350 if(pHostInfo
->QoSParamSet
& 0x1)
2351 Adapter
->PackInfo
[uiSearchRuleIndex
].bAuthorizedSet
=TRUE
;
2352 if(pHostInfo
->QoSParamSet
& 0x2)
2353 Adapter
->PackInfo
[uiSearchRuleIndex
].bAdmittedSet
=TRUE
;
2354 if(pHostInfo
->QoSParamSet
& 0x4)
2356 Adapter
->PackInfo
[uiSearchRuleIndex
].bActiveSet
=TRUE
;
2357 Adapter
->PackInfo
[uiSearchRuleIndex
].bActive
=TRUE
;