Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314937
b: refs/heads/master
c: 0d1632b
h: refs/heads/master
i:
  314935: f012abd
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jun 30, 2012
1 parent 49e6e65 commit b25e0df
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 5a1d1c8c78e55df2e876249f8e3a4a573efdbaa6
refs/heads/master: 0d1632b46ad76cde92085aa1ed422e9329443082
15 changes: 2 additions & 13 deletions trunk/drivers/net/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,6 @@

static int numdummies = 1;

static int dummy_set_address(struct net_device *dev, void *p)
{
struct sockaddr *sa = p;

if (!is_valid_ether_addr(sa->sa_data))
return -EADDRNOTAVAIL;

dev->addr_assign_type &= ~NET_ADDR_RANDOM;
memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN);
return 0;
}

/* fake multicast ability */
static void set_multicast_list(struct net_device *dev)
{
Expand Down Expand Up @@ -118,7 +106,7 @@ static const struct net_device_ops dummy_netdev_ops = {
.ndo_start_xmit = dummy_xmit,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_rx_mode = set_multicast_list,
.ndo_set_mac_address = dummy_set_address,
.ndo_set_mac_address = eth_mac_addr,
.ndo_get_stats64 = dummy_get_stats64,
};

Expand All @@ -134,6 +122,7 @@ static void dummy_setup(struct net_device *dev)
dev->tx_queue_len = 0;
dev->flags |= IFF_NOARP;
dev->flags &= ~IFF_MULTICAST;
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
dev->features |= NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO;
dev->features |= NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_LLTX;
eth_hw_addr_random(dev);
Expand Down

0 comments on commit b25e0df

Please sign in to comment.