mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: mdio: add mdio45_ethtool_ksettings_get
There is a function in mdio for the old ethtool api gset. We add a new function mdio45_ethtool_ksettings_get for the new ethtool api glinksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
525dfa2cdc
commit
8e4881aa1d
2 changed files with 199 additions and 0 deletions
|
@ -130,6 +130,10 @@ extern int mdio45_nway_restart(const struct mdio_if_info *mdio);
|
|||
extern void mdio45_ethtool_gset_npage(const struct mdio_if_info *mdio,
|
||||
struct ethtool_cmd *ecmd,
|
||||
u32 npage_adv, u32 npage_lpa);
|
||||
extern void
|
||||
mdio45_ethtool_ksettings_get_npage(const struct mdio_if_info *mdio,
|
||||
struct ethtool_link_ksettings *cmd,
|
||||
u32 npage_adv, u32 npage_lpa);
|
||||
|
||||
/**
|
||||
* mdio45_ethtool_gset - get settings for ETHTOOL_GSET
|
||||
|
@ -147,6 +151,23 @@ static inline void mdio45_ethtool_gset(const struct mdio_if_info *mdio,
|
|||
mdio45_ethtool_gset_npage(mdio, ecmd, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* mdio45_ethtool_ksettings_get - get settings for ETHTOOL_GLINKSETTINGS
|
||||
* @mdio: MDIO interface
|
||||
* @cmd: Ethtool request structure
|
||||
*
|
||||
* Since the CSRs for auto-negotiation using next pages are not fully
|
||||
* standardised, this function does not attempt to decode them. Use
|
||||
* mdio45_ethtool_ksettings_get_npage() to specify advertisement bits
|
||||
* from next pages.
|
||||
*/
|
||||
static inline void
|
||||
mdio45_ethtool_ksettings_get(const struct mdio_if_info *mdio,
|
||||
struct ethtool_link_ksettings *cmd)
|
||||
{
|
||||
mdio45_ethtool_ksettings_get_npage(mdio, cmd, 0, 0);
|
||||
}
|
||||
|
||||
extern int mdio_mii_ioctl(const struct mdio_if_info *mdio,
|
||||
struct mii_ioctl_data *mii_data, int cmd);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue