diff options
author | dingtianhong <dingtianhong@huawei.com> | 2013-12-26 19:40:22 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-26 13:31:33 -0500 |
commit | ebff7b41b67d9ba2efac0eb3fb02fe90dcc75737 (patch) | |
tree | b894ce581aa7b3d339eb996b0f16fb6a648aa82f /drivers/net/ethernet/amd | |
parent | 40803a2450ef124a6f703b1387fd14080c85e121 (diff) | |
download | op-kernel-dev-ebff7b41b67d9ba2efac0eb3fb02fe90dcc75737.zip op-kernel-dev-ebff7b41b67d9ba2efac0eb3fb02fe90dcc75737.tar.gz |
net: pcnet: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc: Don Fry <pcnet32@frontier.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd')
-rw-r--r-- | drivers/net/ethernet/amd/pcnet32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c index 38492e0..9339ccc 100644 --- a/drivers/net/ethernet/amd/pcnet32.c +++ b/drivers/net/ethernet/amd/pcnet32.c @@ -1668,7 +1668,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) for (i = 0; i < ETH_ALEN; i++) promaddr[i] = inb(ioaddr + i); - if (memcmp(promaddr, dev->dev_addr, ETH_ALEN) || + if (!ether_addr_equal(promaddr, dev->dev_addr) || !is_valid_ether_addr(dev->dev_addr)) { if (is_valid_ether_addr(promaddr)) { if (pcnet32_debug & NETIF_MSG_PROBE) { |