Commit a903d65055199bfad94ae3af598d45970f62f8c2
Committed by
Greg Kroah-Hartman
1 parent
37fed6ac26
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
Staging: bcm: Remove typedef for _S_PHS_RULE and call directly.
This patch removes typedef for _S_PHS_RULE, and changes the name of the struct to bcm_phs_rule. In addition, any calls to struct "S_PHS_RULE" are changed to call directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 6 changed files with 38 additions and 38 deletions Side-by-side Diff
drivers/staging/bcm/Adapter.h
drivers/staging/bcm/CmHost.c
... | ... | @@ -440,7 +440,7 @@ |
440 | 440 | B_UINT16 u16PacketClassificationRuleIndex = 0; |
441 | 441 | int i; |
442 | 442 | struct bcm_convergence_types *psfCSType = NULL; |
443 | - S_PHS_RULE sPhsRule; | |
443 | + struct bcm_phs_rule sPhsRule; | |
444 | 444 | USHORT uVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value; |
445 | 445 | UINT UGIValue = 0; |
446 | 446 | |
... | ... | @@ -703,7 +703,7 @@ |
703 | 703 | /* Update PHS Rule For the Classifier */ |
704 | 704 | if (sPhsRule.u8PHSI) { |
705 | 705 | Adapter->astClassifierTable[uiClassifierIndex].u32PHSRuleID = sPhsRule.u8PHSI; |
706 | - memcpy(&Adapter->astClassifierTable[uiClassifierIndex].sPhsRule, &sPhsRule, sizeof(S_PHS_RULE)); | |
706 | + memcpy(&Adapter->astClassifierTable[uiClassifierIndex].sPhsRule, &sPhsRule, sizeof(struct bcm_phs_rule)); | |
707 | 707 | } |
708 | 708 | } |
709 | 709 | } |
drivers/staging/bcm/PHSDefines.h
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | #define ERR_CLSID_MATCH_FAIL 0x808 |
38 | 38 | #define ERR_PHSRULE_MATCH_FAIL 0x809 |
39 | 39 | |
40 | -typedef struct _S_PHS_RULE { | |
40 | +struct bcm_phs_rule { | |
41 | 41 | u8 u8PHSI; |
42 | 42 | u8 u8PHSFLength; |
43 | 43 | u8 u8PHSF[MAX_PHS_LENGTHS]; |
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | long PHSModifiedBytes; |
52 | 52 | unsigned long PHSModifiedNumPackets; |
53 | 53 | unsigned long PHSErrorNumPackets; |
54 | -} S_PHS_RULE; | |
54 | +}; | |
55 | 55 | |
56 | 56 | enum bcm_phs_classifier_context { |
57 | 57 | eActiveClassifierRuleContext, |
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 | u8 bUsed; |
63 | 63 | u16 uiClassifierRuleId; |
64 | 64 | u8 u8PHSI; |
65 | - S_PHS_RULE *pstPhsRule; | |
65 | + struct bcm_phs_rule *pstPhsRule; | |
66 | 66 | u8 bUnclassifiedPHSRule; |
67 | 67 | }; |
68 | 68 |
drivers/staging/bcm/PHSModule.c
1 | 1 | #include "headers.h" |
2 | 2 | |
3 | -static UINT CreateSFToClassifierRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_table *psServiceFlowTable,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI); | |
3 | +static UINT CreateSFToClassifierRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_table *psServiceFlowTable, struct bcm_phs_rule *psPhsRule, B_UINT8 u8AssociatedPHSI); | |
4 | 4 | |
5 | -static UINT CreateClassiferToPHSRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_entry *pstServiceFlowEntry,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI); | |
5 | +static UINT CreateClassiferToPHSRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_entry *pstServiceFlowEntry, struct bcm_phs_rule *psPhsRule, B_UINT8 u8AssociatedPHSI); | |
6 | 6 | |
7 | -static UINT CreateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule, enum bcm_phs_classifier_context eClsContext,B_UINT8 u8AssociatedPHSI); | |
7 | +static UINT CreateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *psPhsRule, enum bcm_phs_classifier_context eClsContext,B_UINT8 u8AssociatedPHSI); | |
8 | 8 | |
9 | -static UINT UpdateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_entry *pstClassifierEntry, struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI); | |
9 | +static UINT UpdateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_entry *pstClassifierEntry, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *psPhsRule, B_UINT8 u8AssociatedPHSI); | |
10 | 10 | |
11 | -static BOOLEAN ValidatePHSRuleComplete(S_PHS_RULE *psPhsRule); | |
11 | +static BOOLEAN ValidatePHSRuleComplete(struct bcm_phs_rule *psPhsRule); | |
12 | 12 | |
13 | -static BOOLEAN DerefPhsRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable,S_PHS_RULE *pstPhsRule); | |
13 | +static BOOLEAN DerefPhsRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *pstPhsRule); | |
14 | 14 | |
15 | 15 | static UINT GetClassifierEntry(struct bcm_phs_classifier_table *pstClassifierTable,B_UINT32 uiClsid, enum bcm_phs_classifier_context eClsContext, struct bcm_phs_classifier_entry **ppstClassifierEntry); |
16 | 16 | |
17 | -static UINT GetPhsRuleEntry(struct bcm_phs_classifier_table *pstClassifierTable,B_UINT32 uiPHSI, enum bcm_phs_classifier_context eClsContext,S_PHS_RULE **ppstPhsRule); | |
17 | +static UINT GetPhsRuleEntry(struct bcm_phs_classifier_table *pstClassifierTable,B_UINT32 uiPHSI, enum bcm_phs_classifier_context eClsContext, struct bcm_phs_rule **ppstPhsRule); | |
18 | 18 | |
19 | 19 | static void free_phs_serviceflow_rules(struct bcm_phs_table *psServiceFlowRulesTable); |
20 | 20 | |
21 | -static int phs_compress(S_PHS_RULE *phs_members,unsigned char *in_buf, | |
21 | +static int phs_compress(struct bcm_phs_rule *phs_members, unsigned char *in_buf, | |
22 | 22 | unsigned char *out_buf,unsigned int *header_size,UINT *new_header_size ); |
23 | 23 | |
24 | 24 | |
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | unsigned char *phsf,unsigned char *phsm,unsigned int phss,unsigned int phsv,UINT *new_header_size ); |
27 | 27 | |
28 | 28 | static int phs_decompress(unsigned char *in_buf,unsigned char *out_buf,\ |
29 | - S_PHS_RULE *phs_rules,UINT *header_size); | |
29 | + struct bcm_phs_rule *phs_rules, UINT *header_size); | |
30 | 30 | |
31 | 31 | |
32 | 32 | static ULONG PhsCompress(void* pvContext, |
... | ... | @@ -381,7 +381,7 @@ |
381 | 381 | IN void* pvContext - PHS Driver Specific Context |
382 | 382 | IN B_UINT16 uiVcid - The Service Flow ID for which the PHS rule applies |
383 | 383 | IN B_UINT16 uiClsId - The Classifier ID within the Service Flow for which the PHS rule applies. |
384 | - IN S_PHS_RULE *psPhsRule - The PHS Rule strcuture to be added to the PHS Rule table. | |
384 | + IN struct bcm_phs_rule *psPhsRule - The PHS Rule strcuture to be added to the PHS Rule table. | |
385 | 385 | |
386 | 386 | Return Value: |
387 | 387 | |
... | ... | @@ -392,7 +392,7 @@ |
392 | 392 | ULONG PhsUpdateClassifierRule(IN void* pvContext, |
393 | 393 | IN B_UINT16 uiVcid , |
394 | 394 | IN B_UINT16 uiClsId , |
395 | - IN S_PHS_RULE *psPhsRule, | |
395 | + IN struct bcm_phs_rule *psPhsRule, | |
396 | 396 | IN B_UINT8 u8AssociatedPHSI) |
397 | 397 | { |
398 | 398 | ULONG lStatus =0; |
... | ... | @@ -682,7 +682,7 @@ |
682 | 682 | UINT nSFIndex =0, nClsidIndex =0 ; |
683 | 683 | struct bcm_phs_entry *pstServiceFlowEntry = NULL; |
684 | 684 | struct bcm_phs_classifier_entry *pstClassifierEntry = NULL; |
685 | - S_PHS_RULE *pstPhsRule = NULL; | |
685 | + struct bcm_phs_rule *pstPhsRule = NULL; | |
686 | 686 | ULONG lStatus =0; |
687 | 687 | struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); |
688 | 688 | |
... | ... | @@ -776,7 +776,7 @@ |
776 | 776 | { |
777 | 777 | UINT nSFIndex =0, nPhsRuleIndex =0 ; |
778 | 778 | struct bcm_phs_entry *pstServiceFlowEntry = NULL; |
779 | - S_PHS_RULE *pstPhsRule = NULL; | |
779 | + struct bcm_phs_rule *pstPhsRule = NULL; | |
780 | 780 | UINT phsi; |
781 | 781 | struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); |
782 | 782 | struct bcm_phs_extension *pDeviceExtension= |
... | ... | @@ -898,7 +898,7 @@ |
898 | 898 | |
899 | 899 | |
900 | 900 | |
901 | -static BOOLEAN ValidatePHSRuleComplete(IN S_PHS_RULE *psPhsRule) | |
901 | +static BOOLEAN ValidatePHSRuleComplete(IN struct bcm_phs_rule *psPhsRule) | |
902 | 902 | { |
903 | 903 | if(psPhsRule) |
904 | 904 | { |
... | ... | @@ -983,7 +983,7 @@ |
983 | 983 | |
984 | 984 | static UINT GetPhsRuleEntry(IN struct bcm_phs_classifier_table *pstClassifierTable, |
985 | 985 | IN B_UINT32 uiPHSI, enum bcm_phs_classifier_context eClsContext, |
986 | - OUT S_PHS_RULE **ppstPhsRule) | |
986 | + OUT struct bcm_phs_rule **ppstPhsRule) | |
987 | 987 | { |
988 | 988 | int i; |
989 | 989 | struct bcm_phs_classifier_entry *pstClassifierRule = NULL; |
... | ... | @@ -1013,7 +1013,7 @@ |
1013 | 1013 | } |
1014 | 1014 | |
1015 | 1015 | UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid,IN B_UINT16 uiClsId, |
1016 | - IN struct bcm_phs_table *psServiceFlowTable,S_PHS_RULE *psPhsRule, | |
1016 | + IN struct bcm_phs_table *psServiceFlowTable, struct bcm_phs_rule *psPhsRule, | |
1017 | 1017 | B_UINT8 u8AssociatedPHSI) |
1018 | 1018 | { |
1019 | 1019 | |
... | ... | @@ -1051,7 +1051,7 @@ |
1051 | 1051 | |
1052 | 1052 | UINT CreateClassiferToPHSRuleMapping(IN B_UINT16 uiVcid, |
1053 | 1053 | IN B_UINT16 uiClsId,IN struct bcm_phs_entry *pstServiceFlowEntry, |
1054 | - S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI) | |
1054 | + struct bcm_phs_rule *psPhsRule, B_UINT8 u8AssociatedPHSI) | |
1055 | 1055 | { |
1056 | 1056 | struct bcm_phs_classifier_entry *pstClassifierEntry = NULL; |
1057 | 1057 | UINT uiStatus =PHS_SUCCESS; |
... | ... | @@ -1141,7 +1141,7 @@ |
1141 | 1141 | } |
1142 | 1142 | |
1143 | 1143 | static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId, |
1144 | - struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule, | |
1144 | + struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *psPhsRule, | |
1145 | 1145 | enum bcm_phs_classifier_context eClsContext,B_UINT8 u8AssociatedPHSI) |
1146 | 1146 | { |
1147 | 1147 | UINT iClassifierIndex = 0; |
... | ... | @@ -1227,7 +1227,7 @@ |
1227 | 1227 | { |
1228 | 1228 | if(psClassifierRules->pstPhsRule == NULL) |
1229 | 1229 | { |
1230 | - psClassifierRules->pstPhsRule = kmalloc(sizeof(S_PHS_RULE),GFP_KERNEL); | |
1230 | + psClassifierRules->pstPhsRule = kmalloc(sizeof(struct bcm_phs_rule),GFP_KERNEL); | |
1231 | 1231 | |
1232 | 1232 | if(NULL == psClassifierRules->pstPhsRule) |
1233 | 1233 | return ERR_PHSRULE_MEMALLOC_FAIL; |
... | ... | @@ -1240,7 +1240,7 @@ |
1240 | 1240 | |
1241 | 1241 | /* Update The PHS rule */ |
1242 | 1242 | memcpy(psClassifierRules->pstPhsRule, |
1243 | - psPhsRule, sizeof(S_PHS_RULE)); | |
1243 | + psPhsRule, sizeof(struct bcm_phs_rule)); | |
1244 | 1244 | } |
1245 | 1245 | else |
1246 | 1246 | { |
1247 | 1247 | |
... | ... | @@ -1253,10 +1253,10 @@ |
1253 | 1253 | |
1254 | 1254 | static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId, |
1255 | 1255 | IN struct bcm_phs_classifier_entry *pstClassifierEntry, |
1256 | - struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule, | |
1256 | + struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *psPhsRule, | |
1257 | 1257 | B_UINT8 u8AssociatedPHSI) |
1258 | 1258 | { |
1259 | - S_PHS_RULE *pstAddPhsRule = NULL; | |
1259 | + struct bcm_phs_rule *pstAddPhsRule = NULL; | |
1260 | 1260 | UINT nPhsRuleIndex = 0; |
1261 | 1261 | BOOLEAN bPHSRuleOrphaned = FALSE; |
1262 | 1262 | struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); |
1263 | 1263 | |
... | ... | @@ -1281,13 +1281,13 @@ |
1281 | 1281 | //Step 2.a PHS Rule Does Not Exist .Create New PHS Rule for uiClsId |
1282 | 1282 | if(FALSE == bPHSRuleOrphaned) |
1283 | 1283 | { |
1284 | - pstClassifierEntry->pstPhsRule = kmalloc(sizeof(S_PHS_RULE), GFP_KERNEL); | |
1284 | + pstClassifierEntry->pstPhsRule = kmalloc(sizeof(struct bcm_phs_rule), GFP_KERNEL); | |
1285 | 1285 | if(NULL == pstClassifierEntry->pstPhsRule) |
1286 | 1286 | { |
1287 | 1287 | return ERR_PHSRULE_MEMALLOC_FAIL; |
1288 | 1288 | } |
1289 | 1289 | } |
1290 | - memcpy(pstClassifierEntry->pstPhsRule, psPhsRule, sizeof(S_PHS_RULE)); | |
1290 | + memcpy(pstClassifierEntry->pstPhsRule, psPhsRule, sizeof(struct bcm_phs_rule)); | |
1291 | 1291 | |
1292 | 1292 | } |
1293 | 1293 | else |
... | ... | @@ -1312,7 +1312,7 @@ |
1312 | 1312 | |
1313 | 1313 | } |
1314 | 1314 | |
1315 | -static BOOLEAN DerefPhsRule(IN B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable,S_PHS_RULE *pstPhsRule) | |
1315 | +static BOOLEAN DerefPhsRule(IN B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *pstPhsRule) | |
1316 | 1316 | { |
1317 | 1317 | if(pstPhsRule==NULL) |
1318 | 1318 | return FALSE; |
1319 | 1319 | |
... | ... | @@ -1408,10 +1408,10 @@ |
1408 | 1408 | //----------------------------------------------------------------------------- |
1409 | 1409 | |
1410 | 1410 | int phs_decompress(unsigned char *in_buf,unsigned char *out_buf, |
1411 | - S_PHS_RULE *decomp_phs_rules,UINT *header_size) | |
1411 | + struct bcm_phs_rule *decomp_phs_rules, UINT *header_size) | |
1412 | 1412 | { |
1413 | 1413 | int phss,size=0; |
1414 | - S_PHS_RULE *tmp_memb; | |
1414 | + struct bcm_phs_rule *tmp_memb; | |
1415 | 1415 | int bit,i=0; |
1416 | 1416 | unsigned char *phsf,*phsm; |
1417 | 1417 | int in_buf_len = *header_size-1; |
... | ... | @@ -1490,7 +1490,7 @@ |
1490 | 1490 | // size-The number of bytes copied into the output buffer i.e dynamic fields |
1491 | 1491 | // 0 -If PHS rule is NULL.If PHSV field is not set.If the verification fails. |
1492 | 1492 | //----------------------------------------------------------------------------- |
1493 | -static int phs_compress(S_PHS_RULE *phs_rule,unsigned char *in_buf | |
1493 | +static int phs_compress(struct bcm_phs_rule *phs_rule, unsigned char *in_buf | |
1494 | 1494 | ,unsigned char *out_buf,UINT *header_size,UINT *new_header_size) |
1495 | 1495 | { |
1496 | 1496 | unsigned char *old_addr = out_buf; |
drivers/staging/bcm/PHSModule.h
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | int PhsCleanup(struct bcm_phs_extension *pPHSDeviceExt); |
31 | 31 | |
32 | 32 | //Utility Functions |
33 | -ULONG PhsUpdateClassifierRule(void* pvContext,B_UINT16 uiVcid,B_UINT16 uiClsId,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI ); | |
33 | +ULONG PhsUpdateClassifierRule(void* pvContext,B_UINT16 uiVcid,B_UINT16 uiClsId, struct bcm_phs_rule *psPhsRule,B_UINT8 u8AssociatedPHSI ); | |
34 | 34 | |
35 | 35 | ULONG PhsDeletePHSRule(void* pvContext,B_UINT16 uiVcid,B_UINT8 u8PHSI); |
36 | 36 | |
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | ULONG PhsDeleteSFRules(void* pvContext,B_UINT16 uiVcid) ; |
40 | 40 | |
41 | 41 | |
42 | -BOOLEAN ValidatePHSRule(S_PHS_RULE *psPhsRule); | |
42 | +BOOLEAN ValidatePHSRule(struct bcm_phs_rule *psPhsRule); | |
43 | 43 | |
44 | 44 | UINT GetServiceFlowEntry(struct bcm_phs_table *psServiceFlowTable,B_UINT16 uiVcid, struct bcm_phs_entry **ppstServiceFlowEntry); |
45 | 45 |
drivers/staging/bcm/hostmibs.c
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | INT ProcessGetHostMibs(struct bcm_mini_adapter *Adapter, struct bcm_host_stats_mibs *pstHostMibs) |
13 | 13 | { |
14 | 14 | struct bcm_phs_entry *pstServiceFlowEntry = NULL; |
15 | - S_PHS_RULE *pstPhsRule = NULL; | |
15 | + struct bcm_phs_rule *pstPhsRule = NULL; | |
16 | 16 | struct bcm_phs_classifier_table *pstClassifierTable = NULL; |
17 | 17 | struct bcm_phs_classifier_entry *pstClassifierRule = NULL; |
18 | 18 | struct bcm_phs_extension *pDeviceExtension = (struct bcm_phs_extension *) &Adapter->stBCMPhsContext; |
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | |
71 | 71 | memcpy(&pstHostMibs-> |
72 | 72 | astPhsRulesTable[nPhsTableIndex].u8PHSI, |
73 | - &pstPhsRule->u8PHSI, sizeof(S_PHS_RULE)); | |
73 | + &pstPhsRule->u8PHSI, sizeof(struct bcm_phs_rule)); | |
74 | 74 | nPhsTableIndex++; |
75 | 75 | |
76 | 76 | } |