Staging: bcm: PHSModule.c: Replaced member accessing with variable in CreateSFToClassifierRuleMapping()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
18002f567f
commit
91283491c6
1 changed files with 11 additions and 8 deletions
|
@ -1038,10 +1038,12 @@ static UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid,
|
||||||
UINT uiStatus = 0;
|
UINT uiStatus = 0;
|
||||||
int iSfIndex;
|
int iSfIndex;
|
||||||
bool bFreeEntryFound = false;
|
bool bFreeEntryFound = false;
|
||||||
|
struct bcm_phs_entry *curr_list;
|
||||||
|
|
||||||
/* Check for a free entry in SFID table */
|
/* Check for a free entry in SFID table */
|
||||||
for (iSfIndex = 0; iSfIndex < MAX_SERVICEFLOWS; iSfIndex++) {
|
for (iSfIndex = 0; iSfIndex < MAX_SERVICEFLOWS; iSfIndex++) {
|
||||||
if (!psServiceFlowTable->stSFList[iSfIndex].bUsed) {
|
curr_list = &psServiceFlowTable->stSFList[iSfIndex];
|
||||||
|
if (!curr_list->bUsed) {
|
||||||
bFreeEntryFound = TRUE;
|
bFreeEntryFound = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1050,15 +1052,16 @@ static UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid,
|
||||||
if (!bFreeEntryFound)
|
if (!bFreeEntryFound)
|
||||||
return ERR_SFTABLE_FULL;
|
return ERR_SFTABLE_FULL;
|
||||||
|
|
||||||
psaClassifiertable =
|
psaClassifiertable = curr_list->pstClassifierTable;
|
||||||
psServiceFlowTable->stSFList[iSfIndex].pstClassifierTable;
|
uiStatus = CreateClassifierPHSRule(uiClsId,
|
||||||
uiStatus =
|
psaClassifiertable,
|
||||||
CreateClassifierPHSRule(uiClsId, psaClassifiertable, psPhsRule,
|
psPhsRule,
|
||||||
eActiveClassifierRuleContext, u8AssociatedPHSI);
|
eActiveClassifierRuleContext,
|
||||||
|
u8AssociatedPHSI);
|
||||||
if (uiStatus == PHS_SUCCESS) {
|
if (uiStatus == PHS_SUCCESS) {
|
||||||
/* Add entry at free index to the SF */
|
/* Add entry at free index to the SF */
|
||||||
psServiceFlowTable->stSFList[iSfIndex].bUsed = TRUE;
|
curr_list->bUsed = TRUE;
|
||||||
psServiceFlowTable->stSFList[iSfIndex].uiVcid = uiVcid;
|
curr_list->uiVcid = uiVcid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return uiStatus;
|
return uiStatus;
|
||||||
|
|
Loading…
Add table
Reference in a new issue