15 #include <linux/module.h>
16 #include <linux/string.h>
17 #include <linux/netdevice.h>
20 #define AT803X_INTR_ENABLE 0x12
21 #define AT803X_INTR_STATUS 0x13
22 #define AT803X_WOL_ENABLE 0x01
23 #define AT803X_DEVICE_ADDR 0x03
24 #define AT803X_LOC_MAC_ADDR_0_15_OFFSET 0x804C
25 #define AT803X_LOC_MAC_ADDR_16_31_OFFSET 0x804B
26 #define AT803X_LOC_MAC_ADDR_32_47_OFFSET 0x804A
27 #define AT803X_MMD_ACCESS_CONTROL 0x0D
28 #define AT803X_MMD_ACCESS_CONTROL_DATA 0x0E
29 #define AT803X_FUNC_DATA 0x4003
35 static void at803x_set_wol_mac_addr(
struct phy_device *phydev)
50 if (!is_valid_ether_addr(mac))
53 for (i = 0; i < 3; i++) {
61 mac[(i * 2) + 1] | (mac[(i * 2)] << 8));
65 static int at803x_config_init(
struct phy_device *phydev)
104 at803x_set_wol_mac_addr(phydev);
113 .phy_id = 0x004dd072,
114 .name =
"Atheros 8035 ethernet",
115 .phy_id_mask = 0xffffffef,
116 .config_init = at803x_config_init,
128 .phy_id = 0x004dd076,
129 .name =
"Atheros 8030 ethernet",
130 .phy_id_mask = 0xffffffef,
131 .config_init = at803x_config_init,
141 static int __init atheros_init(
void)
161 static void __exit atheros_exit(
void)
171 { 0x004dd076, 0xffffffef },
172 { 0x004dd072, 0xffffffef },