Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135403
b: refs/heads/master
c: 1703338
h: refs/heads/master
i:
  135401: 882ab7e
  135399: 7d69fd2
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent e81f270 commit 5e180f5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 777baa4711c6b8373f4e03a3a558d44a6b046d7a
refs/heads/master: 1703338c79f39178535fe54b5aeaebf9c42300f6
47 changes: 40 additions & 7 deletions trunk/drivers/net/usb/asix.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,18 @@ static int ax88172_link_reset(struct usbnet *dev)
return 0;
}

static const struct net_device_ops ax88172_netdev_ops = {
.ndo_open = usbnet_open,
.ndo_stop = usbnet_stop,
.ndo_start_xmit = usbnet_start_xmit,
.ndo_tx_timeout = usbnet_tx_timeout,
.ndo_change_mtu = usbnet_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_do_ioctl = asix_ioctl,
.ndo_set_multicast_list = ax88172_set_multicast,
};

static int ax88172_bind(struct usbnet *dev, struct usb_interface *intf)
{
int ret = 0;
Expand Down Expand Up @@ -846,9 +858,8 @@ static int ax88172_bind(struct usbnet *dev, struct usb_interface *intf)
dev->mii.phy_id_mask = 0x3f;
dev->mii.reg_num_mask = 0x1f;
dev->mii.phy_id = asix_get_phy_addr(dev);
dev->net->do_ioctl = asix_ioctl;

dev->net->set_multicast_list = ax88172_set_multicast;
dev->net->netdev_ops = &ax88172_netdev_ops;
dev->net->ethtool_ops = &ax88172_ethtool_ops;

asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
Expand Down Expand Up @@ -898,6 +909,18 @@ static int ax88772_link_reset(struct usbnet *dev)
return 0;
}

static const struct net_device_ops ax88772_netdev_ops = {
.ndo_open = usbnet_open,
.ndo_stop = usbnet_stop,
.ndo_start_xmit = usbnet_start_xmit,
.ndo_tx_timeout = usbnet_tx_timeout,
.ndo_change_mtu = usbnet_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_do_ioctl = asix_ioctl,
.ndo_set_multicast_list = asix_set_multicast,
};

static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
{
int ret, embd_phy;
Expand Down Expand Up @@ -962,7 +985,6 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
dev->mii.mdio_write = asix_mdio_write;
dev->mii.phy_id_mask = 0x1f;
dev->mii.reg_num_mask = 0x1f;
dev->net->do_ioctl = asix_ioctl;
dev->mii.phy_id = asix_get_phy_addr(dev);

phyid = asix_get_phyid(dev);
Expand All @@ -978,7 +1000,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)

msleep(150);

dev->net->set_multicast_list = asix_set_multicast;
dev->net->netdev_ops = &ax88772_netdev_ops;
dev->net->ethtool_ops = &ax88772_ethtool_ops;

asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
Expand Down Expand Up @@ -1181,6 +1203,18 @@ static int ax88178_change_mtu(struct net_device *net, int new_mtu)
return 0;
}

static const struct net_device_ops ax88178_netdev_ops = {
.ndo_open = usbnet_open,
.ndo_stop = usbnet_stop,
.ndo_start_xmit = usbnet_start_xmit,
.ndo_tx_timeout = usbnet_tx_timeout,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_multicast_list = asix_set_multicast,
.ndo_do_ioctl = asix_ioctl,
.ndo_change_mtu = ax88178_change_mtu,
};

static int ax88178_bind(struct usbnet *dev, struct usb_interface *intf)
{
struct asix_data *data = (struct asix_data *)&dev->data;
Expand Down Expand Up @@ -1247,11 +1281,10 @@ static int ax88178_bind(struct usbnet *dev, struct usb_interface *intf)
dev->mii.phy_id_mask = 0x1f;
dev->mii.reg_num_mask = 0xff;
dev->mii.supports_gmii = 1;
dev->net->do_ioctl = asix_ioctl;
dev->mii.phy_id = asix_get_phy_addr(dev);
dev->net->set_multicast_list = asix_set_multicast;

dev->net->netdev_ops = &ax88178_netdev_ops;
dev->net->ethtool_ops = &ax88178_ethtool_ops;
dev->net->change_mtu = &ax88178_change_mtu;

phyid = asix_get_phyid(dev);
dbg("PHYID=0x%08x", phyid);
Expand Down

0 comments on commit 5e180f5

Please sign in to comment.