Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143423
b: refs/heads/master
c: 531c680
h: refs/heads/master
i:
  143421: e62a276
  143419: baf18de
  143415: 8007864
  143407: c936c07
  143391: f73f03c
  143359: 808b3c9
v: v3
  • Loading branch information
Alexander Beregalov authored and David S. Miller committed Apr 11, 2009
1 parent 43e99dd commit c732cb3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 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: fefbfb1e09cbcd5ad6fd595c52aa8f01dc4e1126
refs/heads/master: 531c6804a4299663c7fa798ebfa9dbf843e91e0e
32 changes: 19 additions & 13 deletions trunk/drivers/net/arm/at91_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ static void at91ether_sethashtable(struct net_device *dev)
/*
* Enable/Disable promiscuous and multicast modes.
*/
static void at91ether_set_rx_mode(struct net_device *dev)
static void at91ether_set_multicast_list(struct net_device *dev)
{
unsigned long cfg;

Expand Down Expand Up @@ -808,7 +808,7 @@ static int at91ether_close(struct net_device *dev)
/*
* Transmit packet.
*/
static int at91ether_tx(struct sk_buff *skb, struct net_device *dev)
static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct at91_private *lp = netdev_priv(dev);

Expand All @@ -828,7 +828,7 @@ static int at91ether_tx(struct sk_buff *skb, struct net_device *dev)

dev->trans_start = jiffies;
} else {
printk(KERN_ERR "at91_ether.c: at91ether_tx() called, but device is busy!\n");
printk(KERN_ERR "at91_ether.c: at91ether_start_xmit() called, but device is busy!\n");
return 1; /* if we return anything but zero, dev.c:1055 calls kfree_skb(skb)
on this skb, he also reports -ENETDOWN and printk's, so either
we free and return(0) or don't free and return 1 */
Expand Down Expand Up @@ -965,6 +965,21 @@ static void at91ether_poll_controller(struct net_device *dev)
}
#endif

static const struct net_device_ops at91ether_netdev_ops = {
.ndo_open = at91ether_open,
.ndo_stop = at91ether_close,
.ndo_start_xmit = at91ether_start_xmit,
.ndo_get_stats = at91ether_stats,
.ndo_set_multicast_list = at91ether_set_multicast_list,
.ndo_set_mac_address = set_mac_address,
.ndo_do_ioctl = at91ether_ioctl,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = at91ether_poll_controller,
#endif
};

/*
* Initialize the ethernet interface
*/
Expand Down Expand Up @@ -1005,17 +1020,8 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
spin_lock_init(&lp->lock);

ether_setup(dev);
dev->open = at91ether_open;
dev->stop = at91ether_close;
dev->hard_start_xmit = at91ether_tx;
dev->get_stats = at91ether_stats;
dev->set_multicast_list = at91ether_set_rx_mode;
dev->set_mac_address = set_mac_address;
dev->netdev_ops = &at91ether_netdev_ops;
dev->ethtool_ops = &at91ether_ethtool_ops;
dev->do_ioctl = at91ether_ioctl;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = at91ether_poll_controller;
#endif

SET_NETDEV_DEV(dev, &pdev->dev);

Expand Down

0 comments on commit c732cb3

Please sign in to comment.