aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-05-12 06:33:10 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-06-06 02:13:45 -0400
commit30eabc1736c79d9b617887042ebebc0141a14170 (patch)
tree3ddffdcae111e491e2917ec3b252ef137efff0b8
parent6dea887f2b39e9a858f05e84483da0f4d5b35024 (diff)
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: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c5
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 87ed28b13c2f..7c63c0619f2a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3656,6 +3656,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3656 struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); 3656 struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
3657 unsigned long flags; 3657 unsigned long flags;
3658 u16 pci_cmd; 3658 u16 pci_cmd;
3659 u8 perm_addr[ETH_ALEN];
3659 3660
3660 /************************ 3661 /************************
3661 * 1. Allocating HW data 3662 * 1. Allocating HW data
@@ -3776,9 +3777,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3776 goto out_free_eeprom; 3777 goto out_free_eeprom;
3777 3778
3778 /* extract MAC Address */ 3779 /* extract MAC Address */
3779 iwl_eeprom_get_mac(priv, priv->mac_addr); 3780 iwl_eeprom_get_mac(priv, perm_addr);
3780 IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->mac_addr); 3781 IWL_DEBUG_INFO(priv, "MAC address: %pM\n", perm_addr);
3781 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); 3782 SET_IEEE80211_PERM_ADDR(priv->hw, perm_addr);
3782 3783
3783 /************************ 3784 /************************
3784 * 5. Setup HW constants 3785 * 5. Setup HW constants
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 42f1d3328078..5976166cb92d 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4015,9 +4015,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
4015 } 4015 }
4016 /* MAC Address location in EEPROM same for 3945/4965 */ 4016 /* MAC Address location in EEPROM same for 3945/4965 */
4017 eeprom = (struct iwl3945_eeprom *)priv->eeprom; 4017 eeprom = (struct iwl3945_eeprom *)priv->eeprom;
4018 memcpy(priv->mac_addr, eeprom->mac_address, ETH_ALEN); 4018 IWL_DEBUG_INFO(priv, "MAC address: %pM\n", eeprom->mac_address);
4019 IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->mac_addr); 4019 SET_IEEE80211_PERM_ADDR(priv->hw, eeprom->mac_address);
4020 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
4021 4020
4022 /*********************** 4021 /***********************
4023 * 5. Setup HW Constants 4022 * 5. Setup HW Constants