From: Shanyu Zhao Date: Fri, 12 Nov 2010 21:48:13 +0000 (-0800) Subject: iwlagn: check change before commit RXON cmd X-Git-Tag: v2.6.38-rc1~476^2~169^2^2~225^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6163a3735aad19bdb8d02b3362d3a2d7d2eb78d5;p=profile%2Fivi%2Fkernel-x86-ivi.git iwlagn: check change before commit RXON cmd 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 Signed-off-by: Wey-Yi Guy --- diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 59af06d..c6e455e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -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); } } }