]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlagn: check change before commit RXON cmd
authorShanyu Zhao <shanyu.zhao@intel.com>
Fri, 12 Nov 2010 21:48:13 +0000 (13:48 -0800)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Tue, 16 Nov 2010 15:47:22 +0000 (07:47 -0800)
When setting rxon chain and filter, no need to commit RXON when the
chain flag is not changed. This reduces the number of RXON commands
we send down to uCode.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn.c

index 59af06d3511cc41e7dc73d683a97c2e7f9b1c20c..c6e455e8845a08fabb4db80773972cc1500c0fce 100644 (file)
@@ -97,7 +97,8 @@ void iwl_update_chain_flags(struct iwl_priv *priv)
        if (priv->cfg->ops->hcmd->set_rxon_chain) {
                for_each_context(priv, ctx) {
                        priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx);
-                       iwlcore_commit_rxon(priv, ctx);
+                       if (ctx->active.rx_chain != ctx->staging.rx_chain)
+                               iwlcore_commit_rxon(priv, ctx);
                }
        }
 }