iwlagn: introduce iwl-shared.h

It will hold declaration of functions and forward declaration of struct that
are used by several layers.
This will allow modules not to include iwl_priv. iwl_bus and iwl_trans are
still visible to all.

All the layers share the module parameters, move the struct to iwl-shared.h.
Also add all module parameters to iwl_mod_params instead of having them as
global static. This includes

* debug_level
* ant_coupling
* bt_ch_announce
* wanted_ucode_alternative

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index dd34c7c..d0e65c8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -50,6 +50,7 @@
 #include "iwl-agn-tt.h"
 #include "iwl-bus.h"
 #include "iwl-trans.h"
+#include "iwl-shared.h"
 
 #define DRV_NAME        "iwlagn"
 
@@ -1513,7 +1514,7 @@
 #ifdef CONFIG_IWLWIFI_DEBUG
 	/* debugging info */
 	u32 debug_level; /* per device debugging will override global
-			    iwl_debug_level if set */
+			    iwlagn_mod_params.debug_level if set */
 #endif /* CONFIG_IWLWIFI_DEBUG */
 #ifdef CONFIG_IWLWIFI_DEBUGFS
 	/* debugfs */
@@ -1562,6 +1563,8 @@
 	clear_bit(txq_id, &priv->txq_ctx_active_msk);
 }
 
+extern struct iwl_mod_params iwlagn_mod_params;
+
 #ifdef CONFIG_IWLWIFI_DEBUG
 /*
  * iwl_get_debug_level: Return active debug level for device
@@ -1575,12 +1578,12 @@
 	if (priv->debug_level)
 		return priv->debug_level;
 	else
-		return iwl_debug_level;
+		return iwlagn_mod_params.debug_level;
 }
 #else
 static inline u32 iwl_get_debug_level(struct iwl_priv *priv)
 {
-	return iwl_debug_level;
+	return iwlagn_mod_params.debug_level;
 }
 #endif