Linux wireless drivers development
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	Johannes Berg <johannes.berg@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: [PATCH 03/23] iwlwifi: remove mac_addr assignment
Date: Sat,  5 Jun 2010 23:56:18 -0700	[thread overview]
Message-ID: <1275807398-18184-4-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1275807398-18184-1-git-send-email-reinette.chatre@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

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>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c      |    7 ++++---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    5 ++---
 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 87ed28b..7c63c06 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)
 	struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
 	unsigned long flags;
 	u16 pci_cmd;
+	u8 perm_addr[ETH_ALEN];
 
 	/************************
 	 * 1. Allocating HW data
@@ -3776,9 +3777,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		goto out_free_eeprom;
 
 	/* extract MAC Address */
-	iwl_eeprom_get_mac(priv, priv->mac_addr);
-	IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->mac_addr);
-	SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
+	iwl_eeprom_get_mac(priv, perm_addr);
+	IWL_DEBUG_INFO(priv, "MAC address: %pM\n", perm_addr);
+	SET_IEEE80211_PERM_ADDR(priv->hw, perm_addr);
 
 	/************************
 	 * 5. Setup HW constants
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 42f1d33..5976166 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
 	}
 	/* MAC Address location in EEPROM same for 3945/4965 */
 	eeprom = (struct iwl3945_eeprom *)priv->eeprom;
-	memcpy(priv->mac_addr, eeprom->mac_address, ETH_ALEN);
-	IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->mac_addr);
-	SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
+	IWL_DEBUG_INFO(priv, "MAC address: %pM\n", eeprom->mac_address);
+	SET_IEEE80211_PERM_ADDR(priv->hw, eeprom->mac_address);
 
 	/***********************
 	 * 5. Setup HW Constants
-- 
1.7.0.4


  parent reply	other threads:[~2010-06-06  6:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-06  6:56 [PATCH 00/23] iwlwifi updates for 2.6.36 Reinette Chatre
2010-06-06  6:56 ` [PATCH 01/23] iwlwifi: remove useless node_addr assignments Reinette Chatre
2010-06-06  6:56 ` [PATCH 02/23] iwlwifi: remove unused wlap_bssid_addr assignment Reinette Chatre
2010-06-06  6:56 ` Reinette Chatre [this message]
2010-06-06  6:56 ` [PATCH 04/23] iwlwifi: set MAC address in RXON from interface Reinette Chatre
2010-06-06  6:56 ` [PATCH 05/23] iwlwifi: use virtual interface address for scan Reinette Chatre
2010-06-06  6:56 ` [PATCH 06/23] iwlwifi: remove debug frame dumping Reinette Chatre
2010-06-06  6:56 ` [PATCH 07/23] iwlwifi: do not clear data after chain noise calib Reinette Chatre
2010-06-06  6:56 ` [PATCH 08/23] iwlwifi: remove unused parameter in iwl_priv Reinette Chatre
2010-06-06  6:56 ` [PATCH 09/23] iwlwifi: beacon format related helper function Reinette Chatre
2010-06-06  6:56 ` [PATCH 10/23] iwlwifi: support channel switch offload in driver Reinette Chatre
2010-06-06  6:56 ` [PATCH 11/23] iwlwifi: beacon internal time unit Reinette Chatre
2010-06-06  6:56 ` [PATCH 12/23] iwlwifi: remove priv->mac_addr Reinette Chatre
2010-06-06  6:56 ` [PATCH 13/23] iwlwifi: remove inaccurate comment Reinette Chatre
2010-06-06  6:56 ` [PATCH 14/23] iwl3945: fix bugs in txq freeing Reinette Chatre
2010-06-06  6:56 ` [PATCH 15/23] iwlagn: fix bug " Reinette Chatre
2010-06-06  6:56 ` [PATCH 16/23] iwlwifi: kzalloc txb array Reinette Chatre
2010-06-06  6:56 ` [PATCH 17/23] iwlwifi: reduce memory allocation Reinette Chatre
2010-06-06  6:56 ` [PATCH 18/23] iwlwifi: do not use huge command buffer for channel switch Reinette Chatre
2010-06-06  6:56 ` [PATCH 19/23] iwlwifi: generic scan TX antenna forcing Reinette Chatre
2010-06-06  6:56 ` [PATCH 20/23] iwlwifi: queue user-initiated scan when doing internal scan Reinette Chatre
2010-06-06  6:56 ` [PATCH 21/23] iwlwifi: remove unused parameter Reinette Chatre
2010-06-06  6:56 ` [PATCH 22/23] iwlwifi: parse block ack responses correctly Reinette Chatre
2010-06-06  6:56 ` [PATCH 23/23] iwlwifi: fix wrapping when handling aggregated batches Reinette Chatre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1275807398-18184-4-git-send-email-reinette.chatre@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox