Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315399
b: refs/heads/master
c: 7ff65cd
h: refs/heads/master
i:
  315397: d1a2ac1
  315395: 4c9b5d8
  315391: 759ec0d
v: v3
  • Loading branch information
David S. Miller committed Jul 17, 2012
1 parent 967b1ff commit d03a554
Show file tree
Hide file tree
Showing 87 changed files with 711 additions and 1,229 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: d411a9368bca616b4593e4f3d820dceccdd9027e
refs/heads/master: 7ff65cdea72bdf9af0b9c57cd003211875ca4142
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf537/boards/stamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ static struct adf702x_platform_data adf7021_platform_data = {
};
static inline void adf702x_mac_init(void)
{
random_ether_addr(adf7021_platform_data.mac_addr);
eth_random_addr(adf7021_platform_data.mac_addr);
}
#else
static inline void adf702x_mac_init(void) {}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/c6x/kernel/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int soc_mac_addr(unsigned int index, u8 *addr)
if (have_fuse_mac)
memcpy(addr, c6x_fuse_mac, 6);
else
random_ether_addr(addr);
eth_random_addr(addr);
}

/* adjust for specific EMAC device */
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/mips/ar7/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,10 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr)
&dev_addr[4], &dev_addr[5]) != 6) {
pr_warning("cannot parse mac address, "
"using random address\n");
random_ether_addr(dev_addr);
eth_random_addr(dev_addr);
}
} else
random_ether_addr(dev_addr);
eth_random_addr(dev_addr);
}

/*****************************************************************************
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/mips/powertv/powertv_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ early_param("rfmac", rfmac_param);
* Generates an Ethernet MAC address that is highly likely to be unique for
* this particular system on a network with other systems of the same type.
*
* The problem we are solving is that, when random_ether_addr() is used to
* The problem we are solving is that, when eth_random_addr() is used to
* generate MAC addresses at startup, there isn't much entropy for the random
* number generator to use and the addresses it produces are fairly likely to
* be the same as those of other identical systems on the same local network.
Expand All @@ -269,7 +269,7 @@ early_param("rfmac", rfmac_param);
* Still, this does give us something to work with.
*
* The approach we take is:
* 1. If we can't get the RF MAC Address, just call random_ether_addr.
* 1. If we can't get the RF MAC Address, just call eth_random_addr.
* 2. Use the 24-bit NIC-specific bits of the RF MAC address as the last 24
* bits of the new address. This is very likely to be unique, except for
* the current box.
Expand Down Expand Up @@ -299,7 +299,7 @@ void platform_random_ether_addr(u8 addr[ETH_ALEN])
if (!have_rfmac) {
pr_warning("rfmac not available on command line; "
"generating random MAC address\n");
random_ether_addr(addr);
eth_random_addr(addr);
}

else {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/drivers/net_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ static int setup_etheraddr(char *str, unsigned char *addr, char *name)
random:
printk(KERN_INFO
"Choosing a random ethernet address for device %s\n", name);
random_ether_addr(addr);
eth_random_addr(addr);
return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ int atl1c_read_mac_addr(struct atl1c_hw *hw)

err = atl1c_get_permanent_address(hw);
if (err)
random_ether_addr(hw->perm_mac_addr);
eth_random_addr(hw->perm_mac_addr);

memcpy(hw->mac_addr, hw->perm_mac_addr, sizeof(hw->perm_mac_addr));
return err;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/atheros/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ static s32 atl1_read_mac_addr(struct atl1_hw *hw)
u16 i;

if (atl1_get_permanent_address(hw)) {
random_ether_addr(hw->perm_mac_addr);
eth_random_addr(hw->perm_mac_addr);
ret = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/atheros/atlx/atl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@ static s32 atl2_read_mac_addr(struct atl2_hw *hw)
{
if (get_permanent_address(hw)) {
/* for test */
/* FIXME: shouldn't we use random_ether_addr() here? */
/* FIXME: shouldn't we use eth_random_addr() here? */
hw->perm_mac_addr[0] = 0x00;
hw->perm_mac_addr[1] = 0x13;
hw->perm_mac_addr[2] = 0x74;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/emulex/benet/be.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "be_hw.h"
#include "be_roce.h"

#define DRV_VER "4.2.248.0u"
#define DRV_VER "4.4.31.0u"
#define DRV_NAME "be2net"
#define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC"
#define BE3_NAME "ServerEngines BladeEngine3 10Gbps NIC"
Expand Down
14 changes: 12 additions & 2 deletions trunk/drivers/net/ethernet/emulex/benet/be_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -1082,8 +1082,18 @@ struct be_cmd_resp_query_fw_cfg {
u32 function_caps;
};

/******************** RSS Config *******************/
/* RSS types */
/******************** RSS Config ****************************************/
/* RSS type Input parameters used to compute RX hash
* RSS_ENABLE_IPV4 SRC IPv4, DST IPv4
* RSS_ENABLE_TCP_IPV4 SRC IPv4, DST IPv4, TCP SRC PORT, TCP DST PORT
* RSS_ENABLE_IPV6 SRC IPv6, DST IPv6
* RSS_ENABLE_TCP_IPV6 SRC IPv6, DST IPv6, TCP SRC PORT, TCP DST PORT
* RSS_ENABLE_UDP_IPV4 SRC IPv4, DST IPv4, UDP SRC PORT, UDP DST PORT
* RSS_ENABLE_UDP_IPV6 SRC IPv6, DST IPv6, UDP SRC PORT, UDP DST PORT
*
* When multiple RSS types are enabled, HW picks the best hash policy
* based on the type of the received packet.
*/
#define RSS_ENABLE_NONE 0x0
#define RSS_ENABLE_IPV4 0x1
#define RSS_ENABLE_TCP_IPV4 0x2
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,16 +1228,16 @@ static void skb_fill_rx_data(struct be_rx_obj *rxo, struct sk_buff *skb,
/* Copy data in the first descriptor of this completion */
curr_frag_len = min(rxcp->pkt_size, rx_frag_size);

/* Copy the header portion into skb_data */
hdr_len = min(BE_HDR_LEN, curr_frag_len);
memcpy(skb->data, start, hdr_len);
skb->len = curr_frag_len;
if (curr_frag_len <= BE_HDR_LEN) { /* tiny packet */
memcpy(skb->data, start, curr_frag_len);
/* Complete packet has now been moved to data */
put_page(page_info->page);
skb->data_len = 0;
skb->tail += curr_frag_len;
} else {
hdr_len = ETH_HLEN;
memcpy(skb->data, start, hdr_len);
skb_shinfo(skb)->nr_frags = 1;
skb_frag_set_page(skb, 0, page_info->page);
skb_shinfo(skb)->frags[0].page_offset =
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/ethoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ static int __devinit ethoc_probe(struct platform_device *pdev)
/* Check the MAC again for validity, if it still isn't choose and
* program a random one. */
if (!is_valid_ether_addr(netdev->dev_addr)) {
random_ether_addr(netdev->dev_addr);
eth_random_addr(netdev->dev_addr);
random_mac = true;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5008,7 +5008,7 @@ static int igb_vf_configure(struct igb_adapter *adapter, int vf)
unsigned int device_id;
u16 thisvf_devfn;

random_ether_addr(mac_addr);
eth_random_addr(mac_addr);
igb_set_vf_mac(adapter, vf, mac_addr);

switch (adapter->hw.mac.type) {
Expand Down Expand Up @@ -5417,7 +5417,7 @@ static void igb_vf_reset_event(struct igb_adapter *adapter, u32 vf)

/* generate a new mac address as we were hotplug removed/added */
if (!(adapter->vf_data[vf].flags & IGB_VF_FLAG_PF_SET_MAC))
random_ether_addr(vf_mac);
eth_random_addr(vf_mac);

/* process remaining reset events */
igb_vf_reset(adapter, vf);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask)
bool enable = ((event_mask & 0x10000000U) != 0);

if (enable) {
random_ether_addr(vf_mac_addr);
eth_random_addr(vf_mac_addr);
e_info(probe, "IOV: VF %d is enabled MAC %pM\n",
vfn, vf_mac_addr);
/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/lantiq_etop.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ ltq_etop_init(struct net_device *dev)
memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
if (!is_valid_ether_addr(mac.sa_data)) {
pr_warn("etop: invalid MAC, using random\n");
random_ether_addr(mac.sa_data);
eth_random_addr(mac.sa_data);
random_mac = true;
}

Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,7 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
/* remove from list */
list_del(&mclist->list);
kfree(mclist);
}

if (mclist->action == MCLIST_ADD) {
} else if (mclist->action == MCLIST_ADD) {
/* attach the address */
memcpy(&mc_list[10], mclist->addr, ETH_ALEN);
/* needed for B0 steering support */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/mellanox/mlx4/mcg.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ static int parse_trans_rule(struct mlx4_dev *dev, struct mlx4_spec_list *spec,
[MLX4_NET_TRANS_RULE_ID_UDP] =
sizeof(struct mlx4_net_trans_rule_hw_tcp_udp)
};
if (spec->id > MLX4_NET_TRANS_RULE_NUM) {
if (spec->id >= MLX4_NET_TRANS_RULE_NUM) {
mlx4_err(dev, "Invalid network rule id. id = %d\n", spec->id);
return -EINVAL;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/micrel/ks8851.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static void ks8851_read_mac_addr(struct net_device *dev)
*
* Get or create the initial mac address for the device and then set that
* into the station address register. If there is an EEPROM present, then
* we try that. If no valid mac address is found we use random_ether_addr()
* we try that. If no valid mac address is found we use eth_random_addr()
* to create a new one.
*/
static void ks8851_init_mac(struct ks8851_net *ks)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/micrel/ks8851_mll.c
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev)
memcpy(ks->mac_addr, pdata->mac_addr, 6);
if (!is_valid_ether_addr(ks->mac_addr)) {
/* Use random MAC address if none passed */
random_ether_addr(ks->mac_addr);
eth_random_addr(ks->mac_addr);
netdev_info(netdev, "Using random mac address\n");
}
netdev_info(netdev, "Mac address is: %pM\n", ks->mac_addr);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/ethernet/nxp/lpc_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <linux/of_net.h>
#include <linux/types.h>

#include <linux/delay.h>
#include <linux/io.h>
#include <mach/board.h>
#include <mach/platform.h>
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/smsc/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
eth_hw_addr_random(dev);
smsc911x_set_hw_mac_address(pdata, dev->dev_addr);
SMSC_TRACE(pdata, probe,
"MAC Address is set to random_ether_addr");
"MAC Address is set to eth_random_addr");
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
memcpy(priv->mac_addr, data->slave_data[0].mac_addr, ETH_ALEN);
pr_info("Detected MACID = %pM", priv->mac_addr);
} else {
random_ether_addr(priv->mac_addr);
eth_random_addr(priv->mac_addr);
pr_info("Random MACID = %pM", priv->mac_addr);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/tile/tilegx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,7 @@ static void tile_net_dev_init(const char *name, const uint8_t *mac)
memcpy(dev->dev_addr, mac, 6);
dev->addr_len = 6;
} else {
random_ether_addr(dev->dev_addr);
eth_random_addr(dev->dev_addr);
}

/* Register the network device. */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/wiznet/w5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ static int __devinit w5100_hw_probe(struct platform_device *pdev)
if (data && is_valid_ether_addr(data->mac_addr)) {
memcpy(ndev->dev_addr, data->mac_addr, ETH_ALEN);
} else {
random_ether_addr(ndev->dev_addr);
eth_random_addr(ndev->dev_addr);
ndev->addr_assign_type |= NET_ADDR_RANDOM;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/wiznet/w5300.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ static int __devinit w5300_hw_probe(struct platform_device *pdev)
if (data && is_valid_ether_addr(data->mac_addr)) {
memcpy(ndev->dev_addr, data->mac_addr, ETH_ALEN);
} else {
random_ether_addr(ndev->dev_addr);
eth_random_addr(ndev->dev_addr);
ndev->addr_assign_type |= NET_ADDR_RANDOM;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ static void axienet_set_mac_address(struct net_device *ndev, void *address)
if (address)
memcpy(ndev->dev_addr, address, ETH_ALEN);
if (!is_valid_ether_addr(ndev->dev_addr))
random_ether_addr(ndev->dev_addr);
eth_random_addr(ndev->dev_addr);

/* Set up unicast MAC address filter set its mac address */
axienet_iow(lp, XAE_UAW0_OFFSET,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/hyperv/hyperv_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ int rndis_filter_send(struct hv_device *dev,
struct hv_netvsc_packet *pkt);

int rndis_filter_set_packet_filter(struct rndis_device *dev, u32 new_filter);
int rndis_filter_set_device_mac(struct hv_device *hdev, char *mac);


#define NVSP_INVALID_PROTOCOL_VERSION ((u32)0xFFFFFFFF)
Expand Down
30 changes: 29 additions & 1 deletion trunk/drivers/net/hyperv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,34 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
return 0;
}


static int netvsc_set_mac_addr(struct net_device *ndev, void *p)
{
struct net_device_context *ndevctx = netdev_priv(ndev);
struct hv_device *hdev = ndevctx->device_ctx;
struct sockaddr *addr = p;
char save_adr[14];
unsigned char save_aatype;
int err;

memcpy(save_adr, ndev->dev_addr, ETH_ALEN);
save_aatype = ndev->addr_assign_type;

err = eth_mac_addr(ndev, p);
if (err != 0)
return err;

err = rndis_filter_set_device_mac(hdev, addr->sa_data);
if (err != 0) {
/* roll back to saved MAC */
memcpy(ndev->dev_addr, save_adr, ETH_ALEN);
ndev->addr_assign_type = save_aatype;
}

return err;
}


static const struct ethtool_ops ethtool_ops = {
.get_drvinfo = netvsc_get_drvinfo,
.get_link = ethtool_op_get_link,
Expand All @@ -353,7 +381,7 @@ static const struct net_device_ops device_ops = {
.ndo_set_rx_mode = netvsc_set_multicast_list,
.ndo_change_mtu = netvsc_change_mtu,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_set_mac_address = netvsc_set_mac_addr,
};

/*
Expand Down
Loading

0 comments on commit d03a554

Please sign in to comment.