mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
net: mii: Rename mii_stat1000_to_linkmode_lpa_t
Rename mii_stat1000_to_linkmode_lpa_t to
mii_stat1000_mod_linkmode_lpa_t to indicate it modifies the passed
linkmode bitmap, without clearing any other bits.
Add a helper to set/clear bits in a linkmode.
Use this helper to ensure bit are clear which the stat1000 indicates
should not be set.
Fixes: c0ec3c2736
("net: phy: Convert u32 phydev->lp_advertising to linkmode")
Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5f15eed245
commit
78a24df370
5 changed files with 23 additions and 14 deletions
|
@ -57,6 +57,15 @@ static inline void linkmode_clear_bit(int nr, volatile unsigned long *addr)
|
|||
__clear_bit(nr, addr);
|
||||
}
|
||||
|
||||
static inline void linkmode_mod_bit(int nr, volatile unsigned long *addr,
|
||||
int set)
|
||||
{
|
||||
if (set)
|
||||
linkmode_set_bit(nr, addr);
|
||||
else
|
||||
linkmode_clear_bit(nr, addr);
|
||||
}
|
||||
|
||||
static inline void linkmode_change_bit(int nr, volatile unsigned long *addr)
|
||||
{
|
||||
__change_bit(nr, addr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue