Commit 91283491 authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman

Staging: bcm: PHSModule.c: Replaced member accessing with variable in...

Staging: bcm: PHSModule.c: Replaced member accessing with variable in CreateSFToClassifierRuleMapping()
Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 18002f56
......@@ -1038,10 +1038,12 @@ static UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid,
UINT uiStatus = 0;
int iSfIndex;
bool bFreeEntryFound = false;
struct bcm_phs_entry *curr_list;
/* Check for a free entry in SFID table */
for (iSfIndex = 0; iSfIndex < MAX_SERVICEFLOWS; iSfIndex++) {
if (!psServiceFlowTable->stSFList[iSfIndex].bUsed) {
curr_list = &psServiceFlowTable->stSFList[iSfIndex];
if (!curr_list->bUsed) {
bFreeEntryFound = TRUE;
break;
}
......@@ -1050,15 +1052,16 @@ static UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid,
if (!bFreeEntryFound)
return ERR_SFTABLE_FULL;
psaClassifiertable =
psServiceFlowTable->stSFList[iSfIndex].pstClassifierTable;
uiStatus =
CreateClassifierPHSRule(uiClsId, psaClassifiertable, psPhsRule,
eActiveClassifierRuleContext, u8AssociatedPHSI);
psaClassifiertable = curr_list->pstClassifierTable;
uiStatus = CreateClassifierPHSRule(uiClsId,
psaClassifiertable,
psPhsRule,
eActiveClassifierRuleContext,
u8AssociatedPHSI);
if (uiStatus == PHS_SUCCESS) {
/* Add entry at free index to the SF */
psServiceFlowTable->stSFList[iSfIndex].bUsed = TRUE;
psServiceFlowTable->stSFList[iSfIndex].uiVcid = uiVcid;
curr_list->bUsed = TRUE;
curr_list->uiVcid = uiVcid;
}
return uiStatus;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment