Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215263
b: refs/heads/master
c: 575ccfd
h: refs/heads/master
i:
  215261: f866fd2
  215259: fd36dce
  215255: e6e42ef
  215247: f867401
  215231: 5bded59
v: v3
  • Loading branch information
Johannes Berg authored and Wey-Yi Guy committed Oct 7, 2010
1 parent fc52561 commit e7a9e76
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 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: 5de33068a2f841536ca8632534e3e193d5b2607f
refs/heads/master: 575ccfd0f47e5d791246cb03c07d636190322fa1
35 changes: 17 additions & 18 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1617,25 +1617,25 @@ static inline void iwl_set_no_assoc(struct iwl_priv *priv,
iwlcore_commit_rxon(priv, ctx);
}

static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
static void iwlcore_beacon_update(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct iwl_priv *priv = hw->priv;
unsigned long flags;
__le64 timestamp;
struct sk_buff *skb = ieee80211_beacon_get(hw, vif);

IWL_DEBUG_MAC80211(priv, "enter\n");
if (!skb)
return;

IWL_DEBUG_ASSOC(priv, "enter\n");

lockdep_assert_held(&priv->mutex);

if (!priv->beacon_ctx) {
IWL_ERR(priv, "update beacon but no beacon context!\n");
dev_kfree_skb(skb);
return -EINVAL;
}

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

spin_lock_irqsave(&priv->lock, flags);
Expand All @@ -1648,12 +1648,16 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp;
priv->timestamp = le64_to_cpu(timestamp);

IWL_DEBUG_MAC80211(priv, "leave\n");
IWL_DEBUG_ASSOC(priv, "leave\n");

spin_unlock_irqrestore(&priv->lock, flags);

priv->cfg->ops->lib->post_associate(priv, priv->beacon_ctx->vif);
if (!iwl_is_ready_rf(priv)) {
IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n");
return;
}

return 0;
priv->cfg->ops->lib->post_associate(priv, priv->beacon_ctx->vif);
}

void iwl_bss_info_changed(struct ieee80211_hw *hw,
Expand Down Expand Up @@ -1735,13 +1739,8 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
* mac80211 decides to do both changes at once because
* it will invoke post_associate.
*/
if (vif->type == NL80211_IFTYPE_ADHOC &&
changes & BSS_CHANGED_BEACON) {
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);

if (beacon)
iwl_mac_beacon_update(hw, beacon);
}
if (vif->type == NL80211_IFTYPE_ADHOC && changes & BSS_CHANGED_BEACON)
iwlcore_beacon_update(hw, vif);

if (changes & BSS_CHANGED_ERP_PREAMBLE) {
IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n",
Expand Down

0 comments on commit e7a9e76

Please sign in to comment.