Commit 30eabc17 authored by Johannes Berg's avatar Johannes Berg Committed by Reinette Chatre

iwlwifi: remove mac_addr assignment

priv->mac_addr is the address of the operating
interface, not the permanent MAC address. They
are usually the same, but the user can override
the operating address, so we shouldn't set the
variable to the permanent one, it is assigned
when an interface is added.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
parent 6dea887f
...@@ -3656,6 +3656,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -3656,6 +3656,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
unsigned long flags; unsigned long flags;
u16 pci_cmd; u16 pci_cmd;
u8 perm_addr[ETH_ALEN];
/************************ /************************
* 1. Allocating HW data * 1. Allocating HW data
...@@ -3776,9 +3777,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -3776,9 +3777,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto out_free_eeprom; goto out_free_eeprom;
/* extract MAC Address */ /* extract MAC Address */
iwl_eeprom_get_mac(priv, priv->mac_addr); iwl_eeprom_get_mac(priv, perm_addr);
IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->mac_addr); IWL_DEBUG_INFO(priv, "MAC address: %pM\n", perm_addr);
SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); SET_IEEE80211_PERM_ADDR(priv->hw, perm_addr);
/************************ /************************
* 5. Setup HW constants * 5. Setup HW constants
......
...@@ -4015,9 +4015,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e ...@@ -4015,9 +4015,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
} }
/* MAC Address location in EEPROM same for 3945/4965 */ /* MAC Address location in EEPROM same for 3945/4965 */
eeprom = (struct iwl3945_eeprom *)priv->eeprom; eeprom = (struct iwl3945_eeprom *)priv->eeprom;
memcpy(priv->mac_addr, eeprom->mac_address, ETH_ALEN); IWL_DEBUG_INFO(priv, "MAC address: %pM\n", eeprom->mac_address);
IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->mac_addr); SET_IEEE80211_PERM_ADDR(priv->hw, eeprom->mac_address);
SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
/*********************** /***********************
* 5. Setup HW Constants * 5. Setup HW Constants
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment