aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-05-12 06:33:11 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-06-06 02:14:04 -0400
commit7684c4083114e0f0cc02f3a7cbef27b1e29381cd (patch)
tree0ee6a5ba23a37cd7bfbd408cf8821b2c9879c5c2 /drivers
parent30eabc1736c79d9b617887042ebebc0141a14170 (diff)
iwlwifi: set MAC address in RXON from interface
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c5
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 4315212ab46..245cb906c39 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,
979 /* clear both MIX and PURE40 mode flag */ 979 /* clear both MIX and PURE40 mode flag */
980 priv->staging_rxon.flags &= ~(RXON_FLG_CHANNEL_MODE_MIXED | 980 priv->staging_rxon.flags &= ~(RXON_FLG_CHANNEL_MODE_MIXED |
981 RXON_FLG_CHANNEL_MODE_PURE_40); 981 RXON_FLG_CHANNEL_MODE_PURE_40);
982 memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); 982
983 if (vif)
984 memcpy(priv->staging_rxon.node_addr, vif->addr, ETH_ALEN);
985
983 priv->staging_rxon.ofdm_ht_single_stream_basic_rates = 0xff; 986 priv->staging_rxon.ofdm_ht_single_stream_basic_rates = 0xff;
984 priv->staging_rxon.ofdm_ht_dual_stream_basic_rates = 0xff; 987 priv->staging_rxon.ofdm_ht_dual_stream_basic_rates = 0xff;
985 priv->staging_rxon.ofdm_ht_triple_stream_basic_rates = 0xff; 988 priv->staging_rxon.ofdm_ht_triple_stream_basic_rates = 0xff;