This source file includes following definitions.
- _rtl92e_ethtool_get_drvinfo
- _rtl92e_ethtool_get_link
1
2
3
4
5
6
7
8
9
10 #include <linux/netdevice.h>
11 #include <linux/ethtool.h>
12 #include <linux/delay.h>
13
14 #include "rtl_core.h"
15
16 static void _rtl92e_ethtool_get_drvinfo(struct net_device *dev,
17 struct ethtool_drvinfo *info)
18 {
19 struct r8192_priv *priv = rtllib_priv(dev);
20
21 strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
22 strlcpy(info->version, DRV_VERSION, sizeof(info->version));
23 strlcpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info));
24 }
25
26 static u32 _rtl92e_ethtool_get_link(struct net_device *dev)
27 {
28 struct r8192_priv *priv = rtllib_priv(dev);
29
30 return ((priv->rtllib->state == RTLLIB_LINKED) ||
31 (priv->rtllib->state == RTLLIB_LINKED_SCANNING));
32 }
33
34 const struct ethtool_ops rtl819x_ethtool_ops = {
35 .get_drvinfo = _rtl92e_ethtool_get_drvinfo,
36 .get_link = _rtl92e_ethtool_get_link,
37 };