aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/linkmode.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-10-15 11:28:46 +0100
committerDavid S. Miller <davem@davemloft.net>2019-10-15 20:40:06 -0700
commit554032cdfbf4491f38241a3f6b27459408d90df3 (patch)
treec3e77da219f5f4f5e6614499b49be83e00c83c15 /include/linux/linkmode.h
parenttc-testing: updated pedit test cases (diff)
downloadlinux-dev-554032cdfbf4491f38241a3f6b27459408d90df3.tar.xz
linux-dev-554032cdfbf4491f38241a3f6b27459408d90df3.zip
net: phylink: use more linkmode_*
Use more linkmode_* helpers rather than open-coding the bitmap operations. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--include/linux/linkmode.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/linkmode.h b/include/linux/linkmode.h
index a99c58866860..fe740031339d 100644
--- a/include/linux/linkmode.h
+++ b/include/linux/linkmode.h
@@ -82,4 +82,10 @@ static inline int linkmode_equal(const unsigned long *src1,
return bitmap_equal(src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS);
}
+static inline int linkmode_subset(const unsigned long *src1,
+ const unsigned long *src2)
+{
+ return bitmap_subset(src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS);
+}
+
#endif /* __LINKMODE_H */