This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCmHost.c
2254 lines (1986 loc) · 95.6 KB
/
CmHost.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/************************************************************
* CMHOST.C
* This file contains the routines for handling Connection
* Management.
************************************************************/
#include "headers.h"
enum E_CLASSIFIER_ACTION {
eInvalidClassifierAction,
eAddClassifier,
eReplaceClassifier,
eDeleteClassifier
};
static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter,
B_UINT16 tid);
static void restore_endianess_of_pstClassifierEntry(
struct bcm_classifier_rule *pstClassifierEntry,
enum bcm_ipaddr_context eIpAddrContext);
static void apply_phs_rule_to_all_classifiers(
register struct bcm_mini_adapter *Adapter,
register UINT uiSearchRuleIndex,
USHORT uVCID,
struct bcm_phs_rule *sPhsRule,
struct bcm_phs_rules *cPhsRule,
struct bcm_add_indication_alt *pstAddIndication);
/************************************************************
* Function - SearchSfid
*
* Description - This routinue would search QOS queues having
* specified SFID as input parameter.
*
* Parameters - Adapter: Pointer to the Adapter structure
* uiSfid : Given SFID for matching
*
* Returns - Queue index for this SFID(If matched)
* Else Invalid Queue Index(If Not matched)
************************************************************/
int SearchSfid(struct bcm_mini_adapter *Adapter, UINT uiSfid)
{
int i;
for (i = (NO_OF_QUEUES-1); i >= 0; i--)
if (Adapter->PackInfo[i].ulSFID == uiSfid)
return i;
return NO_OF_QUEUES+1;
}
/***************************************************************
* Function -SearchFreeSfid
*
* Description - This routinue would search Free available SFID.
*
* Parameter - Adapter: Pointer to the Adapter structure
*
* Returns - Queue index for the free SFID
* Else returns Invalid Index.
****************************************************************/
static int SearchFreeSfid(struct bcm_mini_adapter *Adapter)
{
int i;
for (i = 0; i < (NO_OF_QUEUES-1); i++)
if (Adapter->PackInfo[i].ulSFID == 0)
return i;
return NO_OF_QUEUES+1;
}
/*
* Function: SearchClsid
* Description: This routinue would search Classifier having specified ClassifierID as input parameter
* Input parameters: struct bcm_mini_adapter *Adapter - Adapter Context
* unsigned int uiSfid - The SF in which the classifier is to searched
* B_UINT16 uiClassifierID - The classifier ID to be searched
* Return: int :Classifier table index of matching entry
*/
static int SearchClsid(struct bcm_mini_adapter *Adapter,
ULONG ulSFID,
B_UINT16 uiClassifierID)
{
int i;
for (i = 0; i < MAX_CLASSIFIERS; i++) {
if ((Adapter->astClassifierTable[i].bUsed) &&
(Adapter->astClassifierTable[i].uiClassifierRuleIndex
== uiClassifierID) &&
(Adapter->astClassifierTable[i].ulSFID == ulSFID))
return i;
}
return MAX_CLASSIFIERS+1;
}
/*
* @ingroup ctrl_pkt_functions
* This routinue would search Free available Classifier entry in classifier table.
* @return free Classifier Entry index in classifier table for specified SF
*/
static int SearchFreeClsid(struct bcm_mini_adapter *Adapter /**Adapter Context*/)
{
int i;
for (i = 0; i < MAX_CLASSIFIERS; i++) {
if (!Adapter->astClassifierTable[i].bUsed)
return i;
}
return MAX_CLASSIFIERS+1;
}
static VOID deleteSFBySfid(struct bcm_mini_adapter *Adapter,
UINT uiSearchRuleIndex)
{
/* deleting all the packet held in the SF */
flush_queue(Adapter, uiSearchRuleIndex);
/* Deleting the all classifiers for this SF */
DeleteAllClassifiersForSF(Adapter, uiSearchRuleIndex);
/* Resetting only MIBS related entries in the SF */
memset((PVOID)&Adapter->PackInfo[uiSearchRuleIndex], 0,
sizeof(struct bcm_mibs_table));
}
static inline VOID
CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry,
B_UINT8 u8IpAddressLen, B_UINT8 *pu8IpAddressMaskSrc,
bool bIpVersion6, enum bcm_ipaddr_context eIpAddrContext)
{
int i = 0;
UINT nSizeOfIPAddressInBytes = IP_LENGTH_OF_ADDRESS;
UCHAR *ptrClassifierIpAddress = NULL;
UCHAR *ptrClassifierIpMask = NULL;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if (bIpVersion6)
nSizeOfIPAddressInBytes = IPV6_ADDRESS_SIZEINBYTES;
/* Destination Ip Address */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Ip Address Range Length:0x%X ", u8IpAddressLen);
if ((bIpVersion6 ? (IPV6_ADDRESS_SIZEINBYTES * MAX_IP_RANGE_LENGTH * 2) :
(TOTAL_MASKED_ADDRESS_IN_BYTES)) >= u8IpAddressLen) {
union u_ip_address *st_dest_ip =
&pstClassifierEntry->stDestIpAddress;
union u_ip_address *st_src_ip =
&pstClassifierEntry->stSrcIpAddress;
/*
* checking both the mask and address togethor in Classification.
* So length will be : TotalLengthInBytes/nSizeOfIPAddressInBytes * 2
* (nSizeOfIPAddressInBytes for address and nSizeOfIPAddressInBytes for mask)
*/
if (eIpAddrContext == eDestIpAddress) {
pstClassifierEntry->ucIPDestinationAddressLength =
u8IpAddressLen/(nSizeOfIPAddressInBytes * 2);
if (bIpVersion6) {
ptrClassifierIpAddress =
st_dest_ip->ucIpv6Address;
ptrClassifierIpMask =
st_dest_ip->ucIpv6Mask;
} else {
ptrClassifierIpAddress =
st_dest_ip->ucIpv4Address;
ptrClassifierIpMask =
st_dest_ip->ucIpv4Mask;
}
} else if (eIpAddrContext == eSrcIpAddress) {
pstClassifierEntry->ucIPSourceAddressLength =
u8IpAddressLen/(nSizeOfIPAddressInBytes * 2);
if (bIpVersion6) {
ptrClassifierIpAddress =
st_src_ip->ucIpv6Address;
ptrClassifierIpMask = st_src_ip->ucIpv6Mask;
} else {
ptrClassifierIpAddress =
st_src_ip->ucIpv4Address;
ptrClassifierIpMask = st_src_ip->ucIpv4Mask;
}
}
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Address Length:0x%X\n",
pstClassifierEntry->ucIPDestinationAddressLength);
while ((u8IpAddressLen >= nSizeOfIPAddressInBytes)
&& (i < MAX_IP_RANGE_LENGTH)) {
memcpy(ptrClassifierIpAddress +
(i * nSizeOfIPAddressInBytes),
(pu8IpAddressMaskSrc
+ (i * nSizeOfIPAddressInBytes * 2)),
nSizeOfIPAddressInBytes);
if (!bIpVersion6) {
if (eIpAddrContext == eSrcIpAddress) {
st_src_ip->ulIpv4Addr[i] =
ntohl(st_src_ip->ulIpv4Addr[i]);
BCM_DEBUG_PRINT(Adapter,
DBG_TYPE_OTHERS,
CONN_MSG,
DBG_LVL_ALL,
"Src Ip Address:0x%luX ",
st_src_ip->ulIpv4Addr[i]);
} else if (eIpAddrContext == eDestIpAddress) {
st_dest_ip->ulIpv4Addr[i] =
ntohl(st_dest_ip->ulIpv4Addr[i]);
BCM_DEBUG_PRINT(Adapter,
DBG_TYPE_OTHERS,
CONN_MSG,
DBG_LVL_ALL,
"Dest Ip Address:0x%luX ",
st_dest_ip->ulIpv4Addr[i]);
}
}
u8IpAddressLen -= nSizeOfIPAddressInBytes;
if (u8IpAddressLen >= nSizeOfIPAddressInBytes) {
memcpy(ptrClassifierIpMask +
(i * nSizeOfIPAddressInBytes),
(pu8IpAddressMaskSrc
+ nSizeOfIPAddressInBytes
+ (i * nSizeOfIPAddressInBytes * 2)),
nSizeOfIPAddressInBytes);
if (!bIpVersion6) {
if (eIpAddrContext == eSrcIpAddress) {
st_src_ip->ulIpv4Mask[i] =
ntohl(st_src_ip->ulIpv4Mask[i]);
BCM_DEBUG_PRINT(Adapter,
DBG_TYPE_OTHERS,
CONN_MSG,
DBG_LVL_ALL,
"Src Ip Mask Address:0x%luX ",
st_src_ip->ulIpv4Mask[i]);
} else if (eIpAddrContext == eDestIpAddress) {
st_dest_ip->ulIpv4Mask[i] =
ntohl(st_dest_ip->ulIpv4Mask[i]);
BCM_DEBUG_PRINT(Adapter,
DBG_TYPE_OTHERS,
CONN_MSG,
DBG_LVL_ALL,
"Dest Ip Mask Address:0x%luX ",
st_dest_ip->ulIpv4Mask[i]);
}
}
u8IpAddressLen -= nSizeOfIPAddressInBytes;
}
if (u8IpAddressLen == 0)
pstClassifierEntry->bDestIpValid = TRUE;
i++;
}
if (bIpVersion6) {
/* Restore EndianNess of Struct */
restore_endianess_of_pstClassifierEntry(
pstClassifierEntry,
eIpAddrContext
);
}
}
}
void ClearTargetDSXBuffer(struct bcm_mini_adapter *Adapter, B_UINT16 TID, bool bFreeAll)
{
int i;
struct bcm_targetdsx_buffer *curr_buf;
for (i = 0; i < Adapter->ulTotalTargetBuffersAvailable; i++) {
curr_buf = &Adapter->astTargetDsxBuffer[i];
if (curr_buf->valid)
continue;
if ((bFreeAll) || (curr_buf->tid == TID)) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
"ClearTargetDSXBuffer: found tid %d buffer cleared %lx\n",
TID, curr_buf->ulTargetDsxBuffer);
curr_buf->valid = 1;
curr_buf->tid = 0;
Adapter->ulFreeTargetBufferCnt++;
}
}
}
/*
* @ingroup ctrl_pkt_functions
* copy classifier rule into the specified SF index
*/
static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter,
struct bcm_convergence_types *psfCSType,
UINT uiSearchRuleIndex,
UINT nClassifierIndex)
{
struct bcm_classifier_rule *pstClassifierEntry = NULL;
/* VOID *pvPhsContext = NULL; */
int i;
/* UCHAR ucProtocolLength=0; */
/* ULONG ulPhsStatus; */
struct bcm_packet_class_rules *pack_class_rule =
&psfCSType->cCPacketClassificationRule;
if (Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value == 0 ||
nClassifierIndex > (MAX_CLASSIFIERS-1))
return;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Storing Classifier Rule Index : %X",
ntohs(pack_class_rule->u16PacketClassificationRuleIndex));
if (nClassifierIndex > MAX_CLASSIFIERS-1)
return;
pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
if (pstClassifierEntry) {
/* Store if Ipv6 */
pstClassifierEntry->bIpv6Protocol =
(Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : false;
/* Destinaiton Port */
pstClassifierEntry->ucDestPortRangeLength =
pack_class_rule->u8ProtocolDestPortRangeLength / 4;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Destination Port Range Length:0x%X ",
pstClassifierEntry->ucDestPortRangeLength);
if (pack_class_rule->u8ProtocolDestPortRangeLength <= MAX_PORT_RANGE) {
for (i = 0; i < (pstClassifierEntry->ucDestPortRangeLength); i++) {
pstClassifierEntry->usDestPortRangeLo[i] =
*((PUSHORT)(pack_class_rule->u8ProtocolDestPortRange+i));
pstClassifierEntry->usDestPortRangeHi[i] =
*((PUSHORT)(pack_class_rule->u8ProtocolDestPortRange+2+i));
pstClassifierEntry->usDestPortRangeLo[i] =
ntohs(pstClassifierEntry->usDestPortRangeLo[i]);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
CONN_MSG, DBG_LVL_ALL,
"Destination Port Range Lo:0x%X ",
pstClassifierEntry->usDestPortRangeLo[i]);
pstClassifierEntry->usDestPortRangeHi[i] =
ntohs(pstClassifierEntry->usDestPortRangeHi[i]);
}
} else {
pstClassifierEntry->ucDestPortRangeLength = 0;
}
/* Source Port */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Source Port Range Length:0x%X ",
pack_class_rule->u8ProtocolSourcePortRangeLength);
if (pack_class_rule->u8ProtocolSourcePortRangeLength <= MAX_PORT_RANGE) {
pstClassifierEntry->ucSrcPortRangeLength =
pack_class_rule->u8ProtocolSourcePortRangeLength/4;
for (i = 0; i < (pstClassifierEntry->ucSrcPortRangeLength); i++) {
pstClassifierEntry->usSrcPortRangeLo[i] =
*((PUSHORT)(pack_class_rule->
u8ProtocolSourcePortRange+i));
pstClassifierEntry->usSrcPortRangeHi[i] =
*((PUSHORT)(pack_class_rule->
u8ProtocolSourcePortRange+2+i));
pstClassifierEntry->usSrcPortRangeLo[i] =
ntohs(pstClassifierEntry->usSrcPortRangeLo[i]);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
CONN_MSG, DBG_LVL_ALL,
"Source Port Range Lo:0x%X ",
pstClassifierEntry->usSrcPortRangeLo[i]);
pstClassifierEntry->usSrcPortRangeHi[i] =
ntohs(pstClassifierEntry->usSrcPortRangeHi[i]);
}
}
/* Destination Ip Address and Mask */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Ip Destination Parameters : ");
CopyIpAddrToClassifier(pstClassifierEntry,
pack_class_rule->u8IPDestinationAddressLength,
pack_class_rule->u8IPDestinationAddress,
(Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ?
TRUE : false, eDestIpAddress);
/* Source Ip Address and Mask */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Ip Source Parameters : ");
CopyIpAddrToClassifier(pstClassifierEntry,
pack_class_rule->u8IPMaskedSourceAddressLength,
pack_class_rule->u8IPMaskedSourceAddress,
(Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : false,
eSrcIpAddress);
/* TOS */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"TOS Length:0x%X ",
pack_class_rule->u8IPTypeOfServiceLength);
if (pack_class_rule->u8IPTypeOfServiceLength == 3) {
pstClassifierEntry->ucIPTypeOfServiceLength =
pack_class_rule->u8IPTypeOfServiceLength;
pstClassifierEntry->ucTosLow =
pack_class_rule->u8IPTypeOfService[0];
pstClassifierEntry->ucTosHigh =
pack_class_rule->u8IPTypeOfService[1];
pstClassifierEntry->ucTosMask =
pack_class_rule->u8IPTypeOfService[2];
pstClassifierEntry->bTOSValid = TRUE;
}
if (pack_class_rule->u8Protocol == 0) {
/* we didn't get protocol field filled in by the BS */
pstClassifierEntry->ucProtocolLength = 0;
} else {
pstClassifierEntry->ucProtocolLength = 1; /* 1 valid protocol */
}
pstClassifierEntry->ucProtocol[0] = pack_class_rule->u8Protocol;
pstClassifierEntry->u8ClassifierRulePriority =
pack_class_rule->u8ClassifierRulePriority;
/* store the classifier rule ID and set this classifier entry as valid */
pstClassifierEntry->ucDirection =
Adapter->PackInfo[uiSearchRuleIndex].ucDirection;
pstClassifierEntry->uiClassifierRuleIndex =
ntohs(pack_class_rule->u16PacketClassificationRuleIndex);
pstClassifierEntry->usVCID_Value =
Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
pstClassifierEntry->ulSFID =
Adapter->PackInfo[uiSearchRuleIndex].ulSFID;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Search Index %d Dir: %d, Index: %d, Vcid: %d\n",
uiSearchRuleIndex,
pstClassifierEntry->ucDirection,
pstClassifierEntry->uiClassifierRuleIndex,
pstClassifierEntry->usVCID_Value);
if (pack_class_rule->u8AssociatedPHSI)
pstClassifierEntry->u8AssociatedPHSI =
pack_class_rule->u8AssociatedPHSI;
/* Copy ETH CS Parameters */
pstClassifierEntry->ucEthCSSrcMACLen =
(pack_class_rule->u8EthernetSourceMACAddressLength);
memcpy(pstClassifierEntry->au8EThCSSrcMAC,
pack_class_rule->u8EthernetSourceMACAddress,
MAC_ADDRESS_SIZE);
memcpy(pstClassifierEntry->au8EThCSSrcMACMask,
pack_class_rule->u8EthernetSourceMACAddress
+ MAC_ADDRESS_SIZE, MAC_ADDRESS_SIZE);
pstClassifierEntry->ucEthCSDestMACLen =
(pack_class_rule->u8EthernetDestMacAddressLength);
memcpy(pstClassifierEntry->au8EThCSDestMAC,
pack_class_rule->u8EthernetDestMacAddress,
MAC_ADDRESS_SIZE);
memcpy(pstClassifierEntry->au8EThCSDestMACMask,
pack_class_rule->u8EthernetDestMacAddress
+ MAC_ADDRESS_SIZE, MAC_ADDRESS_SIZE);
pstClassifierEntry->ucEtherTypeLen =
(pack_class_rule->u8EthertypeLength);
memcpy(pstClassifierEntry->au8EthCSEtherType,
pack_class_rule->u8Ethertype,
NUM_ETHERTYPE_BYTES);
memcpy(pstClassifierEntry->usUserPriority,
&pack_class_rule->u16UserPriority, 2);
pstClassifierEntry->usVLANID =
ntohs(pack_class_rule->u16VLANID);
pstClassifierEntry->usValidityBitMap =
ntohs(pack_class_rule->u16ValidityBitMap);
pstClassifierEntry->bUsed = TRUE;
}
}
/*
* @ingroup ctrl_pkt_functions
*/
static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *Adapter,
UINT uiSearchRuleIndex, UINT nClassifierIndex)
{
struct bcm_classifier_rule *pstClassifierEntry = NULL;
B_UINT16 u16PacketClassificationRuleIndex;
USHORT usVCID;
/* VOID *pvPhsContext = NULL; */
/*ULONG ulPhsStatus; */
usVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
if (nClassifierIndex > MAX_CLASSIFIERS-1)
return;
if (usVCID == 0)
return;
u16PacketClassificationRuleIndex =
Adapter->astClassifierTable[nClassifierIndex].uiClassifierRuleIndex;
pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
if (pstClassifierEntry) {
pstClassifierEntry->bUsed = false;
pstClassifierEntry->uiClassifierRuleIndex = 0;
memset(pstClassifierEntry, 0,
sizeof(struct bcm_classifier_rule));
/* Delete the PHS Rule for this classifier */
PhsDeleteClassifierRule(&Adapter->stBCMPhsContext, usVCID,
u16PacketClassificationRuleIndex);
}
}
/*
* @ingroup ctrl_pkt_functions
*/
VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter,
UINT uiSearchRuleIndex)
{
struct bcm_classifier_rule *pstClassifierEntry = NULL;
int i;
/* B_UINT16 u16PacketClassificationRuleIndex; */
USHORT ulVCID;
/* VOID *pvPhsContext = NULL; */
/* ULONG ulPhsStatus; */
ulVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value;
if (ulVCID == 0)
return;
for (i = 0; i < MAX_CLASSIFIERS; i++) {
if (Adapter->astClassifierTable[i].usVCID_Value == ulVCID) {
pstClassifierEntry = &Adapter->astClassifierTable[i];
if (pstClassifierEntry->bUsed)
DeleteClassifierRuleFromSF(Adapter,
uiSearchRuleIndex, i);
}
}
/* Delete All Phs Rules Associated with this SF */
PhsDeleteSFRules(&Adapter->stBCMPhsContext, ulVCID);
}
/*
* This routinue copies the Connection Management
* related data into the Adapter structure.
* @ingroup ctrl_pkt_functions
*/
static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer to the Adapter structure */
register struct bcm_connect_mgr_params *psfLocalSet, /* Pointer to the connection manager parameters structure */
register UINT uiSearchRuleIndex, /* <Index of Queue, to which this data belongs */
register UCHAR ucDsxType,
struct bcm_add_indication_alt *pstAddIndication) {
/* UCHAR ucProtocolLength = 0; */
ULONG ulSFID;
UINT nClassifierIndex = 0;
enum E_CLASSIFIER_ACTION eClassifierAction = eInvalidClassifierAction;
B_UINT16 u16PacketClassificationRuleIndex = 0;
int i;
struct bcm_convergence_types *psfCSType = NULL;
struct bcm_phs_rule sPhsRule;
struct bcm_packet_info *curr_packinfo =
&Adapter->PackInfo[uiSearchRuleIndex];
USHORT uVCID = curr_packinfo->usVCID_Value;
UINT UGIValue = 0;
curr_packinfo->bValid = TRUE;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Search Rule Index = %d\n", uiSearchRuleIndex);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"%s: SFID= %x ", __func__, ntohl(psfLocalSet->u32SFID));
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Updating Queue %d", uiSearchRuleIndex);
ulSFID = ntohl(psfLocalSet->u32SFID);
/* Store IP Version used */
/* Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF */
curr_packinfo->bIPCSSupport = 0;
curr_packinfo->bEthCSSupport = 0;
/* Enable IP/ETh CS Support As Required */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"CopyToAdapter : u8CSSpecification : %X\n",
psfLocalSet->u8CSSpecification);
switch (psfLocalSet->u8CSSpecification) {
case eCSPacketIPV4:
curr_packinfo->bIPCSSupport = IPV4_CS;
break;
case eCSPacketIPV6:
curr_packinfo->bIPCSSupport = IPV6_CS;
break;
case eCS802_3PacketEthernet:
case eCS802_1QPacketVLAN:
curr_packinfo->bEthCSSupport = ETH_CS_802_3;
break;
case eCSPacketIPV4Over802_1QVLAN:
case eCSPacketIPV4Over802_3Ethernet:
curr_packinfo->bIPCSSupport = IPV4_CS;
curr_packinfo->bEthCSSupport = ETH_CS_802_3;
break;
case eCSPacketIPV6Over802_1QVLAN:
case eCSPacketIPV6Over802_3Ethernet:
curr_packinfo->bIPCSSupport = IPV6_CS;
curr_packinfo->bEthCSSupport = ETH_CS_802_3;
break;
default:
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Error in value of CS Classification.. setting default to IP CS\n");
curr_packinfo->bIPCSSupport = IPV4_CS;
break;
}
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",
uiSearchRuleIndex,
curr_packinfo->bEthCSSupport,
curr_packinfo->bIPCSSupport);
/* Store IP Version used */
/* Get The Version Of IP used (IPv6 or IPv4) from CSSpecification field of SF */
if (curr_packinfo->bIPCSSupport == IPV6_CS)
curr_packinfo->ucIpVersion = IPV6;
else
curr_packinfo->ucIpVersion = IPV4;
/* To ensure that the ETH CS code doesn't gets executed if the BS doesn't supports ETH CS */
if (!Adapter->bETHCSEnabled)
curr_packinfo->bEthCSSupport = 0;
if (psfLocalSet->u8ServiceClassNameLength > 0 && psfLocalSet->u8ServiceClassNameLength < 32)
memcpy(curr_packinfo->ucServiceClassName,
psfLocalSet->u8ServiceClassName,
psfLocalSet->u8ServiceClassNameLength);
curr_packinfo->u8QueueType = psfLocalSet->u8ServiceFlowSchedulingType;
if (curr_packinfo->u8QueueType == BE && curr_packinfo->ucDirection)
Adapter->usBestEffortQueueIndex = uiSearchRuleIndex;
curr_packinfo->ulSFID = ntohl(psfLocalSet->u32SFID);
curr_packinfo->u8TrafficPriority = psfLocalSet->u8TrafficPriority;
/* copy all the classifier in the Service Flow param structure */
for (i = 0; i < psfLocalSet->u8TotalClassifiers; i++) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Classifier index =%d", i);
psfCSType = &psfLocalSet->cConvergenceSLTypes[i];
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"Classifier index =%d", i);
if (psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority)
curr_packinfo->bClassifierPriority = TRUE;
if (psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority)
curr_packinfo->bClassifierPriority = TRUE;
if (ucDsxType == DSA_ACK) {
eClassifierAction = eAddClassifier;
} else if (ucDsxType == DSC_ACK) {
switch (psfCSType->u8ClassfierDSCAction) {
case 0: /* DSC Add Classifier */
eClassifierAction = eAddClassifier;
break;
case 1: /* DSC Replace Classifier */
eClassifierAction = eReplaceClassifier;
break;
case 2: /* DSC Delete Classifier */
eClassifierAction = eDeleteClassifier;
break;
default:
eClassifierAction = eInvalidClassifierAction;
}
}
u16PacketClassificationRuleIndex = ntohs(psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
switch (eClassifierAction) {
case eAddClassifier:
/* Get a Free Classifier Index From Classifier table for this SF to add the Classifier */
/* Contained in this message */
nClassifierIndex = SearchClsid(Adapter,
ulSFID,
u16PacketClassificationRuleIndex);
if (nClassifierIndex > MAX_CLASSIFIERS) {
nClassifierIndex = SearchFreeClsid(Adapter);
if (nClassifierIndex > MAX_CLASSIFIERS) {
/* Failed To get a free Entry */
BCM_DEBUG_PRINT(Adapter,
DBG_TYPE_OTHERS,
CONN_MSG,
DBG_LVL_ALL,
"Error Failed To get a free Classifier Entry");
break;
}
/* Copy the Classifier Rule for this service flow into our Classifier table maintained per SF. */
CopyClassifierRuleToSF(Adapter, psfCSType,
uiSearchRuleIndex,
nClassifierIndex);
} else {
/* This Classifier Already Exists and it is invalid to Add Classifier with existing PCRI */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
CONN_MSG,
DBG_LVL_ALL,
"CopyToAdapter: Error The Specified Classifier Already Exists and attempted To Add Classifier with Same PCRI : 0x%x\n",
u16PacketClassificationRuleIndex);
}
break;
case eReplaceClassifier:
/* Get the Classifier Index From Classifier table for this SF and replace existing Classifier */
/* with the new classifier Contained in this message */
nClassifierIndex = SearchClsid(Adapter, ulSFID,
u16PacketClassificationRuleIndex);
if (nClassifierIndex > MAX_CLASSIFIERS) {
/* Failed To search the classifier */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
CONN_MSG, DBG_LVL_ALL,
"Error Search for Classifier To be replaced failed");
break;
}
/* Copy the Classifier Rule for this service flow into our Classifier table maintained per SF. */
CopyClassifierRuleToSF(Adapter, psfCSType,
uiSearchRuleIndex, nClassifierIndex);
break;
case eDeleteClassifier:
/* Get the Classifier Index From Classifier table for this SF and replace existing Classifier */
/* with the new classifier Contained in this message */
nClassifierIndex = SearchClsid(Adapter, ulSFID,
u16PacketClassificationRuleIndex);
if (nClassifierIndex > MAX_CLASSIFIERS) {
/* Failed To search the classifier */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
CONN_MSG, DBG_LVL_ALL,
"Error Search for Classifier To be deleted failed");
break;
}
/* Delete This classifier */
DeleteClassifierRuleFromSF(Adapter, uiSearchRuleIndex,
nClassifierIndex);
break;
default:
/* Invalid Action for classifier */
break;
}
}
/* Repeat parsing Classification Entries to process PHS Rules */
for (i = 0; i < psfLocalSet->u8TotalClassifiers; i++) {
psfCSType = &psfLocalSet->cConvergenceSLTypes[i];
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"psfCSType->u8PhsDSCAction : 0x%x\n",
psfCSType->u8PhsDSCAction);
switch (psfCSType->u8PhsDSCAction) {
case eDeleteAllPHSRules:
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG,
DBG_LVL_ALL,
"Deleting All PHS Rules For VCID: 0x%X\n",
uVCID);
/* Delete All the PHS rules for this Service flow */
PhsDeleteSFRules(&Adapter->stBCMPhsContext, uVCID);
break;
case eDeletePHSRule:
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG,
DBG_LVL_ALL,
"PHS DSC Action = Delete PHS Rule\n");
if (psfCSType->cPhsRule.u8PHSI)
PhsDeletePHSRule(&Adapter->stBCMPhsContext,
uVCID,
psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
break;
default:
if (ucDsxType == DSC_ACK) {
/* BCM_DEBUG_PRINT(CONN_MSG,("Invalid PHS DSC Action For DSC\n",psfCSType->cPhsRule.u8PHSI)); */
break; /* FOr DSC ACK Case PHS DSC Action must be in valid set */
}
/* Proceed To Add PHS rule for DSA_ACK case even if PHS DSC action is unspecified */
/* No Break Here . Intentionally! */
case eAddPHSRule:
case eSetPHSRule:
if (psfCSType->cPhsRule.u8PHSI) {
/* Apply This PHS Rule to all classifiers whose Associated PHSI Match */
apply_phs_rule_to_all_classifiers(Adapter,
uiSearchRuleIndex,
uVCID,
&sPhsRule,
&psfCSType->cPhsRule,
pstAddIndication);
}
break;
}
}
if (psfLocalSet->u32MaxSustainedTrafficRate == 0) {
/* No Rate Limit . Set Max Sustained Traffic Rate to Maximum */
curr_packinfo->uiMaxAllowedRate = WIMAX_MAX_ALLOWED_RATE;
} else if (ntohl(psfLocalSet->u32MaxSustainedTrafficRate) > WIMAX_MAX_ALLOWED_RATE) {
/* Too large Allowed Rate specified. Limiting to Wi Max Allowed rate */
curr_packinfo->uiMaxAllowedRate = WIMAX_MAX_ALLOWED_RATE;
} else {
curr_packinfo->uiMaxAllowedRate =
ntohl(psfLocalSet->u32MaxSustainedTrafficRate);
}
curr_packinfo->uiMaxLatency = ntohl(psfLocalSet->u32MaximumLatency);
if (curr_packinfo->uiMaxLatency == 0) /* 0 should be treated as infinite */
curr_packinfo->uiMaxLatency = MAX_LATENCY_ALLOWED;
if ((curr_packinfo->u8QueueType == ERTPS ||
curr_packinfo->u8QueueType == UGS))
UGIValue = ntohs(psfLocalSet->u16UnsolicitedGrantInterval);
if (UGIValue == 0)
UGIValue = DEFAULT_UG_INTERVAL;
/*
* For UGI based connections...
* DEFAULT_UGI_FACTOR*UGIInterval worth of data is the max token count at host...
* The extra amount of token is to ensure that a large amount of jitter won't have loss in throughput...
* In case of non-UGI based connection, 200 frames worth of data is the max token count at host...
*/
curr_packinfo->uiMaxBucketSize =
(DEFAULT_UGI_FACTOR*curr_packinfo->uiMaxAllowedRate*UGIValue)/1000;
if (curr_packinfo->uiMaxBucketSize < WIMAX_MAX_MTU*8) {
UINT UGIFactor = 0;
/* Special Handling to ensure the biggest size of packet can go out from host to FW as follows:
* 1. Any packet from Host to FW can go out in different packet size.
* 2. So in case the Bucket count is smaller than MTU, the packets of size (Size > TokenCount), will get dropped.
* 3. We can allow packets of MaxSize from Host->FW that can go out from FW in multiple SDUs by fragmentation at Wimax Layer
*/
UGIFactor = (curr_packinfo->uiMaxLatency/UGIValue + 1);
if (UGIFactor > DEFAULT_UGI_FACTOR)
curr_packinfo->uiMaxBucketSize =
(UGIFactor*curr_packinfo->uiMaxAllowedRate*UGIValue)/1000;
if (curr_packinfo->uiMaxBucketSize > WIMAX_MAX_MTU*8)
curr_packinfo->uiMaxBucketSize = WIMAX_MAX_MTU*8;
}
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"LAT: %d, UGI: %d\n", curr_packinfo->uiMaxLatency,
UGIValue);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"uiMaxAllowedRate: 0x%x, u32MaxSustainedTrafficRate: 0x%x ,uiMaxBucketSize: 0x%x",
curr_packinfo->uiMaxAllowedRate,
ntohl(psfLocalSet->u32MaxSustainedTrafficRate),
curr_packinfo->uiMaxBucketSize);
/* copy the extended SF Parameters to Support MIBS */
CopyMIBSExtendedSFParameters(Adapter, psfLocalSet, uiSearchRuleIndex);
/* store header suppression enabled flag per SF */
curr_packinfo->bHeaderSuppressionEnabled =
!(psfLocalSet->u8RequesttransmissionPolicy &
MASK_DISABLE_HEADER_SUPPRESSION);
kfree(curr_packinfo->pstSFIndication);
curr_packinfo->pstSFIndication = pstAddIndication;
/* Re Sort the SF list in PackInfo according to Traffic Priority */
SortPackInfo(Adapter);
/* Re Sort the Classifier Rules table and re - arrange
* according to Classifier Rule Priority
*/
SortClassifiers(Adapter);
DumpPhsRules(&Adapter->stBCMPhsContext);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL,
"%s <=====", __func__);
}
/***********************************************************************
* Function - DumpCmControlPacket
*
* Description - This routinue Dumps the Contents of the AddIndication
* Structure in the Connection Management Control Packet
*
* Parameter - pvBuffer: Pointer to the buffer containing the
* AddIndication data.
*
* Returns - None
*************************************************************************/
static VOID DumpCmControlPacket(PVOID pvBuffer)
{
int uiLoopIndex;
int nIndex;
struct bcm_add_indication_alt *pstAddIndication;
UINT nCurClassifierCnt;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
pstAddIndication = pvBuffer;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "======>");
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Type: 0x%X", pstAddIndication->u8Type);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Direction: 0x%X", pstAddIndication->u8Direction);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TID: 0x%X", ntohs(pstAddIndication->u16TID));
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID: 0x%X", ntohs(pstAddIndication->u16CID));
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VCID: 0x%X", ntohs(pstAddIndication->u16VCID));
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " AuthorizedSet--->");
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID: 0x%X", htonl(pstAddIndication->sfAuthorizedSet.u32SFID));
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID: 0x%X", htons(pstAddIndication->sfAuthorizedSet.u16CID));
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength: 0x%X",
pstAddIndication->sfAuthorizedSet.u8ServiceClassNameLength);
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",
pstAddIndication->sfAuthorizedSet.u8ServiceClassName[0],
pstAddIndication->sfAuthorizedSet.u8ServiceClassName[1],
pstAddIndication->sfAuthorizedSet.u8ServiceClassName[2],
pstAddIndication->sfAuthorizedSet.u8ServiceClassName[3],
pstAddIndication->sfAuthorizedSet.u8ServiceClassName[4],
pstAddIndication->sfAuthorizedSet.u8ServiceClassName[5]);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService: 0x%X", pstAddIndication->sfAuthorizedSet.u8MBSService);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet: 0x%X", pstAddIndication->sfAuthorizedSet.u8QosParamSet);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficPriority: 0x%X, %p",
pstAddIndication->sfAuthorizedSet.u8TrafficPriority, &pstAddIndication->sfAuthorizedSet.u8TrafficPriority);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxSustainedTrafficRate: 0x%X 0x%p",
pstAddIndication->sfAuthorizedSet.u32MaxSustainedTrafficRate,
&pstAddIndication->sfAuthorizedSet.u32MaxSustainedTrafficRate);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaxTrafficBurst: 0x%X", pstAddIndication->sfAuthorizedSet.u32MaxTrafficBurst);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MinReservedTrafficRate : 0x%X",
pstAddIndication->sfAuthorizedSet.u32MinReservedTrafficRate);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParamLength: 0x%X",
pstAddIndication->sfAuthorizedSet.u8VendorSpecificQoSParamLength);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8VendorSpecificQoSParam: 0x%X",
pstAddIndication->sfAuthorizedSet.u8VendorSpecificQoSParam[0]);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceFlowSchedulingType: 0x%X",
pstAddIndication->sfAuthorizedSet.u8ServiceFlowSchedulingType);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32ToleratedJitter: 0x%X", pstAddIndication->sfAuthorizedSet.u32ToleratedJitter);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32MaximumLatency: 0x%X", pstAddIndication->sfAuthorizedSet.u32MaximumLatency);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8FixedLengthVSVariableLengthSDUIndicator: 0x%X",
pstAddIndication->sfAuthorizedSet.u8FixedLengthVSVariableLengthSDUIndicator);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8SDUSize: 0x%X", pstAddIndication->sfAuthorizedSet.u8SDUSize);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TargetSAID: 0x%X", pstAddIndication->sfAuthorizedSet.u16TargetSAID);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQEnable: 0x%X", pstAddIndication->sfAuthorizedSet.u8ARQEnable);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQWindowSize: 0x%X", pstAddIndication->sfAuthorizedSet.u16ARQWindowSize);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryTxTimeOut: 0x%X", pstAddIndication->sfAuthorizedSet.u16ARQRetryTxTimeOut);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRetryRxTimeOut: 0x%X", pstAddIndication->sfAuthorizedSet.u16ARQRetryRxTimeOut);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockLifeTime: 0x%X", pstAddIndication->sfAuthorizedSet.u16ARQBlockLifeTime);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQSyncLossTimeOut: 0x%X", pstAddIndication->sfAuthorizedSet.u16ARQSyncLossTimeOut);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ARQDeliverInOrder: 0x%X", pstAddIndication->sfAuthorizedSet.u8ARQDeliverInOrder);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQRxPurgeTimeOut: 0x%X", pstAddIndication->sfAuthorizedSet.u16ARQRxPurgeTimeOut);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16ARQBlockSize: 0x%X", pstAddIndication->sfAuthorizedSet.u16ARQBlockSize);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8CSSpecification: 0x%X", pstAddIndication->sfAuthorizedSet.u8CSSpecification);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TypeOfDataDeliveryService: 0x%X",
pstAddIndication->sfAuthorizedSet.u8TypeOfDataDeliveryService);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16SDUInterArrivalTime: 0x%X", pstAddIndication->sfAuthorizedSet.u16SDUInterArrivalTime);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16TimeBase: 0x%X", pstAddIndication->sfAuthorizedSet.u16TimeBase);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8PagingPreference: 0x%X", pstAddIndication->sfAuthorizedSet.u8PagingPreference);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UnsolicitedPollingInterval: 0x%X",
pstAddIndication->sfAuthorizedSet.u16UnsolicitedPollingInterval);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "sfAuthorizedSet.u8HARQChannelMapping %x %x %x ",
*(unsigned int *)pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping,
*(unsigned int *)&pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping[4],
*(USHORT *)&pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping[8]);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8TrafficIndicationPreference: 0x%X",
pstAddIndication->sfAuthorizedSet.u8TrafficIndicationPreference);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " Total Classifiers Received: 0x%X", pstAddIndication->sfAuthorizedSet.u8TotalClassifiers);
nCurClassifierCnt = pstAddIndication->sfAuthorizedSet.u8TotalClassifiers;
if (nCurClassifierCnt > MAX_CLASSIFIERS_IN_SF)
nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "pstAddIndication->sfAuthorizedSet.bValid %d", pstAddIndication->sfAuthorizedSet.bValid);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "pstAddIndication->sfAuthorizedSet.u16MacOverhead %x", pstAddIndication->sfAuthorizedSet.u16MacOverhead);
if (!pstAddIndication->sfAuthorizedSet.bValid)
pstAddIndication->sfAuthorizedSet.bValid = 1;
for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) {
struct bcm_convergence_types *psfCSType = NULL;
psfCSType = &pstAddIndication->sfAuthorizedSet.cConvergenceSLTypes[nIndex];
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "psfCSType = %p", psfCSType);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "CCPacketClassificationRuleSI====>");
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ClassifierRulePriority: 0x%X ",
psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfServiceLength: 0x%X ",
psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfService[3]: 0x%X ,0x%X ,0x%X ",
psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0],
psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1],
psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2]);
for (uiLoopIndex = 0; uiLoopIndex < 1; uiLoopIndex++)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Protocol: 0x%02X ",
psfCSType->cCPacketClassificationRule.u8Protocol);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddressLength: 0x%X ",
psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength);
for (uiLoopIndex = 0; uiLoopIndex < 32; uiLoopIndex++)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPMaskedSourceAddress[32]: 0x%02X ",
psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress[uiLoopIndex]);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPDestinationAddressLength: 0x%X ",