/* Set default MAC address for the PF in the first RAR entry */
 static void igc_set_default_mac_filter(struct igc_adapter *adapter)
 {
-       struct igc_mac_addr *mac_table = &adapter->mac_table[0];
        struct net_device *dev = adapter->netdev;
        u8 *addr = adapter->hw.mac.addr;
 
        netdev_dbg(dev, "Set default MAC address filter: address %pM", addr);
 
-       ether_addr_copy(mac_table->addr, addr);
-       mac_table->state = IGC_MAC_STATE_DEFAULT | IGC_MAC_STATE_IN_USE;
-       mac_table->queue = -1;
-
-       igc_set_mac_filter_hw(adapter, 0, addr, mac_table->queue);
+       igc_set_mac_filter_hw(adapter, 0, addr, -1);
 }
 
 /**
 
 static int igc_find_mac_filter(struct igc_adapter *adapter, const u8 *addr)
 {
-       int max_entries = adapter->hw.mac.rar_entry_count;
-       struct igc_mac_addr *entry;
+       struct igc_hw *hw = &adapter->hw;
+       int max_entries = hw->mac.rar_entry_count;
+       u32 ral, rah;
        int i;
 
        for (i = 0; i < max_entries; i++) {
-               entry = &adapter->mac_table[i];
+               ral = rd32(IGC_RAL(i));
+               rah = rd32(IGC_RAH(i));
 
-               if (!(entry->state & IGC_MAC_STATE_IN_USE))
+               if (!(rah & IGC_RAH_AV))
                        continue;
-               if (!ether_addr_equal(addr, entry->addr))
+               if ((rah & IGC_RAH_RAH_MASK) !=
+                   le16_to_cpup((__le16 *)(addr + 4)))
+                       continue;
+               if (ral != le32_to_cpup((__le32 *)(addr)))
                        continue;
 
                return i;
 
 static int igc_get_avail_mac_filter_slot(struct igc_adapter *adapter)
 {
-       int max_entries = adapter->hw.mac.rar_entry_count;
-       struct igc_mac_addr *entry;
+       struct igc_hw *hw = &adapter->hw;
+       int max_entries = hw->mac.rar_entry_count;
+       u32 rah;
        int i;
 
        for (i = 0; i < max_entries; i++) {
-               entry = &adapter->mac_table[i];
+               rah = rd32(IGC_RAH(i));
 
-               if (!(entry->state & IGC_MAC_STATE_IN_USE))
+               if (!(rah & IGC_RAH_AV))
                        return i;
        }
 
 
        index = igc_find_mac_filter(adapter, addr);
        if (index >= 0)
-               goto update_queue_assignment;
+               goto update_filter;
 
        index = igc_get_avail_mac_filter_slot(adapter);
        if (index < 0)
        netdev_dbg(dev, "Add MAC address filter: index %d address %pM queue %d",
                   index, addr, queue);
 
-       ether_addr_copy(adapter->mac_table[index].addr, addr);
-       adapter->mac_table[index].state |= IGC_MAC_STATE_IN_USE;
-update_queue_assignment:
-       adapter->mac_table[index].queue = queue;
-
+update_filter:
        igc_set_mac_filter_hw(adapter, index, addr, queue);
        return 0;
 }
 int igc_del_mac_filter(struct igc_adapter *adapter, const u8 *addr)
 {
        struct net_device *dev = adapter->netdev;
-       struct igc_mac_addr *entry;
        int index;
 
        if (!is_valid_ether_addr(addr))
        if (index < 0)
                return -ENOENT;
 
-       entry = &adapter->mac_table[index];
-
-       if (entry->state & IGC_MAC_STATE_DEFAULT) {
+       if (index == 0) {
                /* If this is the default filter, we don't actually delete it.
                 * We just reset to its default value i.e. disable queue
                 * assignment.
                 */
                netdev_dbg(dev, "Disable default MAC filter queue assignment");
 
-               entry->queue = -1;
-               igc_set_mac_filter_hw(adapter, 0, addr, entry->queue);
+               igc_set_mac_filter_hw(adapter, 0, addr, -1);
        } else {
                netdev_dbg(dev, "Delete MAC address filter: index %d address %pM",
                           index, addr);
 
-               entry->state = 0;
-               entry->queue = -1;
-               memset(entry->addr, 0, ETH_ALEN);
                igc_clear_mac_filter_hw(adapter, index);
        }
 
        struct pci_dev *pdev = adapter->pdev;
        struct igc_hw *hw = &adapter->hw;
 
-       int size = sizeof(struct igc_mac_addr) * hw->mac.rar_entry_count;
-
        pci_read_config_word(pdev, PCI_COMMAND, &hw->bus.pci_cmd_word);
 
        /* set default ring sizes */
        /* Assume MSI-X interrupts, will be checked during IRQ allocation */
        adapter->flags |= IGC_FLAG_HAS_MSIX;
 
-       adapter->mac_table = kzalloc(size, GFP_ATOMIC);
-       if (!adapter->mac_table)
-               return -ENOMEM;
-
        igc_init_queue_configuration(adapter);
 
        /* This call may decrease the number of queues */
        pci_iounmap(pdev, adapter->io_addr);
        pci_release_mem_regions(pdev);
 
-       kfree(adapter->mac_table);
        free_netdev(netdev);
 
        pci_disable_pcie_error_reporting(pdev);