Re: [PATCH] Enable MACsec HW offload in driver_macsec_linux if supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 28, 2022 at 04:59:56PM +0200, Benny Lønstrup Ammitzbøll wrote:

> +static int macsec_drv_try_enable_hw_offload(void *priv, enum macsec_offload offl)

This breaks the build with many existing systems since enum
macsec_offload is not defined. In other words, this would need some kind
of conditional build mechanism to try to include this only if the needed
defines are available.

> +	msg = msg_prepare(MACSEC_CMD_UPD_OFFLOAD, ctx, drv->ifi);

Same applies for these MACSEC*OFFLOAD* values

> @@ -1180,7 +1220,28 @@ static int macsec_drv_create_transmit_sc(
> +	/* Try to enable MACsec hardware offloading */
> +	err = macsec_drv_try_enable_hw_offload(drv, MACSEC_OFFLOAD_MAC);
> +	if (err) {
> +		err = macsec_drv_try_enable_hw_offload(drv, MACSEC_OFFLOAD_PHY);
> +		if (err) {
> +			wpa_printf(MSG_INFO, DRV_PREFIX
> +				   "%s: MACSEC_OFFLOAD_OFF",
> +				   drv->common.ifname);
> +		} else {
> +			wpa_printf(MSG_INFO, DRV_PREFIX
> +				   "%s: MACSEC_OFFLOAD_PHY",
> +				   drv->common.ifname);
> +		}
> +	} else {
> +		wpa_printf(MSG_INFO, DRV_PREFIX
> +			   "%s: MACSEC_OFFLOAD_MAC",
> +			   drv->common.ifname);
> +	}
>  }

Missing return 0 at the end of the function.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux