iwlwifi: print warning about disconnected antennas
authorJohannes Berg <johannes.berg@intel.com>
Wed, 9 Jun 2010 08:46:32 +0000 (01:46 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Mon, 14 Jun 2010 18:00:47 +0000 (11:00 -0700)
When we detect that not all antennas are
properly connected, we simply disable the
associated chains, but never notify the
user at all. Print out a warning so it is
obvious that happened and we know where
to start looking for related issues.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-calib.c

index 7e822777321331cb5f9ae8303e16613247c2c580..22fa947e8756e5752888e3d8c7d492d6a5ea780e 100644 (file)
@@ -846,6 +846,13 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv,
                }
        }
 
+       if (active_chains != priv->hw_params.valid_rx_ant &&
+           active_chains != priv->chain_noise_data.active_chains)
+               IWL_WARN(priv,
+                        "Detected that not all antennas are connected! "
+                        "Connected: %#x, valid: %#x.\n",
+                        active_chains, priv->hw_params.valid_rx_ant);
+
        /* Save for use within RXON, TX, SCAN commands, etc. */
        priv->chain_noise_data.active_chains = active_chains;
        IWL_DEBUG_CALIB(priv, "active_chains (bitwise) = 0x%x\n",