]> Pileus Git - ~andy/linux/blobdiff - drivers/net/ethernet/atheros/atlx/atl1.c
net: atl1: slight optimization of addr compare
[~andy/linux] / drivers / net / ethernet / atheros / atlx / atl1.c
index 538211d6f7d9ad5fc806008a58d984750c91edcd..55d86ecdacfe3b553ea92b0bc691f884717c5160 100644 (file)
@@ -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);