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 04/23] iwlwifi: set MAC address in RXON from interface
Date: Sat, 5 Jun 2010 23:56:19 -0700 [thread overview]
Message-ID: <1275807398-18184-5-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>
When we do not have an interface, priv->mac_addr
is all zeroes, so the memcpy() is not useful as
the RXON buffer has been cleared previously.
Therefore, use the interface's address that we
are setting up the RXON for, if available.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-core.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 4315212..245cb90 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -979,7 +979,10 @@ void iwl_connection_init_rx_config(struct iwl_priv *priv,
/* clear both MIX and PURE40 mode flag */
priv->staging_rxon.flags &= ~(RXON_FLG_CHANNEL_MODE_MIXED |
RXON_FLG_CHANNEL_MODE_PURE_40);
- memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN);
+
+ if (vif)
+ memcpy(priv->staging_rxon.node_addr, vif->addr, ETH_ALEN);
+
priv->staging_rxon.ofdm_ht_single_stream_basic_rates = 0xff;
priv->staging_rxon.ofdm_ht_dual_stream_basic_rates = 0xff;
priv->staging_rxon.ofdm_ht_triple_stream_basic_rates = 0xff;
--
1.7.0.4
next prev 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 ` [PATCH 03/23] iwlwifi: remove mac_addr assignment Reinette Chatre
2010-06-06 6:56 ` Reinette Chatre [this message]
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-5-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