Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux-2.6-microblaze.git] / net / netfilter / nf_flow_table_offload.c
index 83e1db3..06f00cd 100644 (file)
@@ -847,9 +847,6 @@ static int nf_flow_table_offload_cmd(struct flow_block_offload *bo,
 {
        int err;
 
-       if (!nf_flowtable_hw_offload(flowtable))
-               return 0;
-
        if (!dev->netdev_ops->ndo_setup_tc)
                return -EOPNOTSUPP;
 
@@ -876,6 +873,9 @@ int nf_flow_table_offload_setup(struct nf_flowtable *flowtable,
        struct flow_block_offload bo;
        int err;
 
+       if (!nf_flowtable_hw_offload(flowtable))
+               return 0;
+
        err = nf_flow_table_offload_cmd(&bo, flowtable, dev, cmd, &extack);
        if (err < 0)
                return err;