lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 6 Mar 2016 16:36:00 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Michael Chan <michael.chan@...adcom.com>, davem@...emloft.net
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next 3/8] bnxt_en: Use common function to get ethtool
 supported flags.

Hello.

On 3/6/2016 10:01 AM, Michael Chan wrote:

> The supported bits and advertising bits in ethtool have the same
> definitions.  The same is true for the firmware bits.  So use the
> common function to handle the conversion for both supported and
> advertising bits.
>
> Signed-off-by: Michael Chan <mchan@...adcom.com>
> ---
>   drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 29 +++++++----------------
>   1 file changed, 9 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> index 591c290..e2fe967 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
[...]
> @@ -564,6 +545,15 @@ static u32 bnxt_fw_to_ethtool_lp_adv(struct bnxt_link_info *link_info)
>   	return _bnxt_fw_to_ethtool_adv_spds(fw_speeds, fw_pause);
>   }
>
> +static u32 bnxt_fw_to_ethtool_support_spds(struct bnxt_link_info *link_info)
> +{
> +	u16 fw_speeds = link_info->support_speeds;
> +	u32 supported;
> +
> +	supported = _bnxt_fw_to_ethtool_adv_spds(fw_speeds, 0);
> +	return (supported | SUPPORTED_Pause | SUPPORTED_Asym_Pause);

    Parens not needed here.

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ