summaryrefslogtreecommitdiff
path: root/include/linux/linkmode.h
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-11-15 14:39:18 +0300
committerDavid S. Miller <davem@davemloft.net>2023-11-17 02:45:04 +0300
commit96fa96e198f9707285003075fbbce7db6a485112 (patch)
tree79ebc1615018fe25899edeabf2cf3631e98e7260 /include/linux/linkmode.h
parent9a1f02f3ef96bd83162e94e4ee34a4f8240256ba (diff)
downloadlinux-96fa96e198f9707285003075fbbce7db6a485112.tar.xz
net: linkmode: add linkmode_fill() helper
Add a linkmode_fill() helper, which will allow us to convert phylink's open coded bitmap_fill() operations. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/linkmode.h')
-rw-r--r--include/linux/linkmode.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/linkmode.h b/include/linux/linkmode.h
index 7303b4bc2ce0..287f590ed56b 100644
--- a/include/linux/linkmode.h
+++ b/include/linux/linkmode.h
@@ -10,6 +10,11 @@ static inline void linkmode_zero(unsigned long *dst)
bitmap_zero(dst, __ETHTOOL_LINK_MODE_MASK_NBITS);
}
+static inline void linkmode_fill(unsigned long *dst)
+{
+ bitmap_fill(dst, __ETHTOOL_LINK_MODE_MASK_NBITS);
+}
+
static inline void linkmode_copy(unsigned long *dst, const unsigned long *src)
{
bitmap_copy(dst, src, __ETHTOOL_LINK_MODE_MASK_NBITS);