nfp: xdp: move driver XDP setup into a separate function
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 22 Jun 2017 01:25:05 +0000 (18:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jun 2017 17:42:19 +0000 (13:42 -0400)
commitc443b5accedaef8e1d6faf7a1bb921670a90a3d0
tree6089675fd1da878023dfb5b8ffb7c6392f3879e3
parentee5d032f7d032e2cea354522a46b211de84c4e8c
nfp: xdp: move driver XDP setup into a separate function

In preparation of XDP offload flags move the driver setup into
a function.  Otherwise the number of conditions in one function
would make it slightly hard to follow.  The offload handler may
now be called with NULL prog, even if no offload is currently
active, but that's fine, offload code can handle that.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c