summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-11-01 12:11:27 +0000
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-01-08 10:23:44 +0000
commit37eb05e6a135fd9c8af0f2a0bc2077b2ee4b46e8 (patch)
treeafe6e22ecc9a0474f4f04a996a2a053d9a5dd6f2 /include
parent0dd3ee31125508cd67f7e7172247f05b7fd1753a (diff)
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>
Diffstat (limited to 'include')
-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);