From: Dimitri Fedrau <dima.fedrau@gmail.com>
Cc: Dimitri Fedrau <dima.fedrau@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] net: phy: Support 100BT1 and 1000BT1 linkmode advertisements
Date: Mon, 18 Dec 2023 23:18:14 +0100 [thread overview]
Message-ID: <20231218221814.69304-2-dima.fedrau@gmail.com> (raw)
In-Reply-To: <20231218221814.69304-1-dima.fedrau@gmail.com>
Extend helper function linkmode_adv_to_mii_t1_adv_m_t to support
100BT1 and 1000BT1 linkmode advertisements.
Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
---
include/linux/mdio.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/mdio.h b/include/linux/mdio.h
index 007fd9c3e4b6..322c7a5092e4 100644
--- a/include/linux/mdio.h
+++ b/include/linux/mdio.h
@@ -408,6 +408,10 @@ static inline u32 linkmode_adv_to_mii_t1_adv_m_t(unsigned long *advertising)
if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT1L_Full_BIT, advertising))
result |= MDIO_AN_T1_ADV_M_B10L;
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT, advertising))
+ result |= MDIO_AN_T1_ADV_M_100BT1;
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, advertising))
+ result |= MDIO_AN_T1_ADV_M_1000BT1;
return result;
}
--
2.39.2
next prev parent reply other threads:[~2023-12-18 22:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 22:18 [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants Dimitri Fedrau
2023-12-18 22:18 ` Dimitri Fedrau [this message]
2023-12-18 23:45 ` Andrew Lunn
2023-12-19 9:28 ` Dimitri Fedrau
2023-12-19 16:01 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231218221814.69304-2-dima.fedrau@gmail.com \
--to=dima.fedrau@gmail.com \
--cc=andrew@lunn.ch \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox