Message ID | 20200720180815.107-2-alobakin@marvell.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | qed, qede: add support for new operating modes | expand |
On Mon, Jul 20, 2020 at 09:08:00PM +0300, Alexander Lobakin wrote: > Add a new helper to find intersections between Ethtool link modes, > linkmode_intersects(), similar to the other linkmode helpers. > > Signed-off-by: Alexander Lobakin <alobakin@marvell.com> > Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
diff --git a/include/linux/linkmode.h b/include/linux/linkmode.h index c664c27a29a0..f8397f300fcd 100644 --- a/include/linux/linkmode.h +++ b/include/linux/linkmode.h @@ -82,6 +82,12 @@ static inline int linkmode_equal(const unsigned long *src1, return bitmap_equal(src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS); } +static inline int linkmode_intersects(const unsigned long *src1, + const unsigned long *src2) +{ + return bitmap_intersects(src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS); +} + static inline int linkmode_subset(const unsigned long *src1, const unsigned long *src2) {