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

Staging: bcm: PHSModule.c: Rewrote ValidatePHSRuleComplete()

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 c8020cc9
...@@ -948,24 +948,10 @@ static void free_phs_serviceflow_rules(struct bcm_phs_table *psServiceFlowRulesT ...@@ -948,24 +948,10 @@ static void free_phs_serviceflow_rules(struct bcm_phs_table *psServiceFlowRulesT
static bool ValidatePHSRuleComplete(IN struct bcm_phs_rule *psPhsRule) static bool ValidatePHSRuleComplete(IN struct bcm_phs_rule *psPhsRule)
{ {
if (psPhsRule) { return (psPhsRule &&
if (!psPhsRule->u8PHSI) { psPhsRule->u8PHSI &&
/* PHSI is not valid */ psPhsRule->u8PHSS &&
return false; psPhsRule->u8PHSFLength);
}
if (!psPhsRule->u8PHSS) {
/* PHSS Is Undefined */
return false;
}
/* Check if PHSF is defines for the PHS Rule */
if (!psPhsRule->u8PHSFLength) /* If any part of PHSF is valid then Rule contains valid PHSF */
return false;
return TRUE;
} else
return false;
} }
UINT GetServiceFlowEntry(IN struct bcm_phs_table *psServiceFlowTable, UINT GetServiceFlowEntry(IN struct bcm_phs_table *psServiceFlowTable,
......
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