Subject: Re: [RFC 12/18] net: atlantic: MACSec offload skeleton

From: Antoine Tenart <[email-masked]>
Date: Fri, 21 Feb 2020 19:21:30 +0100

Hello,

On Fri, Feb 14, 2020 at 06:02:52PM +0300, Igor Russkikh wrote:
> From: Dmitry Bogdanov <[email-masked]>
> --- a/drivers/net/ethernet/aquantia/atlantic/Makefile
> +++ b/drivers/net/ethernet/aquantia/atlantic/Makefile
> @@ -8,6 +8,8 @@
>  
>  obj-$(CONFIG_AQTION) += atlantic.o
>  
> +ccflags-y += -I$(src)
> +
>  atlantic-objs := aq_main.o \
>  	aq_nic.o \
>  	aq_pci_func.o \
> @@ -18,6 +20,7 @@ atlantic-objs := aq_main.o \
>  	aq_drvinfo.o \
>  	aq_filters.o \
>  	aq_phy.o \
> +	aq_macsec.o \

You can exclude this file from the build when MACsec isn't enabled and
remove the #if in the corresponding C file. If MACsec is set to be built
as a module, your driver cannot work as the pn wrap callback won't be
callable.

You would also need to define a dependency on 'MACSEC || MACSEC=n' for
the pn wrap callback to work.

Thanks,
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com