35 if (Adapter->
PackInfo[i].ulSFID == uiSfid)
56 if (Adapter->
PackInfo[i].ulSFID == 0)
81 return MAX_CLASSIFIERS+1;
98 return MAX_CLASSIFIERS+1;
156 while ((u8IpAddressLen >= nSizeOfIPAddressInBytes) && (i < MAX_IP_RANGE_LENGTH)) {
157 memcpy(ptrClassifierIpAddress +
158 (i * nSizeOfIPAddressInBytes),
159 (pu8IpAddressMaskSrc+(i*nSizeOfIPAddressInBytes*2)),
160 nSizeOfIPAddressInBytes);
173 u8IpAddressLen -= nSizeOfIPAddressInBytes;
174 if (u8IpAddressLen >= nSizeOfIPAddressInBytes) {
175 memcpy(ptrClassifierIpMask +
176 (i * nSizeOfIPAddressInBytes),
177 (pu8IpAddressMaskSrc+nSizeOfIPAddressInBytes +
178 (i*nSizeOfIPAddressInBytes*2)),
179 nSizeOfIPAddressInBytes);
194 u8IpAddressLen -= nSizeOfIPAddressInBytes;
196 if (u8IpAddressLen == 0)
203 for (i = 0; i < MAX_IP_RANGE_LENGTH * 4; i++) {
246 if (Adapter->
PackInfo[uiSearchRuleIndex].usVCID_Value == 0 ||
247 nClassifierIndex > (MAX_CLASSIFIERS-1))
253 if (nClassifierIndex > MAX_CLASSIFIERS-1)
257 if (pstClassifierEntry) {
287 u8ProtocolSourcePortRange+i));
290 u8ProtocolSourcePortRange+2+i));
300 CopyIpAddrToClassifier(pstClassifierEntry,
303 (Adapter->
PackInfo[uiSearchRuleIndex].ucIpVersion ==
IPV6) ?
309 CopyIpAddrToClassifier(pstClassifierEntry,
338 pstClassifierEntry->
ulSFID = Adapter->
PackInfo[uiSearchRuleIndex].ulSFID;
340 uiSearchRuleIndex, pstClassifierEntry->
ucDirection,
370 B_UINT16 u16PacketClassificationRuleIndex;
375 usVCID = Adapter->
PackInfo[uiSearchRuleIndex].usVCID_Value;
377 if (nClassifierIndex > MAX_CLASSIFIERS-1)
383 u16PacketClassificationRuleIndex = Adapter->
astClassifierTable[nClassifierIndex].uiClassifierRuleIndex;
385 if (pstClassifierEntry) {
407 ulVCID = Adapter->
PackInfo[uiSearchRuleIndex].usVCID_Value;
416 if (pstClassifierEntry->
bUsed)
417 DeleteClassifierRuleFromSF(Adapter, uiSearchRuleIndex, i);
432 register UINT uiSearchRuleIndex,
433 register UCHAR ucDsxType,
438 UINT nClassifierIndex = 0;
440 B_UINT16 u16PacketClassificationRuleIndex = 0;
456 Adapter->
PackInfo[uiSearchRuleIndex].bIPCSSupport = 0;
457 Adapter->
PackInfo[uiSearchRuleIndex].bEthCSSupport = 0;
502 Adapter->
PackInfo[uiSearchRuleIndex].bEthCSSupport,
503 Adapter->
PackInfo[uiSearchRuleIndex].bIPCSSupport);
508 Adapter->
PackInfo[uiSearchRuleIndex].ucIpVersion =
IPV6;
510 Adapter->
PackInfo[uiSearchRuleIndex].ucIpVersion =
IPV4;
514 Adapter->
PackInfo[uiSearchRuleIndex].bEthCSSupport = 0;
521 if (Adapter->
PackInfo[uiSearchRuleIndex].u8QueueType ==
BE && Adapter->
PackInfo[uiSearchRuleIndex].ucDirection)
535 Adapter->
PackInfo[uiSearchRuleIndex].bClassifierPriority =
TRUE;
538 Adapter->
PackInfo[uiSearchRuleIndex].bClassifierPriority =
TRUE;
542 }
else if (ucDsxType ==
DSC_ACK) {
568 switch (eClassifierAction) {
573 nClassifierIndex = SearchClsid(Adapter, ulSFID, u16PacketClassificationRuleIndex);
575 if (nClassifierIndex > MAX_CLASSIFIERS) {
576 nClassifierIndex = SearchFreeClsid(Adapter);
577 if (nClassifierIndex > MAX_CLASSIFIERS) {
583 CopyClassifierRuleToSF(Adapter, psfCSType, uiSearchRuleIndex, nClassifierIndex);
587 "CopyToAdapter: Error The Specified Classifier Already Exists and attempted To Add Classifier with Same PCRI : 0x%x\n",
588 u16PacketClassificationRuleIndex);
596 nClassifierIndex = SearchClsid(Adapter, ulSFID, u16PacketClassificationRuleIndex);
597 if (nClassifierIndex > MAX_CLASSIFIERS) {
603 CopyClassifierRuleToSF(Adapter, psfCSType, uiSearchRuleIndex, nClassifierIndex);
610 nClassifierIndex = SearchClsid(Adapter, ulSFID, u16PacketClassificationRuleIndex);
611 if (nClassifierIndex > MAX_CLASSIFIERS) {
618 DeleteClassifierRuleFromSF(Adapter, uiSearchRuleIndex, nClassifierIndex);
667 unsigned int uiClassifierIndex = 0;
669 for (uiClassifierIndex = 0; uiClassifierIndex <
MAX_CLASSIFIERS; uiClassifierIndex++) {
674 "Adding PHS Rule For Classifier: 0x%x cPhsRule.u8PHSI: 0x%x\n",
757 if (Adapter->
PackInfo[uiSearchRuleIndex].uiMaxLatency == 0)
760 if ((Adapter->
PackInfo[uiSearchRuleIndex].u8QueueType ==
ERTPS ||
761 Adapter->
PackInfo[uiSearchRuleIndex].u8QueueType ==
UGS))
773 Adapter->
PackInfo[uiSearchRuleIndex].uiMaxBucketSize =
783 UGIFactor = (Adapter->
PackInfo[uiSearchRuleIndex].uiMaxLatency/UGIValue + 1);
786 Adapter->
PackInfo[uiSearchRuleIndex].uiMaxBucketSize =
787 (UGIFactor*Adapter->
PackInfo[uiSearchRuleIndex].uiMaxAllowedRate*UGIValue)/1000;
795 Adapter->
PackInfo[uiSearchRuleIndex].uiMaxAllowedRate,
797 Adapter->
PackInfo[uiSearchRuleIndex].uiMaxBucketSize);
803 Adapter->
PackInfo[uiSearchRuleIndex].bHeaderSuppressionEnabled =
808 Adapter->
PackInfo[uiSearchRuleIndex].pstSFIndication = pstAddIndication;
832 static VOID DumpCmControlPacket(
PVOID pvBuffer)
837 UINT nCurClassifierCnt;
853 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",
880 pstAddIndication->
sfAuthorizedSet.u8FixedLengthVSVariableLengthSDUIndicator);
902 *(
unsigned int *)pstAddIndication->
sfAuthorizedSet.u8HARQChannelMapping,
903 *(
unsigned int *)&pstAddIndication->
sfAuthorizedSet.u8HARQChannelMapping[4],
909 nCurClassifierCnt = pstAddIndication->
sfAuthorizedSet.u8TotalClassifiers;
917 for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) {
919 psfCSType = &pstAddIndication->
sfAuthorizedSet.cConvergenceSLTypes[nIndex];
932 for (uiLoopIndex = 0; uiLoopIndex < 1; uiLoopIndex++)
939 for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++)
946 for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++)
972 u8EthernetDestMacAddress);
980 u8EthernetSourceMACAddress);
1016 "u8ServiceClassName: 0x%*ph",
1027 pstAddIndication->
sfAdmittedSet.u8VendorSpecificQoSParamLength);
1029 pstAddIndication->
sfAdmittedSet.u8VendorSpecificQoSParam[0]);
1031 pstAddIndication->
sfAdmittedSet.u8ServiceFlowSchedulingType);
1035 pstAddIndication->
sfAdmittedSet.u8FixedLengthVSVariableLengthSDUIndicator);
1049 pstAddIndication->
sfAdmittedSet.u8TypeOfDataDeliveryService);
1054 pstAddIndication->
sfAdmittedSet.u8TrafficIndicationPreference);
1057 nCurClassifierCnt = pstAddIndication->
sfAdmittedSet.u8TotalClassifiers;
1061 for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) {
1064 psfCSType = &pstAddIndication->
sfAdmittedSet.cConvergenceSLTypes[nIndex];
1074 for (uiLoopIndex = 0; uiLoopIndex < 1; uiLoopIndex++)
1080 for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++)
1087 for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++)
1096 "0x%*ph ", 4, psfCSType->
1098 u8ProtocolSourcePortRange);
1105 "0x%*ph ", 4, psfCSType->
1107 u8ProtocolDestPortRange);
1115 u8EthernetDestMacAddress);
1123 u8EthernetSourceMACAddress);
1156 "u8ServiceClassName: 0x%*ph",
1157 6, pstAddIndication->
sfActiveSet.u8ServiceClassName);
1164 pstAddIndication->
sfActiveSet.u32MinReservedTrafficRate);
1166 pstAddIndication->
sfActiveSet.u8VendorSpecificQoSParamLength);
1168 pstAddIndication->
sfActiveSet.u8VendorSpecificQoSParam[0]);
1170 pstAddIndication->
sfActiveSet.u8ServiceFlowSchedulingType);
1174 pstAddIndication->
sfActiveSet.u8FixedLengthVSVariableLengthSDUIndicator);
1188 pstAddIndication->
sfActiveSet.u8TypeOfDataDeliveryService);
1193 pstAddIndication->
sfActiveSet.u8TrafficIndicationPreference);
1196 nCurClassifierCnt = pstAddIndication->
sfActiveSet.u8TotalClassifiers;
1200 for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) {
1203 psfCSType = &pstAddIndication->
sfActiveSet.cConvergenceSLTypes[nIndex];
1214 for (uiLoopIndex = 0; uiLoopIndex < 1; uiLoopIndex++)
1220 for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++)
1227 for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++)
1250 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",
1260 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",
1288 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 ",
1305 if (ulAddrSFParamSet == 0 ||
NULL == pucDestBuffer) {
1309 ulAddrSFParamSet =
ntohl(ulAddrSFParamSet);
1312 if (
rdm(Adapter, ulAddrSFParamSet, (
PUCHAR)pucDestBuffer, nBytesToRead) < 0)
1323 if (ulAddrSFParamSet == 0 ||
NULL == pucSrcBuffer)
1326 ret =
wrm(Adapter, ulAddrSFParamSet, (
u8 *)pucSrcBuffer, nBytesToWrite);
1339 UINT uiSearchRuleIndex;
1352 uiSearchRuleIndex =
SearchSfid(Adapter, ulSFID);
1355 deleteSFBySfid(Adapter, uiSearchRuleIndex);
1369 if (pstAddIndication ==
NULL)
1374 GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->
u16TID);
1376 kfree(pstAddIndication);
1382 kfree(pstAddIndication);
1400 kfree(pstAddIndication);
1407 pstAddIndication->
u8Type = pstAddIndicationAlt->
u8Type;
1409 pstAddIndication->
u16TID = pstAddIndicationAlt->
u16TID;
1410 pstAddIndication->
u16CID = pstAddIndicationAlt->
u16CID;
1412 pstAddIndication->
u8CC = pstAddIndicationAlt->
u8CC;
1416 GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->
u16TID);
1418 kfree(pstAddIndication);
1422 kfree(pstAddIndication);
1430 GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->
u16TID);
1432 kfree(pstAddIndication);
1436 kfree(pstAddIndication);
1444 kfree(pstAddIndication);
1449 *RestoreCmControlResponseMessage(
register struct bcm_mini_adapter *Adapter,
register PVOID pvBuffer)
1469 if (pstAddIndicationDest) {
1484 pstAddIndicationDest->
u8Type = pstAddIndication->
u8Type;
1486 pstAddIndicationDest->
u16TID = pstAddIndication->
u16TID;
1487 pstAddIndicationDest->
u16CID = pstAddIndication->
u16CID;
1489 pstAddIndicationDest->
u8CC = pstAddIndication->
u8CC;
1494 goto failed_restore_sf_param;
1502 goto failed_restore_sf_param;
1510 goto failed_restore_sf_param;
1520 return pstAddIndicationDest;
1521 failed_restore_sf_param:
1522 kfree(pstAddIndicationDest);
1529 ULONG ulTargetDsxBuffersBase = 0;
1530 ULONG ulCntTargetBuffers;
1576 ULONG ulTargetDSXBufferAddress;
1577 ULONG ulTargetDsxBufferIndexToUse, ulMaxTry;
1586 while ((ulMaxTry) && (Adapter->
astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].valid != 1)) {
1591 if (ulMaxTry == 0) {
1597 ulTargetDSXBufferAddress = Adapter->
astTargetDsxBuffer[ulTargetDsxBufferIndexToUse].ulTargetDsxBuffer;
1605 return ulTargetDSXBufferAddress;
1645 pstAddIndication = RestoreCmControlResponseMessage(Adapter, pvBuffer);
1646 if (pstAddIndication ==
NULL) {
1652 DumpCmControlPacket(pstAddIndication);
1661 switch (pstAddIndication->
u8Type) {
1668 = *pstAddIndication;
1673 kfree(pstAddIndication);
1682 = *pstAddIndication;
1688 UINT uiSearchRuleIndex = 0;
1692 uiSearchRuleIndex = SearchFreeSfid(Adapter);
1698 Adapter->
PackInfo[uiSearchRuleIndex].ucDirection =
1703 Adapter->
PackInfo[uiSearchRuleIndex].bActiveSet =
TRUE;
1706 Adapter->
PackInfo[uiSearchRuleIndex].bAuthorizedSet =
TRUE;
1709 Adapter->
PackInfo[uiSearchRuleIndex].bAdmittedSet =
TRUE;
1713 Adapter->
PackInfo[uiSearchRuleIndex].bActivateRequestSent =
FALSE;
1727 Adapter->
PackInfo[uiSearchRuleIndex].usVCID_Value = 0;
1728 kfree(pstAddIndication);
1729 }
else if (psfLocalSet->
bValid && (pstAddIndication->
u8CC == 0)) {
1737 CopyToAdapter(Adapter, psfLocalSet, uiSearchRuleIndex,
DSA_ACK, pstAddIndication);
1751 netif_start_queue(Adapter->
dev);
1764 Adapter->
PackInfo[uiSearchRuleIndex].usVCID_Value = 0;
1765 kfree(pstAddIndication);
1769 kfree(pstAddIndication);
1784 kfree(pstAddIndication);
1797 UINT uiSearchRuleIndex = 0;
1807 Adapter->
PackInfo[uiSearchRuleIndex].bActiveSet =
TRUE;
1810 Adapter->
PackInfo[uiSearchRuleIndex].bAuthorizedSet =
TRUE;
1813 Adapter->
PackInfo[uiSearchRuleIndex].bAdmittedSet =
TRUE;
1817 Adapter->
PackInfo[uiSearchRuleIndex].bActivateRequestSent =
FALSE;
1832 Adapter->
PackInfo[uiSearchRuleIndex].usVCID_Value = 0;
1833 kfree(pstAddIndication);
1834 }
else if (psfLocalSet->
bValid && (pstChangeIndication->
u8CC == 0)) {
1837 pstChangeIndication->
u8CC, psfLocalSet->
bValid);
1840 CopyToAdapter(Adapter, psfLocalSet, uiSearchRuleIndex,
DSC_ACK, pstAddIndication);
1843 }
else if (pstChangeIndication->
u8CC == 6) {
1844 deleteSFBySfid(Adapter, uiSearchRuleIndex);
1845 kfree(pstAddIndication);
1849 kfree(pstAddIndication);
1856 UINT uiSearchRuleIndex;
1863 uiSearchRuleIndex =
SearchSfid(Adapter, ulSFID);
1868 deleteSFBySfid(Adapter, uiSearchRuleIndex);
1885 kfree(pstAddIndication);
1917 UINT uiSearchRuleIndex = 0;
1923 while (u32NumofSFsinMsg != 0 && u32NumofSFsinMsg <
NO_OF_QUEUES) {
1926 puiBuffer = (
PUINT)(pHostInfo + 1);
1929 uiSearchRuleIndex =
SearchSfid(Adapter, ulSFID);
1939 deleteSFBySfid(Adapter, uiSearchRuleIndex);
1948 Adapter->
PackInfo[uiSearchRuleIndex].bAuthorizedSet =
TRUE;
1950 Adapter->
PackInfo[uiSearchRuleIndex].bAdmittedSet =
TRUE;
1952 Adapter->
PackInfo[uiSearchRuleIndex].bActiveSet =
TRUE;