summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-09-11 00:10:15 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-09-11 16:47:40 +0200
commit0161a56f40c8f6bfa3c46fbbc7372f7fcfce19a5 (patch)
tree43cfd63f5220abb2e8059c9efd3cdd13e105ebc7
parent624532647442a5030eaf8868e8e3fe0c2c372d2c (diff)
backport: add ethtool_convert_legacy_u32_to_link_mode()
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@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--backport/compat/backport-4.10.c7
1 files changed, 7 insertions, 0 deletions
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;
+}
#endif
static u32 mii_get_an(struct mii_if_info *mii, u16 addr)