1 /************************************************************
3 * This file contains the routines for handling Connnection
5 ************************************************************/
10 typedef enum _E_CLASSIFIER_ACTION
12 eInvalidClassifierAction,
18 static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter,B_UINT16 tid);
20 /************************************************************
21 * Function - SearchSfid
23 * Description - This routinue would search QOS queues having
24 * specified SFID as input parameter.
26 * Parameters - Adapter: Pointer to the Adapter structure
27 * uiSfid : Given SFID for matching
29 * Returns - Queue index for this SFID(If matched)
30 Else Invalid Queue Index(If Not matched)
31 ************************************************************/
32 INT SearchSfid(PMINI_ADAPTER Adapter,UINT uiSfid)
35 for(iIndex=(NO_OF_QUEUES-1); iIndex>=0; iIndex--)
36 if(Adapter->PackInfo[iIndex].ulSFID==uiSfid)
38 return NO_OF_QUEUES+1;
41 /***************************************************************
42 * Function - SearchFreeSfid
44 * Description - This routinue would search Free available SFID.
46 * Parameter - Adapter: Pointer to the Adapter structure
48 * Returns - Queue index for the free SFID
49 * Else returns Invalid Index.
50 ****************************************************************/
51 static INT SearchFreeSfid(PMINI_ADAPTER Adapter)
55 for(uiIndex=0; uiIndex < (NO_OF_QUEUES-1); uiIndex++)
56 if(Adapter->PackInfo[uiIndex].ulSFID==0)
58 return NO_OF_QUEUES+1;
61 int SearchVcid(PMINI_ADAPTER Adapter,unsigned short usVcid)
65 for(iIndex=(NO_OF_QUEUES-1);iIndex>=0;iIndex--)
66 if(Adapter->PackInfo[iIndex].usVCID_Value == usVcid)
68 return NO_OF_QUEUES+1;
75 Description: This routinue would search Classifier having specified ClassifierID as input parameter
76 Input parameters: PMINI_ADAPTER Adapter - Adapter Context
77 unsigned int uiSfid - The SF in which the classifier is to searched
78 B_UINT16 uiClassifierID - The classifier ID to be searched
79 Return: int :Classifier table index of matching entry
82 static int SearchClsid(PMINI_ADAPTER Adapter,ULONG ulSFID,B_UINT16 uiClassifierID)
84 unsigned int uiClassifierIndex = 0;
85 for(uiClassifierIndex=0;uiClassifierIndex<MAX_CLASSIFIERS;uiClassifierIndex++)
87 if((Adapter->astClassifierTable[uiClassifierIndex].bUsed) &&
88 (Adapter->astClassifierTable[uiClassifierIndex].uiClassifierRuleIndex == uiClassifierID)&&
89 (Adapter->astClassifierTable[uiClassifierIndex].ulSFID == ulSFID))
90 return uiClassifierIndex;
92 return MAX_CLASSIFIERS+1;
96 @ingroup ctrl_pkt_functions
97 This routinue would search Free available Classifier entry in classifier table.
98 @return free Classifier Entry index in classifier table for specified SF
100 static int SearchFreeClsid(PMINI_ADAPTER Adapter /**Adapter Context*/
103 unsigned int uiClassifierIndex = 0;
104 for(uiClassifierIndex=0;uiClassifierIndex<MAX_CLASSIFIERS;uiClassifierIndex++)
106 if(!Adapter->astClassifierTable[uiClassifierIndex].bUsed)
107 return uiClassifierIndex;
109 return MAX_CLASSIFIERS+1;
112 static VOID deleteSFBySfid(PMINI_ADAPTER Adapter, UINT uiSearchRuleIndex)
114 //deleting all the packet held in the SF
115 flush_queue(Adapter,uiSearchRuleIndex);
117 //Deleting the all classifiers for this SF
118 DeleteAllClassifiersForSF(Adapter,uiSearchRuleIndex);
120 //Resetting only MIBS related entries in the SF
121 memset((PVOID)&Adapter->PackInfo[uiSearchRuleIndex], 0, sizeof(S_MIBS_SERVICEFLOW_TABLE));
125 CopyIpAddrToClassifier(S_CLASSIFIER_RULE *pstClassifierEntry ,
126 B_UINT8 u8IpAddressLen , B_UINT8 *pu8IpAddressMaskSrc ,
127 BOOLEAN bIpVersion6 , E_IPADDR_CONTEXT eIpAddrContext)
130 UINT nSizeOfIPAddressInBytes = IP_LENGTH_OF_ADDRESS;
131 UCHAR *ptrClassifierIpAddress = NULL;
132 UCHAR *ptrClassifierIpMask = NULL;
133 PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
137 nSizeOfIPAddressInBytes = IPV6_ADDRESS_SIZEINBYTES;
139 //Destination Ip Address
140 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Ip Address Range Length:0x%X ",
142 if((bIpVersion6?(IPV6_ADDRESS_SIZEINBYTES * MAX_IP_RANGE_LENGTH * 2):
143 (TOTAL_MASKED_ADDRESS_IN_BYTES)) >= u8IpAddressLen)
146 //checking both the mask and address togethor in Classification.
147 //So length will be : TotalLengthInBytes/nSizeOfIPAddressInBytes * 2
148 //(nSizeOfIPAddressInBytes for address and nSizeOfIPAddressInBytes for mask)
150 if(eIpAddrContext == eDestIpAddress)
152 pstClassifierEntry->ucIPDestinationAddressLength =
153 u8IpAddressLen/(nSizeOfIPAddressInBytes * 2);
156 ptrClassifierIpAddress =
157 pstClassifierEntry->stDestIpAddress.ucIpv6Address;
158 ptrClassifierIpMask =
159 pstClassifierEntry->stDestIpAddress.ucIpv6Mask;
163 ptrClassifierIpAddress =
164 pstClassifierEntry->stDestIpAddress.ucIpv4Address;
165 ptrClassifierIpMask =
166 pstClassifierEntry->stDestIpAddress.ucIpv4Mask;
169 else if(eIpAddrContext == eSrcIpAddress)
171 pstClassifierEntry->ucIPSourceAddressLength =
172 u8IpAddressLen/(nSizeOfIPAddressInBytes * 2);
175 ptrClassifierIpAddress =
176 pstClassifierEntry->stSrcIpAddress.ucIpv6Address;
177 ptrClassifierIpMask =
178 pstClassifierEntry->stSrcIpAddress.ucIpv6Mask;
182 ptrClassifierIpAddress =
183 pstClassifierEntry->stSrcIpAddress.ucIpv4Address;
184 ptrClassifierIpMask =
185 pstClassifierEntry->stSrcIpAddress.ucIpv4Mask;
188 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Address Length:0x%X \n",
189 pstClassifierEntry->ucIPDestinationAddressLength);
190 while((u8IpAddressLen>= nSizeOfIPAddressInBytes) &&
191 (ucLoopIndex < MAX_IP_RANGE_LENGTH))
193 memcpy(ptrClassifierIpAddress +
194 (ucLoopIndex * nSizeOfIPAddressInBytes),
195 (pu8IpAddressMaskSrc+(ucLoopIndex*nSizeOfIPAddressInBytes*2)),
196 nSizeOfIPAddressInBytes);
199 if(eIpAddrContext == eSrcIpAddress)
201 pstClassifierEntry->stSrcIpAddress.ulIpv4Addr[ucLoopIndex]=
202 ntohl(pstClassifierEntry->stSrcIpAddress.
203 ulIpv4Addr[ucLoopIndex]);
204 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Src Ip Address:0x%luX ",pstClassifierEntry->stSrcIpAddress.ulIpv4Addr[ucLoopIndex]);
206 else if(eIpAddrContext == eDestIpAddress)
208 pstClassifierEntry->stDestIpAddress.ulIpv4Addr[ucLoopIndex]= ntohl(pstClassifierEntry->stDestIpAddress.
209 ulIpv4Addr[ucLoopIndex]);
210 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Dest Ip Address:0x%luX ",pstClassifierEntry->stDestIpAddress.ulIpv4Addr[ucLoopIndex]);
213 u8IpAddressLen-=nSizeOfIPAddressInBytes;
214 if(u8IpAddressLen >= nSizeOfIPAddressInBytes)
216 memcpy(ptrClassifierIpMask +
217 (ucLoopIndex * nSizeOfIPAddressInBytes),
218 (pu8IpAddressMaskSrc+nSizeOfIPAddressInBytes +
219 (ucLoopIndex*nSizeOfIPAddressInBytes*2)),
220 nSizeOfIPAddressInBytes);
223 if(eIpAddrContext == eSrcIpAddress)
225 pstClassifierEntry->stSrcIpAddress.
226 ulIpv4Mask[ucLoopIndex]=
227 ntohl(pstClassifierEntry->stSrcIpAddress.
228 ulIpv4Mask[ucLoopIndex]);
229 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Src Ip Mask Address:0x%luX ",pstClassifierEntry->stSrcIpAddress.ulIpv4Mask[ucLoopIndex]);
231 else if(eIpAddrContext == eDestIpAddress)
233 pstClassifierEntry->stDestIpAddress.
234 ulIpv4Mask[ucLoopIndex] =
235 ntohl(pstClassifierEntry->stDestIpAddress.
236 ulIpv4Mask[ucLoopIndex]);
237 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Dest Ip Mask Address:0x%luX ",pstClassifierEntry->stDestIpAddress.ulIpv4Mask[ucLoopIndex]);
240 u8IpAddressLen-=nSizeOfIPAddressInBytes;
242 if(0==u8IpAddressLen)
244 pstClassifierEntry->bDestIpValid=TRUE;
250 //Restore EndianNess of Struct
251 for(ucLoopIndex =0 ; ucLoopIndex < MAX_IP_RANGE_LENGTH * 4 ;
254 if(eIpAddrContext == eSrcIpAddress)
256 pstClassifierEntry->stSrcIpAddress.ulIpv6Addr[ucLoopIndex]=
257 ntohl(pstClassifierEntry->stSrcIpAddress.
258 ulIpv6Addr[ucLoopIndex]);
259 pstClassifierEntry->stSrcIpAddress.ulIpv6Mask[ucLoopIndex]= ntohl(pstClassifierEntry->stSrcIpAddress.
260 ulIpv6Mask[ucLoopIndex]);
262 else if(eIpAddrContext == eDestIpAddress)
264 pstClassifierEntry->stDestIpAddress.ulIpv6Addr[ucLoopIndex]= ntohl(pstClassifierEntry->stDestIpAddress.
265 ulIpv6Addr[ucLoopIndex]);
266 pstClassifierEntry->stDestIpAddress.ulIpv6Mask[ucLoopIndex]= ntohl(pstClassifierEntry->stDestIpAddress.
267 ulIpv6Mask[ucLoopIndex]);
275 void ClearTargetDSXBuffer(PMINI_ADAPTER Adapter,B_UINT16 TID,BOOLEAN bFreeAll)
278 for(ulIndex=0; ulIndex < Adapter->ulTotalTargetBuffersAvailable; ulIndex++)
280 if(Adapter->astTargetDsxBuffer[ulIndex].valid)
282 if ((bFreeAll) || (Adapter->astTargetDsxBuffer[ulIndex].tid == TID)){
283 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "ClearTargetDSXBuffer: found tid %d buffer cleared %lx\n",
284 TID, Adapter->astTargetDsxBuffer[ulIndex].ulTargetDsxBuffer);
285 Adapter->astTargetDsxBuffer[ulIndex].valid=1;
286 Adapter->astTargetDsxBuffer[ulIndex].tid=0;
287 Adapter->ulFreeTargetBufferCnt++;
293 @ingroup ctrl_pkt_functions
294 copy classifier rule into the specified SF index
296 static inline VOID CopyClassifierRuleToSF(PMINI_ADAPTER Adapter,stConvergenceSLTypes *psfCSType,UINT uiSearchRuleIndex,UINT nClassifierIndex)
298 S_CLASSIFIER_RULE *pstClassifierEntry = NULL;
299 //VOID *pvPhsContext = NULL;
301 //UCHAR ucProtocolLength=0;
305 if(Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value == 0 ||
306 nClassifierIndex > (MAX_CLASSIFIERS-1))
310 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Storing Classifier Rule Index : %X",ntohs(psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex));
312 if(nClassifierIndex > MAX_CLASSIFIERS-1)
315 pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
316 if(pstClassifierEntry)
319 pstClassifierEntry->bIpv6Protocol =
320 (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6)?TRUE:FALSE;
323 pstClassifierEntry->ucDestPortRangeLength=psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength/4;
324 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Destination Port Range Length:0x%X ",pstClassifierEntry->ucDestPortRangeLength);
325 if( MAX_PORT_RANGE >= psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength)
327 for(ucLoopIndex=0;ucLoopIndex<(pstClassifierEntry->ucDestPortRangeLength);ucLoopIndex++)
329 pstClassifierEntry->usDestPortRangeLo[ucLoopIndex] =
330 *((PUSHORT)(psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange+ucLoopIndex));
331 pstClassifierEntry->usDestPortRangeHi[ucLoopIndex] =
332 *((PUSHORT)(psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange+2+ucLoopIndex));
333 pstClassifierEntry->usDestPortRangeLo[ucLoopIndex]=ntohs(pstClassifierEntry->usDestPortRangeLo[ucLoopIndex]);
334 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Destination Port Range Lo:0x%X ",pstClassifierEntry->usDestPortRangeLo[ucLoopIndex]);
335 pstClassifierEntry->usDestPortRangeHi[ucLoopIndex]=ntohs(pstClassifierEntry->usDestPortRangeHi[ucLoopIndex]);
340 pstClassifierEntry->ucDestPortRangeLength=0;
343 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Source Port Range Length:0x%X ",psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);
345 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength)
347 pstClassifierEntry->ucSrcPortRangeLength =
348 psfCSType->cCPacketClassificationRule.
349 u8ProtocolSourcePortRangeLength/4;
350 for(ucLoopIndex = 0; ucLoopIndex <
351 (pstClassifierEntry->ucSrcPortRangeLength); ucLoopIndex++)
353 pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex] =
354 *((PUSHORT)(psfCSType->cCPacketClassificationRule.
355 u8ProtocolSourcePortRange+ucLoopIndex));
356 pstClassifierEntry->usSrcPortRangeHi[ucLoopIndex] =
357 *((PUSHORT)(psfCSType->cCPacketClassificationRule.
358 u8ProtocolSourcePortRange+2+ucLoopIndex));
359 pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex] =
360 ntohs(pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex]);
361 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Source Port Range Lo:0x%X ",pstClassifierEntry->usSrcPortRangeLo[ucLoopIndex]);
362 pstClassifierEntry->usSrcPortRangeHi[ucLoopIndex]=ntohs(pstClassifierEntry->usSrcPortRangeHi[ucLoopIndex]);
365 //Destination Ip Address and Mask
366 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Ip Destination Parameters : ");
368 CopyIpAddrToClassifier(pstClassifierEntry,
369 psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength,
370 psfCSType->cCPacketClassificationRule.u8IPDestinationAddress,
371 (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6)?
372 TRUE:FALSE, eDestIpAddress);
374 //Source Ip Address and Mask
375 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Ip Source Parameters : ");
377 CopyIpAddrToClassifier(pstClassifierEntry,
378 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength,
379 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress,
380 (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6)?TRUE:FALSE,
384 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"TOS Length:0x%X ",psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength);
385 if(3 == psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength)
387 pstClassifierEntry->ucIPTypeOfServiceLength =
388 psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength;
389 pstClassifierEntry->ucTosLow =
390 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0];
391 pstClassifierEntry->ucTosHigh =
392 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1];
393 pstClassifierEntry->ucTosMask =
394 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2];
395 pstClassifierEntry->bTOSValid = TRUE;
397 if(psfCSType->cCPacketClassificationRule.u8Protocol == 0)
399 //we didnt get protocol field filled in by the BS
400 pstClassifierEntry->ucProtocolLength=0;
404 pstClassifierEntry->ucProtocolLength=1;// 1 valid protocol
407 pstClassifierEntry->ucProtocol[0] =
408 psfCSType->cCPacketClassificationRule.u8Protocol;
410 pstClassifierEntry->u8ClassifierRulePriority =
411 psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority;
413 //store the classifier rule ID and set this classifier entry as valid
414 pstClassifierEntry->ucDirection =
415 Adapter->PackInfo[uiSearchRuleIndex].ucDirection;
416 pstClassifierEntry->uiClassifierRuleIndex = ntohs(psfCSType->
417 cCPacketClassificationRule.u16PacketClassificationRuleIndex);
418 pstClassifierEntry->usVCID_Value =
419 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
420 pstClassifierEntry->ulSFID =
421 Adapter->PackInfo[uiSearchRuleIndex].ulSFID;
422 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Search Index %d Dir: %d, Index: %d, Vcid: %d\n",
423 uiSearchRuleIndex, pstClassifierEntry->ucDirection,
424 pstClassifierEntry->uiClassifierRuleIndex,
425 pstClassifierEntry->usVCID_Value);
427 if(psfCSType->cCPacketClassificationRule.u8AssociatedPHSI)
429 pstClassifierEntry->u8AssociatedPHSI = psfCSType->cCPacketClassificationRule.u8AssociatedPHSI;
432 //Copy ETH CS Parameters
433 pstClassifierEntry->ucEthCSSrcMACLen = (psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddressLength);
434 memcpy(pstClassifierEntry->au8EThCSSrcMAC,psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress,MAC_ADDRESS_SIZE);
435 memcpy(pstClassifierEntry->au8EThCSSrcMACMask,psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress+MAC_ADDRESS_SIZE,MAC_ADDRESS_SIZE);
436 pstClassifierEntry->ucEthCSDestMACLen = (psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
437 memcpy(pstClassifierEntry->au8EThCSDestMAC,psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress,MAC_ADDRESS_SIZE);
438 memcpy(pstClassifierEntry->au8EThCSDestMACMask,psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress+MAC_ADDRESS_SIZE,MAC_ADDRESS_SIZE);
439 pstClassifierEntry->ucEtherTypeLen = (psfCSType->cCPacketClassificationRule.u8EthertypeLength);
440 memcpy(pstClassifierEntry->au8EthCSEtherType,psfCSType->cCPacketClassificationRule.u8Ethertype,NUM_ETHERTYPE_BYTES);
441 memcpy(pstClassifierEntry->usUserPriority, &psfCSType->cCPacketClassificationRule.u16UserPriority, 2);
442 pstClassifierEntry->usVLANID = ntohs(psfCSType->cCPacketClassificationRule.u16VLANID);
443 pstClassifierEntry->usValidityBitMap = ntohs(psfCSType->cCPacketClassificationRule.u16ValidityBitMap);
445 pstClassifierEntry->bUsed = TRUE;
451 @ingroup ctrl_pkt_functions
453 static inline VOID DeleteClassifierRuleFromSF(PMINI_ADAPTER Adapter,UINT uiSearchRuleIndex,UINT nClassifierIndex)
455 S_CLASSIFIER_RULE *pstClassifierEntry = NULL;
456 B_UINT16 u16PacketClassificationRuleIndex;
458 //VOID *pvPhsContext = NULL;
461 usVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
463 if(nClassifierIndex > MAX_CLASSIFIERS-1)
469 u16PacketClassificationRuleIndex = Adapter->astClassifierTable[nClassifierIndex].uiClassifierRuleIndex;
472 pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
473 if(pstClassifierEntry)
475 pstClassifierEntry->bUsed = FALSE;
476 pstClassifierEntry->uiClassifierRuleIndex = 0;
477 memset(pstClassifierEntry,0,sizeof(S_CLASSIFIER_RULE));
479 //Delete the PHS Rule for this classifier
480 PhsDeleteClassifierRule(
481 &Adapter->stBCMPhsContext,
483 u16PacketClassificationRuleIndex);
488 @ingroup ctrl_pkt_functions
490 VOID DeleteAllClassifiersForSF(PMINI_ADAPTER Adapter,UINT uiSearchRuleIndex)
492 S_CLASSIFIER_RULE *pstClassifierEntry = NULL;
493 UINT nClassifierIndex;
494 //B_UINT16 u16PacketClassificationRuleIndex;
496 //VOID *pvPhsContext = NULL;
499 ulVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
505 for(nClassifierIndex =0 ; nClassifierIndex < MAX_CLASSIFIERS ; nClassifierIndex++)
507 if(Adapter->astClassifierTable[nClassifierIndex].usVCID_Value == ulVCID)
509 pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
510 if(pstClassifierEntry->bUsed)
512 DeleteClassifierRuleFromSF(Adapter,uiSearchRuleIndex,nClassifierIndex);
517 //Delete All Phs Rules Associated with this SF
519 &Adapter->stBCMPhsContext,
526 This routinue copies the Connection Management
527 related data into the Adapter structure.
528 @ingroup ctrl_pkt_functions
531 static VOID CopyToAdapter( register PMINI_ADAPTER Adapter, /**<Pointer to the Adapter structure*/
532 register pstServiceFlowParamSI psfLocalSet, /**<Pointer to the ServiceFlowParamSI structure*/
533 register UINT uiSearchRuleIndex, /**<Index of Queue, to which this data belongs*/
534 register UCHAR ucDsxType,
535 stLocalSFAddIndicationAlt *pstAddIndication)
537 //UCHAR ucProtocolLength=0;
539 UINT nClassifierIndex = 0;
540 E_CLASSIFIER_ACTION eClassifierAction = eInvalidClassifierAction;
541 B_UINT16 u16PacketClassificationRuleIndex=0;
543 stConvergenceSLTypes *psfCSType = NULL;
545 USHORT uVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
549 Adapter->PackInfo[uiSearchRuleIndex].bValid=TRUE;
550 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Search Rule Index = %d\n", uiSearchRuleIndex);
551 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"%s: SFID= %x ",__FUNCTION__, ntohl(psfLocalSet->u32SFID));
552 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Updating Queue %d",uiSearchRuleIndex);
554 ulSFID = ntohl(psfLocalSet->u32SFID);
555 //Store IP Version used
556 //Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF
558 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = 0;
559 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = 0;
561 /*Enable IP/ETh CS Support As Required*/
562 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"CopyToAdapter : u8CSSpecification : %X\n",psfLocalSet->u8CSSpecification);
563 switch(psfLocalSet->u8CSSpecification)
567 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV4_CS;
572 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV6_CS;
576 case eCS802_3PacketEthernet:
577 case eCS802_1QPacketVLAN:
579 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = ETH_CS_802_3;
583 case eCSPacketIPV4Over802_1QVLAN:
584 case eCSPacketIPV4Over802_3Ethernet:
586 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV4_CS;
587 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = ETH_CS_802_3;
591 case eCSPacketIPV6Over802_1QVLAN:
592 case eCSPacketIPV6Over802_3Ethernet:
594 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV6_CS;
595 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = ETH_CS_802_3;
601 BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Error in value of CS Classification.. setting default to IP CS\n");
602 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV4_CS;
607 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",
609 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport,
610 Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport);
612 //Store IP Version used
613 //Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF
614 if(Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport == IPV6_CS)
616 Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion = IPV6;
620 Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion = IPV4;
623 /* To ensure that the ETH CS code doesn't gets executed if the BS doesn't supports ETH CS */
624 if(!Adapter->bETHCSEnabled)
625 Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = 0;
627 if(psfLocalSet->u8ServiceClassNameLength > 0 &&
628 psfLocalSet->u8ServiceClassNameLength < 32)
630 memcpy(Adapter->PackInfo[uiSearchRuleIndex].ucServiceClassName,
631 psfLocalSet->u8ServiceClassName,
632 psfLocalSet->u8ServiceClassNameLength);
634 Adapter->PackInfo[uiSearchRuleIndex].u8QueueType =
635 psfLocalSet->u8ServiceFlowSchedulingType;
637 if(Adapter->PackInfo[uiSearchRuleIndex].u8QueueType==BE &&
638 Adapter->PackInfo[uiSearchRuleIndex].ucDirection)
640 Adapter->usBestEffortQueueIndex=uiSearchRuleIndex;
643 Adapter->PackInfo[uiSearchRuleIndex].ulSFID = ntohl(psfLocalSet->u32SFID);
645 Adapter->PackInfo[uiSearchRuleIndex].u8TrafficPriority = psfLocalSet->u8TrafficPriority;
647 //copy all the classifier in the Service Flow param structure
648 for(nIndex=0; nIndex<psfLocalSet->u8TotalClassifiers; nIndex++)
650 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Classifier index =%d",nIndex);
651 psfCSType = &psfLocalSet->cConvergenceSLTypes[nIndex];
652 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Classifier index =%d",nIndex);
654 if(psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority)
656 Adapter->PackInfo[uiSearchRuleIndex].bClassifierPriority=TRUE;
659 if(psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority)
661 Adapter->PackInfo[uiSearchRuleIndex].bClassifierPriority=TRUE;
665 if(ucDsxType== DSA_ACK)
667 eClassifierAction = eAddClassifier;
669 else if(ucDsxType == DSC_ACK)
671 switch(psfCSType->u8ClassfierDSCAction)
673 case 0://DSC Add Classifier
675 eClassifierAction = eAddClassifier;
678 case 1://DSC Replace Classifier
680 eClassifierAction = eReplaceClassifier;
683 case 2://DSC Delete Classifier
685 eClassifierAction = eDeleteClassifier;
691 eClassifierAction = eInvalidClassifierAction;
696 u16PacketClassificationRuleIndex = ntohs(psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
698 switch(eClassifierAction)
702 //Get a Free Classifier Index From Classifier table for this SF to add the Classifier
703 //Contained in this message
704 nClassifierIndex = SearchClsid(Adapter,ulSFID,u16PacketClassificationRuleIndex);
706 if(nClassifierIndex > MAX_CLASSIFIERS)
708 nClassifierIndex = SearchFreeClsid(Adapter);
709 if(nClassifierIndex > MAX_CLASSIFIERS)
711 //Failed To get a free Entry
712 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Error Failed To get a free Classifier Entry");
715 //Copy the Classifier Rule for this service flow into our Classifier table maintained per SF.
716 CopyClassifierRuleToSF(Adapter,psfCSType,uiSearchRuleIndex,nClassifierIndex);
721 //This Classifier Already Exists and it is invalid to Add Classifier with existing PCRI
722 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"CopyToAdapter : Error The Specified Classifier Already Exists \
723 and attempted To Add Classifier with Same PCRI : 0x%x\n", u16PacketClassificationRuleIndex);
728 case eReplaceClassifier:
730 //Get the Classifier Index From Classifier table for this SF and replace existing Classifier
731 //with the new classifier Contained in this message
732 nClassifierIndex = SearchClsid(Adapter,ulSFID,u16PacketClassificationRuleIndex);
733 if(nClassifierIndex > MAX_CLASSIFIERS)
735 //Failed To search the classifier
736 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Error Search for Classifier To be replaced failed");
739 //Copy the Classifier Rule for this service flow into our Classifier table maintained per SF.
740 CopyClassifierRuleToSF(Adapter,psfCSType,uiSearchRuleIndex,nClassifierIndex);
744 case eDeleteClassifier:
746 //Get the Classifier Index From Classifier table for this SF and replace existing Classifier
747 //with the new classifier Contained in this message
748 nClassifierIndex = SearchClsid(Adapter,ulSFID,u16PacketClassificationRuleIndex);
749 if(nClassifierIndex > MAX_CLASSIFIERS)
751 //Failed To search the classifier
752 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Error Search for Classifier To be deleted failed");
756 //Delete This classifier
757 DeleteClassifierRuleFromSF(Adapter,uiSearchRuleIndex,nClassifierIndex);
763 //Invalid Action for classifier
769 //Repeat parsing Classification Entries to process PHS Rules
770 for(nIndex=0; nIndex < psfLocalSet->u8TotalClassifiers; nIndex++)
772 psfCSType = &psfLocalSet->cConvergenceSLTypes[nIndex];
774 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "psfCSType->u8PhsDSCAction : 0x%x\n",
775 psfCSType->u8PhsDSCAction );
777 switch (psfCSType->u8PhsDSCAction)
779 case eDeleteAllPHSRules:
781 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Deleting All PHS Rules For VCID: 0x%X\n",uVCID);
783 //Delete All the PHS rules for this Service flow
786 &Adapter->stBCMPhsContext,
793 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"PHS DSC Action = Delete PHS Rule \n");
795 if(psfCSType->cPhsRule.u8PHSI)
798 &Adapter->stBCMPhsContext,
800 psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
804 //BCM_DEBUG_PRINT(CONN_MSG,("Error CPHSRule.PHSI is ZERO \n"));
810 if(ucDsxType == DSC_ACK)
812 //BCM_DEBUG_PRINT(CONN_MSG,("Invalid PHS DSC Action For DSC \n",psfCSType->cPhsRule.u8PHSI));
813 break; //FOr DSC ACK Case PHS DSC Action must be in valid set
816 //Proceed To Add PHS rule for DSA_ACK case even if PHS DSC action is unspecified
817 //No Break Here . Intentionally!
822 if(psfCSType->cPhsRule.u8PHSI)
824 //Apply This PHS Rule to all classifiers whose Associated PHSI Match
825 unsigned int uiClassifierIndex = 0;
826 if(pstAddIndication->u8Direction == UPLINK_DIR )
828 for(uiClassifierIndex=0;uiClassifierIndex<MAX_CLASSIFIERS;uiClassifierIndex++)
830 if((Adapter->astClassifierTable[uiClassifierIndex].bUsed) &&
831 (Adapter->astClassifierTable[uiClassifierIndex].ulSFID == Adapter->PackInfo[uiSearchRuleIndex].ulSFID) &&
832 (Adapter->astClassifierTable[uiClassifierIndex].u8AssociatedPHSI == psfCSType->cPhsRule.u8PHSI))
834 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Adding PHS Rule For Classifier : 0x%x cPhsRule.u8PHSI : 0x%x\n",
835 Adapter->astClassifierTable[uiClassifierIndex].uiClassifierRuleIndex,
836 psfCSType->cPhsRule.u8PHSI);
837 //Update The PHS Rule for this classifier as Associated PHSI id defined
840 sPhsRule.u8PHSI = psfCSType->cPhsRule.u8PHSI;
841 sPhsRule.u8PHSFLength = psfCSType->cPhsRule.u8PHSFLength;
842 sPhsRule.u8PHSMLength = psfCSType->cPhsRule.u8PHSMLength;
843 sPhsRule.u8PHSS = psfCSType->cPhsRule.u8PHSS;
844 sPhsRule.u8PHSV = psfCSType->cPhsRule.u8PHSV;
845 memcpy(sPhsRule.u8PHSF,psfCSType->cPhsRule.u8PHSF,MAX_PHS_LENGTHS);
846 memcpy(sPhsRule.u8PHSM,psfCSType->cPhsRule.u8PHSM,MAX_PHS_LENGTHS);
847 sPhsRule.u8RefCnt = 0;
848 sPhsRule.bUnclassifiedPHSRule = FALSE;
849 sPhsRule.PHSModifiedBytes = 0;
850 sPhsRule.PHSModifiedNumPackets = 0;
851 sPhsRule.PHSErrorNumPackets = 0;
853 //bPHSRuleAssociated = TRUE;
854 //Store The PHS Rule for this classifier
856 PhsUpdateClassifierRule(
857 &Adapter->stBCMPhsContext,
859 Adapter->astClassifierTable[uiClassifierIndex].uiClassifierRuleIndex,
861 Adapter->astClassifierTable[uiClassifierIndex].u8AssociatedPHSI);
863 //Update PHS Rule For the Classifier
866 Adapter->astClassifierTable[uiClassifierIndex].u32PHSRuleID = sPhsRule.u8PHSI;
867 memcpy(&Adapter->astClassifierTable[uiClassifierIndex].sPhsRule,&sPhsRule,sizeof(S_PHS_RULE));
875 //Error PHS Rule specified in signaling could not be applied to any classifier
878 sPhsRule.u8PHSI = psfCSType->cPhsRule.u8PHSI;
879 sPhsRule.u8PHSFLength = psfCSType->cPhsRule.u8PHSFLength;
880 sPhsRule.u8PHSMLength = psfCSType->cPhsRule.u8PHSMLength;
881 sPhsRule.u8PHSS = psfCSType->cPhsRule.u8PHSS;
882 sPhsRule.u8PHSV = psfCSType->cPhsRule.u8PHSV;
883 memcpy(sPhsRule.u8PHSF,psfCSType->cPhsRule.u8PHSF,MAX_PHS_LENGTHS);
884 memcpy(sPhsRule.u8PHSM,psfCSType->cPhsRule.u8PHSM,MAX_PHS_LENGTHS);
885 sPhsRule.u8RefCnt = 0;
886 sPhsRule.bUnclassifiedPHSRule = TRUE;
887 sPhsRule.PHSModifiedBytes = 0;
888 sPhsRule.PHSModifiedNumPackets = 0;
889 sPhsRule.PHSErrorNumPackets = 0;
890 //Store The PHS Rule for this classifier
893 Passing the argument u8PHSI instead of clsid. Because for DL with no classifier rule,
894 clsid will be zero hence we cant have multiple PHS rules for the same SF.
895 To support multiple PHS rule, passing u8PHSI.
898 PhsUpdateClassifierRule(
899 &Adapter->stBCMPhsContext,
913 if(psfLocalSet->u32MaxSustainedTrafficRate == 0 )
915 //No Rate Limit . Set Max Sustained Traffic Rate to Maximum
916 Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate =
917 WIMAX_MAX_ALLOWED_RATE;
920 else if (ntohl(psfLocalSet->u32MaxSustainedTrafficRate) >
921 WIMAX_MAX_ALLOWED_RATE)
923 //Too large Allowed Rate specified. Limiting to Wi Max Allowed rate
924 Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate =
925 WIMAX_MAX_ALLOWED_RATE;
929 Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate =
930 ntohl(psfLocalSet->u32MaxSustainedTrafficRate);
933 Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency = ntohl(psfLocalSet->u32MaximumLatency);
935 if(Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency == 0) /* 0 should be treated as infinite */
936 Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency = MAX_LATENCY_ALLOWED;
939 if(( Adapter->PackInfo[uiSearchRuleIndex].u8QueueType == ERTPS ||
940 Adapter->PackInfo[uiSearchRuleIndex].u8QueueType == UGS ) )
941 UGIValue = ntohs(psfLocalSet->u16UnsolicitedGrantInterval);
944 UGIValue = DEFAULT_UG_INTERVAL;
947 For UGI based connections...
948 DEFAULT_UGI_FACTOR*UGIInterval worth of data is the max token count at host...
949 The extra amount of token is to ensure that a large amount of jitter won't have loss in throughput...
950 In case of non-UGI based connection, 200 frames worth of data is the max token count at host...
953 Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize =
954 (DEFAULT_UGI_FACTOR*Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate*UGIValue)/1000;
956 if(Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize < WIMAX_MAX_MTU*8)
959 /* Special Handling to ensure the biggest size of packet can go out from host to FW as follows:
960 1. Any packet from Host to FW can go out in different packet size.
961 2. So in case the Bucket count is smaller than MTU, the packets of size (Size > TokenCount), will get dropped.
962 3. We can allow packets of MaxSize from Host->FW that can go out from FW in multiple SDUs by fragmentation at Wimax Layer
964 UGIFactor = (Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency/UGIValue + 1);
966 if(UGIFactor > DEFAULT_UGI_FACTOR)
967 Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize =
968 (UGIFactor*Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate*UGIValue)/1000;
970 if(Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize > WIMAX_MAX_MTU*8)
971 Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize = WIMAX_MAX_MTU*8;
975 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"LAT: %d, UGI: %d \n", Adapter->PackInfo[uiSearchRuleIndex].uiMaxLatency, UGIValue);
976 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"uiMaxAllowedRate: 0x%x, u32MaxSustainedTrafficRate: 0x%x ,uiMaxBucketSize: 0x%x",
977 Adapter->PackInfo[uiSearchRuleIndex].uiMaxAllowedRate,
978 ntohl(psfLocalSet->u32MaxSustainedTrafficRate),
979 Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize);
981 //copy the extended SF Parameters to Support MIBS
982 CopyMIBSExtendedSFParameters(Adapter,psfLocalSet,uiSearchRuleIndex);
984 //store header suppression enabled flag per SF
985 Adapter->PackInfo[uiSearchRuleIndex].bHeaderSuppressionEnabled =
986 !(psfLocalSet->u8RequesttransmissionPolicy &
987 MASK_DISABLE_HEADER_SUPPRESSION);
989 if(Adapter->PackInfo[uiSearchRuleIndex].pstSFIndication)
991 kfree(Adapter->PackInfo[uiSearchRuleIndex].pstSFIndication);
992 Adapter->PackInfo[uiSearchRuleIndex].pstSFIndication = NULL;
994 Adapter->PackInfo[uiSearchRuleIndex].pstSFIndication = pstAddIndication;
996 //Re Sort the SF list in PackInfo according to Traffic Priority
997 SortPackInfo(Adapter);
999 /* Re Sort the Classifier Rules table and re - arrange
1000 according to Classifier Rule Priority */
1001 SortClassifiers(Adapter);
1003 DumpPhsRules(&Adapter->stBCMPhsContext);
1005 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"%s <=====", __FUNCTION__);
1009 /***********************************************************************
1010 * Function - DumpCmControlPacket
1012 * Description - This routinue Dumps the Contents of the AddIndication
1013 * Structure in the Connection Management Control Packet
1015 * Parameter - pvBuffer: Pointer to the buffer containing the
1016 * AddIndication data.
1019 *************************************************************************/
1020 static VOID DumpCmControlPacket(PVOID pvBuffer)
1024 stLocalSFAddIndicationAlt *pstAddIndication;
1025 UINT nCurClassifierCnt;
1026 PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
1028 pstAddIndication = (stLocalSFAddIndicationAlt *)pvBuffer;
1029 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "======>");
1031 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Type : 0x%X",pstAddIndication->u8Type);
1032 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Direction : 0x%X",pstAddIndication->u8Direction);
1033 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TID: 0x%X", ntohs(pstAddIndication->u16TID));
1034 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID : 0x%X",ntohs(pstAddIndication->u16CID));
1035 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VCID : 0x%X",ntohs(pstAddIndication->u16VCID));
1037 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " AuthorizedSet--->");
1039 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID : 0x%X",htonl(pstAddIndication->sfAuthorizedSet.u32SFID));
1040 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID : 0x%X",htons(pstAddIndication->sfAuthorizedSet.u16CID));
1041 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength : 0x%X",
1042 pstAddIndication->sfAuthorizedSet.u8ServiceClassNameLength);
1044 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",
1045 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[0],
1046 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[1],
1047 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[2],
1048 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[3],
1049 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[4],
1050 pstAddIndication->sfAuthorizedSet.u8ServiceClassName[5]);
1052 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService : 0x%X",
1053 pstAddIndication->sfAuthorizedSet.u8MBSService);
1054 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet : 0x%X",
1055 pstAddIndication->sfAuthorizedSet.u8QosParamSet);
1056 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficPriority : 0x%X, %p",
1057 pstAddIndication->sfAuthorizedSet.u8TrafficPriority, &pstAddIndication->sfAuthorizedSet.u8TrafficPriority);
1059 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxSustainedTrafficRate : 0x%X 0x%p",
1060 pstAddIndication->sfAuthorizedSet.u32MaxSustainedTrafficRate,
1061 &pstAddIndication->sfAuthorizedSet.u32MaxSustainedTrafficRate);
1063 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxTrafficBurst : 0x%X",
1064 pstAddIndication->sfAuthorizedSet.u32MaxTrafficBurst);
1065 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MinReservedTrafficRate : 0x%X",
1066 pstAddIndication->sfAuthorizedSet.u32MinReservedTrafficRate);
1067 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParamLength : 0x%X",
1068 pstAddIndication->sfAuthorizedSet.u8VendorSpecificQoSParamLength);
1069 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParam : 0x%X",
1070 pstAddIndication->sfAuthorizedSet.u8VendorSpecificQoSParam[0]);
1071 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceFlowSchedulingType : 0x%X",
1072 pstAddIndication->sfAuthorizedSet.u8ServiceFlowSchedulingType);
1073 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32ToleratedJitter : 0x%X",
1074 pstAddIndication->sfAuthorizedSet.u32ToleratedJitter);
1075 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaximumLatency : 0x%X",
1076 pstAddIndication->sfAuthorizedSet.u32MaximumLatency);
1077 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%X",
1078 pstAddIndication->sfAuthorizedSet.u8FixedLengthVSVariableLengthSDUIndicator);
1080 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8SDUSize : 0x%X",
1081 pstAddIndication->sfAuthorizedSet.u8SDUSize);
1082 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TargetSAID : 0x%X",
1083 pstAddIndication->sfAuthorizedSet.u16TargetSAID);
1084 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQEnable : 0x%X",
1085 pstAddIndication->sfAuthorizedSet.u8ARQEnable);
1086 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQWindowSize : 0x%X",
1087 pstAddIndication->sfAuthorizedSet.u16ARQWindowSize);
1088 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryTxTimeOut : 0x%X",
1089 pstAddIndication->sfAuthorizedSet.u16ARQRetryTxTimeOut);
1090 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryRxTimeOut : 0x%X",
1091 pstAddIndication->sfAuthorizedSet.u16ARQRetryRxTimeOut);
1092 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockLifeTime : 0x%X",
1093 pstAddIndication->sfAuthorizedSet.u16ARQBlockLifeTime);
1094 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQSyncLossTimeOut : 0x%X",
1095 pstAddIndication->sfAuthorizedSet.u16ARQSyncLossTimeOut);
1096 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQDeliverInOrder : 0x%X",
1097 pstAddIndication->sfAuthorizedSet.u8ARQDeliverInOrder);
1098 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRxPurgeTimeOut : 0x%X",
1099 pstAddIndication->sfAuthorizedSet.u16ARQRxPurgeTimeOut);
1100 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockSize : 0x%X",
1101 pstAddIndication->sfAuthorizedSet.u16ARQBlockSize);
1102 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8CSSpecification : 0x%X",
1103 pstAddIndication->sfAuthorizedSet.u8CSSpecification);
1104 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TypeOfDataDeliveryService : 0x%X",
1105 pstAddIndication->sfAuthorizedSet.u8TypeOfDataDeliveryService);
1106 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16SDUInterArrivalTime : 0x%X",
1107 pstAddIndication->sfAuthorizedSet.u16SDUInterArrivalTime);
1108 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TimeBase : 0x%X",
1109 pstAddIndication->sfAuthorizedSet.u16TimeBase);
1110 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8PagingPreference : 0x%X",
1111 pstAddIndication->sfAuthorizedSet.u8PagingPreference);
1112 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UnsolicitedPollingInterval : 0x%X",
1113 pstAddIndication->sfAuthorizedSet.u16UnsolicitedPollingInterval);
1115 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "sfAuthorizedSet.u8HARQChannelMapping %x %x %x ",
1116 *(unsigned int*)pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping,
1117 *(unsigned int*)&pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping[4],
1118 *(USHORT*) &pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping[8]);
1119 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficIndicationPreference : 0x%X",
1120 pstAddIndication->sfAuthorizedSet.u8TrafficIndicationPreference);
1122 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Recieved : 0x%X",pstAddIndication->sfAuthorizedSet.u8TotalClassifiers);
1124 nCurClassifierCnt = pstAddIndication->sfAuthorizedSet.u8TotalClassifiers;
1126 if(nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF)
1128 nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF;
1130 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "pstAddIndication->sfAuthorizedSet.bValid %d", pstAddIndication->sfAuthorizedSet.bValid);
1131 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "pstAddIndication->sfAuthorizedSet.u16MacOverhead %x", pstAddIndication->sfAuthorizedSet.u16MacOverhead);
1132 if(!pstAddIndication->sfAuthorizedSet.bValid)
1133 pstAddIndication->sfAuthorizedSet.bValid=1;
1134 for(nIndex = 0 ; nIndex < nCurClassifierCnt ; nIndex++)
1136 stConvergenceSLTypes *psfCSType = NULL;
1137 psfCSType = &pstAddIndication->sfAuthorizedSet.cConvergenceSLTypes[nIndex];
1139 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "psfCSType = %p", psfCSType);
1140 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "CCPacketClassificationRuleSI====>");
1142 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ClassifierRulePriority :0x%X ",
1143 psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority);
1144 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfServiceLength :0x%X ",
1145 psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength);
1147 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfService[3] :0x%X ,0x%X ,0x%X ",
1148 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0],
1149 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1],
1150 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2]);
1152 for(uiLoopIndex=0; uiLoopIndex < 1; uiLoopIndex++)
1153 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Protocol : 0x%02X ",
1154 psfCSType->cCPacketClassificationRule.u8Protocol);
1156 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddressLength :0x%X ",
1157 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength);
1159 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1160 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddress[32] : 0x%02X ",
1161 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress[uiLoopIndex]);
1163 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddressLength : 0x%X ",
1164 psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength);
1166 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1167 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddress[32] : 0x%02X ",
1168 psfCSType->cCPacketClassificationRule.u8IPDestinationAddress[uiLoopIndex]);
1170 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRangeLength:0x%X ",
1171 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);
1172 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: 0x%02X ,0x%02X ,0x%02X ,0x%02X ",
1173 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[0],
1174 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[1],
1175 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[2],
1176 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[3]);
1178 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRangeLength : 0x%02X ",
1179 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);
1180 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: 0x%02X ,0x%02X ,0x%02X ,0x%02X ",
1181 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[0],
1182 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[1],
1183 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[2],
1184 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[3]);
1186 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetDestMacAddressLength : 0x%02X ",
1187 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1189 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetDestMacAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1190 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[0],
1191 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[1],
1192 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[2],
1193 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[3],
1194 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[4],
1195 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[5]);
1197 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetSourceMACAddressLength : 0x%02X ",
1198 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1200 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetSourceMACAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1201 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[0],
1202 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[1],
1203 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[2],
1204 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[3],
1205 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[4],
1206 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[5]);
1208 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthertypeLength : 0x%02X ",
1209 psfCSType->cCPacketClassificationRule.u8EthertypeLength);
1210 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Ethertype[3] : 0x%02X ,0x%02X ,0x%02X ",
1211 psfCSType->cCPacketClassificationRule.u8Ethertype[0],
1212 psfCSType->cCPacketClassificationRule.u8Ethertype[1],
1213 psfCSType->cCPacketClassificationRule.u8Ethertype[2]);
1215 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UserPriority : 0x%X ",
1216 psfCSType->cCPacketClassificationRule.u16UserPriority);
1218 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VLANID : 0x%X ",
1219 psfCSType->cCPacketClassificationRule.u16VLANID);
1221 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8AssociatedPHSI : 0x%02X ",
1222 psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
1224 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16PacketClassificationRuleIndex : 0x%X ",
1225 psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
1227 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParamLength : 0x%X ",
1228 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParamLength);
1230 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParam[1] : 0x%X ",
1231 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParam[0]);
1233 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLableLength :0x%X ",
1234 psfCSType->cCPacketClassificationRule.u8IPv6FlowLableLength);
1235 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLable[6] : 0x %02X %02X %02X %02X %02X %02X ",
1236 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[0],
1237 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[1],
1238 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[2],
1239 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[3],
1240 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[4],
1241 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[5]);
1245 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "bValid : 0x%02X",pstAddIndication->sfAuthorizedSet.bValid);
1247 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "AdmittedSet--->");
1248 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID : 0x%X",pstAddIndication->sfAdmittedSet.u32SFID);
1249 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID : 0x%X",pstAddIndication->sfAdmittedSet.u16CID);
1250 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength : 0x%X",
1251 pstAddIndication->sfAdmittedSet.u8ServiceClassNameLength);
1252 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassName : 0x %02X %02X %02X %02X %02X %02X",
1253 pstAddIndication->sfAdmittedSet.u8ServiceClassName[0],
1254 pstAddIndication->sfAdmittedSet.u8ServiceClassName[1],
1255 pstAddIndication->sfAdmittedSet.u8ServiceClassName[2],
1256 pstAddIndication->sfAdmittedSet.u8ServiceClassName[3],
1257 pstAddIndication->sfAdmittedSet.u8ServiceClassName[4],
1258 pstAddIndication->sfAdmittedSet.u8ServiceClassName[5]);
1260 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService : 0x%02X",
1261 pstAddIndication->sfAdmittedSet.u8MBSService);
1262 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet : 0x%02X",
1263 pstAddIndication->sfAdmittedSet.u8QosParamSet);
1264 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficPriority : 0x%02X",
1265 pstAddIndication->sfAdmittedSet.u8TrafficPriority);
1266 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxTrafficBurst : 0x%X",
1267 pstAddIndication->sfAdmittedSet.u32MaxTrafficBurst);
1268 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MinReservedTrafficRate : 0x%X",
1269 pstAddIndication->sfAdmittedSet.u32MinReservedTrafficRate);
1271 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParamLength : 0x%02X",
1272 pstAddIndication->sfAdmittedSet.u8VendorSpecificQoSParamLength);
1273 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParam : 0x%02X",
1274 pstAddIndication->sfAdmittedSet.u8VendorSpecificQoSParam[0]);
1275 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceFlowSchedulingType : 0x%02X",
1276 pstAddIndication->sfAdmittedSet.u8ServiceFlowSchedulingType);
1278 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32ToleratedJitter : 0x%X",
1279 pstAddIndication->sfAdmittedSet.u32ToleratedJitter);
1280 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaximumLatency : 0x%X",
1281 pstAddIndication->sfAdmittedSet.u32MaximumLatency);
1283 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%02X",
1284 pstAddIndication->sfAdmittedSet.u8FixedLengthVSVariableLengthSDUIndicator);
1285 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8SDUSize : 0x%02X",
1286 pstAddIndication->sfAdmittedSet.u8SDUSize);
1287 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TargetSAID : 0x%02X",
1288 pstAddIndication->sfAdmittedSet.u16TargetSAID);
1289 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQEnable : 0x%02X",
1290 pstAddIndication->sfAdmittedSet.u8ARQEnable);
1292 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQWindowSize : 0x%X",
1293 pstAddIndication->sfAdmittedSet.u16ARQWindowSize);
1294 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryTxTimeOut : 0x%X",
1295 pstAddIndication->sfAdmittedSet.u16ARQRetryTxTimeOut);
1296 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryRxTimeOut : 0x%X",
1297 pstAddIndication->sfAdmittedSet.u16ARQRetryRxTimeOut);
1298 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockLifeTime : 0x%X",
1299 pstAddIndication->sfAdmittedSet.u16ARQBlockLifeTime);
1300 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQSyncLossTimeOut : 0x%X",
1301 pstAddIndication->sfAdmittedSet.u16ARQSyncLossTimeOut);
1303 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQDeliverInOrder : 0x%02X",
1304 pstAddIndication->sfAdmittedSet.u8ARQDeliverInOrder);
1305 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRxPurgeTimeOut : 0x%X",
1306 pstAddIndication->sfAdmittedSet.u16ARQRxPurgeTimeOut);
1307 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockSize : 0x%X",
1308 pstAddIndication->sfAdmittedSet.u16ARQBlockSize);
1309 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8CSSpecification : 0x%02X",
1310 pstAddIndication->sfAdmittedSet.u8CSSpecification);
1311 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TypeOfDataDeliveryService : 0x%02X",
1312 pstAddIndication->sfAdmittedSet.u8TypeOfDataDeliveryService);
1313 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16SDUInterArrivalTime : 0x%X",
1314 pstAddIndication->sfAdmittedSet.u16SDUInterArrivalTime);
1315 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TimeBase : 0x%X",
1316 pstAddIndication->sfAdmittedSet.u16TimeBase);
1317 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8PagingPreference : 0x%X",
1318 pstAddIndication->sfAdmittedSet.u8PagingPreference);
1321 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficIndicationPreference : 0x%02X",
1322 pstAddIndication->sfAdmittedSet.u8TrafficIndicationPreference);
1324 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Recieved : 0x%X",pstAddIndication->sfAdmittedSet.u8TotalClassifiers);
1326 nCurClassifierCnt = pstAddIndication->sfAdmittedSet.u8TotalClassifiers;
1328 if(nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF)
1330 nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF;
1334 for(nIndex = 0 ; nIndex < nCurClassifierCnt ; nIndex++)
1337 stConvergenceSLTypes *psfCSType = NULL;
1338 psfCSType = &pstAddIndication->sfAdmittedSet.cConvergenceSLTypes[nIndex];
1340 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " CCPacketClassificationRuleSI====>");
1342 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ClassifierRulePriority :0x%02X ",
1343 psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority);
1344 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfServiceLength :0x%02X",
1345 psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength);
1347 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfService[3] :0x%02X %02X %02X",
1348 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0],
1349 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1],
1350 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2]);
1351 for(uiLoopIndex=0; uiLoopIndex < 1; uiLoopIndex++)
1352 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Protocol: 0x%02X ",
1353 psfCSType->cCPacketClassificationRule.u8Protocol);
1355 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddressLength :0x%02X ",
1356 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength);
1358 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1359 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddress[32] : 0x%02X ",
1360 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress[uiLoopIndex]);
1362 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddressLength : 0x%02X ",
1363 psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength);
1365 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1366 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddress[32] : 0x%02X ",
1367 psfCSType->cCPacketClassificationRule.u8IPDestinationAddress[uiLoopIndex]);
1369 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRangeLength : 0x%02X ",
1370 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);
1372 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRange[4] : 0x %02X %02X %02X %02X ",
1373 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[0],
1374 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[1],
1375 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[2],
1376 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[3]);
1378 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRangeLength : 0x%02X ",
1379 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);
1381 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRange[4] : 0x %02X %02X %02X %02X ",
1382 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[0],
1383 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[1],
1384 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[2],
1385 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[3]);
1387 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetDestMacAddressLength : 0x%02X ",
1388 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1390 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetDestMacAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1391 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[0],
1392 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[1],
1393 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[2],
1394 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[3],
1395 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[4],
1396 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[5]);
1398 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetSourceMACAddressLength : 0x%02X ",
1399 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1401 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetSourceMACAddress[6] : 0x %02X %02X %02X %02X %02X %02X",
1402 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[0],
1403 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[1],
1404 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[2],
1405 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[3],
1406 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[4],
1407 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[5]);
1409 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthertypeLength : 0x%02X ",
1410 psfCSType->cCPacketClassificationRule.u8EthertypeLength);
1411 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Ethertype[3] : 0x%02X %02X %02X",
1412 psfCSType->cCPacketClassificationRule.u8Ethertype[0],
1413 psfCSType->cCPacketClassificationRule.u8Ethertype[1],
1414 psfCSType->cCPacketClassificationRule.u8Ethertype[2]);
1416 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UserPriority : 0x%X ",
1417 psfCSType->cCPacketClassificationRule.u16UserPriority);
1418 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VLANID : 0x%X ",
1419 psfCSType->cCPacketClassificationRule.u16VLANID);
1420 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8AssociatedPHSI : 0x%02X ",
1421 psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
1422 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16PacketClassificationRuleIndex : 0x%X ",
1423 psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
1425 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParamLength : 0x%02X",
1426 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParamLength);
1427 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificClassifierParam[1] : 0x%02X ",
1428 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParam[0]);
1430 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLableLength : 0x%X ",
1431 psfCSType->cCPacketClassificationRule.u8IPv6FlowLableLength);
1432 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLable[6] : 0x %02X %02X %02X %02X %02X %02X ",
1433 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[0],
1434 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[1],
1435 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[2],
1436 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[3],
1437 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[4],
1438 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[5]);
1442 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "bValid : 0x%X",pstAddIndication->sfAdmittedSet.bValid);
1444 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " ActiveSet--->");
1445 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID : 0x%X",pstAddIndication->sfActiveSet.u32SFID);
1446 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID : 0x%X",pstAddIndication->sfActiveSet.u16CID);
1448 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength : 0x%X",
1449 pstAddIndication->sfActiveSet.u8ServiceClassNameLength);
1451 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassName : 0x %02X %02X %02X %02X %02X %02X",
1452 pstAddIndication->sfActiveSet.u8ServiceClassName[0],
1453 pstAddIndication->sfActiveSet.u8ServiceClassName[1],
1454 pstAddIndication->sfActiveSet.u8ServiceClassName[2],
1455 pstAddIndication->sfActiveSet.u8ServiceClassName[3],
1456 pstAddIndication->sfActiveSet.u8ServiceClassName[4],
1457 pstAddIndication->sfActiveSet.u8ServiceClassName[5]);
1459 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService : 0x%02X",
1460 pstAddIndication->sfActiveSet.u8MBSService);
1461 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet : 0x%02X",
1462 pstAddIndication->sfActiveSet.u8QosParamSet);
1463 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficPriority : 0x%02X",
1464 pstAddIndication->sfActiveSet.u8TrafficPriority);
1465 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxTrafficBurst : 0x%X",
1466 pstAddIndication->sfActiveSet.u32MaxTrafficBurst);
1467 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MinReservedTrafficRate : 0x%X",
1468 pstAddIndication->sfActiveSet.u32MinReservedTrafficRate);
1469 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParamLength : 0x%02X",
1470 pstAddIndication->sfActiveSet.u8VendorSpecificQoSParamLength);
1471 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParam : 0x%02X",
1472 pstAddIndication->sfActiveSet.u8VendorSpecificQoSParam[0]);
1473 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceFlowSchedulingType : 0x%02X",
1474 pstAddIndication->sfActiveSet.u8ServiceFlowSchedulingType);
1476 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32ToleratedJitter : 0x%X",
1477 pstAddIndication->sfActiveSet.u32ToleratedJitter);
1478 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaximumLatency : 0x%X",
1479 pstAddIndication->sfActiveSet.u32MaximumLatency);
1481 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%02X",
1482 pstAddIndication->sfActiveSet.u8FixedLengthVSVariableLengthSDUIndicator);
1484 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8SDUSize : 0x%X",
1485 pstAddIndication->sfActiveSet.u8SDUSize);
1486 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16TargetSAID : 0x%X",
1487 pstAddIndication->sfActiveSet.u16TargetSAID);
1488 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ARQEnable : 0x%X",
1489 pstAddIndication->sfActiveSet.u8ARQEnable);
1490 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQWindowSize : 0x%X",
1491 pstAddIndication->sfActiveSet.u16ARQWindowSize);
1492 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQRetryTxTimeOut : 0x%X",
1493 pstAddIndication->sfActiveSet.u16ARQRetryTxTimeOut);
1494 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQRetryRxTimeOut : 0x%X",
1495 pstAddIndication->sfActiveSet.u16ARQRetryRxTimeOut);
1496 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQBlockLifeTime : 0x%X",
1497 pstAddIndication->sfActiveSet.u16ARQBlockLifeTime);
1498 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQSyncLossTimeOut : 0x%X",
1499 pstAddIndication->sfActiveSet.u16ARQSyncLossTimeOut);
1500 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ARQDeliverInOrder : 0x%X",
1501 pstAddIndication->sfActiveSet.u8ARQDeliverInOrder);
1502 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQRxPurgeTimeOut : 0x%X",
1503 pstAddIndication->sfActiveSet.u16ARQRxPurgeTimeOut);
1504 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16ARQBlockSize : 0x%X",
1505 pstAddIndication->sfActiveSet.u16ARQBlockSize);
1506 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8CSSpecification : 0x%X",
1507 pstAddIndication->sfActiveSet.u8CSSpecification);
1508 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8TypeOfDataDeliveryService : 0x%X",
1509 pstAddIndication->sfActiveSet.u8TypeOfDataDeliveryService);
1510 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16SDUInterArrivalTime : 0x%X",
1511 pstAddIndication->sfActiveSet.u16SDUInterArrivalTime);
1512 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16TimeBase : 0x%X",
1513 pstAddIndication->sfActiveSet.u16TimeBase);
1514 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8PagingPreference : 0x%X",
1515 pstAddIndication->sfActiveSet.u8PagingPreference);
1518 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8TrafficIndicationPreference : 0x%X",
1519 pstAddIndication->sfActiveSet.u8TrafficIndicationPreference);
1521 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Recieved : 0x%X",pstAddIndication->sfActiveSet.u8TotalClassifiers);
1523 nCurClassifierCnt = pstAddIndication->sfActiveSet.u8TotalClassifiers;
1525 if(nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF)
1527 nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF;
1530 for(nIndex = 0 ; nIndex < nCurClassifierCnt ; nIndex++)
1533 stConvergenceSLTypes *psfCSType = NULL;
1534 psfCSType = &pstAddIndication->sfActiveSet.cConvergenceSLTypes[nIndex];
1537 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " CCPacketClassificationRuleSI====>");
1539 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ClassifierRulePriority :0x%X ",
1540 psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority);
1541 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8IPTypeOfServiceLength :0x%X ",
1542 psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength);
1544 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8IPTypeOfService[3] :0x%X ,0x%X ,0x%X ",
1545 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0],
1546 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1],
1547 psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2]);
1548 for(uiLoopIndex=0; uiLoopIndex < 1; uiLoopIndex++)
1549 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8Protocol : 0x%X ",
1550 psfCSType->cCPacketClassificationRule.u8Protocol);
1552 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddressLength :0x%X ",
1553 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength);
1555 for(uiLoopIndex=0; uiLoopIndex < 32; uiLoopIndex++)
1556 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddress[32]:0x%X ",
1557 psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress[uiLoopIndex]);
1559 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddressLength : 0x%02X ",
1560 psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength);
1562 for(uiLoopIndex=0;uiLoopIndex<32;uiLoopIndex++)
1563 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8IPDestinationAddress[32]:0x%X ",
1564 psfCSType->cCPacketClassificationRule.u8IPDestinationAddress[uiLoopIndex]);
1566 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ProtocolSourcePortRangeLength:0x%X ",
1567 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);
1569 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ProtocolSourcePortRange[4]:0x%X ,0x%X ,0x%X ,0x%X ",
1570 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[0],
1571 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[1],
1572 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[2],
1573 psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[3]);
1575 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ProtocolDestPortRangeLength:0x%X ",
1576 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);
1578 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8ProtocolDestPortRange[4]:0x%X ,0x%X ,0x%X ,0x%X ",
1579 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[0],
1580 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[1],
1581 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[2],
1582 psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[3]);
1584 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8EthernetDestMacAddressLength:0x%X ",
1585 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1587 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",
1588 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[0],
1589 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[1],
1590 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[2],
1591 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[3],
1592 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[4],
1593 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddress[5]);
1595 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8EthernetSourceMACAddressLength:0x%X ",
1596 psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
1598 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",
1599 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[0],
1600 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[1],
1601 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[2],
1602 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[3],
1603 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[4],
1604 psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress[5]);
1606 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8EthertypeLength :0x%X ",
1607 psfCSType->cCPacketClassificationRule.u8EthertypeLength);
1608 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8Ethertype[3] :0x%X ,0x%X ,0x%X ",
1609 psfCSType->cCPacketClassificationRule.u8Ethertype[0],
1610 psfCSType->cCPacketClassificationRule.u8Ethertype[1],
1611 psfCSType->cCPacketClassificationRule.u8Ethertype[2]);
1612 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16UserPriority :0x%X ",
1613 psfCSType->cCPacketClassificationRule.u16UserPriority);
1614 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16VLANID :0x%X ",
1615 psfCSType->cCPacketClassificationRule.u16VLANID);
1616 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8AssociatedPHSI :0x%X ",
1617 psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
1618 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u16PacketClassificationRuleIndex:0x%X ",
1619 psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
1621 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8VendorSpecificClassifierParamLength:0x%X ",
1622 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParamLength);
1623 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8VendorSpecificClassifierParam[1]:0x%X ",
1624 psfCSType->cCPacketClassificationRule.u8VendorSpecificClassifierParam[0]);
1626 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " u8IPv6FlowLableLength :0x%X ",
1627 psfCSType->cCPacketClassificationRule.u8IPv6FlowLableLength);
1628 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 ",
1629 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[0],
1630 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[1],
1631 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[2],
1632 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[3],
1633 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[4],
1634 psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[5]);
1638 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " bValid : 0x%X",pstAddIndication->sfActiveSet.bValid);
1642 static inline ULONG RestoreSFParam(PMINI_ADAPTER Adapter, ULONG ulAddrSFParamSet,PUCHAR pucDestBuffer)
1644 UINT nBytesToRead = sizeof(stServiceFlowParamSI);
1646 if(ulAddrSFParamSet == 0 || NULL == pucDestBuffer)
1648 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Got Param address as 0!!");
1651 ulAddrSFParamSet = ntohl(ulAddrSFParamSet);
1653 //Read out the SF Param Set At the indicated Location
1654 if(rdm(Adapter, ulAddrSFParamSet, (PUCHAR)pucDestBuffer, nBytesToRead) < 0)
1655 return STATUS_FAILURE;
1661 static ULONG StoreSFParam(PMINI_ADAPTER Adapter,PUCHAR pucSrcBuffer,ULONG ulAddrSFParamSet)
1663 UINT nBytesToWrite = sizeof(stServiceFlowParamSI);
1666 if(ulAddrSFParamSet == 0 || NULL == pucSrcBuffer)
1671 uiRetVal = wrm(Adapter,ulAddrSFParamSet,(PUCHAR)pucSrcBuffer, nBytesToWrite);
1673 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "%s:%d WRM failed",__FUNCTION__, __LINE__);
1679 ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter,PVOID pvBuffer,UINT *puBufferLength)
1681 stLocalSFAddIndicationAlt *pstAddIndicationAlt = NULL;
1682 stLocalSFAddIndication * pstAddIndication = NULL;
1683 stLocalSFDeleteRequest *pstDeletionRequest;
1684 UINT uiSearchRuleIndex;
1687 pstAddIndicationAlt = (stLocalSFAddIndicationAlt *)(pvBuffer);
1690 * In case of DSD Req By MS, we should immediately delete this SF so that
1691 * we can stop the further classifying the pkt for this SF.
1693 if(pstAddIndicationAlt->u8Type == DSD_REQ)
1695 pstDeletionRequest = (stLocalSFDeleteRequest *)pvBuffer;
1697 ulSFID = ntohl(pstDeletionRequest->u32SFID);
1698 uiSearchRuleIndex=SearchSfid(Adapter,ulSFID);
1700 if(uiSearchRuleIndex < NO_OF_QUEUES)
1702 deleteSFBySfid(Adapter,uiSearchRuleIndex);
1703 Adapter->u32TotalDSD++;
1709 if( (pstAddIndicationAlt->u8Type == DSD_RSP) ||
1710 (pstAddIndicationAlt->u8Type == DSD_ACK))
1712 //No Special handling send the message as it is
1715 // For DSA_REQ, only upto "psfAuthorizedSet" parameter should be accessed by driver!
1717 pstAddIndication=(stLocalSFAddIndication *)kmalloc(sizeof(*pstAddIndication), GFP_KERNEL);
1718 if(NULL==pstAddIndication)
1721 /* AUTHORIZED SET */
1722 pstAddIndication->psfAuthorizedSet = (stServiceFlowParamSI *)
1723 GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID);
1724 if(!pstAddIndication->psfAuthorizedSet)
1727 if(StoreSFParam(Adapter,(PUCHAR)&pstAddIndicationAlt->sfAuthorizedSet,
1728 (ULONG)pstAddIndication->psfAuthorizedSet)!= 1)
1731 /* this can't possibly be right */
1732 pstAddIndication->psfAuthorizedSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfAuthorizedSet);
1734 if(pstAddIndicationAlt->u8Type == DSA_REQ)
1736 stLocalSFAddRequest AddRequest;
1738 AddRequest.u8Type = pstAddIndicationAlt->u8Type;
1739 AddRequest.eConnectionDir = pstAddIndicationAlt->u8Direction;
1740 AddRequest.u16TID = pstAddIndicationAlt->u16TID;
1741 AddRequest.u16CID = pstAddIndicationAlt->u16CID;
1742 AddRequest.u16VCID = pstAddIndicationAlt->u16VCID;
1743 AddRequest.psfParameterSet =pstAddIndication->psfAuthorizedSet ;
1744 (*puBufferLength) = sizeof(stLocalSFAddRequest);
1745 memcpy(pvBuffer,&AddRequest,sizeof(stLocalSFAddRequest));
1749 // Since it's not DSA_REQ, we can access all field in pstAddIndicationAlt
1751 //We need to extract the structure from the buffer and pack it differently
1753 pstAddIndication->u8Type = pstAddIndicationAlt->u8Type;
1754 pstAddIndication->eConnectionDir= pstAddIndicationAlt->u8Direction ;
1755 pstAddIndication->u16TID = pstAddIndicationAlt->u16TID;
1756 pstAddIndication->u16CID = pstAddIndicationAlt->u16CID;
1757 pstAddIndication->u16VCID = pstAddIndicationAlt->u16VCID;
1758 pstAddIndication->u8CC = pstAddIndicationAlt->u8CC;
1761 pstAddIndication->psfAdmittedSet = (stServiceFlowParamSI *)
1762 GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID);
1763 if(!pstAddIndication->psfAdmittedSet)
1765 if(StoreSFParam(Adapter,(PUCHAR)&pstAddIndicationAlt->sfAdmittedSet,(ULONG)pstAddIndication->psfAdmittedSet) != 1)
1768 pstAddIndication->psfAdmittedSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfAdmittedSet);
1772 pstAddIndication->psfActiveSet = (stServiceFlowParamSI *)
1773 GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID);
1774 if(!pstAddIndication->psfActiveSet)
1776 if(StoreSFParam(Adapter,(PUCHAR)&pstAddIndicationAlt->sfActiveSet,(ULONG)pstAddIndication->psfActiveSet) != 1)
1779 pstAddIndication->psfActiveSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfActiveSet);
1781 (*puBufferLength) = sizeof(stLocalSFAddIndication);
1782 *(stLocalSFAddIndication *)pvBuffer = *pstAddIndication;
1783 kfree(pstAddIndication);
1788 static inline stLocalSFAddIndicationAlt
1789 *RestoreCmControlResponseMessage(register PMINI_ADAPTER Adapter,register PVOID pvBuffer)
1792 stLocalSFAddIndication *pstAddIndication = NULL;
1793 stLocalSFAddIndicationAlt *pstAddIndicationDest = NULL;
1794 pstAddIndication = (stLocalSFAddIndication *)(pvBuffer);
1796 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "=====>" );
1797 if ((pstAddIndication->u8Type == DSD_REQ) ||
1798 (pstAddIndication->u8Type == DSD_RSP) ||
1799 (pstAddIndication->u8Type == DSD_ACK))
1801 return (stLocalSFAddIndicationAlt *)pvBuffer;
1804 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Inside RestoreCmControlResponseMessage ");
1806 //Need to Allocate memory to contain the SUPER Large structures
1807 //Our driver cant create these structures on Stack :(
1809 pstAddIndicationDest=kmalloc(sizeof(stLocalSFAddIndicationAlt), GFP_KERNEL);
1811 if(pstAddIndicationDest)
1813 memset(pstAddIndicationDest,0,sizeof(stLocalSFAddIndicationAlt));
1817 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Failed to allocate memory for SF Add Indication Structure ");
1820 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u8Type : 0x%X",pstAddIndication->u8Type);
1821 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u8Direction : 0x%X",pstAddIndication->eConnectionDir);
1822 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u8TID : 0x%X",ntohs(pstAddIndication->u16TID));
1823 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u8CID : 0x%X",ntohs(pstAddIndication->u16CID));
1824 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-u16VCID : 0x%X",ntohs(pstAddIndication->u16VCID));
1825 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-autorized set loc : %p",pstAddIndication->psfAuthorizedSet);
1826 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-admitted set loc : %p",pstAddIndication->psfAdmittedSet);
1827 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "AddIndication-Active set loc : %p",pstAddIndication->psfActiveSet);
1829 pstAddIndicationDest->u8Type = pstAddIndication->u8Type;
1830 pstAddIndicationDest->u8Direction = pstAddIndication->eConnectionDir;
1831 pstAddIndicationDest->u16TID = pstAddIndication->u16TID;
1832 pstAddIndicationDest->u16CID = pstAddIndication->u16CID;
1833 pstAddIndicationDest->u16VCID = pstAddIndication->u16VCID;
1834 pstAddIndicationDest->u8CC = pstAddIndication->u8CC;
1836 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Active Set ");
1837 ulStatus=RestoreSFParam(Adapter,(ULONG)pstAddIndication->psfActiveSet, (PUCHAR)&pstAddIndicationDest->sfActiveSet);
1840 goto failed_restore_sf_param;
1842 if(pstAddIndicationDest->sfActiveSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF)
1843 pstAddIndicationDest->sfActiveSet.u8TotalClassifiers = MAX_CLASSIFIERS_IN_SF;
1845 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Admitted Set ");
1846 ulStatus=RestoreSFParam(Adapter,(ULONG)pstAddIndication->psfAdmittedSet,(PUCHAR)&pstAddIndicationDest->sfAdmittedSet);
1849 goto failed_restore_sf_param;
1851 if(pstAddIndicationDest->sfAdmittedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF)
1852 pstAddIndicationDest->sfAdmittedSet.u8TotalClassifiers = MAX_CLASSIFIERS_IN_SF;
1854 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Restoring Authorized Set ");
1855 ulStatus=RestoreSFParam(Adapter,(ULONG)pstAddIndication->psfAuthorizedSet,(PUCHAR)&pstAddIndicationDest->sfAuthorizedSet);
1858 goto failed_restore_sf_param;
1860 if(pstAddIndicationDest->sfAuthorizedSet.u8TotalClassifiers > MAX_CLASSIFIERS_IN_SF)
1861 pstAddIndicationDest->sfAuthorizedSet.u8TotalClassifiers = MAX_CLASSIFIERS_IN_SF;
1863 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Dumping the whole raw packet");
1864 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "============================================================");
1865 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " pstAddIndicationDest->sfActiveSet size %zx %p", sizeof(*pstAddIndicationDest), pstAddIndicationDest);
1866 //BCM_DEBUG_PRINT_BUFFER(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, (unsigned char *)pstAddIndicationDest, sizeof(*pstAddIndicationDest));
1867 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "============================================================");
1868 return pstAddIndicationDest;
1869 failed_restore_sf_param:
1870 kfree(pstAddIndicationDest);
1871 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "<=====" );
1875 ULONG SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter)
1877 ULONG ulTargetDsxBuffersBase = 0;
1878 ULONG ulCntTargetBuffers;
1883 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Adapter was NULL!!!");
1887 if(Adapter->astTargetDsxBuffer[0].ulTargetDsxBuffer)
1890 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Size of Each DSX Buffer(Also size of ServiceFlowParamSI): %zx ",sizeof(stServiceFlowParamSI));
1891 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Reading DSX buffer From Target location %x ",DSX_MESSAGE_EXCHANGE_BUFFER);
1893 Status = rdmalt(Adapter, DSX_MESSAGE_EXCHANGE_BUFFER,
1894 (PUINT)&ulTargetDsxBuffersBase, sizeof(UINT));
1897 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "RDM failed!!");
1901 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Base Address Of DSX Target Buffer : 0x%lx",ulTargetDsxBuffersBase);
1903 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Tgt Buffer is Now %lx :",ulTargetDsxBuffersBase);
1905 ulCntTargetBuffers = DSX_MESSAGE_EXCHANGE_BUFFER_SIZE/sizeof(stServiceFlowParamSI);
1907 Adapter->ulTotalTargetBuffersAvailable =
1908 ulCntTargetBuffers > MAX_TARGET_DSX_BUFFERS ?
1909 MAX_TARGET_DSX_BUFFERS : ulCntTargetBuffers;
1911 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " Total Target DSX Buffer setup %lx ",Adapter->ulTotalTargetBuffersAvailable);
1913 for(ulIndex=0; ulIndex < Adapter->ulTotalTargetBuffersAvailable ; ulIndex++)
1915 Adapter->astTargetDsxBuffer[ulIndex].ulTargetDsxBuffer = ulTargetDsxBuffersBase;
1916 Adapter->astTargetDsxBuffer[ulIndex].valid=1;
1917 Adapter->astTargetDsxBuffer[ulIndex].tid=0;
1918 ulTargetDsxBuffersBase+=sizeof(stServiceFlowParamSI);
1919 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " Target DSX Buffer %lx setup at 0x%lx",
1920 ulIndex, Adapter->astTargetDsxBuffer[ulIndex].ulTargetDsxBuffer);
1922 Adapter->ulCurrentTargetBuffer = 0;
1923 Adapter->ulFreeTargetBufferCnt = Adapter->ulTotalTargetBuffersAvailable;
1927 static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter,B_UINT16 tid)
1929 ULONG ulTargetDSXBufferAddress;
1930 ULONG ulTargetDsxBufferIndexToUse,ulMaxTry;
1932 if((Adapter->ulTotalTargetBuffersAvailable == 0)||
1933 (Adapter->ulFreeTargetBufferCnt == 0))
1935 ClearTargetDSXBuffer(Adapter,tid,FALSE);
1939 ulTargetDsxBufferIndexToUse = Adapter->ulCurrentTargetBuffer;
1940 ulMaxTry = Adapter->ulTotalTargetBuffersAvailable;
1941 while((ulMaxTry)&&(Adapter->astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].valid != 1))
1943 ulTargetDsxBufferIndexToUse = (ulTargetDsxBufferIndexToUse+1)%
1944 Adapter->ulTotalTargetBuffersAvailable;
1950 BCM_DEBUG_PRINT (Adapter, DBG_TYPE_PRINTK, 0, 0, "\n GetNextTargetBufferLocation : Error No Free Target DSX Buffers FreeCnt : %lx ",Adapter->ulFreeTargetBufferCnt);
1951 ClearTargetDSXBuffer(Adapter,tid,FALSE);
1956 ulTargetDSXBufferAddress =
1957 Adapter->astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].ulTargetDsxBuffer;
1958 Adapter->astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].valid=0;
1959 Adapter->astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].tid=tid;
1960 Adapter->ulFreeTargetBufferCnt--;
1963 ulTargetDsxBufferIndexToUse =
1964 (ulTargetDsxBufferIndexToUse+1)%Adapter->ulTotalTargetBuffersAvailable;
1965 Adapter->ulCurrentTargetBuffer = ulTargetDsxBufferIndexToUse;
1966 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "GetNextTargetBufferLocation :Returning address %lx tid %d\n",
1967 ulTargetDSXBufferAddress,tid);
1968 return ulTargetDSXBufferAddress;
1972 INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter)
1975 //Need to Allocate memory to contain the SUPER Large structures
1976 //Our driver cant create these structures on Stack
1978 Adapter->caDsxReqResp=kmalloc(sizeof(stLocalSFAddIndicationAlt)+LEADER_SIZE, GFP_KERNEL);
1979 if(!Adapter->caDsxReqResp)
1984 INT FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter)
1986 if(Adapter->caDsxReqResp)
1988 kfree(Adapter->caDsxReqResp);
1994 @ingroup ctrl_pkt_functions
1995 This routinue would process the Control responses
1996 for the Connection Management.
1997 @return - Queue index for the free SFID else returns Invalid Index.
1999 BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, /**<Pointer to the Adapter structure*/
2000 PVOID pvBuffer /**Starting Address of the Buffer, that contains the AddIndication Data*/
2003 stServiceFlowParamSI *psfLocalSet=NULL;
2004 stLocalSFAddIndicationAlt *pstAddIndication = NULL;
2005 stLocalSFChangeIndicationAlt *pstChangeIndication = NULL;
2006 PLEADER pLeader=NULL;
2008 //Otherwise the message contains a target address from where we need to
2009 //read out the rest of the service flow param structure
2011 if((pstAddIndication = RestoreCmControlResponseMessage(Adapter,pvBuffer))
2014 ClearTargetDSXBuffer(Adapter,((stLocalSFAddIndication *)pvBuffer)->u16TID, FALSE);
2015 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_PRINTK, 0, 0, "Error in restoring Service Flow param structure from DSx message");
2019 DumpCmControlPacket(pstAddIndication);
2020 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "====>");
2021 pLeader = (PLEADER)Adapter->caDsxReqResp;
2023 pLeader->Status =CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ;
2026 ClearTargetDSXBuffer(Adapter,pstAddIndication->u16TID,FALSE);
2027 BCM_DEBUG_PRINT (Adapter, DBG_TYPE_PRINTK, 0, 0, "### TID RECEIVED %d\n",pstAddIndication->u16TID);
2028 switch(pstAddIndication->u8Type)
2032 pLeader->PLength = sizeof(stLocalSFAddIndicationAlt);
2033 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Sending DSA Response....\n");
2034 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSA RESPONSE TO MAC %d", pLeader->PLength );
2035 *((stLocalSFAddIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))
2036 = *pstAddIndication;
2037 ((stLocalSFAddIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_RSP;
2039 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " VCID = %x", ntohs(pstAddIndication->u16VCID));
2040 CopyBufferToControlPacket(Adapter,(PVOID)Adapter->caDsxReqResp);
2041 kfree(pstAddIndication);
2046 pLeader->PLength = sizeof(stLocalSFAddIndicationAlt);
2047 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSA ACK TO MAC %d",
2049 *((stLocalSFAddIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))
2050 = *pstAddIndication;
2051 ((stLocalSFAddIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_ACK;
2053 }//no break here..we should go down.
2056 UINT uiSearchRuleIndex=0;
2058 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "VCID:0x%X",
2059 ntohs(pstAddIndication->u16VCID));
2060 uiSearchRuleIndex=SearchFreeSfid(Adapter);
2061 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"uiSearchRuleIndex:0x%X ",
2063 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Direction:0x%X ",
2064 pstAddIndication->u8Direction);
2065 if((uiSearchRuleIndex< NO_OF_QUEUES) )
2067 Adapter->PackInfo[uiSearchRuleIndex].ucDirection =
2068 pstAddIndication->u8Direction;
2069 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "bValid:0x%X ",
2070 pstAddIndication->sfActiveSet.bValid);
2071 if(pstAddIndication->sfActiveSet.bValid==TRUE)
2073 Adapter->PackInfo[uiSearchRuleIndex].bActiveSet=TRUE;
2075 if(pstAddIndication->sfAuthorizedSet.bValid==TRUE)
2077 Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet=TRUE;
2079 if(pstAddIndication->sfAdmittedSet.bValid==TRUE)
2081 Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet=TRUE;
2083 if(FALSE == pstAddIndication->sfActiveSet.bValid)
2085 Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE;
2086 Adapter->PackInfo[uiSearchRuleIndex].bActivateRequestSent = FALSE;
2087 if(pstAddIndication->sfAdmittedSet.bValid)
2089 psfLocalSet = &pstAddIndication->sfAdmittedSet;
2091 else if(pstAddIndication->sfAuthorizedSet.bValid)
2093 psfLocalSet = &pstAddIndication->sfAuthorizedSet;
2098 psfLocalSet = &pstAddIndication->sfActiveSet;
2099 Adapter->PackInfo[uiSearchRuleIndex].bActive=TRUE;
2104 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "No set is valid\n");
2105 Adapter->PackInfo[uiSearchRuleIndex].bActive=FALSE;
2106 Adapter->PackInfo[uiSearchRuleIndex].bValid=FALSE;
2107 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value=0;
2108 kfree(pstAddIndication);
2111 else if(psfLocalSet->bValid && (pstAddIndication->u8CC == 0))
2113 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "DSA ACK");
2114 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value =
2115 ntohs(pstAddIndication->u16VCID);
2116 Adapter->PackInfo[uiSearchRuleIndex].usCID =
2117 ntohs(pstAddIndication->u16CID);
2119 if(UPLINK_DIR == pstAddIndication->u8Direction)
2120 atomic_set(&Adapter->PackInfo[uiSearchRuleIndex].uiPerSFTxResourceCount, DEFAULT_PERSFCOUNT);
2121 CopyToAdapter(Adapter,psfLocalSet,uiSearchRuleIndex,
2122 DSA_ACK, pstAddIndication);
2123 // don't free pstAddIndication
2125 /* Inside CopyToAdapter, Sorting of all the SFs take place.
2126 Hence any access to the newly added SF through uiSearchRuleIndex is invalid.
2127 SHOULD BE STRICTLY AVOIDED.
2129 // *(PULONG)(((PUCHAR)pvBuffer)+1)=psfLocalSet->u32SFID;
2130 memcpy((((PUCHAR)pvBuffer)+1), &psfLocalSet->u32SFID, 4);
2132 if(pstAddIndication->sfActiveSet.bValid == TRUE)
2134 if(UPLINK_DIR == pstAddIndication->u8Direction)
2136 if(!Adapter->LinkUpStatus)
2138 netif_carrier_on(Adapter->dev);
2139 netif_start_queue(Adapter->dev);
2140 Adapter->LinkUpStatus = 1;
2141 if (netif_msg_link(Adapter))
2142 pr_info(PFX "%s: link up\n", Adapter->dev->name);
2143 atomic_set(&Adapter->TxPktAvail, 1);
2144 wake_up(&Adapter->tx_packet_wait_queue);
2145 Adapter->liTimeSinceLastNetEntry = get_seconds();
2153 Adapter->PackInfo[uiSearchRuleIndex].bActive=FALSE;
2154 Adapter->PackInfo[uiSearchRuleIndex].bValid=FALSE;
2155 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value=0;
2156 kfree(pstAddIndication);
2161 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_PRINTK, 0, 0, "DSA ACK did not get valid SFID");
2162 kfree(pstAddIndication);
2169 pLeader->PLength = sizeof(stLocalSFChangeIndicationAlt);
2170 pstChangeIndication = (stLocalSFChangeIndicationAlt*)pstAddIndication;
2171 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSC RESPONSE TO MAC %d", pLeader->PLength);
2173 *((stLocalSFChangeIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
2174 ((stLocalSFChangeIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_RSP;
2176 CopyBufferToControlPacket(Adapter,(PVOID)Adapter->caDsxReqResp);
2177 kfree(pstAddIndication);
2182 pLeader->PLength = sizeof(stLocalSFChangeIndicationAlt);
2183 pstChangeIndication = (stLocalSFChangeIndicationAlt*)pstAddIndication;
2184 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSC ACK TO MAC %d", pLeader->PLength);
2185 *((stLocalSFChangeIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
2186 ((stLocalSFChangeIndicationAlt*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_ACK;
2190 UINT uiSearchRuleIndex=0;
2192 pstChangeIndication = (stLocalSFChangeIndicationAlt *)pstAddIndication;
2193 uiSearchRuleIndex=SearchSfid(Adapter,ntohl(pstChangeIndication->sfActiveSet.u32SFID));
2194 if(uiSearchRuleIndex > NO_OF_QUEUES-1)
2196 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_PRINTK, 0, 0, "SF doesn't exist for which DSC_ACK is received");
2198 if((uiSearchRuleIndex < NO_OF_QUEUES))
2200 Adapter->PackInfo[uiSearchRuleIndex].ucDirection = pstChangeIndication->u8Direction;
2201 if(pstChangeIndication->sfActiveSet.bValid==TRUE)
2203 Adapter->PackInfo[uiSearchRuleIndex].bActiveSet=TRUE;
2205 if(pstChangeIndication->sfAuthorizedSet.bValid==TRUE)
2207 Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet=TRUE;
2209 if(pstChangeIndication->sfAdmittedSet.bValid==TRUE)
2211 Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet=TRUE;
2214 if(FALSE==pstChangeIndication->sfActiveSet.bValid)
2216 Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE;
2217 Adapter->PackInfo[uiSearchRuleIndex].bActivateRequestSent = FALSE;
2218 if(pstChangeIndication->sfAdmittedSet.bValid)
2220 psfLocalSet = &pstChangeIndication->sfAdmittedSet;
2222 else if(pstChangeIndication->sfAuthorizedSet.bValid)
2224 psfLocalSet = &pstChangeIndication->sfAuthorizedSet;
2230 psfLocalSet = &pstChangeIndication->sfActiveSet;
2231 Adapter->PackInfo[uiSearchRuleIndex].bActive=TRUE;
2233 if(psfLocalSet->bValid && (pstChangeIndication->u8CC == 0))
2235 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value =
2236 ntohs(pstChangeIndication->u16VCID);
2237 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "CC field is %d bvalid = %d\n",
2238 pstChangeIndication->u8CC, psfLocalSet->bValid);
2239 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "VCID= %d\n", ntohs(pstChangeIndication->u16VCID));
2240 Adapter->PackInfo[uiSearchRuleIndex].usCID =
2241 ntohs(pstChangeIndication->u16CID);
2242 CopyToAdapter(Adapter,psfLocalSet,uiSearchRuleIndex,
2243 DSC_ACK, pstAddIndication);
2245 *(PULONG)(((PUCHAR)pvBuffer)+1)=psfLocalSet->u32SFID;
2247 else if(pstChangeIndication->u8CC == 6)
2249 deleteSFBySfid(Adapter,uiSearchRuleIndex);
2250 kfree(pstAddIndication);
2255 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_PRINTK, 0, 0, "DSC ACK did not get valid SFID");
2256 kfree(pstAddIndication);
2263 UINT uiSearchRuleIndex;
2266 pLeader->PLength = sizeof(stLocalSFDeleteIndication);
2267 *((stLocalSFDeleteIndication*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((stLocalSFDeleteIndication*)pstAddIndication);
2269 ulSFID = ntohl(((stLocalSFDeleteIndication*)pstAddIndication)->u32SFID);
2270 uiSearchRuleIndex=SearchSfid(Adapter,ulSFID);
2271 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "DSD - Removing connection %x",uiSearchRuleIndex);
2273 if(uiSearchRuleIndex < NO_OF_QUEUES)
2275 //Delete All Classifiers Associated with this SFID
2276 deleteSFBySfid(Adapter,uiSearchRuleIndex);
2277 Adapter->u32TotalDSD++;
2280 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSD RESPONSE TO MAC");
2281 ((stLocalSFDeleteIndication*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP;
2282 CopyBufferToControlPacket(Adapter,(PVOID)Adapter->caDsxReqResp);
2286 //Do nothing as SF has already got Deleted
2290 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "DSD ACK Rcd, let App handle it\n");
2293 kfree(pstAddIndication);
2299 int get_dsx_sf_data_to_application(PMINI_ADAPTER Adapter, UINT uiSFId, void __user *user_buffer)
2302 struct _packet_info *psSfInfo=NULL;
2303 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "status =%d",status);
2304 status = SearchSfid(Adapter, uiSFId);
2305 if (status >= NO_OF_QUEUES) {
2306 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SFID %d not present in queue !!!", uiSFId );
2309 BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "status =%d",status);
2310 psSfInfo=&Adapter->PackInfo[status];
2311 if(psSfInfo->pstSFIndication && copy_to_user(user_buffer,
2312 psSfInfo->pstSFIndication, sizeof(stLocalSFAddIndicationAlt)))
2314 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "copy to user failed SFID %d, present in queue !!!", uiSFId );
2318 return STATUS_SUCCESS;
2321 VOID OverrideServiceFlowParams(PMINI_ADAPTER Adapter,PUINT puiBuffer)
2323 B_UINT32 u32NumofSFsinMsg = ntohl(*(puiBuffer + 1));
2324 stIM_SFHostNotify *pHostInfo = NULL;
2325 UINT uiSearchRuleIndex = 0;
2330 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "u32NumofSFsinMsg: 0x%x\n",u32NumofSFsinMsg);
2332 while(u32NumofSFsinMsg != 0 && u32NumofSFsinMsg < NO_OF_QUEUES)
2335 pHostInfo = (stIM_SFHostNotify *)puiBuffer;
2336 puiBuffer = (PUINT)(pHostInfo + 1);
2338 ulSFID = ntohl(pHostInfo->SFID);
2339 uiSearchRuleIndex=SearchSfid(Adapter,ulSFID);
2340 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"SFID: 0x%lx\n",ulSFID);
2342 if(uiSearchRuleIndex >= NO_OF_QUEUES || uiSearchRuleIndex == HiPriority)
2344 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);
2348 if(pHostInfo->RetainSF == FALSE)
2350 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"Going to Delete SF");
2351 deleteSFBySfid(Adapter,uiSearchRuleIndex);
2356 Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = ntohs(pHostInfo->VCID);
2357 Adapter->PackInfo[uiSearchRuleIndex].usCID = ntohs(pHostInfo->newCID);
2358 Adapter->PackInfo[uiSearchRuleIndex].bActive=FALSE;
2360 BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,"pHostInfo->QoSParamSet: 0x%x\n",pHostInfo->QoSParamSet);
2362 if(pHostInfo->QoSParamSet & 0x1)
2363 Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet =TRUE;
2364 if(pHostInfo->QoSParamSet & 0x2)
2365 Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet =TRUE;
2366 if(pHostInfo->QoSParamSet & 0x4)
2368 Adapter->PackInfo[uiSearchRuleIndex].bActiveSet =TRUE;
2369 Adapter->PackInfo[uiSearchRuleIndex].bActive=TRUE;