Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9331442 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa3: Correctly return error for ipa3_mdfy_flt_rule"

parents e93e60d6 6643457f
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1705,17 +1705,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]);
		}
	}