This is a note to let you know that I've just added the patch titled

    iwlagn: fix iwl_is_any_associated

to the 2.6.39-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iwlagn-fix-iwl_is_any_associated.patch
and it can be found in the queue-2.6.39 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 054ec924944912413e4ee927b8cf02f476d08783 Mon Sep 17 00:00:00 2001
From: Johannes Berg <[email protected]>
Date: Fri, 6 May 2011 11:11:20 -0700
Subject: iwlagn: fix iwl_is_any_associated

From: Johannes Berg <[email protected]>

commit 054ec924944912413e4ee927b8cf02f476d08783 upstream.

The function iwl_is_any_associated() was intended
to check both contexts, but due to an oversight
it only checks the BSS context. This leads to a
problem with scanning since the passive dwell
time isn't restricted appropriately and a scan
that includes passive channels will never finish
if only the PAN context is associated since the
default dwell time of 120ms won't fit into the
normal 100 TU DTIM interval.

Fix the function by using for_each_context() and
also reorganise the other functions a bit to take
advantage of each other making the code easier to
read.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/net/wireless/iwlwifi/iwl-dev.h |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1658,21 +1658,24 @@ iwl_rxon_ctx_from_vif(struct ieee80211_v
             ctx < &priv->contexts[NUM_IWL_RXON_CTX]; ctx++)    \
                if (priv->valid_contexts & BIT(ctx->ctxid))
 
-static inline int iwl_is_associated(struct iwl_priv *priv,
-                                   enum iwl_rxon_context_id ctxid)
+static inline int iwl_is_associated_ctx(struct iwl_rxon_context *ctx)
 {
-       return (priv->contexts[ctxid].active.filter_flags &
-                       RXON_FILTER_ASSOC_MSK) ? 1 : 0;
+       return (ctx->active.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0;
 }
 
-static inline int iwl_is_any_associated(struct iwl_priv *priv)
+static inline int iwl_is_associated(struct iwl_priv *priv,
+                                   enum iwl_rxon_context_id ctxid)
 {
-       return iwl_is_associated(priv, IWL_RXON_CTX_BSS);
+       return iwl_is_associated_ctx(&priv->contexts[ctxid]);
 }
 
-static inline int iwl_is_associated_ctx(struct iwl_rxon_context *ctx)
+static inline int iwl_is_any_associated(struct iwl_priv *priv)
 {
-       return (ctx->active.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0;
+       struct iwl_rxon_context *ctx;
+       for_each_context(priv, ctx)
+               if (iwl_is_associated_ctx(ctx))
+                       return true;
+       return false;
 }
 
 static inline int is_channel_valid(const struct iwl_channel_info *ch_info)


Patches currently in stable-queue which might be from [email protected] 
are

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to