blob: cff52e21a53e99f7abdbb28314c7e9ca5b638527 [file] [log] [blame]
developerfd40db22021-04-29 10:08:25 +08001/* Copyright 2016 MediaTek Inc.
2 * Author: Harry Huang <harry.huang@mediatek.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13#ifndef RA_ETHTOOL_H
14#define RA_ETHTOOL_H
15
16extern struct net_device *dev_raether;
17
18/* ethtool related */
19void ethtool_init(struct net_device *dev);
20int et_get_settings(struct net_device *dev, struct ethtool_cmd *cmd);
21u32 et_get_link(struct net_device *dev);
22unsigned char get_current_phy_address(void);
23int mdio_read(struct net_device *dev, int phy_id, int location);
24void mdio_write(struct net_device *dev, int phy_id, int location, int value);
25
26/* for pseudo interface */
27void ethtool_virt_init(struct net_device *dev);
28int et_virt_get_settings(struct net_device *dev, struct ethtool_cmd *cmd);
29u32 et_virt_get_link(struct net_device *dev);
30int mdio_virt_read(struct net_device *dev, int phy_id, int location);
31void mdio_virt_write(struct net_device *dev, int phy_id, int location,
32 int value);
33
34#endif