diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 2fd752a9aac8..214e4658c495 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1558,21 +1558,24 @@ iwl_rxon_ctx_from_vif(struct ieee80211_vif *vif) | |||
1558 | ctx < &priv->contexts[NUM_IWL_RXON_CTX]; ctx++) \ | 1558 | ctx < &priv->contexts[NUM_IWL_RXON_CTX]; ctx++) \ |
1559 | if (priv->valid_contexts & BIT(ctx->ctxid)) | 1559 | if (priv->valid_contexts & BIT(ctx->ctxid)) |
1560 | 1560 | ||
1561 | static inline int iwl_is_associated(struct iwl_priv *priv, | 1561 | static inline int iwl_is_associated_ctx(struct iwl_rxon_context *ctx) |
1562 | enum iwl_rxon_context_id ctxid) | ||
1563 | { | 1562 | { |
1564 | return (priv->contexts[ctxid].active.filter_flags & | 1563 | return (ctx->active.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0; |
1565 | RXON_FILTER_ASSOC_MSK) ? 1 : 0; | ||
1566 | } | 1564 | } |
1567 | 1565 | ||
1568 | static inline int iwl_is_any_associated(struct iwl_priv *priv) | 1566 | static inline int iwl_is_associated(struct iwl_priv *priv, |
1567 | enum iwl_rxon_context_id ctxid) | ||
1569 | { | 1568 | { |
1570 | return iwl_is_associated(priv, IWL_RXON_CTX_BSS); | 1569 | return iwl_is_associated_ctx(&priv->contexts[ctxid]); |
1571 | } | 1570 | } |
1572 | 1571 | ||
1573 | static inline int iwl_is_associated_ctx(struct iwl_rxon_context *ctx) | 1572 | static inline int iwl_is_any_associated(struct iwl_priv *priv) |
1574 | { | 1573 | { |
1575 | return (ctx->active.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0; | 1574 | struct iwl_rxon_context *ctx; |
1575 | for_each_context(priv, ctx) | ||
1576 | if (iwl_is_associated_ctx(ctx)) | ||
1577 | return true; | ||
1578 | return false; | ||
1576 | } | 1579 | } |
1577 | 1580 | ||
1578 | static inline int is_channel_valid(const struct iwl_channel_info *ch_info) | 1581 | static inline int is_channel_valid(const struct iwl_channel_info *ch_info) |