diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 8 |
2 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 5751c89857f0..ae89a0f2c799 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6940,13 +6940,10 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, | |||
6940 | DECLARE_MAC_BUF(mac); | 6940 | DECLARE_MAC_BUF(mac); |
6941 | 6941 | ||
6942 | IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); | 6942 | IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); |
6943 | if (conf->mac_addr) | ||
6944 | IWL_DEBUG_MAC80211("enter: MAC %s\n", | ||
6945 | print_mac(mac, conf->mac_addr)); | ||
6946 | 6943 | ||
6947 | if (priv->interface_id) { | 6944 | if (priv->interface_id) { |
6948 | IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); | 6945 | IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); |
6949 | return 0; | 6946 | return -EOPNOTSUPP; |
6950 | } | 6947 | } |
6951 | 6948 | ||
6952 | spin_lock_irqsave(&priv->lock, flags); | 6949 | spin_lock_irqsave(&priv->lock, flags); |
@@ -6955,6 +6952,12 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, | |||
6955 | spin_unlock_irqrestore(&priv->lock, flags); | 6952 | spin_unlock_irqrestore(&priv->lock, flags); |
6956 | 6953 | ||
6957 | mutex_lock(&priv->mutex); | 6954 | mutex_lock(&priv->mutex); |
6955 | |||
6956 | if (conf->mac_addr) { | ||
6957 | IWL_DEBUG_MAC80211("Set: %s\n", print_mac(mac, conf->mac_addr)); | ||
6958 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); | ||
6959 | } | ||
6960 | |||
6958 | iwl_set_mode(priv, conf->type); | 6961 | iwl_set_mode(priv, conf->type); |
6959 | 6962 | ||
6960 | IWL_DEBUG_MAC80211("leave\n"); | 6963 | IWL_DEBUG_MAC80211("leave\n"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 0b22e0173576..22d3bbc7be52 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -7330,9 +7330,6 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, | |||
7330 | DECLARE_MAC_BUF(mac); | 7330 | DECLARE_MAC_BUF(mac); |
7331 | 7331 | ||
7332 | IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); | 7332 | IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); |
7333 | if (conf->mac_addr) | ||
7334 | IWL_DEBUG_MAC80211("enter: MAC %s\n", | ||
7335 | print_mac(mac, conf->mac_addr)); | ||
7336 | 7333 | ||
7337 | if (priv->interface_id) { | 7334 | if (priv->interface_id) { |
7338 | IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); | 7335 | IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); |
@@ -7345,6 +7342,11 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, | |||
7345 | spin_unlock_irqrestore(&priv->lock, flags); | 7342 | spin_unlock_irqrestore(&priv->lock, flags); |
7346 | 7343 | ||
7347 | mutex_lock(&priv->mutex); | 7344 | mutex_lock(&priv->mutex); |
7345 | |||
7346 | if (conf->mac_addr) { | ||
7347 | IWL_DEBUG_MAC80211("Set %s\n", print_mac(mac, conf->mac_addr)); | ||
7348 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); | ||
7349 | } | ||
7348 | iwl_set_mode(priv, conf->type); | 7350 | iwl_set_mode(priv, conf->type); |
7349 | 7351 | ||
7350 | IWL_DEBUG_MAC80211("leave\n"); | 7352 | IWL_DEBUG_MAC80211("leave\n"); |