[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bc342289-5008-490d-b98f-6826a11574b3@lunn.ch>
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