Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122009
b: refs/heads/master
c: 9bdf5ec
h: refs/heads/master
i:
  122007: 32e98e8
v: v3
  • Loading branch information
Mohamed Abbas authored and John W. Linville committed Nov 21, 2008
1 parent 37e3b98 commit 402fb22
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 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: ada1751346b5539f393c2e9c9dc04d9e7078e53a
refs/heads/master: 9bdf5ecabf1cd2fb012f87d9742590fdd8290da0
21 changes: 14 additions & 7 deletions trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -5601,6 +5601,10 @@ static void iwl3945_init_alive_start(struct iwl3945_priv *priv)
}


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

/**
* iwl3945_alive_start - called after REPLY_ALIVE notification received
* from protocol/runtime uCode (initialization uCode's
Expand Down Expand Up @@ -5704,6 +5708,14 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
if (priv->error_recovering)
iwl3945_error_recovery(priv);

/* 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)
iwl3945_mac_beacon_update(priv->hw, beacon);
}

return;

restart:
Expand Down Expand Up @@ -6710,9 +6722,6 @@ static void iwl3945_config_ap(struct iwl3945_priv *priv)
* clear sta table, add BCAST sta... */
}

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

static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_if_conf *conf)
Expand All @@ -6734,7 +6743,9 @@ static int iwl3945_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 = iwl3945_mac_beacon_update(hw, beacon);
mutex_unlock(&priv->mutex);
if (rc)
return rc;
}
Expand Down Expand Up @@ -7188,18 +7199,15 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk
struct iwl3945_priv *priv = hw->priv;
unsigned long flags;

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

if (!iwl3945_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 @@ -7219,7 +7227,6 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk

iwl3945_post_associate(priv);

mutex_unlock(&priv->mutex);

return 0;
}
Expand Down

0 comments on commit 402fb22

Please sign in to comment.