Re: [PATCH] linkstate: Add macros for link state up/down

From: Olliver Schinagl
Date: Tue Sep 06 2022 - 09:50:28 EST


Hey Andrew,

On 06-09-2022 14:18, Andrew Lunn wrote:
On Tue, Sep 06, 2022 at 10:37:54AM +0200, Olliver Schinagl wrote:
The phylink_link_state.state property can be up or down, via 1 and 0.

The other link state's (speed, duplex) are defined in ethtool.h so lets
add defines for the link-state there as well so we can use macro's to
define our up/down states.
Hi Olliver

The change itself is fine, but we don't add to the API without
users. Please make use of these two new values somewhere, to show they
are really useful.

Andrew

I actually ran into this need as I'm working on the realtek switch stuff over on openwrt, where I see link-states being set with 0/1. I'll search the kernel for these as well if that helps and can do a follow up of course.

Olliver