1 /************************************************************
3 * This file contains the routines for handling Connnection
5 ************************************************************/
10 typedef enum _E_CLASSIFIER_ACTION
12 eInvalidClassifierAction,
19 /************************************************************
20 * Function - SearchSfid
22 * Description - This routinue would search QOS queues having
23 * specified SFID as input parameter.
25 * Parameters - Adapter: Pointer to the Adapter structure
26 * uiSfid : Given SFID for matching
28 * Returns - Queue index for this SFID(If matched)
29 Else Invalid Queue Index(If Not matched)
30 ************************************************************/
31 __inline INT SearchSfid(PMINI_ADAPTER Adapter,UINT uiSfid)
34 for(iIndex=(NO_OF_QUEUES-1); iIndex>=0; iIndex--)
35 if(Adapter->PackInfo[iIndex].ulSFID==uiSfid)
37 return NO_OF_QUEUES+1;
40 /***************************************************************
41 * Function - SearchFreeSfid
43 * Description - This routinue would search Free available SFID.
45 * Parameter - Adapter: Pointer to the Adapter structure
47 * Returns - Queue index for the free SFID
48 * Else returns Invalid Index.
49 ****************************************************************/
50 __inline INT SearchFreeSfid(PMINI_ADAPTER Adapter)
53 for(uiIndex=0; uiIndex < (NO_OF_QUEUES-1); uiIndex++)
54 if(Adapter->PackInfo[uiIndex].ulSFID==0)
56 return NO_OF_QUEUES+1;
59 __inline int SearchVcid(PMINI_ADAPTER Adapter,unsigned short usVcid)
62 for(iIndex=(NO_OF_QUEUES-1);iIndex>=0;iIndex--)
63 if(Adapter->PackInfo[iIndex].usVCID_Value == usVcid)
65 return NO_OF_QUEUES+1;
72 Description: This routinue would search Classifier having specified ClassifierID as input parameter
73 Input parameters: PMINI_ADAPTER Adapter - Adapter Context
74 unsigned int uiSfid - The SF in which the classifier is to searched
75 B_UINT16 uiClassifierID - The classifier ID to be searched
76 Return: int :Classifier table index of matching entry
79 __inline int SearchClsid(PMINI_ADAPTER Adapter,ULONG ulSFID,B_UINT16 uiClassifierID)
81 unsigned int uiClassifierIndex = 0;
82 for(uiClassifierIndex=0;uiClassifierIndex<MAX_CLASSIFIERS;uiClassifierIndex++)
84 if((Adapter->astClassifierTable[uiClassifierIndex].bUsed) &&
85 (Adapter->astClassifierTable[uiClassifierIndex].uiClassifierRuleIndex == uiClassifierID)&&
86 (Adapter->astClassifierTable[uiClassifierIndex].ulSFID == ulSFID))
87 return uiClassifierIndex;
89 return MAX_CLASSIFIERS+1;
93 @ingroup ctrl_pkt_functions
94 This routinue would search Free available Classifier entry in classifier table.
95 @return free Classifier Entry index in classifier table for specified SF
97 static __inline int SearchFreeClsid(PMINI_ADAPTER Adapter /**Adapter Context*/
100 unsigned int uiClassifierIndex = 0;
101 for(uiClassifierIndex=0;uiClassifierIndex<MAX_CLASSIFIERS;uiClassifierIndex++)
103 if(!Adapter->astClassifierTable[uiClassifierIndex].bUsed)
104 return uiClassifierIndex;
106 return MAX_CLASSIFIERS+1;
109 VOID deleteSFBySfid(PMINI_ADAPTER Adapter, UINT uiSearchRuleIndex)
111 //deleting all the packet held in the SF
112 flush_queue(Adapter,uiSearchRuleIndex);
114 //Deleting the all classifiers for this SF
115 DeleteAllClassifiersForSF(Adapter,uiSearchRuleIndex);
117 //Resetting only MIBS related entries in the SF
118 memset((PVOID)&Adapter->PackInfo[uiSearchRuleIndex], 0, sizeof(S_MIBS_SERVICEFLOW_TABLE));
122 CopyIpAddrToClassifier(S_CLASSIFIER_RULE *pstClassifierEntry ,
123 B_UINT8 u8IpAddressLen , B_UINT8 *pu8IpAddressMaskSrc ,
124 BOOLEAN bIpVersion6 , E_IPADDR_CONTEXT eIpAddrContext)
127 UINT nSizeOfIPAddressInBytes = IP_LENGTH_OF_ADDRESS;
128 UCHAR *ptrClassifierIpAddress = NULL;
129 UCHAR *ptrClassifierIpMask = NULL;
130 PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
134 nSizeOfIPAddressInBytes = IPV6_ADDRESS_SIZEINBYTES;
136 //Destination Ip Address
137 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Ip Address Range Length:0x%X ",
139 if((bIpVersion6?(IPV6_ADDRESS_SIZEINBYTES * MAX_IP_RANGE_LENGTH * 2):
140 (TOTAL_MASKED_ADDRESS_IN_BYTES)) >= u8IpAddressLen)
143 //checking both the mask and address togethor in Classification.
144 //So length will be : TotalLengthInBytes/nSizeOfIPAddressInBytes * 2
145 //(nSizeOfIPAddressInBytes for address and nSizeOfIPAddressInBytes for mask)
147 if(eIpAddrContext == eDestIpAddress)
149 pstClassifierEntry->ucIPDestinationAddressLength =
150 u8IpAddressLen/(nSizeOfIPAddressInBytes * 2);
153 ptrClassifierIpAddress =
154 pstClassifierEntry->stDestIpAddress.ucIpv6Address;
155 ptrClassifierIpMask =
156 pstClassifierEntry->stDestIpAddress.ucIpv6Mask;
160 ptrClassifierIpAddress =
161 pstClassifierEntry->stDestIpAddress.ucIpv4Address;
162 ptrClassifierIpMask =
163 pstClassifierEntry->stDestIpAddress.ucIpv4Mask;
166 else if(eIpAddrContext == eSrcIpAddress)
168 pstClassifierEntry->ucIPSourceAddressLength =
169 u8IpAddressLen/(nSizeOfIPAddressInBytes * 2);
172 ptrClassifierIpAddress =
173 pstClassifierEntry->stSrcIpAddress.ucIpv6Address;
174 ptrClassifierIpMask =
175 pstClassifierEntry->stSrcIpAddress.ucIpv6Mask;
179 ptrClassifierIpAddress =
180 pstClassifierEntry->stSrcIpAddress.ucIpv4Address;
181 ptrClassifierIpMask =
182 pstClassifierEntry->stSrcIpAddress.ucIpv4Mask;
185 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Address Length:0x%X \n",
186 pstClassifierEntry->ucIPDestinationAddressLength);
187 while((u8IpAddressLen>= nSizeOfIPAddressInBytes) &&
188 (ucLoopIndex < MAX_IP_RANGE_LENGTH))
190 memcpy(ptrClassifierIpAddress +
191 (ucLoopIndex * nSizeOfIPAddressInBytes),
192 (pu8IpAddressMaskSrc+(ucLoopIndex*nSizeOfIPAddressInBytes*2)),
193 nSizeOfIPAddressInBytes);
196 if(eIpAddrContext == eSrcIpAddress)
198 pstClassifierEntry->stSrcIpAddress.ulIpv4Addr[ucLoopIndex]=
199 ntohl(pstClassifierEntry->stSrcIpAddress.
200 ulIpv4Addr[ucLoopIndex]);
201 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Src Ip Address:0x%luX ",pstClassifierEntry->stSrcIpAddress.ulIpv4Addr[ucLoopIndex]);
203 else if(eIpAddrContext == eDestIpAddress)
205 pstClassifierEntry->stDestIpAddress.ulIpv4Addr[ucLoopIndex]= ntohl(pstClassifierEntry->stDestIpAddress.
206 ulIpv4Addr[ucLoopIndex]);
207 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Dest Ip Address:0x%luX ",pstClassifierEntry->stDestIpAddress.ulIpv4Addr[ucLoopIndex]);
210 u8IpAddressLen-=nSizeOfIPAddressInBytes;
211 if(u8IpAddressLen >= nSizeOfIPAddressInBytes)
213 memcpy(ptrClassifierIpMask +
214 (ucLoopIndex * nSizeOfIPAddressInBytes),
215 (pu8IpAddressMaskSrc+nSizeOfIPAddressInBytes +
216 (ucLoopIndex*nSizeOfIPAddressInBytes*2)),
217 nSizeOfIPAddressInBytes);
220 if(eIpAddrContext == eSrcIpAddress)
222 pstClassifierEntry->stSrcIpAddress.
223 ulIpv4Mask[ucLoopIndex]=
224 ntohl(pstClassifierEntry->stSrcIpAddress.
225 ulIpv4Mask[ucLoopIndex]);
226 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Src Ip Mask Address:0x%luX ",pstClassifierEntry->stSrcIpAddress.ulIpv4Mask[ucLoopIndex]);
228 else if(eIpAddrContext == eDestIpAddress)
230 pstClassifierEntry->stDestIpAddress.
231 ulIpv4Mask[ucLoopIndex] =
232 ntohl(pstClassifierEntry->stDestIpAddress.
233 ulIpv4Mask[ucLoopIndex]);
234 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Dest Ip Mask Address:0x%luX ",pstClassifierEntry->stDestIpAddress.ulIpv4Mask[ucLoopIndex]);
237 u8IpAddressLen-=nSizeOfIPAddressInBytes;
239 if(0==u8IpAddressLen)
241 pstClassifierEntry->bDestIpValid=TRUE;
247 //Restore EndianNess of Struct
248 for(ucLoopIndex =0 ; ucLoopIndex < MAX_IP_RANGE_LENGTH * 4 ;
251 if(eIpAddrContext == eSrcIpAddress)
253 pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[ucLoopIndex]=
254 ntohl(pstClassifierEntry->stSrcIpAddress.
255 ulIpv6Addr[ucLoopIndex]);
256 pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[ucLoopIndex]= ntohl(pstClassifierEntry->stSrcIpAddress.
257 ulIpv6Mask[ucLoopIndex]);
259 else if(eIpAddrContext == eDestIpAddress)
261 pstClassifierEntry->stDestIpAddress.ulIpv6Addr[ucLoopIndex]= ntohl(pstClassifierEntry->stDestIpAddress.
262 ulIpv6Addr[ucLoopIndex]);
263 pstClassifierEntry->stDestIpAddress.ulIpv6Mask[ucLoopIndex]= ntohl(pstClassifierEntry->stDestIpAddress.
264 ulIpv6Mask[ucLoopIndex]);
272 void ClearTargetDSXBuffer(PMINI_ADAPTER Adapter,B_UINT16 TID,BOOLEAN bFreeAll)
275 for(ulIndex=0; ulIndex < Adapter->ulTotalTargetBuffersAvailable; ulIndex++)
277 if(Adapter->astTargetDsxBuffer[ulIndex].valid)
279 if ((bFreeAll) || (Adapter->astTargetDsxBuffer[ulIndex].tid == TID)){
280 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "ClearTargetDSXBuffer: found tid %d buffer cleared %lx\n",
281 TID, Adapter->astTargetDsxBuffer[ulIndex].ulTargetDsxBuffer);
282 Adapter->astTargetDsxBuffer[ulIndex].valid=1;
283 Adapter->astTargetDsxBuffer[ulIndex].tid=0;
284 Adapter->ulFreeTargetBufferCnt++;
290 @ingroup ctrl_pkt_functions
291 copy classifier rule into the specified SF index
293 static inline VOID CopyClassifierRuleToSF(PMINI_ADAPTER Adapter,stConvergenceSLTypes *psfCSType,UINT uiSearchRuleIndex,UINT nClassifierIndex)
295 S_CLASSIFIER_RULE *pstClassifierEntry = NULL;
296 //VOID *pvPhsContext = NULL;
298 //UCHAR ucProtocolLength=0;
302 if(Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value == 0 ||
303 nClassifierIndex > (MAX_CLASSIFIERS-1))
307 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Storing Classifier Rule Index : %X",ntohs(psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex));
309 if(nClassifierIndex > MAX_CLASSIFIERS-1)
312 pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
313 if(pstClassifierEntry)
316 pstClassifierEntry->bIpv6Protocol =
317 (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6)?TRUE:FALSE;
320 pstClassifierEntry->ucDestPortRangeLength=psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength/4;
321 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Destination Port Range Length:0x%X ",pstClassifierEntry->ucDestPortRangeLength);
322 if( MAX_PORT_RANGE >= psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength)
324 for(ucLoopIndex=0;ucLoopIndex<(pstClassifierEntry->ucDestPortRangeLength);ucLoopIndex++)
326 pstClassifierEntry->usDestPortRangeLo[ucLoopIndex] =
327 *((PUSHORT)(psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange+ucLoopIndex));
328 pstClassifierEntry->usDestPortRangeHi[ucLoopIndex] =
329 *((PUSHORT)(psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange+2+ucLoopIndex));
330 pstClassifierEntry->usDestPortRangeLo[ucLoopIndex]=ntohs(pstClassifierEntry->usDestPortRangeLo[ucLoopIndex]);
331 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Destination Port Range Lo:0x%X ",pstClassifierEntry->usDestPortRangeLo[ucLoopIndex]);
332 pstClassifierEntry->usDestPortRangeHi[ucLoopIndex]=ntohs(pstClassifierEntry->usDestPortRangeHi[ucLoopIndex]);
337 pstClassifierEntry->ucDestPortRangeLength=0;
340 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Source Port Range Length:0x%X ",psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);
342 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength)
344 pstClassifierEntry->ucSrcPortRangeLength =
345 psfCSType->cCPacketClassificationRule.
346 u8ProtocolSourcePortRangeLength/4;
347 for(ucLoopIndex = 0; ucLoopIndex <
348 (pstClassifierEntry->ucSrcPortRangeLength); ucLoopIndex++)
350 pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex] =
351 *((PUSHORT)(psfCSType->cCPacketClassificationRule.
352 u8ProtocolSourcePortRange+ucLoopIndex));
353 pstClassifierEntry->usSrcPortRangeHi[ucLoopIndex] =
354 *((PUSHORT)(psfCSType->cCPacketClassificationRule.
355 u8ProtocolSourcePortRange+2+ucLoopIndex));
356 pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex] =
357 ntohs(pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex]);
358 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Source Port Range Lo:0x%X ",pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex]);
359 pstClassifierEntry->usSrcPortRangeHi[ucLoopIndex]=ntohs(pstClassifierEntry->usSrcPortRangeHi[ucLoopIndex]);
362 //Destination Ip Address and Mask
363 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Ip Destination Parameters : ");
365 CopyIpAddrToClassifier(pstClassifierEntry,
366 psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength,
367 psfCSType->cCPacketClassificationRule.u8IPDestinationAddress,
368 (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6)?
369 TRUE:FALSE, eDestIpAddress);
371 //Source Ip Address and Mask
372 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Ip Source Parameters : ");
374 CopyIpAddrToClassifier(pstClassifierEntry,
375 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength,
376 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress,
377 (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6)?TRUE:FALSE,
381 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"TOS Length:0x%X ",psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength);
382 if(3 == psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength)
384 pstClassifierEntry->ucIPTypeOfServiceLength =
385 psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength;
386 pstClassifierEntry->ucTosLow =
387 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0];
388 pstClassifierEntry->ucTosHigh =
389 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1];
390 pstClassifierEntry->ucTosMask =
391 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2];
392 pstClassifierEntry->bTOSValid = TRUE;
394 if(psfCSType->cCPacketClassificationRule.u8Protocol == 0)
396 //we didnt get protocol field filled in by the BS
397 pstClassifierEntry->ucProtocolLength=0;
401 pstClassifierEntry->ucProtocolLength=1;// 1 valid protocol
404 pstClassifierEntry->ucProtocol[0] =
405 psfCSType->cCPacketClassificationRule.u8Protocol;
407 pstClassifierEntry->u8ClassifierRulePriority =
408 psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority;
410 //store the classifier rule ID and set this classifier entry as valid
411 pstClassifierEntry->ucDirection =
412 Adapter->PackInfo[uiSearchRuleIndex].ucDirection;
413 pstClassifierEntry->uiClassifierRuleIndex = ntohs(psfCSType->
414 cCPacketClassificationRule.u16PacketClassificationRuleIndex);
415 pstClassifierEntry->usVCID_Value =
416 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
417 pstClassifierEntry->ulSFID =
418 Adapter->PackInfo[uiSearchRuleIndex].ulSFID;
419 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Search Index %d Dir: %d, Index: %d, Vcid: %d\n",
420 uiSearchRuleIndex, pstClassifierEntry->ucDirection,
421 pstClassifierEntry->uiClassifierRuleIndex,
422 pstClassifierEntry->usVCID_Value);
424 if(psfCSType->cCPacketClassificationRule.u8AssociatedPHSI)
426 pstClassifierEntry->u8AssociatedPHSI = psfCSType->cCPacketClassificationRule.u8AssociatedPHSI;
429 //Copy ETH CS Parameters
430 pstClassifierEntry->ucEthCSSrcMACLen = (psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddressLength);
431 memcpy(pstClassifierEntry->au8EThCSSrcMAC,psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress,MAC_ADDRESS_SIZE);
432 memcpy(pstClassifierEntry->au8EThCSSrcMACMask,psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress+MAC_ADDRESS_SIZE,MAC_ADDRESS_SIZE);
433 pstClassifierEntry->ucEthCSDestMACLen = (psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
434 memcpy(pstClassifierEntry->au8EThCSDestMAC,psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress,MAC_ADDRESS_SIZE);
435 memcpy(pstClassifierEntry->au8EThCSDestMACMask,psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress+MAC_ADDRESS_SIZE,MAC_ADDRESS_SIZE);
436 pstClassifierEntry->ucEtherTypeLen = (psfCSType->cCPacketClassificationRule.u8EthertypeLength);
437 memcpy(pstClassifierEntry->au8EthCSEtherType,psfCSType->cCPacketClassificationRule.u8Ethertype,NUM_ETHERTYPE_BYTES);
438 memcpy(pstClassifierEntry->usUserPriority, &psfCSType->cCPacketClassificationRule.u16UserPriority, 2);
439 pstClassifierEntry->usVLANID = ntohs(psfCSType->cCPacketClassificationRule.u16VLANID);
440 pstClassifierEntry->usValidityBitMap = ntohs(psfCSType->cCPacketClassificationRule.u16ValidityBitMap);
442 pstClassifierEntry->bUsed = TRUE;
448 @ingroup ctrl_pkt_functions
450 static inline VOID DeleteClassifierRuleFromSF(PMINI_ADAPTER Adapter,UINT uiSearchRuleIndex,UINT nClassifierIndex)
452 S_CLASSIFIER_RULE *pstClassifierEntry = NULL;
453 B_UINT16 u16PacketClassificationRuleIndex;
455 //VOID *pvPhsContext = NULL;
458 usVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
460 if(nClassifierIndex > MAX_CLASSIFIERS-1)
466 u16PacketClassificationRuleIndex = Adapter->astClassifierTable[nClassifierIndex].uiClassifierRuleIndex;
469 pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
470 if(pstClassifierEntry)
472 pstClassifierEntry->bUsed = FALSE;
473 pstClassifierEntry->uiClassifierRuleIndex = 0;
474 memset(pstClassifierEntry,0,sizeof(S_CLASSIFIER_RULE));
476 //Delete the PHS Rule for this classifier
477 PhsDeleteClassifierRule(
478 &Adapter->stBCMPhsContext,
480 u16PacketClassificationRuleIndex);
485 @ingroup ctrl_pkt_functions
487 VOID DeleteAllClassifiersForSF(PMINI_ADAPTER Adapter,UINT uiSearchRuleIndex)
489 S_CLASSIFIER_RULE *pstClassifierEntry = NULL;
490 UINT nClassifierIndex;
491 //B_UINT16 u16PacketClassificationRuleIndex;
493 //VOID *pvPhsContext = NULL;
496 ulVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
502 for(nClassifierIndex =0 ; nClassifierIndex < MAX_CLASSIFIERS ; nClassifierIndex++)
504 if(Adapter->astClassifierTable[nClassifierIndex].usVCID_Value == ulVCID)
506 pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
507 if(pstClassifierEntry->bUsed)
509 DeleteClassifierRuleFromSF(Adapter,uiSearchRuleIndex,nClassifierIndex);
514 //Delete All Phs Rules Associated with this SF
516 &Adapter->stBCMPhsContext,
523 This routinue copies the Connection Management
524 related data into the Adapter structure.
525 @ingroup ctrl_pkt_functions
528 static VOID CopyToAdapter( register PMINI_ADAPTER Adapter, /**<Pointer to the Adapter structure*/
529 register pstServiceFlowParamSI psfLocalSet, /**<Pointer to the ServiceFlowParamSI structure*/
530 register UINT uiSearchRuleIndex, /**<Index of Queue, to which this data belongs*/
531 register UCHAR ucDsxType,
532 stLocalSFAddIndicationAlt *pstAddIndication)
534 //UCHAR ucProtocolLength=0;
536 UINT nClassifierIndex = 0;
537 E_CLASSIFIER_ACTION eClassifierAction = eInvalidClassifierAction;
538 B_UINT16 u16PacketClassificationRuleIndex=0;
540 stConvergenceSLTypes *psfCSType = NULL;
542 USHORT uVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
546 Adapter->PackInfo[uiSearchRuleIndex].bValid=TRUE;
547 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Search Rule Index = %d\n", uiSearchRuleIndex);
548 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"%s: SFID= %x ",__FUNCTION__, ntohl(psfLocalSet->u32SFID));
549 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Updating Queue %d",uiSearchRuleIndex);
551 ulSFID = ntohl(psfLocalSet->u32SFID);
552 //Store IP Version used
553 //Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF
555 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = 0;
556 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = 0;
558 /*Enable IP/ETh CS Support As Required*/
559 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"CopyToAdapter : u8CSSpecification : %X\n",psfLocalSet->u8CSSpecification);
560 switch(psfLocalSet->u8CSSpecification)
564 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV4_CS;
569 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV6_CS;
573 case eCS802_3PacketEthernet:
574 case eCS802_1QPacketVLAN:
576 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = ETH_CS_802_3;
580 case eCSPacketIPV4Over802_1QVLAN:
581 case eCSPacketIPV4Over802_3Ethernet:
583 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV4_CS;
584 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = ETH_CS_802_3;
588 case eCSPacketIPV6Over802_1QVLAN:
589 case eCSPacketIPV6Over802_3Ethernet:
591 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV6_CS;
592 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = ETH_CS_802_3;
598 BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Error in value of CS Classification.. setting default to IP CS\n");
599 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV4_CS;
604 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",
606 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport,
607 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport);
609 //Store IP Version used
610 //Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF
611 if(Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport == IPV6_CS)
613 Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion = IPV6;
617 Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion = IPV4;
620 /* To ensure that the ETH CS code doesn't gets executed if the BS doesn't supports ETH CS */
621 if(!Adapter->bETHCSEnabled)
622 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = 0;
624 if(psfLocalSet->u8ServiceClassNameLength > 0 &&
625 psfLocalSet->u8ServiceClassNameLength < 32)
627 memcpy(Adapter->PackInfo[uiSearchRuleIndex].ucServiceClassName,
628 psfLocalSet->u8ServiceClassName,
629 psfLocalSet->u8ServiceClassNameLength);
631 Adapter->PackInfo[uiSearchRuleIndex].u8QueueType =
632 psfLocalSet->u8ServiceFlowSchedulingType;
634 if(Adapter->PackInfo[uiSearchRuleIndex].u8QueueType==BE &&
635 Adapter->PackInfo[uiSearchRuleIndex].ucDirection)
637 Adapter->usBestEffortQueueIndex=uiSearchRuleIndex;
640 Adapter->PackInfo[uiSearchRuleIndex].ulSFID = ntohl(psfLocalSet->u32SFID);
642 Adapter->PackInfo[uiSearchRuleIndex].u8TrafficPriority = psfLocalSet->u8TrafficPriority;
644 //copy all the classifier in the Service Flow param structure
645 for(nIndex=0; nIndex<psfLocalSet->u8TotalClassifiers; nIndex++)
647 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Classifier index =%d",nIndex);
648 psfCSType = &psfLocalSet->cConvergenceSLTypes[nIndex];
649 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Classifier index =%d",nIndex);
651 if(psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority)
653 Adapter->PackInfo[uiSearchRuleIndex].bClassifierPriority=TRUE;
656 if(psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority)
658 Adapter->PackInfo[uiSearchRuleIndex].bClassifierPriority=TRUE;
662 if(ucDsxType== DSA_ACK)
664 eClassifierAction = eAddClassifier;
666 else if(ucDsxType == DSC_ACK)
668 switch(psfCSType->u8ClassfierDSCAction)
670 case 0://DSC Add Classifier
672 eClassifierAction = eAddClassifier;
675 case 1://DSC Replace Classifier
677 eClassifierAction = eReplaceClassifier;
680 case 2://DSC Delete Classifier
682 eClassifierAction = eDeleteClassifier;
688 eClassifierAction = eInvalidClassifierAction;
693 u16PacketClassificationRuleIndex = ntohs(psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
695 switch(eClassifierAction)
699 //Get a Free Classifier Index From Classifier table for this SF to add the Classifier
700 //Contained in this message
701 nClassifierIndex = SearchClsid(Adapter,ulSFID,u16PacketClassificationRuleIndex);
703 if(nClassifierIndex > MAX_CLASSIFIERS)
705 nClassifierIndex = SearchFreeClsid(Adapter);
706 if(nClassifierIndex > MAX_CLASSIFIERS)
708 //Failed To get a free Entry
709 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Error Failed To get a free Classifier Entry");
712 //Copy the Classifier Rule for this service flow into our Classifier table maintained per SF.
713 CopyClassifierRuleToSF(Adapter,psfCSType,uiSearchRuleIndex,nClassifierIndex);
718 //This Classifier Already Exists and it is invalid to Add Classifier with existing PCRI
719 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"CopyToAdapter : Error The Specified Classifier Already Exists \
720 and attempted To Add Classifier with Same PCRI : 0x%x\n", u16PacketClassificationRuleIndex);
725 case eReplaceClassifier:
727 //Get the Classifier Index From Classifier table for this SF and replace existing Classifier
728 //with the new classifier Contained in this message
729 nClassifierIndex = SearchClsid(Adapter,ulSFID,u16PacketClassificationRuleIndex);
730 if(nClassifierIndex > MAX_CLASSIFIERS)
732 //Failed To search the classifier
733 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Error Search for Classifier To be replaced failed");
736 //Copy the Classifier Rule for this service flow into our Classifier table maintained per SF.
737 CopyClassifierRuleToSF(Adapter,psfCSType,uiSearchRuleIndex,nClassifierIndex);
741 case eDeleteClassifier:
743 //Get the Classifier Index From Classifier table for this SF and replace existing Classifier
744 //with the new classifier Contained in this message
745 nClassifierIndex = SearchClsid(Adapter,ulSFID,u16PacketClassificationRuleIndex);
746 if(nClassifierIndex > MAX_CLASSIFIERS)
748 //Failed To search the classifier
749 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Error Search for Classifier To be deleted failed");
753 //Delete This classifier
754 DeleteClassifierRuleFromSF(Adapter,uiSearchRuleIndex,nClassifierIndex);
760 //Invalid Action for classifier
766 //Repeat parsing Classification Entries to process PHS Rules
767 for(nIndex=0; nIndex < psfLocalSet->u8TotalClassifiers; nIndex++)
769 psfCSType = &psfLocalSet->cConvergenceSLTypes[nIndex];
771 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "psfCSType->u8PhsDSCAction : 0x%x\n",
772 psfCSType->u8PhsDSCAction );
774 switch (psfCSType->u8PhsDSCAction)
776 case eDeleteAllPHSRules:
778 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Deleting All PHS Rules For VCID: 0x%X\n",uVCID);
780 //Delete All the PHS rules for this Service flow
783 &Adapter->stBCMPhsContext,
790 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"PHS DSC Action = Delete PHS Rule \n");
792 if(psfCSType->cPhsRule.u8PHSI)
795 &Adapter->stBCMPhsContext,
797 psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
801 //BCM_DEBUG_PRINT(CONN_MSG,("Error CPHSRule.PHSI is ZERO \n"));
807 if(ucDsxType == DSC_ACK)
809 //BCM_DEBUG_PRINT(CONN_MSG,("Invalid PHS DSC Action For DSC \n",psfCSType->cPhsRule.u8PHSI));
810 break; //FOr DSC ACK Case PHS DSC Action must be in valid set
813 //Proceed To Add PHS rule for DSA_ACK case even if PHS DSC action is unspecified
814 //No Break Here . Intentionally!
819 if(psfCSType->cPhsRule.u8PHSI)
821 //Apply This PHS Rule to all classifiers whose Associated PHSI Match
822 unsigned int uiClassifierIndex = 0;
823 if(pstAddIndication->u8Direction == UPLINK_DIR )
825 for(uiClassifierIndex=0;uiClassifierIndex<MAX_CLASSIFIERS;uiClassifierIndex++)
827 if((Adapter->astClassifierTable[uiClassifierIndex].bUsed) &&
828 (Adapter->astClassifierTable[uiClassifierIndex].ulSFID == Adapter->PackInfo[uiSearchRuleIndex].ulSFID) &&
829 (Adapter->astClassifierTable[uiClassifierIndex].u8AssociatedPHSI == psfCSType->cPhsRule.u8PHSI))
831 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Adding PHS Rule For Classifier : 0x%x cPhsRule.u8PHSI : 0x%x\n",
832 Adapter->astClassifierTable[uiClassifierIndex].uiClassifierRuleIndex,
833 psfCSType->cPhsRule.u8PHSI);
834 //Update The PHS Rule for this classifier as Associated PHSI id defined
837 sPhsRule.u8PHSI = psfCSType->cPhsRule.u8PHSI;
838 sPhsRule.u8PHSFLength = psfCSType->cPhsRule.u8PHSFLength;
839 sPhsRule.u8PHSMLength = psfCSType->cPhsRule.u8PHSMLength;
840 sPhsRule.u8PHSS = psfCSType->cPhsRule.u8PHSS;
841 sPhsRule.u8PHSV = psfCSType->cPhsRule.u8PHSV;
842 memcpy(sPhsRule.u8PHSF,psfCSType->cPhsRule.u8PHSF,MAX_PHS_LENGTHS);
843 memcpy(sPhsRule.u8PHSM,psfCSType->cPhsRule.u8PHSM,MAX_PHS_LENGTHS);
844 sPhsRule.u8RefCnt = 0;
845 sPhsRule.bUnclassifiedPHSRule = FALSE;
846 sPhsRule.PHSModifiedBytes = 0;
847 sPhsRule.PHSModifiedNumPackets = 0;
848 sPhsRule.PHSErrorNumPackets = 0;
850 //bPHSRuleAssociated = TRUE;
851 //Store The PHS Rule for this classifier
853 PhsUpdateClassifierRule(
854 &Adapter->stBCMPhsContext,
856 Adapter->astClassifierTable[uiClassifierIndex].uiClassifierRuleIndex,
858 Adapter->astClassifierTable[uiClassifierIndex].u8AssociatedPHSI);
860 //Update PHS Rule For the Classifier
863 Adapter->astClassifierTable[uiClassifierIndex].u32PHSRuleID = sPhsRule.u8PHSI;
864 memcpy(&Adapter->astClassifierTable[uiClassifierIndex].sPhsRule,&sPhsRule,sizeof(S_PHS_RULE));
872 //Error PHS Rule specified in signaling could not be applied to any classifier
875 sPhsRule.u8PHSI = psfCSType->cPhsRule.u8PHSI;
876 sPhsRule.u8PHSFLength = psfCSType->cPhsRule.u8PHSFLength;
877 sPhsRule.u8PHSMLength = psfCSType->cPhsRule.u8PHSMLength;
878 sPhsRule.u8PHSS = psfCSType->cPhsRule.u8PHSS;
879 sPhsRule.u8PHSV = psfCSType->cPhsRule.u8PHSV;
880 memcpy(sPhsRule.u8PHSF,psfCSType->cPhsRule.u8PHSF,MAX_PHS_LENGTHS);
881 memcpy(sPhsRule.u8PHSM,psfCSType->cPhsRule.u8PHSM,MAX_PHS_LENGTHS);
882 sPhsRule.u8RefCnt = 0;
883 sPhsRule.bUnclassifiedPHSRule = TRUE;
884 sPhsRule.PHSModifiedBytes = 0;
885 sPhsRule.PHSModifiedNumPackets = 0;
886 sPhsRule.PHSErrorNumPackets = 0;
887 //Store The PHS Rule for this classifier
890 Passing the argument u8PHSI instead of clsid. Because for DL with no classifier rule,
891 clsid will be zero hence we cant have multiple PHS rules for the same SF.
892 To support multiple PHS rule, passing u8PHSI.
895 PhsUpdateClassifierRule(
896 &Adapter->stBCMPhsContext,
910 if(psfLocalSet->u32MaxSustainedTrafficRate == 0 )
912 //No Rate Limit . Set Max Sustained Traffic Rate to Maximum
913 Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate =
914 WIMAX_MAX_ALLOWED_RATE;
917 else if (ntohl(psfLocalSet->u32MaxSustainedTrafficRate) >
918 WIMAX_MAX_ALLOWED_RATE)
920 //Too large Allowed Rate specified. Limiting to Wi Max Allowed rate
921 Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate =
922 WIMAX_MAX_ALLOWED_RATE;
926 Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate =
927 ntohl(psfLocalSet->u32MaxSustainedTrafficRate);
930 Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency = ntohl(psfLocalSet->u32MaximumLatency);
932 if(Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency == 0) /* 0 should be treated as infinite */
933 Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency = MAX_LATENCY_ALLOWED;
936 if(( Adapter->PackInfo[uiSearchRuleIndex].u8QueueType == ERTPS ||
937 Adapter->PackInfo[uiSearchRuleIndex].u8QueueType == UGS ) )
938 UGIValue = ntohs(psfLocalSet->u16UnsolicitedGrantInterval);
941 UGIValue = DEFAULT_UG_INTERVAL;
944 For UGI based connections...
945 DEFAULT_UGI_FACTOR*UGIInterval worth of data is the max token count at host...
946 The extra amount of token is to ensure that a large amount of jitter won't have loss in throughput...
947 In case of non-UGI based connection, 200 frames worth of data is the max token count at host...
950 Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize =
951 (DEFAULT_UGI_FACTOR*Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate*UGIValue)/1000;
953 if(Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize < WIMAX_MAX_MTU*8)
956 /* Special Handling to ensure the biggest size of packet can go out from host to FW as follows:
957 1. Any packet from Host to FW can go out in different packet size.
958 2. So in case the Bucket count is smaller than MTU, the packets of size (Size > TokenCount), will get dropped.
959 3. We can allow packets of MaxSize from Host->FW that can go out from FW in multiple SDUs by fragmentation at Wimax Layer
961 UGIFactor = (Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency/UGIValue + 1);
963 if(UGIFactor > DEFAULT_UGI_FACTOR)
964 Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize =
965 (UGIFactor*Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate*UGIValue)/1000;
967 if(Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize > WIMAX_MAX_MTU*8)
968 Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize = WIMAX_MAX_MTU*8;
972 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"LAT: %d, UGI: %d \n", Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency, UGIValue);
973 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"uiMaxAllowedRate: 0x%x, u32MaxSustainedTrafficRate: 0x%x ,uiMaxBucketSize: 0x%x",
974 Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate,
975 ntohl(psfLocalSet->u32MaxSustainedTrafficRate),
976 Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize);
978 //copy the extended SF Parameters to Support MIBS
979 CopyMIBSExtendedSFParameters(Adapter,psfLocalSet,uiSearchRuleIndex);
981 //store header suppression enabled flag per SF
982 Adapter->PackInfo[uiSearchRuleIndex].bHeaderSuppressionEnabled =
983 !(psfLocalSet->u8RequesttransmissionPolicy &
984 MASK_DISABLE_HEADER_SUPPRESSION);
986 if(Adapter->PackInfo[uiSearchRuleIndex].pstSFIndication)
988 kfree(Adapter->PackInfo[uiSearchRuleIndex].pstSFIndication);
989 Adapter->PackInfo[uiSearchRuleIndex].pstSFIndication = NULL;
991 Adapter->PackInfo[uiSearchRuleIndex].pstSFIndication = pstAddIndication;
993 //Re Sort the SF list in PackInfo according to Traffic Priority
994 SortPackInfo(Adapter);
996 /* Re Sort the Classifier Rules table and re - arrange
997 according to Classifier Rule Priority */
998 SortClassifiers(Adapter);
1000 DumpPhsRules(&Adapter->stBCMPhsContext);
1002 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"%s <=====", __FUNCTION__);
1006 /***********************************************************************
1007 * Function - DumpCmControlPacket
1009 * Description - This routinue Dumps the Contents of the AddIndication
1010 * Structure in the Connection Management Control Packet
1012 * Parameter - pvBuffer: Pointer to the buffer containing the
1013 * AddIndication data.
1016 *************************************************************************/
1017 static VOID DumpCmControlPacket(PVOID pvBuffer)
1021 stLocalSFAddIndicationAlt *pstAddIndication;
1022 UINT nCurClassifierCnt;
1023 PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
1025 pstAddIndication = (stLocalSFAddIndicationAlt *)pvBuffer;
1026 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "======>");
1028 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Type : 0x%X",pstAddIndication->u8Type);
1029 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Direction : 0x%X",pstAddIndication->u8Direction);
1030 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TID: 0x%X", ntohs(pstAddIndication->u16TID));
1031 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID : 0x%X",ntohs(pstAddIndication->u16CID));
1032 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VCID : 0x%X",ntohs(pstAddIndication->u16VCID));
1034 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " AuthorizedSet--->");
1036 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID : 0x%X",htonl(pstAddIndication->sfAuthorizedSet.u32SFID));
1037 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID : 0x%X",htons(pstAddIndication->sfAuthorizedSet.u16CID));
1038 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength : 0x%X",
1039 pstAddIndication->sfAuthorizedSet.u8ServiceClassNameLength);
1041 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",
1042 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[0],
1043 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[1],
1044 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[2],
1045 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[3],
1046 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[4],
1047 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[5]);
1049 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService : 0x%X",
1050 pstAddIndication->sfAuthorizedSet.u8MBSService);
1051 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet : 0x%X",
1052 pstAddIndication->sfAuthorizedSet.u8QosParamSet);
1053 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficPriority : 0x%X, %p",
1054 pstAddIndication->sfAuthorizedSet.u8TrafficPriority, &pstAddIndication->sfAuthorizedSet.u8TrafficPriority);
1056 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxSustainedTrafficRate : 0x%X 0x%p",
1057 pstAddIndication->sfAuthorizedSet.u32MaxSustainedTrafficRate,
1058 &pstAddIndication->sfAuthorizedSet.u32MaxSustainedTrafficRate);
1060 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxTrafficBurst : 0x%X",
1061 pstAddIndication->sfAuthorizedSet.u32MaxTrafficBurst);
1062 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MinReservedTrafficRate : 0x%X",
1063 pstAddIndication->sfAuthorizedSet.u32MinReservedTrafficRate);
1065 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MinimumTolerableTrafficRate : 0x%X",
1066 pstAddIndication->sfAuthorizedSet.u32MinimumTolerableTrafficRate);
1067 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32RequesttransmissionPolicy : 0x%X",
1068 pstAddIndication->sfAuthorizedSet.u32RequesttransmissionPolicy);
1070 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParamLength : 0x%X",
1071 pstAddIndication->sfAuthorizedSet.u8VendorSpecificQoSParamLength);
1072 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParam : 0x%X",
1073 pstAddIndication->sfAuthorizedSet.u8VendorSpecificQoSParam[0]);
1074 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceFlowSchedulingType : 0x%X",
1075 pstAddIndication->sfAuthorizedSet.u8ServiceFlowSchedulingType);
1076 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32ToleratedJitter : 0x%X",
1077 pstAddIndication->sfAuthorizedSet.u32ToleratedJitter);
1078 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaximumLatency : 0x%X",
1079 pstAddIndication->sfAuthorizedSet.u32MaximumLatency);
1080 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%X",
1081 pstAddIndication->sfAuthorizedSet.u8FixedLengthVSVariableLengthSDUIndicator);
1083 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8SDUSize : 0x%X",
1084 pstAddIndication->sfAuthorizedSet.u8SDUSize);
1085 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TargetSAID : 0x%X",
1086 pstAddIndication->sfAuthorizedSet.u16TargetSAID);
1087 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQEnable : 0x%X",
1088 pstAddIndication->sfAuthorizedSet.u8ARQEnable);
1089 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQWindowSize : 0x%X",
1090 pstAddIndication->sfAuthorizedSet.u16ARQWindowSize);
1091 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryTxTimeOut : 0x%X",
1092 pstAddIndication->sfAuthorizedSet.u16ARQRetryTxTimeOut);
1093 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryRxTimeOut : 0x%X",
1094 pstAddIndication->sfAuthorizedSet.u16ARQRetryRxTimeOut);
1095 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockLifeTime : 0x%X",
1096 pstAddIndication->sfAuthorizedSet.u16ARQBlockLifeTime);
1097 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQSyncLossTimeOut : 0x%X",
1098 pstAddIndication->sfAuthorizedSet.u16ARQSyncLossTimeOut);
1099 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQDeliverInOrder : 0x%X",
1100 pstAddIndication->sfAuthorizedSet.u8ARQDeliverInOrder);
1101 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRxPurgeTimeOut : 0x%X",
1102 pstAddIndication->sfAuthorizedSet.u16ARQRxPurgeTimeOut);
1103 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockSize : 0x%X",
1104 pstAddIndication->sfAuthorizedSet.u16ARQBlockSize);
1105 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8CSSpecification : 0x%X",
1106 pstAddIndication->sfAuthorizedSet.u8CSSpecification);
1107 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TypeOfDataDeliveryService : 0x%X",
1108 pstAddIndication->sfAuthorizedSet.u8TypeOfDataDeliveryService);
1109 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16SDUInterArrivalTime : 0x%X",
1110 pstAddIndication->sfAuthorizedSet.u16SDUInterArrivalTime);
1111 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TimeBase : 0x%X",
1112 pstAddIndication->sfAuthorizedSet.u16TimeBase);
1113 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8PagingPreference : 0x%X",
1114 pstAddIndication->sfAuthorizedSet.u8PagingPreference);
1115 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UnsolicitedPollingInterval : 0x%X",
1116 pstAddIndication->sfAuthorizedSet.u16UnsolicitedPollingInterval);
1118 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "MBSZoneIdentifierassignmentLength : 0x%X",
1119 pstAddIndication->sfAuthorizedSet.MBSZoneIdentifierassignmentLength);
1120 for(uiLoopIndex=0; uiLoopIndex < MAX_STRING_LEN; uiLoopIndex++)
1121 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "MBSZoneIdentifierassignment : 0x%X",
1122 pstAddIndication->sfAuthorizedSet.MBSZoneIdentifierassignment[uiLoopIndex]);
1125 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "sfAuthorizedSet.u8HARQChannelMapping %x %x %x ",
1126 *(unsigned int*)pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping,
1127 *(unsigned int*)&pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping[4],
1128 *(USHORT*) &pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping[8]);
1129 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficIndicationPreference : 0x%X",
1130 pstAddIndication->sfAuthorizedSet.u8TrafficIndicationPreference);
1132 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Recieved : 0x%X",pstAddIndication->sfAuthorizedSet.u8TotalClassifiers);
1134 nCurClassifierCnt = pstAddIndication->sfAuthorizedSet.u8TotalClassifiers;
1136 if(nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF)
1138 nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF;
1140 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "pstAddIndication->sfAuthorizedSet.bValid %d", pstAddIndication->sfAuthorizedSet.bValid);
1141 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "pstAddIndication->sfAuthorizedSet.u16MacOverhead %x", pstAddIndication->sfAuthorizedSet.u16MacOverhead);
1142 if(!pstAddIndication->sfAuthorizedSet.bValid)
1143 pstAddIndication->sfAuthorizedSet.bValid=1;
1144 for(nIndex = 0 ; nIndex < nCurClassifierCnt ; nIndex++)
1146 stConvergenceSLTypes *psfCSType = NULL;
1147 psfCSType = &pstAddIndication->sfAuthorizedSet.cConvergenceSLTypes[nIndex];
1149 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "psfCSType = %p", psfCSType);
1150 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "CCPacketClassificationRuleSI====>");
1152 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ClassifierRulePriority :0x%X ",
1153 psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority);
1154 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfServiceLength :0x%X ",
1155 psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength);
1157 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfService[3] :0x%X ,0x%X ,0x%X ",
1158 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0],
1159 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1],
1160 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2]);
1163 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u8ProtocolLength :0x%X ",
1164 psfCSType->cCPacketClassificationRule.u8ProtocolLength);
1167 for(uiLoopIndex=0; uiLoopIndex < 1; uiLoopIndex++)
1168 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Protocol : 0x%02X ",
1169 psfCSType->cCPacketClassificationRule.u8Protocol);
1171 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddressLength :0x%X ",
1172 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength);
1174 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1175 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddress[32] : 0x%02X ",
1176 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress[uiLoopIndex]);
1178 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddressLength : 0x%X ",
1179 psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength);
1181 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1182 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddress[32] : 0x%02X ",
1183 psfCSType->cCPacketClassificationRule.u8IPDestinationAddress[uiLoopIndex]);
1185 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRangeLength:0x%X ",
1186 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);
1187 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: 0x%02X ,0x%02X ,0x%02X ,0x%02X ",
1188 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[0],
1189 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[1],
1190 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[2],
1191 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[3]);
1193 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRangeLength : 0x%02X ",
1194 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);
1195 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: 0x%02X ,0x%02X ,0x%02X ,0x%02X ",
1196 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[0],
1197 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[1],
1198 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[2],
1199 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[3]);
1201 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetDestMacAddressLength : 0x%02X ",
1202 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1204 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetDestMacAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1205 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[0],
1206 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[1],
1207 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[2],
1208 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[3],
1209 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[4],
1210 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[5]);
1212 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetSourceMACAddressLength : 0x%02X ",
1213 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1215 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetSourceMACAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1216 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[0],
1217 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[1],
1218 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[2],
1219 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[3],
1220 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[4],
1221 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[5]);
1223 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthertypeLength : 0x%02X ",
1224 psfCSType->cCPacketClassificationRule.u8EthertypeLength);
1225 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Ethertype[3] : 0x%02X ,0x%02X ,0x%02X ",
1226 psfCSType->cCPacketClassificationRule.u8Ethertype[0],
1227 psfCSType->cCPacketClassificationRule.u8Ethertype[1],
1228 psfCSType->cCPacketClassificationRule.u8Ethertype[2]);
1230 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UserPriority : 0x%X ",
1231 psfCSType->cCPacketClassificationRule.u16UserPriority);
1233 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VLANID : 0x%X ",
1234 psfCSType->cCPacketClassificationRule.u16VLANID);
1236 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8AssociatedPHSI : 0x%02X ",
1237 psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
1239 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16PacketClassificationRuleIndex : 0x%X ",
1240 psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
1242 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParamLength : 0x%X ",
1243 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParamLength);
1245 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParam[1] : 0x%X ",
1246 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParam[0]);
1248 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLableLength :0x%X ",
1249 psfCSType->cCPacketClassificationRule.u8IPv6FlowLableLength);
1250 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLable[6] : 0x %02X %02X %02X %02X %02X %02X ",
1251 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[0],
1252 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[1],
1253 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[2],
1254 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[3],
1255 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[4],
1256 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[5]);
1260 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "bValid : 0x%02X",pstAddIndication->sfAuthorizedSet.bValid);
1262 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "AdmittedSet--->");
1263 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID : 0x%X",pstAddIndication->sfAdmittedSet.u32SFID);
1264 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID : 0x%X",pstAddIndication->sfAdmittedSet.u16CID);
1265 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength : 0x%X",
1266 pstAddIndication->sfAdmittedSet.u8ServiceClassNameLength);
1267 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassName : 0x %02X %02X %02X %02X %02X %02X",
1268 pstAddIndication->sfAdmittedSet.u8ServiceClassName[0],
1269 pstAddIndication->sfAdmittedSet.u8ServiceClassName[1],
1270 pstAddIndication->sfAdmittedSet.u8ServiceClassName[2],
1271 pstAddIndication->sfAdmittedSet.u8ServiceClassName[3],
1272 pstAddIndication->sfAdmittedSet.u8ServiceClassName[4],
1273 pstAddIndication->sfAdmittedSet.u8ServiceClassName[5]);
1275 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService : 0x%02X",
1276 pstAddIndication->sfAdmittedSet.u8MBSService);
1277 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet : 0x%02X",
1278 pstAddIndication->sfAdmittedSet.u8QosParamSet);
1279 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficPriority : 0x%02X",
1280 pstAddIndication->sfAdmittedSet.u8TrafficPriority);
1282 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u32MaxSustainedTrafficRate : 0x%02X",
1283 ntohl(pstAddIndication->sfAdmittedSet.u32MaxSustainedTrafficRate));
1284 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u32MinimumTolerableTrafficRate : 0x%X",
1285 pstAddIndication->sfAdmittedSet.u32MinimumTolerableTrafficRate);
1286 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u32RequesttransmissionPolicy : 0x%X",
1287 pstAddIndication->sfAdmittedSet.u32RequesttransmissionPolicy);
1289 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxTrafficBurst : 0x%X",
1290 pstAddIndication->sfAdmittedSet.u32MaxTrafficBurst);
1291 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MinReservedTrafficRate : 0x%X",
1292 pstAddIndication->sfAdmittedSet.u32MinReservedTrafficRate);
1294 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParamLength : 0x%02X",
1295 pstAddIndication->sfAdmittedSet.u8VendorSpecificQoSParamLength);
1296 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParam : 0x%02X",
1297 pstAddIndication->sfAdmittedSet.u8VendorSpecificQoSParam[0]);
1298 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceFlowSchedulingType : 0x%02X",
1299 pstAddIndication->sfAdmittedSet.u8ServiceFlowSchedulingType);
1301 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32ToleratedJitter : 0x%X",
1302 pstAddIndication->sfAdmittedSet.u32ToleratedJitter);
1303 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaximumLatency : 0x%X",
1304 pstAddIndication->sfAdmittedSet.u32MaximumLatency);
1306 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%02X",
1307 pstAddIndication->sfAdmittedSet.u8FixedLengthVSVariableLengthSDUIndicator);
1308 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8SDUSize : 0x%02X",
1309 pstAddIndication->sfAdmittedSet.u8SDUSize);
1310 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TargetSAID : 0x%02X",
1311 pstAddIndication->sfAdmittedSet.u16TargetSAID);
1312 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQEnable : 0x%02X",
1313 pstAddIndication->sfAdmittedSet.u8ARQEnable);
1315 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQWindowSize : 0x%X",
1316 pstAddIndication->sfAdmittedSet.u16ARQWindowSize);
1317 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryTxTimeOut : 0x%X",
1318 pstAddIndication->sfAdmittedSet.u16ARQRetryTxTimeOut);
1319 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryRxTimeOut : 0x%X",
1320 pstAddIndication->sfAdmittedSet.u16ARQRetryRxTimeOut);
1321 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockLifeTime : 0x%X",
1322 pstAddIndication->sfAdmittedSet.u16ARQBlockLifeTime);
1323 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQSyncLossTimeOut : 0x%X",
1324 pstAddIndication->sfAdmittedSet.u16ARQSyncLossTimeOut);
1326 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQDeliverInOrder : 0x%02X",
1327 pstAddIndication->sfAdmittedSet.u8ARQDeliverInOrder);
1328 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRxPurgeTimeOut : 0x%X",
1329 pstAddIndication->sfAdmittedSet.u16ARQRxPurgeTimeOut);
1330 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockSize : 0x%X",
1331 pstAddIndication->sfAdmittedSet.u16ARQBlockSize);
1332 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8CSSpecification : 0x%02X",
1333 pstAddIndication->sfAdmittedSet.u8CSSpecification);
1334 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TypeOfDataDeliveryService : 0x%02X",
1335 pstAddIndication->sfAdmittedSet.u8TypeOfDataDeliveryService);
1336 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16SDUInterArrivalTime : 0x%X",
1337 pstAddIndication->sfAdmittedSet.u16SDUInterArrivalTime);
1338 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TimeBase : 0x%X",
1339 pstAddIndication->sfAdmittedSet.u16TimeBase);
1340 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8PagingPreference : 0x%X",
1341 pstAddIndication->sfAdmittedSet.u8PagingPreference);
1343 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "MBSZoneIdentifierassignmentLength : 0x%X",
1344 pstAddIndication->sfAdmittedSet.MBSZoneIdentifierassignmentLength);
1345 for(uiLoopIndex=0; uiLoopIndex < MAX_STRING_LEN; uiLoopIndex++)
1346 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "MBSZoneIdentifierassignment : 0x%X",
1347 pstAddIndication->sfAdmittedSet.MBSZoneIdentifierassignment[uiLoopIndex]);
1351 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficIndicationPreference : 0x%02X",
1352 pstAddIndication->sfAdmittedSet.u8TrafficIndicationPreference);
1354 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Recieved : 0x%X",pstAddIndication->sfAdmittedSet.u8TotalClassifiers);
1356 nCurClassifierCnt = pstAddIndication->sfAdmittedSet.u8TotalClassifiers;
1358 if(nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF)
1360 nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF;
1364 for(nIndex = 0 ; nIndex < nCurClassifierCnt ; nIndex++)
1367 stConvergenceSLTypes *psfCSType = NULL;
1368 psfCSType = &pstAddIndication->sfAdmittedSet.cConvergenceSLTypes[nIndex];
1370 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " CCPacketClassificationRuleSI====>");
1372 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ClassifierRulePriority :0x%02X ",
1373 psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority);
1374 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfServiceLength :0x%02X",
1375 psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength);
1377 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfService[3] :0x%02X %02X %02X",
1378 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0],
1379 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1],
1380 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2]);
1383 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolLength :0x%02X ",
1384 psfCSType->cCPacketClassificationRule.u8ProtocolLength);
1386 for(uiLoopIndex=0; uiLoopIndex < 1; uiLoopIndex++)
1387 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Protocol: 0x%02X ",
1388 psfCSType->cCPacketClassificationRule.u8Protocol);
1390 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddressLength :0x%02X ",
1391 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength);
1393 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1394 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddress[32] : 0x%02X ",
1395 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress[uiLoopIndex]);
1397 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddressLength : 0x%02X ",
1398 psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength);
1400 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1401 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddress[32] : 0x%02X ",
1402 psfCSType->cCPacketClassificationRule.u8IPDestinationAddress[uiLoopIndex]);
1404 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRangeLength : 0x%02X ",
1405 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);
1407 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRange[4] : 0x %02X %02X %02X %02X ",
1408 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[0],
1409 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[1],
1410 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[2],
1411 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[3]);
1413 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRangeLength : 0x%02X ",
1414 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);
1416 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRange[4] : 0x %02X %02X %02X %02X ",
1417 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[0],
1418 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[1],
1419 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[2],
1420 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[3]);
1422 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetDestMacAddressLength : 0x%02X ",
1423 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1425 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetDestMacAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1426 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[0],
1427 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[1],
1428 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[2],
1429 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[3],
1430 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[4],
1431 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[5]);
1433 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetSourceMACAddressLength : 0x%02X ",
1434 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1436 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetSourceMACAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1437 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[0],
1438 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[1],
1439 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[2],
1440 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[3],
1441 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[4],
1442 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[5]);
1444 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthertypeLength : 0x%02X ",
1445 psfCSType->cCPacketClassificationRule.u8EthertypeLength);
1446 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Ethertype[3] : 0x%02X %02X %02X",
1447 psfCSType->cCPacketClassificationRule.u8Ethertype[0],
1448 psfCSType->cCPacketClassificationRule.u8Ethertype[1],
1449 psfCSType->cCPacketClassificationRule.u8Ethertype[2]);
1451 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UserPriority : 0x%X ",
1452 psfCSType->cCPacketClassificationRule.u16UserPriority);
1453 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VLANID : 0x%X ",
1454 psfCSType->cCPacketClassificationRule.u16VLANID);
1455 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8AssociatedPHSI : 0x%02X ",
1456 psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
1457 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16PacketClassificationRuleIndex : 0x%X ",
1458 psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
1460 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParamLength : 0x%02X",
1461 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParamLength);
1462 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParam[1] : 0x%02X ",
1463 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParam[0]);
1465 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLableLength : 0x%X ",
1466 psfCSType->cCPacketClassificationRule.u8IPv6FlowLableLength);
1467 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLable[6] : 0x %02X %02X %02X %02X %02X %02X ",
1468 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[0],
1469 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[1],
1470 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[2],
1471 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[3],
1472 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[4],
1473 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[5]);
1477 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "bValid : 0x%X",pstAddIndication->sfAdmittedSet.bValid);
1479 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " ActiveSet--->");
1480 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID : 0x%X",pstAddIndication->sfActiveSet.u32SFID);
1481 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID : 0x%X",pstAddIndication->sfActiveSet.u16CID);
1483 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength : 0x%X",
1484 pstAddIndication->sfActiveSet.u8ServiceClassNameLength);
1486 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassName : 0x %02X %02X %02X %02X %02X %02X",
1487 pstAddIndication->sfActiveSet.u8ServiceClassName[0],
1488 pstAddIndication->sfActiveSet.u8ServiceClassName[1],
1489 pstAddIndication->sfActiveSet.u8ServiceClassName[2],
1490 pstAddIndication->sfActiveSet.u8ServiceClassName[3],
1491 pstAddIndication->sfActiveSet.u8ServiceClassName[4],
1492 pstAddIndication->sfActiveSet.u8ServiceClassName[5]);
1494 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService : 0x%02X",
1495 pstAddIndication->sfActiveSet.u8MBSService);
1496 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet : 0x%02X",
1497 pstAddIndication->sfActiveSet.u8QosParamSet);
1498 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficPriority : 0x%02X",
1499 pstAddIndication->sfActiveSet.u8TrafficPriority);
1501 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u32MaxSustainedTrafficRate : 0x%02X",
1502 ntohl(pstAddIndication->sfActiveSet.u32MaxSustainedTrafficRate));
1504 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxTrafficBurst : 0x%X",
1505 pstAddIndication->sfActiveSet.u32MaxTrafficBurst);
1506 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MinReservedTrafficRate : 0x%X",
1507 pstAddIndication->sfActiveSet.u32MinReservedTrafficRate);
1509 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u32MinimumTolerableTrafficRate : 0x%X",
1510 pstAddIndication->sfActiveSet.u32MinimumTolerableTrafficRate);
1511 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u32RequesttransmissionPolicy : 0x%X",
1512 pstAddIndication->sfActiveSet.u32RequesttransmissionPolicy);
1514 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParamLength : 0x%02X",
1515 pstAddIndication->sfActiveSet.u8VendorSpecificQoSParamLength);
1516 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParam : 0x%02X",
1517 pstAddIndication->sfActiveSet.u8VendorSpecificQoSParam[0]);
1518 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceFlowSchedulingType : 0x%02X",
1519 pstAddIndication->sfActiveSet.u8ServiceFlowSchedulingType);
1521 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32ToleratedJitter : 0x%X",
1522 pstAddIndication->sfActiveSet.u32ToleratedJitter);
1523 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaximumLatency : 0x%X",
1524 pstAddIndication->sfActiveSet.u32MaximumLatency);
1526 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%02X",
1527 pstAddIndication->sfActiveSet.u8FixedLengthVSVariableLengthSDUIndicator);
1529 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8SDUSize : 0x%X",
1530 pstAddIndication->sfActiveSet.u8SDUSize);
1531 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16TargetSAID : 0x%X",
1532 pstAddIndication->sfActiveSet.u16TargetSAID);
1533 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ARQEnable : 0x%X",
1534 pstAddIndication->sfActiveSet.u8ARQEnable);
1535 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQWindowSize : 0x%X",
1536 pstAddIndication->sfActiveSet.u16ARQWindowSize);
1537 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQRetryTxTimeOut : 0x%X",
1538 pstAddIndication->sfActiveSet.u16ARQRetryTxTimeOut);
1539 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQRetryRxTimeOut : 0x%X",
1540 pstAddIndication->sfActiveSet.u16ARQRetryRxTimeOut);
1541 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQBlockLifeTime : 0x%X",
1542 pstAddIndication->sfActiveSet.u16ARQBlockLifeTime);
1543 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQSyncLossTimeOut : 0x%X",
1544 pstAddIndication->sfActiveSet.u16ARQSyncLossTimeOut);
1545 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ARQDeliverInOrder : 0x%X",
1546 pstAddIndication->sfActiveSet.u8ARQDeliverInOrder);
1547 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQRxPurgeTimeOut : 0x%X",
1548 pstAddIndication->sfActiveSet.u16ARQRxPurgeTimeOut);
1549 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQBlockSize : 0x%X",
1550 pstAddIndication->sfActiveSet.u16ARQBlockSize);
1551 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8CSSpecification : 0x%X",
1552 pstAddIndication->sfActiveSet.u8CSSpecification);
1553 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8TypeOfDataDeliveryService : 0x%X",
1554 pstAddIndication->sfActiveSet.u8TypeOfDataDeliveryService);
1555 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16SDUInterArrivalTime : 0x%X",
1556 pstAddIndication->sfActiveSet.u16SDUInterArrivalTime);
1557 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16TimeBase : 0x%X",
1558 pstAddIndication->sfActiveSet.u16TimeBase);
1559 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8PagingPreference : 0x%X",
1560 pstAddIndication->sfActiveSet.u8PagingPreference);
1562 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " MBSZoneIdentifierassignmentLength : 0x%X",
1563 pstAddIndication->sfActiveSet.MBSZoneIdentifierassignmentLength);
1564 for(uiLoopIndex=0; uiLoopIndex < MAX_STRING_LEN; uiLoopIndex++)
1565 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " MBSZoneIdentifierassignment : 0x%X",
1566 pstAddIndication->sfActiveSet.MBSZoneIdentifierassignment[uiLoopIndex]);
1570 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8TrafficIndicationPreference : 0x%X",
1571 pstAddIndication->sfActiveSet.u8TrafficIndicationPreference);
1573 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Recieved : 0x%X",pstAddIndication->sfActiveSet.u8TotalClassifiers);
1575 nCurClassifierCnt = pstAddIndication->sfActiveSet.u8TotalClassifiers;
1577 if(nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF)
1579 nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF;
1582 for(nIndex = 0 ; nIndex < nCurClassifierCnt ; nIndex++)
1585 stConvergenceSLTypes *psfCSType = NULL;
1586 psfCSType = &pstAddIndication->sfActiveSet.cConvergenceSLTypes[nIndex];
1589 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " CCPacketClassificationRuleSI====>");
1591 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ClassifierRulePriority :0x%X ",
1592 psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority);
1593 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8IPTypeOfServiceLength :0x%X ",
1594 psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength);
1596 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8IPTypeOfService[3] :0x%X ,0x%X ,0x%X ",
1597 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0],
1598 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1],
1599 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2]);
1602 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " u8ProtocolLength :0x%X ",
1603 psfCSType->cCPacketClassificationRule.u8ProtocolLength);
1605 for(uiLoopIndex=0; uiLoopIndex < 1; uiLoopIndex++)
1606 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8Protocol : 0x%X ",
1607 psfCSType->cCPacketClassificationRule.u8Protocol);
1609 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddressLength :0x%X ",
1610 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength);
1612 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1613 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddress[32]:0x%X ",
1614 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress[uiLoopIndex]);
1616 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddressLength : 0x%02X ",
1617 psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength);
1619 for(uiLoopIndex=0;uiLoopIndex<32;uiLoopIndex++)
1620 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8IPDestinationAddress[32]:0x%X ",
1621 psfCSType->cCPacketClassificationRule.u8IPDestinationAddress[uiLoopIndex]);
1623 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ProtocolSourcePortRangeLength:0x%X ",
1624 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);
1626 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ProtocolSourcePortRange[4]:0x%X ,0x%X ,0x%X ,0x%X ",
1627 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[0],
1628 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[1],
1629 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[2],
1630 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[3]);
1632 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ProtocolDestPortRangeLength:0x%X ",
1633 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);
1635 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ProtocolDestPortRange[4]:0x%X ,0x%X ,0x%X ,0x%X ",
1636 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[0],
1637 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[1],
1638 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[2],
1639 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[3]);
1641 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8EthernetDestMacAddressLength:0x%X ",
1642 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1644 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",
1645 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[0],
1646 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[1],
1647 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[2],
1648 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[3],
1649 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[4],
1650 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[5]);
1652 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8EthernetSourceMACAddressLength:0x%X ",
1653 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1655 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",
1656 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[0],
1657 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[1],
1658 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[2],
1659 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[3],
1660 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[4],
1661 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[5]);
1663 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8EthertypeLength :0x%X ",
1664 psfCSType->cCPacketClassificationRule.u8EthertypeLength);
1665 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8Ethertype[3] :0x%X ,0x%X ,0x%X ",
1666 psfCSType->cCPacketClassificationRule.u8Ethertype[0],
1667 psfCSType->cCPacketClassificationRule.u8Ethertype[1],
1668 psfCSType->cCPacketClassificationRule.u8Ethertype[2]);
1669 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16UserPriority :0x%X ",
1670 psfCSType->cCPacketClassificationRule.u16UserPriority);
1671 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16VLANID :0x%X ",
1672 psfCSType->cCPacketClassificationRule.u16VLANID);
1673 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8AssociatedPHSI :0x%X ",
1674 psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
1675 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16PacketClassificationRuleIndex:0x%X ",
1676 psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
1678 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8VendorSpecificClassifierParamLength:0x%X ",
1679 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParamLength);
1680 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8VendorSpecificClassifierParam[1]:0x%X ",
1681 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParam[0]);
1683 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8IPv6FlowLableLength :0x%X ",
1684 psfCSType->cCPacketClassificationRule.u8IPv6FlowLableLength);
1685 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 ",
1686 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[0],
1687 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[1],
1688 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[2],
1689 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[3],
1690 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[4],
1691 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[5]);
1695 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " bValid : 0x%X",pstAddIndication->sfActiveSet.bValid);
1699 static inline ULONG RestoreSFParam(PMINI_ADAPTER Adapter, ULONG ulAddrSFParamSet,PUCHAR pucDestBuffer)
1701 UINT nBytesToRead = sizeof(stServiceFlowParamSI);
1703 if(ulAddrSFParamSet == 0 || NULL == pucDestBuffer)
1705 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Got Param address as 0!!");
1708 ulAddrSFParamSet = ntohl(ulAddrSFParamSet);
1709 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " RestoreSFParam: Total Words of DSX Message To Read: 0x%zx From Target At : 0x%lx ",
1710 nBytesToRead/sizeof(ULONG),ulAddrSFParamSet);
1711 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "sizeof(stServiceFlowParamSI) = %zx", sizeof(stServiceFlowParamSI));
1713 //Read out the SF Param Set At the indicated Location
1714 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "nBytesToRead = %x", nBytesToRead);
1715 if(rdm(Adapter, ulAddrSFParamSet, (PUCHAR)pucDestBuffer, nBytesToRead) < 0)
1716 return STATUS_FAILURE;
1722 static __inline ULONG StoreSFParam(PMINI_ADAPTER Adapter,PUCHAR pucSrcBuffer,ULONG ulAddrSFParamSet)
1724 UINT nBytesToWrite = sizeof(stServiceFlowParamSI);
1727 if(ulAddrSFParamSet == 0 || NULL == pucSrcBuffer)
1731 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " StoreSFParam: Total Words of DSX Message To Write: 0x%zX To Target At : 0x%lX ",(nBytesToWrite/sizeof(ULONG)),ulAddrSFParamSet);
1733 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "WRM with %x bytes",nBytesToWrite);
1735 uiRetVal = wrm(Adapter,ulAddrSFParamSet,(PUCHAR)pucSrcBuffer, nBytesToWrite);
1737 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "%s:%d WRM failed",__FUNCTION__, __LINE__);
1743 ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter,PVOID pvBuffer,UINT *puBufferLength)
1745 stLocalSFAddIndicationAlt *pstAddIndicationAlt = NULL;
1746 stLocalSFAddIndication * pstAddIndication = NULL;
1747 stLocalSFDeleteRequest *pstDeletionRequest;
1748 UINT uiSearchRuleIndex;
1751 pstAddIndicationAlt = (stLocalSFAddIndicationAlt *)(pvBuffer);
1754 * In case of DSD Req By MS, we should immediately delete this SF so that
1755 * we can stop the further classifying the pkt for this SF.
1757 if(pstAddIndicationAlt->u8Type == DSD_REQ)
1759 pstDeletionRequest = (stLocalSFDeleteRequest *)pvBuffer;
1761 ulSFID = ntohl(pstDeletionRequest->u32SFID);
1762 uiSearchRuleIndex=SearchSfid(Adapter,ulSFID);
1764 if(uiSearchRuleIndex < NO_OF_QUEUES)
1766 deleteSFBySfid(Adapter,uiSearchRuleIndex);
1767 Adapter->u32TotalDSD++;
1773 if( (pstAddIndicationAlt->u8Type == DSD_RSP) ||
1774 (pstAddIndicationAlt->u8Type == DSD_ACK))
1776 //No Special handling send the message as it is
1779 // For DSA_REQ, only upto "psfAuthorizedSet" parameter should be accessed by driver!
1781 pstAddIndication=(stLocalSFAddIndication *)kmalloc(sizeof(*pstAddIndication), GFP_KERNEL);
1782 if(NULL==pstAddIndication)
1785 /* AUTHORIZED SET */
1786 pstAddIndication->psfAuthorizedSet = (stServiceFlowParamSI *)
1787 GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID);
1788 if(!pstAddIndication->psfAuthorizedSet)
1791 if(StoreSFParam(Adapter,(PUCHAR)&pstAddIndicationAlt->sfAuthorizedSet,
1792 (ULONG)pstAddIndication->psfAuthorizedSet)!= 1)
1795 /* this can't possibly be right */
1796 pstAddIndication->psfAuthorizedSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfAuthorizedSet);
1798 if(pstAddIndicationAlt->u8Type == DSA_REQ)
1800 stLocalSFAddRequest AddRequest;
1802 AddRequest.u8Type = pstAddIndicationAlt->u8Type;
1803 AddRequest.eConnectionDir = pstAddIndicationAlt->u8Direction;
1804 AddRequest.u16TID = pstAddIndicationAlt->u16TID;
1805 AddRequest.u16CID = pstAddIndicationAlt->u16CID;
1806 AddRequest.u16VCID = pstAddIndicationAlt->u16VCID;
1807 AddRequest.psfParameterSet =pstAddIndication->psfAuthorizedSet ;
1808 (*puBufferLength) = sizeof(stLocalSFAddRequest);
1809 memcpy(pvBuffer,&AddRequest,sizeof(stLocalSFAddRequest));
1813 // Since it's not DSA_REQ, we can access all field in pstAddIndicationAlt
1815 //We need to extract the structure from the buffer and pack it differently
1817 pstAddIndication->u8Type = pstAddIndicationAlt->u8Type;
1818 pstAddIndication->eConnectionDir= pstAddIndicationAlt->u8Direction ;
1819 pstAddIndication->u16TID = pstAddIndicationAlt->u16TID;
1820 pstAddIndication->u16CID = pstAddIndicationAlt->u16CID;
1821 pstAddIndication->u16VCID = pstAddIndicationAlt->u16VCID;
1822 pstAddIndication->u8CC = pstAddIndicationAlt->u8CC;
1825 pstAddIndication->psfAdmittedSet = (stServiceFlowParamSI *)
1826 GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID);
1827 if(!pstAddIndication->psfAdmittedSet)
1829 if(StoreSFParam(Adapter,(PUCHAR)&pstAddIndicationAlt->sfAdmittedSet,(ULONG)pstAddIndication->psfAdmittedSet) != 1)
1832 pstAddIndication->psfAdmittedSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfAdmittedSet);
1836 pstAddIndication->psfActiveSet = (stServiceFlowParamSI *)
1837 GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID);
1838 if(!pstAddIndication->psfActiveSet)
1840 if(StoreSFParam(Adapter,(PUCHAR)&pstAddIndicationAlt->sfActiveSet,(ULONG)pstAddIndication->psfActiveSet) != 1)
1843 pstAddIndication->psfActiveSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfActiveSet);
1845 (*puBufferLength) = sizeof(stLocalSFAddIndication);
1846 *(stLocalSFAddIndication *)pvBuffer = *pstAddIndication;
1847 kfree(pstAddIndication);
1852 static inline stLocalSFAddIndicationAlt
1853 *RestoreCmControlResponseMessage(register PMINI_ADAPTER Adapter,register PVOID pvBuffer)
1856 stLocalSFAddIndication *pstAddIndication = NULL;
1857 stLocalSFAddIndicationAlt *pstAddIndicationDest = NULL;
1858 pstAddIndication = (stLocalSFAddIndication *)(pvBuffer);
1860 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "=====>" );
1861 if ((pstAddIndication->u8Type == DSD_REQ) ||
1862 (pstAddIndication->u8Type == DSD_RSP) ||
1863 (pstAddIndication->u8Type == DSD_ACK))
1865 return (stLocalSFAddIndicationAlt *)pvBuffer;
1868 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Inside RestoreCmControlResponseMessage ");
1870 //Need to Allocate memory to contain the SUPER Large structures
1871 //Our driver cant create these structures on Stack :(
1873 pstAddIndicationDest=kmalloc(sizeof(stLocalSFAddIndicationAlt), GFP_KERNEL);
1875 if(pstAddIndicationDest)
1877 memset(pstAddIndicationDest,0,sizeof(stLocalSFAddIndicationAlt));
1881 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Failed to allocate memory for SF Add Indication Structure ");
1884 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u8Type : 0x%X",pstAddIndication->u8Type);
1885 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u8Direction : 0x%X",pstAddIndication->eConnectionDir);
1886 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u8TID : 0x%X",ntohs(pstAddIndication->u16TID));
1887 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u8CID : 0x%X",ntohs(pstAddIndication->u16CID));
1888 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u16VCID : 0x%X",ntohs(pstAddIndication->u16VCID));
1889 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-autorized set loc : %p",pstAddIndication->psfAuthorizedSet);
1890 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-admitted set loc : %p",pstAddIndication->psfAdmittedSet);
1891 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-Active set loc : %p",pstAddIndication->psfActiveSet);
1893 pstAddIndicationDest->u8Type = pstAddIndication->u8Type;
1894 pstAddIndicationDest->u8Direction = pstAddIndication->eConnectionDir;
1895 pstAddIndicationDest->u16TID = pstAddIndication->u16TID;
1896 pstAddIndicationDest->u16CID = pstAddIndication->u16CID;
1897 pstAddIndicationDest->u16VCID = pstAddIndication->u16VCID;
1898 pstAddIndicationDest->u8CC = pstAddIndication->u8CC;
1900 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Active Set ");
1901 ulStatus=RestoreSFParam(Adapter,(ULONG)pstAddIndication->psfActiveSet, (PUCHAR)&pstAddIndicationDest->sfActiveSet);
1904 goto failed_restore_sf_param;
1906 if(pstAddIndicationDest->sfActiveSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF)
1907 pstAddIndicationDest->sfActiveSet.u8TotalClassifiers = MAX_CLASSIFIERS_IN_SF;
1909 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Admitted Set ");
1910 ulStatus=RestoreSFParam(Adapter,(ULONG)pstAddIndication->psfAdmittedSet,(PUCHAR)&pstAddIndicationDest->sfAdmittedSet);
1913 goto failed_restore_sf_param;
1915 if(pstAddIndicationDest->sfAdmittedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF)
1916 pstAddIndicationDest->sfAdmittedSet.u8TotalClassifiers = MAX_CLASSIFIERS_IN_SF;
1918 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Authorized Set ");
1919 ulStatus=RestoreSFParam(Adapter,(ULONG)pstAddIndication->psfAuthorizedSet,(PUCHAR)&pstAddIndicationDest->sfAuthorizedSet);
1922 goto failed_restore_sf_param;
1924 if(pstAddIndicationDest->sfAuthorizedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF)
1925 pstAddIndicationDest->sfAuthorizedSet.u8TotalClassifiers = MAX_CLASSIFIERS_IN_SF;
1927 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Dumping the whole raw packet");
1928 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "============================================================");
1929 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " pstAddIndicationDest->sfActiveSet size %zx %p", sizeof(*pstAddIndicationDest), pstAddIndicationDest);
1930 //BCM_DEBUG_PRINT_BUFFER(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, (unsigned char *)pstAddIndicationDest, sizeof(*pstAddIndicationDest));
1931 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "============================================================");
1932 return pstAddIndicationDest;
1933 failed_restore_sf_param:
1934 kfree(pstAddIndicationDest);
1935 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "<=====" );
1939 ULONG SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter)
1941 ULONG ulTargetDsxBuffersBase = 0;
1942 ULONG ulCntTargetBuffers;
1947 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Adapter was NULL!!!");
1951 if(Adapter->astTargetDsxBuffer[0].ulTargetDsxBuffer)
1954 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Size of Each DSX Buffer(Also size of ServiceFlowParamSI): %zx ",sizeof(stServiceFlowParamSI));
1955 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Reading DSX buffer From Target location %x ",DSX_MESSAGE_EXCHANGE_BUFFER);
1957 Status = rdmalt(Adapter, DSX_MESSAGE_EXCHANGE_BUFFER,
1958 (PUINT)&ulTargetDsxBuffersBase, sizeof(UINT));
1961 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "RDM failed!!");
1965 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Base Address Of DSX Target Buffer : 0x%lx",ulTargetDsxBuffersBase);
1967 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Tgt Buffer is Now %lx :",ulTargetDsxBuffersBase);
1969 ulCntTargetBuffers = DSX_MESSAGE_EXCHANGE_BUFFER_SIZE/sizeof(stServiceFlowParamSI);
1971 Adapter->ulTotalTargetBuffersAvailable =
1972 ulCntTargetBuffers > MAX_TARGET_DSX_BUFFERS ?
1973 MAX_TARGET_DSX_BUFFERS : ulCntTargetBuffers;
1975 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " Total Target DSX Buffer setup %lx ",Adapter->ulTotalTargetBuffersAvailable);
1977 for(ulIndex=0; ulIndex < Adapter->ulTotalTargetBuffersAvailable ; ulIndex++)
1979 Adapter->astTargetDsxBuffer[ulIndex].ulTargetDsxBuffer = ulTargetDsxBuffersBase;
1980 Adapter->astTargetDsxBuffer[ulIndex].valid=1;
1981 Adapter->astTargetDsxBuffer[ulIndex].tid=0;
1982 ulTargetDsxBuffersBase+=sizeof(stServiceFlowParamSI);
1983 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " Target DSX Buffer %lx setup at 0x%lx",
1984 ulIndex, Adapter->astTargetDsxBuffer[ulIndex].ulTargetDsxBuffer);
1986 Adapter->ulCurrentTargetBuffer = 0;
1987 Adapter->ulFreeTargetBufferCnt = Adapter->ulTotalTargetBuffersAvailable;
1991 ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter,B_UINT16 tid)
1993 ULONG ulTargetDSXBufferAddress;
1994 ULONG ulTargetDsxBufferIndexToUse,ulMaxTry;
1996 if((Adapter->ulTotalTargetBuffersAvailable == 0)||
1997 (Adapter->ulFreeTargetBufferCnt == 0))
1999 ClearTargetDSXBuffer(Adapter,tid,FALSE);
2003 ulTargetDsxBufferIndexToUse = Adapter->ulCurrentTargetBuffer;
2004 ulMaxTry = Adapter->ulTotalTargetBuffersAvailable;
2005 while((ulMaxTry)&&(Adapter->astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].valid != 1))
2007 ulTargetDsxBufferIndexToUse = (ulTargetDsxBufferIndexToUse+1)%
2008 Adapter->ulTotalTargetBuffersAvailable;
2014 BCM_DEBUG_PRINT (Adapter, DBG_TYPE_PRINTK, 0, 0, "\n GetNextTargetBufferLocation : Error No Free Target DSX Buffers FreeCnt : %lx ",Adapter->ulFreeTargetBufferCnt);
2015 ClearTargetDSXBuffer(Adapter,tid,FALSE);
2020 ulTargetDSXBufferAddress =
2021 Adapter->astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].ulTargetDsxBuffer;
2022 Adapter->astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].valid=0;
2023 Adapter->astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].tid=tid;
2024 Adapter->ulFreeTargetBufferCnt--;
2027 ulTargetDsxBufferIndexToUse =
2028 (ulTargetDsxBufferIndexToUse+1)%Adapter->ulTotalTargetBuffersAvailable;
2029 Adapter->ulCurrentTargetBuffer = ulTargetDsxBufferIndexToUse;
2030 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "GetNextTargetBufferLocation :Returning address %lx tid %d\n",
2031 ulTargetDSXBufferAddress,tid);
2032 return ulTargetDSXBufferAddress;
2036 INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter)
2039 //Need to Allocate memory to contain the SUPER Large structures
2040 //Our driver cant create these structures on Stack
2042 Adapter->caDsxReqResp=kmalloc(sizeof(stLocalSFAddIndicationAlt)+LEADER_SIZE, GFP_KERNEL);
2043 if(!Adapter->caDsxReqResp)
2048 INT FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter)
2050 if(Adapter->caDsxReqResp)
2052 kfree(Adapter->caDsxReqResp);
2058 @ingroup ctrl_pkt_functions
2059 This routinue would process the Control responses
2060 for the Connection Management.
2061 @return - Queue index for the free SFID else returns Invalid Index.
2063 BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, /**<Pointer to the Adapter structure*/
2064 PVOID pvBuffer /**Starting Address of the Buffer, that contains the AddIndication Data*/
2067 stServiceFlowParamSI *psfLocalSet=NULL;
2068 stLocalSFAddIndicationAlt *pstAddIndication = NULL;
2069 stLocalSFChangeIndicationAlt *pstChangeIndication = NULL;
2070 PLEADER pLeader=NULL;
2072 //Otherwise the message contains a target address from where we need to
2073 //read out the rest of the service flow param structure
2075 if((pstAddIndication = RestoreCmControlResponseMessage(Adapter,pvBuffer))
2078 ClearTargetDSXBuffer(Adapter,((stLocalSFAddIndication *)pvBuffer)->u16TID, FALSE);
2079 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_PRINTK, 0, 0, "Error in restoring Service Flow param structure from DSx message");
2083 DumpCmControlPacket(pstAddIndication);
2084 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "====>");
2085 pLeader = (PLEADER)Adapter->caDsxReqResp;
2087 pLeader->Status =CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ;
2090 ClearTargetDSXBuffer(Adapter,pstAddIndication->u16TID,FALSE);
2091 BCM_DEBUG_PRINT (Adapter, DBG_TYPE_PRINTK, 0, 0, "### TID RECEIVED %d\n",pstAddIndication->u16TID);
2092 switch(pstAddIndication->u8Type)
2096 pLeader->PLength = sizeof(stLocalSFAddIndicationAlt);
2097 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Sending DSA Response....\n");
2098 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSA RESPONSE TO MAC %d", pLeader->PLength );
2099 *((stLocalSFAddIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))
2100 = *pstAddIndication;
2101 ((stLocalSFAddIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_RSP;
2103 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " VCID = %x", ntohs(pstAddIndication->u16VCID));
2104 CopyBufferToControlPacket(Adapter,(PVOID)Adapter->caDsxReqResp);
2105 kfree(pstAddIndication);
2110 pLeader->PLength = sizeof(stLocalSFAddIndicationAlt);
2111 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSA ACK TO MAC %d",
2113 *((stLocalSFAddIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))
2114 = *pstAddIndication;
2115 ((stLocalSFAddIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_ACK;
2117 }//no break here..we should go down.
2120 UINT uiSearchRuleIndex=0;
2121 struct timeval tv = {0};
2122 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "VCID:0x%X",
2123 ntohs(pstAddIndication->u16VCID));
2124 uiSearchRuleIndex=SearchFreeSfid(Adapter);
2125 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"uiSearchRuleIndex:0x%X ",
2127 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Direction:0x%X ",
2128 pstAddIndication->u8Direction);
2129 if((uiSearchRuleIndex< NO_OF_QUEUES) )
2131 Adapter->PackInfo[uiSearchRuleIndex].ucDirection =
2132 pstAddIndication->u8Direction;
2133 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "bValid:0x%X ",
2134 pstAddIndication->sfActiveSet.bValid);
2135 if(pstAddIndication->sfActiveSet.bValid==TRUE)
2137 Adapter->PackInfo[uiSearchRuleIndex].bActiveSet=TRUE;
2139 if(pstAddIndication->sfAuthorizedSet.bValid==TRUE)
2141 Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet=TRUE;
2143 if(pstAddIndication->sfAdmittedSet.bValid==TRUE)
2145 Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet=TRUE;
2147 if(FALSE == pstAddIndication->sfActiveSet.bValid)
2149 Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE;
2150 Adapter->PackInfo[uiSearchRuleIndex].bActivateRequestSent = FALSE;
2151 if(pstAddIndication->sfAdmittedSet.bValid)
2153 psfLocalSet = &pstAddIndication->sfAdmittedSet;
2155 else if(pstAddIndication->sfAuthorizedSet.bValid)
2157 psfLocalSet = &pstAddIndication->sfAuthorizedSet;
2162 psfLocalSet = &pstAddIndication->sfActiveSet;
2163 Adapter->PackInfo[uiSearchRuleIndex].bActive=TRUE;
2168 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "No set is valid\n");
2169 Adapter->PackInfo[uiSearchRuleIndex].bActive=FALSE;
2170 Adapter->PackInfo[uiSearchRuleIndex].bValid=FALSE;
2171 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value=0;
2172 kfree(pstAddIndication);
2175 else if(psfLocalSet->bValid && (pstAddIndication->u8CC == 0))
2177 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "DSA ACK");
2178 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value =
2179 ntohs(pstAddIndication->u16VCID);
2180 Adapter->PackInfo[uiSearchRuleIndex].usCID =
2181 ntohs(pstAddIndication->u16CID);
2183 if(UPLINK_DIR == pstAddIndication->u8Direction)
2184 atomic_set(&Adapter->PackInfo[uiSearchRuleIndex].uiPerSFTxResourceCount, DEFAULT_PERSFCOUNT);
2185 CopyToAdapter(Adapter,psfLocalSet,uiSearchRuleIndex,
2186 DSA_ACK, pstAddIndication);
2187 // don't free pstAddIndication
2189 /* Inside CopyToAdapter, Sorting of all the SFs take place.
2190 Hence any access to the newly added SF through uiSearchRuleIndex is invalid.
2191 SHOULD BE STRICTLY AVOIDED.
2193 // *(PULONG)(((PUCHAR)pvBuffer)+1)=psfLocalSet->u32SFID;
2194 memcpy((((PUCHAR)pvBuffer)+1), &psfLocalSet->u32SFID, 4);
2196 if(pstAddIndication->sfActiveSet.bValid == TRUE)
2198 if(UPLINK_DIR == pstAddIndication->u8Direction)
2200 if(!Adapter->LinkUpStatus)
2202 netif_carrier_on(Adapter->dev);
2203 netif_start_queue(Adapter->dev);
2204 Adapter->LinkUpStatus = 1;
2205 do_gettimeofday(&tv);
2207 atomic_set(&Adapter->TxPktAvail, 1);
2208 wake_up(&Adapter->tx_packet_wait_queue);
2209 Adapter->liTimeSinceLastNetEntry = tv.tv_sec;
2210 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "============Tx Service Flow Created!");
2218 Adapter->PackInfo[uiSearchRuleIndex].bActive=FALSE;
2219 Adapter->PackInfo[uiSearchRuleIndex].bValid=FALSE;
2220 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value=0;
2221 kfree(pstAddIndication);
2226 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_PRINTK, 0, 0, "DSA ACK did not get valid SFID");
2227 kfree(pstAddIndication);
2234 pLeader->PLength = sizeof(stLocalSFChangeIndicationAlt);
2235 pstChangeIndication = (stLocalSFChangeIndicationAlt*)pstAddIndication;
2236 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSC RESPONSE TO MAC %d", pLeader->PLength);
2238 *((stLocalSFChangeIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
2239 ((stLocalSFChangeIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_RSP;
2241 CopyBufferToControlPacket(Adapter,(PVOID)Adapter->caDsxReqResp);
2242 kfree(pstAddIndication);
2247 pLeader->PLength = sizeof(stLocalSFChangeIndicationAlt);
2248 pstChangeIndication = (stLocalSFChangeIndicationAlt*)pstAddIndication;
2249 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSC ACK TO MAC %d", pLeader->PLength);
2250 *((stLocalSFChangeIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
2251 ((stLocalSFChangeIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_ACK;
2255 UINT uiSearchRuleIndex=0;
2257 pstChangeIndication = (stLocalSFChangeIndicationAlt *)pstAddIndication;
2258 uiSearchRuleIndex=SearchSfid(Adapter,ntohl(pstChangeIndication->sfActiveSet.u32SFID));
2259 if(uiSearchRuleIndex > NO_OF_QUEUES-1)
2261 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_PRINTK, 0, 0, "SF doesn't exist for which DSC_ACK is received");
2263 if((uiSearchRuleIndex < NO_OF_QUEUES))
2265 Adapter->PackInfo[uiSearchRuleIndex].ucDirection = pstChangeIndication->u8Direction;
2266 if(pstChangeIndication->sfActiveSet.bValid==TRUE)
2268 Adapter->PackInfo[uiSearchRuleIndex].bActiveSet=TRUE;
2270 if(pstChangeIndication->sfAuthorizedSet.bValid==TRUE)
2272 Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet=TRUE;
2274 if(pstChangeIndication->sfAdmittedSet.bValid==TRUE)
2276 Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet=TRUE;
2279 if(FALSE==pstChangeIndication->sfActiveSet.bValid)
2281 Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE;
2282 Adapter->PackInfo[uiSearchRuleIndex].bActivateRequestSent = FALSE;
2283 if(pstChangeIndication->sfAdmittedSet.bValid)
2285 psfLocalSet = &pstChangeIndication->sfAdmittedSet;
2287 else if(pstChangeIndication->sfAuthorizedSet.bValid)
2289 psfLocalSet = &pstChangeIndication->sfAuthorizedSet;
2295 psfLocalSet = &pstChangeIndication->sfActiveSet;
2296 Adapter->PackInfo[uiSearchRuleIndex].bActive=TRUE;
2298 if(psfLocalSet->bValid && (pstChangeIndication->u8CC == 0))
2300 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value =
2301 ntohs(pstChangeIndication->u16VCID);
2302 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "CC field is %d bvalid = %d\n",
2303 pstChangeIndication->u8CC, psfLocalSet->bValid);
2304 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "VCID= %d\n", ntohs(pstChangeIndication->u16VCID));
2305 Adapter->PackInfo[uiSearchRuleIndex].usCID =
2306 ntohs(pstChangeIndication->u16CID);
2307 CopyToAdapter(Adapter,psfLocalSet,uiSearchRuleIndex,
2308 DSC_ACK, pstAddIndication);
2310 *(PULONG)(((PUCHAR)pvBuffer)+1)=psfLocalSet->u32SFID;
2312 else if(pstChangeIndication->u8CC == 6)
2314 deleteSFBySfid(Adapter,uiSearchRuleIndex);
2315 kfree(pstAddIndication);
2320 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_PRINTK, 0, 0, "DSC ACK did not get valid SFID");
2321 kfree(pstAddIndication);
2328 UINT uiSearchRuleIndex;
2331 pLeader->PLength = sizeof(stLocalSFDeleteIndication);
2332 *((stLocalSFDeleteIndication*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((stLocalSFDeleteIndication*)pstAddIndication);
2334 ulSFID = ntohl(((stLocalSFDeleteIndication*)pstAddIndication)->u32SFID);
2335 uiSearchRuleIndex=SearchSfid(Adapter,ulSFID);
2336 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "DSD - Removing connection %x",uiSearchRuleIndex);
2338 if(uiSearchRuleIndex < NO_OF_QUEUES)
2340 //Delete All Classifiers Associated with this SFID
2341 deleteSFBySfid(Adapter,uiSearchRuleIndex);
2342 Adapter->u32TotalDSD++;
2345 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSD RESPONSE TO MAC");
2346 ((stLocalSFDeleteIndication*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP;
2347 CopyBufferToControlPacket(Adapter,(PVOID)Adapter->caDsxReqResp);
2351 //Do nothing as SF has already got Deleted
2355 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "DSD ACK Rcd, let App handle it\n");
2358 kfree(pstAddIndication);
2364 int get_dsx_sf_data_to_application(PMINI_ADAPTER Adapter, UINT uiSFId, void __user *user_buffer)
2367 struct _packet_info *psSfInfo=NULL;
2368 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "status =%d",status);
2369 status = SearchSfid(Adapter, uiSFId);
2370 if (status >= NO_OF_QUEUES) {
2371 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SFID %d not present in queue !!!", uiSFId );
2374 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "status =%d",status);
2375 psSfInfo=&Adapter->PackInfo[status];
2376 if(psSfInfo->pstSFIndication && copy_to_user(user_buffer,
2377 psSfInfo->pstSFIndication, sizeof(stLocalSFAddIndicationAlt)))
2379 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "copy to user failed SFID %d, present in queue !!!", uiSFId );
2383 return STATUS_SUCCESS;
2386 VOID OverrideServiceFlowParams(PMINI_ADAPTER Adapter,PUINT puiBuffer)
2388 B_UINT32 u32NumofSFsinMsg = ntohl(*(puiBuffer + 1));
2389 stIM_SFHostNotify *pHostInfo = NULL;
2390 UINT uiSearchRuleIndex = 0;
2395 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u32NumofSFsinMsg: 0x%x\n",u32NumofSFsinMsg);
2397 while(u32NumofSFsinMsg != 0 && u32NumofSFsinMsg < NO_OF_QUEUES)
2400 pHostInfo = (stIM_SFHostNotify *)puiBuffer;
2401 puiBuffer = (PUINT)(pHostInfo + 1);
2403 ulSFID = ntohl(pHostInfo->SFID);
2404 uiSearchRuleIndex=SearchSfid(Adapter,ulSFID);
2405 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"SFID: 0x%lx\n",ulSFID);
2407 if(uiSearchRuleIndex >= NO_OF_QUEUES || uiSearchRuleIndex == HiPriority)
2409 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);
2413 if(pHostInfo->RetainSF == FALSE)
2415 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Going to Delete SF");
2416 deleteSFBySfid(Adapter,uiSearchRuleIndex);
2421 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = ntohs(pHostInfo->VCID);
2422 Adapter->PackInfo[uiSearchRuleIndex].usCID = ntohs(pHostInfo->newCID);
2423 Adapter->PackInfo[uiSearchRuleIndex].bActive=FALSE;
2425 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"pHostInfo->QoSParamSet: 0x%x\n",pHostInfo->QoSParamSet);
2427 if(pHostInfo->QoSParamSet & 0x1)
2428 Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet =TRUE;
2429 if(pHostInfo->QoSParamSet & 0x2)
2430 Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet =TRUE;
2431 if(pHostInfo->QoSParamSet & 0x4)
2433 Adapter->PackInfo[uiSearchRuleIndex].bActiveSet =TRUE;
2434 Adapter->PackInfo[uiSearchRuleIndex].bActive=TRUE;