本文整理汇总了C++中phy_ethtool_gset函数的典型用法代码示例。如果您正苦于以下问题:C++ phy_ethtool_gset函数的具体用法?C++ phy_ethtool_gset怎么用?C++ phy_ethtool_gset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了phy_ethtool_gset函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: arc_emac_get_settings
/**
* arc_emac_get_settings - Get PHY settings.
* @ndev: Pointer to net_device structure.
* @cmd: Pointer to ethtool_cmd structure.
*
* This implements ethtool command for getting PHY settings. If PHY could
* not be found, the function returns -ENODEV. This function calls the
* relevant PHY ethtool API to get the PHY settings.
* Issue "ethtool ethX" under linux prompt to execute this function.
*/
static int arc_emac_get_settings(struct net_device *ndev,
struct ethtool_cmd *cmd)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
return phy_ethtool_gset(priv->phy_dev, cmd);
}
示例2: bgmac_get_settings
static int bgmac_get_settings(struct net_device *net_dev,
struct ethtool_cmd *cmd)
{
struct bgmac *bgmac = netdev_priv(net_dev);
return phy_ethtool_gset(bgmac->phy_dev, cmd);
}
示例3: cvm_oct_get_settings
static int cvm_oct_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct octeon_ethernet *priv = netdev_priv(dev);
if (priv->phydev)
return phy_ethtool_gset(priv->phydev, cmd);
return -EINVAL;
}
示例4: au1000_get_settings
static int au1000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct au1000_private *aup = netdev_priv(dev);
if (aup->phy_dev)
return phy_ethtool_gset(aup->phy_dev, cmd);
return -EINVAL;
}
示例5: fs_get_settings
static int fs_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct fs_enet_private *fep = netdev_priv(dev);
if (!fep->phydev)
return -ENODEV;
return phy_ethtool_gset(fep->phydev, cmd);
}
示例6: sxgbe_getsettings
static int sxgbe_getsettings(struct net_device *dev,
struct ethtool_cmd *cmd)
{
struct sxgbe_priv_data *priv = netdev_priv(dev);
if (priv->phydev)
return phy_ethtool_gset(priv->phydev, cmd);
return -EOPNOTSUPP;
}
示例7: tse_get_settings
static int tse_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct alt_tse_private *priv = netdev_priv(dev);
struct phy_device *phydev = priv->phydev;
if (phydev == NULL)
return -ENODEV;
return phy_ethtool_gset(phydev, cmd);
}
示例8: hieth_ethtools_get_settings
static int hieth_ethtools_get_settings(struct net_device *net_dev, \
struct ethtool_cmd *cmd)
{
struct hieth_netdev_local *ld = netdev_priv(net_dev);
if (ld->phy)
return phy_ethtool_gset(ld->phy, cmd);
return -EINVAL;
}
示例9: octeon_mgmt_get_settings
static int octeon_mgmt_get_settings(struct net_device *netdev,
struct ethtool_cmd *cmd)
{
struct octeon_mgmt *p = netdev_priv(netdev);
if (p->phydev)
return phy_ethtool_gset(p->phydev, cmd);
return -EOPNOTSUPP;
}
示例10: bfin_mac_ethtool_getsettings
static int
bfin_mac_ethtool_getsettings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct bfin_mac_local *lp = netdev_priv(dev);
if (lp->phydev)
return phy_ethtool_gset(lp->phydev, cmd);
return -EINVAL;
}
示例11: emac_get_settings
static int emac_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct emac_board_info *dm = netdev_priv(dev);
struct phy_device *phydev = dm->phy_dev;
if (!phydev)
return -ENODEV;
return phy_ethtool_gset(phydev, cmd);
}
示例12: ag71xx_ethtool_get_settings
static int ag71xx_ethtool_get_settings(struct net_device *dev,
struct ethtool_cmd *cmd)
{
struct ag71xx *ag = netdev_priv(dev);
struct phy_device *phydev = ag->phy_dev;
if (!phydev)
return -ENODEV;
return phy_ethtool_gset(phydev, cmd);
}
示例13: gfar_gsettings
/* Return the current settings in the ethtool_cmd structure */
static int gfar_gsettings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct gfar_private *priv = netdev_priv(dev);
struct phy_device *phydev = priv->phydev;
if (NULL == phydev)
return -ENODEV;
cmd->maxtxpkt = get_icft_value(priv->txic);
cmd->maxrxpkt = get_icft_value(priv->rxic);
return phy_ethtool_gset(phydev, cmd);
}
示例14: sh_eth_get_settings
static int sh_eth_get_settings(struct net_device *ndev,
struct ethtool_cmd *ecmd)
{
struct sh_eth_private *mdp = netdev_priv(ndev);
unsigned long flags;
int ret;
spin_lock_irqsave(&mdp->lock, flags);
ret = phy_ethtool_gset(mdp->phydev, ecmd);
spin_unlock_irqrestore(&mdp->lock, flags);
return ret;
}
示例15: uec_get_settings
static int
uec_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
{
struct ucc_geth_private *ugeth = netdev_priv(netdev);
struct phy_device *phydev = ugeth->phydev;
struct ucc_geth_info *ug_info = ugeth->ug_info;
if (!phydev)
return -ENODEV;
ecmd->maxtxpkt = 1;
ecmd->maxrxpkt = ug_info->interruptcoalescingmaxvalue[0];
return phy_ethtool_gset(phydev, ecmd);
}