diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-09-22 12:01:59 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-10-07 18:49:58 -0400 |
commit | 575ccfd0f47e5d791246cb03c07d636190322fa1 (patch) | |
tree | f81cbf73907a6661c19bc868be554792c47abc70 /drivers/net/wireless/iwlwifi | |
parent | 5de33068a2f841536ca8632534e3e193d5b2607f (diff) |
iwlwifi: rename iwl_mac_beacon_update
Rename iwl_mac_beacon_update to iwlcore_beacon_update
and make the calling convention a bit different. The
old name with _mac_ indicated that it was a mac80211
callback, but that's no longer true.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index dd7c3cbd2f6b..71f245f3f0f6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1617,25 +1617,25 @@ static inline void iwl_set_no_assoc(struct iwl_priv *priv, | |||
1617 | iwlcore_commit_rxon(priv, ctx); | 1617 | iwlcore_commit_rxon(priv, ctx); |
1618 | } | 1618 | } |
1619 | 1619 | ||
1620 | static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | 1620 | static void iwlcore_beacon_update(struct ieee80211_hw *hw, |
1621 | struct ieee80211_vif *vif) | ||
1621 | { | 1622 | { |
1622 | struct iwl_priv *priv = hw->priv; | 1623 | struct iwl_priv *priv = hw->priv; |
1623 | unsigned long flags; | 1624 | unsigned long flags; |
1624 | __le64 timestamp; | 1625 | __le64 timestamp; |
1626 | struct sk_buff *skb = ieee80211_beacon_get(hw, vif); | ||
1625 | 1627 | ||
1626 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 1628 | if (!skb) |
1629 | return; | ||
1630 | |||
1631 | IWL_DEBUG_ASSOC(priv, "enter\n"); | ||
1627 | 1632 | ||
1628 | lockdep_assert_held(&priv->mutex); | 1633 | lockdep_assert_held(&priv->mutex); |
1629 | 1634 | ||
1630 | if (!priv->beacon_ctx) { | 1635 | if (!priv->beacon_ctx) { |
1631 | IWL_ERR(priv, "update beacon but no beacon context!\n"); | 1636 | IWL_ERR(priv, "update beacon but no beacon context!\n"); |
1632 | dev_kfree_skb(skb); | 1637 | dev_kfree_skb(skb); |
1633 | return -EINVAL; | 1638 | return; |
1634 | } | ||
1635 | |||
1636 | if (!iwl_is_ready_rf(priv)) { | ||
1637 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); | ||
1638 | return -EIO; | ||
1639 | } | 1639 | } |
1640 | 1640 | ||
1641 | spin_lock_irqsave(&priv->lock, flags); | 1641 | spin_lock_irqsave(&priv->lock, flags); |
@@ -1648,12 +1648,16 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1648 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; | 1648 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; |
1649 | priv->timestamp = le64_to_cpu(timestamp); | 1649 | priv->timestamp = le64_to_cpu(timestamp); |
1650 | 1650 | ||
1651 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 1651 | IWL_DEBUG_ASSOC(priv, "leave\n"); |
1652 | |||
1652 | spin_unlock_irqrestore(&priv->lock, flags); | 1653 | spin_unlock_irqrestore(&priv->lock, flags); |
1653 | 1654 | ||
1654 | priv->cfg->ops->lib->post_associate(priv, priv->beacon_ctx->vif); | 1655 | if (!iwl_is_ready_rf(priv)) { |
1656 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); | ||
1657 | return; | ||
1658 | } | ||
1655 | 1659 | ||
1656 | return 0; | 1660 | priv->cfg->ops->lib->post_associate(priv, priv->beacon_ctx->vif); |
1657 | } | 1661 | } |
1658 | 1662 | ||
1659 | void iwl_bss_info_changed(struct ieee80211_hw *hw, | 1663 | void iwl_bss_info_changed(struct ieee80211_hw *hw, |
@@ -1735,13 +1739,8 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
1735 | * mac80211 decides to do both changes at once because | 1739 | * mac80211 decides to do both changes at once because |
1736 | * it will invoke post_associate. | 1740 | * it will invoke post_associate. |
1737 | */ | 1741 | */ |
1738 | if (vif->type == NL80211_IFTYPE_ADHOC && | 1742 | if (vif->type == NL80211_IFTYPE_ADHOC && changes & BSS_CHANGED_BEACON) |
1739 | changes & BSS_CHANGED_BEACON) { | 1743 | iwlcore_beacon_update(hw, vif); |
1740 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); | ||
1741 | |||
1742 | if (beacon) | ||
1743 | iwl_mac_beacon_update(hw, beacon); | ||
1744 | } | ||
1745 | 1744 | ||
1746 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { | 1745 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { |
1747 | IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n", | 1746 | IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n", |