iwlwifi: avoid commit rxon during scan in iwlagn_configure_filter
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 22 Oct 2010 15:04:27 +0000 (17:04 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Nov 2010 18:24:26 +0000 (13:24 -0500)
Almost anywhere in the code we avoid committing rxon while performing
scan, and make rxon commit when scan complete. However in some places
in the code we do not follow that rule. This patch fix that problem in
iwlagn_configure_filter().

Since we do not commit directly in iwl3945_configure_filter, we can
also do the same for agn, so I just remove iwlcore_commit_rxon()
function and add a comment. Also change comment for iwl3945.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index d3435c43027350dd3af5e0478bd1dedec4633575..0ba8083ee4cd0dd6e7be9ed087e85da7a86edd37 100644 (file)
@@ -3983,7 +3983,11 @@ static void iwlagn_configure_filter(struct ieee80211_hw *hw,
        for_each_context(priv, ctx) {
                ctx->staging.filter_flags &= ~filter_nand;
                ctx->staging.filter_flags |= filter_or;
-               iwlcore_commit_rxon(priv, ctx);
+
+               /*
+                * Not committing directly because hardware can perform a scan,
+                * but we'll eventually commit the filter flags change anyway.
+                */
        }
 
        mutex_unlock(&priv->mutex);
index a75429171c46b8b04995f302b59978ced99fa093..3b8bf8686276d076ecd49c4a3c2833c880a4cfe0 100644 (file)
@@ -3407,9 +3407,9 @@ static void iwl3945_configure_filter(struct ieee80211_hw *hw,
        ctx->staging.filter_flags |= filter_or;
 
        /*
-        * Committing directly here breaks for some reason,
-        * but we'll eventually commit the filter flags
-        * change anyway.
+        * Not committing directly because hardware can perform a scan,
+        * but even if hw is ready, committing here breaks for some reason,
+        * we'll eventually commit the filter flags change anyway.
         */
 
        mutex_unlock(&priv->mutex);