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] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 11 Jun 2023 18:01:46 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Christian Marangi <ansuelsmth@...il.com>
Cc:     Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Yang Li <yang.lee@...ux.alibaba.com>,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] leds: trigger: netdev: add additional specific
 link duplex mode

>  static ssize_t device_name_show(struct device *dev,
> @@ -230,6 +241,7 @@ static int set_device_name(struct led_netdev_data *trigger_data,
>  
>  	trigger_data->carrier_link_up = false;
>  	trigger_data->link_speed = 0;
> +	trigger_data->duplex = 0;

/* Duplex, half or full. */
#define DUPLEX_HALF		0x00
#define DUPLEX_FULL		0x01
#define DUPLEX_UNKNOWN		0xff

You probably want to initialise it to DUPLEX_UNKNOWN, not DUPLEX_HALF.

There is also SPEED_UNKNOWN, which might be good to use, rather than
0.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ