summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-26 19:40:27 +0800
committerDavid S. Miller <davem@davemloft.net>2013-12-26 13:31:33 -0500
commite6d9f8a31c6906f68364487a3540206e7d8d635a (patch)
tree91d1ad1999d92f4d4f3bb4c5551ea72f8696e586 /drivers/net/ethernet/atheros
parentebff7b41b67d9ba2efac0eb3fb02fe90dcc75737 (diff)
downloadop-kernel-dev-e6d9f8a31c6906f68364487a3540206e7d8d635a.zip
op-kernel-dev-e6d9f8a31c6906f68364487a3540206e7d8d635a.tar.gz
net: atl1: slight optimization of addr compare
Use the recently added and possibly more efficient ether_addr_equal_unaligned to instead of memcmp. Cc: Jay Cliburn <jcliburn@gmail.com> Cc: Chris Snook <chris.snook@gmail.com> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 538211d..55d86ec 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -3122,7 +3122,8 @@ static void atl1_remove(struct pci_dev *pdev)
* from the BIOS during POST. If we've been messing with the MAC
* address, we need to save the permanent one.
*/
- if (memcmp(adapter->hw.mac_addr, adapter->hw.perm_mac_addr, ETH_ALEN)) {
+ if (!ether_addr_equal_unaligned(adapter->hw.mac_addr,
+ adapter->hw.perm_mac_addr)) {
memcpy(adapter->hw.mac_addr, adapter->hw.perm_mac_addr,
ETH_ALEN);
atl1_set_mac_addr(&adapter->hw);
OpenPOWER on IntegriCloud