msm: ipa3: Correctly return error for ipa3_mdfy_flt_rule
Return the right error in internal mdfy_flt_rule for better IPACM debugability and update the status last after the modify in and out. Change-Id: Id872cd8fcea9816d13a20a4cf71c47311897aa9d Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
This commit is contained in:
parent
942aa8f8d5
commit
502288d0ba
@ -1693,17 +1693,23 @@ int ipa3_mdfy_flt_rule(struct ipa_ioc_mdfy_flt_rule *hdls)
|
||||
}
|
||||
|
||||
mutex_lock(&ipa3_ctx->lock);
|
||||
|
||||
for (i = 0; i < hdls->num_rules; i++) {
|
||||
/* if hashing not supported, all tables are non-hash tables*/
|
||||
if (ipa3_ctx->ipa_fltrt_not_hashable)
|
||||
hdls->rules[i].rule.hashable = false;
|
||||
|
||||
__ipa_convert_flt_mdfy_in(hdls->rules[i], &rule);
|
||||
if (__ipa_mdfy_flt_rule(&rule, hdls->ip)) {
|
||||
IPAERR_RL("failed to mdfy flt rule %i\n", i);
|
||||
|
||||
result = __ipa_mdfy_flt_rule(&rule, hdls->ip);
|
||||
|
||||
__ipa_convert_flt_mdfy_out(rule, &hdls->rules[i]);
|
||||
|
||||
if (result) {
|
||||
IPAERR_RL("failed to mdfy flt rule %d\n", i);
|
||||
hdls->rules[i].status = IPA_FLT_STATUS_OF_MDFY_FAILED;
|
||||
} else {
|
||||
hdls->rules[i].status = 0;
|
||||
__ipa_convert_flt_mdfy_out(rule, &hdls->rules[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user