Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122008
b: refs/heads/master
c: ada1751
h: refs/heads/master
v: v3
  • Loading branch information
Mohamed Abbas authored and John W. Linville committed Nov 21, 2008
1 parent 32e98e8 commit 37e3b98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 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: 1e87d68083cd073c84edb3a71fa4365d7fc092bd
refs/heads/master: ada1751346b5539f393c2e9c9dc04d9e7078e53a
21 changes: 15 additions & 6 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2002,6 +2002,10 @@ static int iwl_read_ucode(struct iwl_priv *priv)
return ret;
}

/* temporary */
static int iwl_mac_beacon_update(struct ieee80211_hw *hw,
struct sk_buff *skb);

/**
* iwl_alive_start - called after REPLY_ALIVE notification received
* from protocol/runtime uCode (initialization uCode's
Expand Down Expand Up @@ -2084,6 +2088,15 @@ static void iwl_alive_start(struct iwl_priv *priv)

iwl_power_update_mode(priv, 1);

/* reassociate for ADHOC mode */
if (priv->vif && (priv->iw_mode == NL80211_IFTYPE_ADHOC)) {
struct sk_buff *beacon = ieee80211_beacon_get(priv->hw,
priv->vif);
if (beacon)
iwl_mac_beacon_update(priv->hw, beacon);
}


if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status))
iwl_set_mode(priv, priv->iw_mode);

Expand Down Expand Up @@ -2930,8 +2943,6 @@ static void iwl_config_ap(struct iwl_priv *priv)
* clear sta table, add BCAST sta... */
}

/* temporary */
static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb);

static int iwl_mac_config_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
Expand All @@ -2953,7 +2964,9 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw,
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
if (!beacon)
return -ENOMEM;
mutex_lock(&priv->mutex);
rc = iwl_mac_beacon_update(hw, beacon);
mutex_unlock(&priv->mutex);
if (rc)
return rc;
}
Expand Down Expand Up @@ -3529,18 +3542,15 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
unsigned long flags;
__le64 timestamp;

mutex_lock(&priv->mutex);
IWL_DEBUG_MAC80211("enter\n");

if (!iwl_is_ready_rf(priv)) {
IWL_DEBUG_MAC80211("leave - RF not ready\n");
mutex_unlock(&priv->mutex);
return -EIO;
}

if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
IWL_DEBUG_MAC80211("leave - not IBSS\n");
mutex_unlock(&priv->mutex);
return -EIO;
}

Expand All @@ -3562,7 +3572,6 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)

iwl_post_associate(priv);

mutex_unlock(&priv->mutex);

return 0;
}
Expand Down

0 comments on commit 37e3b98

Please sign in to comment.