Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183927
b: refs/heads/master
c: 47e28f4
h: refs/heads/master
i:
  183925: 936dfed
  183923: 19f151e
  183919: b17cbc7
v: v3
  • Loading branch information
Johannes Berg authored and Reinette Chatre committed Jan 29, 2010
1 parent c5332b3 commit 81ab627
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7fce6ee8dd693fb2a9d19ddf9ee1fe380893fa1
refs/heads/master: 47e28f41dce90ea4317d35cf23f232c1a6b07adf
15 changes: 7 additions & 8 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2631,23 +2631,21 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct iwl_priv *priv = hw->priv;
unsigned long flags;
int err = 0;

IWL_DEBUG_MAC80211(priv, "enter: type %d\n", vif->type);

mutex_lock(&priv->mutex);

if (priv->vif) {
IWL_DEBUG_MAC80211(priv, "leave - vif != NULL\n");
return -EOPNOTSUPP;
err = -EOPNOTSUPP;
goto out;
}

spin_lock_irqsave(&priv->lock, flags);
priv->vif = vif;
priv->iw_mode = vif->type;

spin_unlock_irqrestore(&priv->lock, flags);

mutex_lock(&priv->mutex);

if (vif->addr) {
IWL_DEBUG_MAC80211(priv, "Set %pM\n", vif->addr);
memcpy(priv->mac_addr, vif->addr, ETH_ALEN);
Expand All @@ -2657,10 +2655,11 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw,
/* we are not ready, will run again when ready */
set_bit(STATUS_MODE_PENDING, &priv->status);

out:
mutex_unlock(&priv->mutex);

IWL_DEBUG_MAC80211(priv, "leave\n");
return 0;
return err;
}
EXPORT_SYMBOL(iwl_mac_add_interface);

Expand Down

0 comments on commit 81ab627

Please sign in to comment.