From: Shanyu Zhao Date: Fri, 12 Nov 2010 21:48:13 +0000 (-0800) Subject: iwlagn: check change before commit RXON cmd X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6163a3735aad19bdb8d02b3362d3a2d7d2eb78d5;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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 59af06d3511..c6e455e8845 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); } } }