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>
This commit is contained in:
parent
5de33068a2
commit
575ccfd0f4
@ -1617,25 +1617,25 @@ static inline void iwl_set_no_assoc(struct iwl_priv *priv,
|
|||||||
iwlcore_commit_rxon(priv, ctx);
|
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;
|
struct iwl_priv *priv = hw->priv;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
__le64 timestamp;
|
__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);
|
lockdep_assert_held(&priv->mutex);
|
||||||
|
|
||||||
if (!priv->beacon_ctx) {
|
if (!priv->beacon_ctx) {
|
||||||
IWL_ERR(priv, "update beacon but no beacon context!\n");
|
IWL_ERR(priv, "update beacon but no beacon context!\n");
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
return -EINVAL;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (!iwl_is_ready_rf(priv)) {
|
|
||||||
IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n");
|
|
||||||
return -EIO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_lock_irqsave(&priv->lock, flags);
|
spin_lock_irqsave(&priv->lock, flags);
|
||||||
@ -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;
|
timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp;
|
||||||
priv->timestamp = le64_to_cpu(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);
|
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,
|
void iwl_bss_info_changed(struct ieee80211_hw *hw,
|
||||||
@ -1735,13 +1739,8 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
|
|||||||
* mac80211 decides to do both changes at once because
|
* mac80211 decides to do both changes at once because
|
||||||
* it will invoke post_associate.
|
* it will invoke post_associate.
|
||||||
*/
|
*/
|
||||||
if (vif->type == NL80211_IFTYPE_ADHOC &&
|
if (vif->type == NL80211_IFTYPE_ADHOC && changes & BSS_CHANGED_BEACON)
|
||||||
changes & BSS_CHANGED_BEACON) {
|
iwlcore_beacon_update(hw, vif);
|
||||||
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
|
|
||||||
|
|
||||||
if (beacon)
|
|
||||||
iwl_mac_beacon_update(hw, beacon);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changes & BSS_CHANGED_ERP_PREAMBLE) {
|
if (changes & BSS_CHANGED_ERP_PREAMBLE) {
|
||||||
IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n",
|
IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user