6 * Author: Beceem Communications Pvt. Ltd
8 * Abstract: This file contains the routines sorting the classification rules.
10 * Copyright (c) 2007 Beceem Communications Pvt. Ltd
13 VOID
SortPackInfo(PMINI_ADAPTER Adapter
)
18 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "<=======");
20 for(nIndex1
= 0; nIndex1
< NO_OF_QUEUES
-2 ; nIndex1
++)
22 for(nIndex2
= nIndex1
+ 1 ; nIndex2
< NO_OF_QUEUES
-1 ; nIndex2
++)
24 if(Adapter
->PackInfo
[nIndex1
].bValid
&& Adapter
->PackInfo
[nIndex2
].bValid
)
26 if(Adapter
->PackInfo
[nIndex2
].u8TrafficPriority
<
27 Adapter
->PackInfo
[nIndex1
].u8TrafficPriority
)
29 PacketInfo stTemppackInfo
= Adapter
->PackInfo
[nIndex2
];
30 Adapter
->PackInfo
[nIndex2
] = Adapter
->PackInfo
[nIndex1
];
31 Adapter
->PackInfo
[nIndex1
] = stTemppackInfo
;
39 VOID
SortClassifiers(PMINI_ADAPTER Adapter
)
44 BCM_DEBUG_PRINT( Adapter
,DBG_TYPE_OTHERS
, CONN_MSG
, DBG_LVL_ALL
, "<=======");
46 for(nIndex1
= 0; nIndex1
< MAX_CLASSIFIERS
-1 ; nIndex1
++)
48 for(nIndex2
= nIndex1
+ 1 ; nIndex2
< MAX_CLASSIFIERS
; nIndex2
++)
50 if(Adapter
->astClassifierTable
[nIndex1
].bUsed
&& Adapter
->astClassifierTable
[nIndex2
].bUsed
)
52 if(Adapter
->astClassifierTable
[nIndex2
].u8ClassifierRulePriority
<
53 Adapter
->astClassifierTable
[nIndex1
].u8ClassifierRulePriority
)
55 S_CLASSIFIER_RULE stTempClassifierRule
= Adapter
->astClassifierTable
[nIndex2
];
56 Adapter
->astClassifierTable
[nIndex2
] = Adapter
->astClassifierTable
[nIndex1
];
57 Adapter
->astClassifierTable
[nIndex1
] = stTempClassifierRule
;