diff options
author | 2023-01-14 14:42:35 +0100 | |
---|---|---|
committer | 2023-01-16 13:45:16 +0000 | |
commit | 6573f71ae72fa66160377b2bebd9946897e8bcc9 (patch) | |
tree | b6a28f41b8dfc51c22897d6f3df55d3d49ae65fc | |
parent | r8169: reset bus if NIC isn't accessible after tx timeout (diff) | |
download | linux-6573f71ae72fa66160377b2bebd9946897e8bcc9.tar.gz linux-6573f71ae72fa66160377b2bebd9946897e8bcc9.tar.bz2 linux-6573f71ae72fa66160377b2bebd9946897e8bcc9.zip |
net: microchip: vcap api: Erase VCAP cache before encoding rule
For consistency the VCAP cache area is erased just before the new rule is
being encoded.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/microchip/vcap/vcap_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api.c b/drivers/net/ethernet/microchip/vcap/vcap_api.c index 664aae3e2acd..b9b6432f4094 100644 --- a/drivers/net/ethernet/microchip/vcap/vcap_api.c +++ b/drivers/net/ethernet/microchip/vcap/vcap_api.c @@ -1823,6 +1823,7 @@ int vcap_add_rule(struct vcap_rule *rule) } if (move.count > 0) vcap_move_rules(ri, &move); + vcap_erase_cache(ri); ret = vcap_encode_rule(ri); if (ret) { pr_err("%s:%d: rule encoding error: %d\n", __func__, __LINE__, ret); @@ -1885,7 +1886,6 @@ struct vcap_rule *vcap_alloc_rule(struct vcap_control *vctrl, ri->vctrl = vctrl; /* refer to the client */ if (vcap_set_rule_id(ri) == 0) goto out_free; - vcap_erase_cache(ri); return (struct vcap_rule *)ri; out_free: |