[PATCH 3/8] backport: add ethtool_convert_legacy_u32_to_link_mode()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


This function was added in kernel 4.7 in commit 6d62b4d5fac62 ("net:
ethtool: export conversion function between u32 and link mode") and is
used by mii_ethtool_get_link_ksettings() in the backport-4.10.c file.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
 backport/compat/backport-4.10.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backport/compat/backport-4.10.c b/backport/compat/backport-4.10.c
index 4c8125fb..44e02dd7 100644
--- a/backport/compat/backport-4.10.c
+++ b/backport/compat/backport-4.10.c
@@ -36,6 +36,13 @@ static bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
 	*legacy_u32 = src[0];
 	return retval;
+static void ethtool_convert_legacy_u32_to_link_mode(unsigned long *dst,
+						    u32 legacy_u32)
+	bitmap_zero(dst, __ETHTOOL_LINK_MODE_MASK_NBITS);
+	dst[0] = legacy_u32;
 static u32 mii_get_an(struct mii_if_info *mii, u16 addr)

To unsubscribe from this list: send the line "unsubscribe backports" in

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux