iwlwifi: move iwl_dump_csr to agn
authorJohannes Berg <johannes.berg@intel.com>
Wed, 22 Sep 2010 16:02:06 +0000 (18:02 +0200)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Thu, 7 Oct 2010 22:51:49 +0000 (15:51 -0700)
The iwl_dump_csr function is only used
within the agn module, so it can be
moved there instead of being exported
by the core.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn.h
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h

index 9f1c93bbb01c8b431c05e1afa82d7927656c2349..de91ff6dcd6caa3c20e089f9559acd7382d6b742 100644 (file)
@@ -2222,3 +2222,72 @@ u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant, u8 valid)
        }
        return ant;
 }
+
+static const char *get_csr_string(int cmd)
+{
+       switch (cmd) {
+       IWL_CMD(CSR_HW_IF_CONFIG_REG);
+       IWL_CMD(CSR_INT_COALESCING);
+       IWL_CMD(CSR_INT);
+       IWL_CMD(CSR_INT_MASK);
+       IWL_CMD(CSR_FH_INT_STATUS);
+       IWL_CMD(CSR_GPIO_IN);
+       IWL_CMD(CSR_RESET);
+       IWL_CMD(CSR_GP_CNTRL);
+       IWL_CMD(CSR_HW_REV);
+       IWL_CMD(CSR_EEPROM_REG);
+       IWL_CMD(CSR_EEPROM_GP);
+       IWL_CMD(CSR_OTP_GP_REG);
+       IWL_CMD(CSR_GIO_REG);
+       IWL_CMD(CSR_GP_UCODE_REG);
+       IWL_CMD(CSR_GP_DRIVER_REG);
+       IWL_CMD(CSR_UCODE_DRV_GP1);
+       IWL_CMD(CSR_UCODE_DRV_GP2);
+       IWL_CMD(CSR_LED_REG);
+       IWL_CMD(CSR_DRAM_INT_TBL_REG);
+       IWL_CMD(CSR_GIO_CHICKEN_BITS);
+       IWL_CMD(CSR_ANA_PLL_CFG);
+       IWL_CMD(CSR_HW_REV_WA_REG);
+       IWL_CMD(CSR_DBG_HPET_MEM_REG);
+       default:
+               return "UNKNOWN";
+       }
+}
+
+void iwl_dump_csr(struct iwl_priv *priv)
+{
+       int i;
+       u32 csr_tbl[] = {
+               CSR_HW_IF_CONFIG_REG,
+               CSR_INT_COALESCING,
+               CSR_INT,
+               CSR_INT_MASK,
+               CSR_FH_INT_STATUS,
+               CSR_GPIO_IN,
+               CSR_RESET,
+               CSR_GP_CNTRL,
+               CSR_HW_REV,
+               CSR_EEPROM_REG,
+               CSR_EEPROM_GP,
+               CSR_OTP_GP_REG,
+               CSR_GIO_REG,
+               CSR_GP_UCODE_REG,
+               CSR_GP_DRIVER_REG,
+               CSR_UCODE_DRV_GP1,
+               CSR_UCODE_DRV_GP2,
+               CSR_LED_REG,
+               CSR_DRAM_INT_TBL_REG,
+               CSR_GIO_CHICKEN_BITS,
+               CSR_ANA_PLL_CFG,
+               CSR_HW_REV_WA_REG,
+               CSR_DBG_HPET_MEM_REG
+       };
+       IWL_ERR(priv, "CSR values:\n");
+       IWL_ERR(priv, "(2nd byte of CSR_INT_COALESCING is "
+               "CSR_INT_PERIODIC_REG)\n");
+       for (i = 0; i <  ARRAY_SIZE(csr_tbl); i++) {
+               IWL_ERR(priv, "  %25s: 0X%08x\n",
+                       get_csr_string(csr_tbl[i]),
+                       iwl_read32(priv, csr_tbl[i]));
+       }
+}
index cc7a3b56cfe50bd01874d9e6f36c099a5cf1ff64..5458e63f803d54155007dfe755d630136290d293 100644 (file)
@@ -162,6 +162,7 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv);
 int iwlagn_wait_tx_queue_empty(struct iwl_priv *priv);
 int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control);
 void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control);
+void iwl_dump_csr(struct iwl_priv *priv);
 
 /* rx */
 void iwlagn_rx_queue_restock(struct iwl_priv *priv);
index 88c1ed5b7dd716c90333817c05d507bb3c9cd36f..c0d531c669bf485b3ef904d2c6a102f91d2410b9 100644 (file)
@@ -2351,77 +2351,6 @@ void iwl_update_stats(struct iwl_priv *priv, bool is_tx, __le16 fc, u16 len)
 EXPORT_SYMBOL(iwl_update_stats);
 #endif
 
-static const char *get_csr_string(int cmd)
-{
-       switch (cmd) {
-               IWL_CMD(CSR_HW_IF_CONFIG_REG);
-               IWL_CMD(CSR_INT_COALESCING);
-               IWL_CMD(CSR_INT);
-               IWL_CMD(CSR_INT_MASK);
-               IWL_CMD(CSR_FH_INT_STATUS);
-               IWL_CMD(CSR_GPIO_IN);
-               IWL_CMD(CSR_RESET);
-               IWL_CMD(CSR_GP_CNTRL);
-               IWL_CMD(CSR_HW_REV);
-               IWL_CMD(CSR_EEPROM_REG);
-               IWL_CMD(CSR_EEPROM_GP);
-               IWL_CMD(CSR_OTP_GP_REG);
-               IWL_CMD(CSR_GIO_REG);
-               IWL_CMD(CSR_GP_UCODE_REG);
-               IWL_CMD(CSR_GP_DRIVER_REG);
-               IWL_CMD(CSR_UCODE_DRV_GP1);
-               IWL_CMD(CSR_UCODE_DRV_GP2);
-               IWL_CMD(CSR_LED_REG);
-               IWL_CMD(CSR_DRAM_INT_TBL_REG);
-               IWL_CMD(CSR_GIO_CHICKEN_BITS);
-               IWL_CMD(CSR_ANA_PLL_CFG);
-               IWL_CMD(CSR_HW_REV_WA_REG);
-               IWL_CMD(CSR_DBG_HPET_MEM_REG);
-       default:
-               return "UNKNOWN";
-
-       }
-}
-
-void iwl_dump_csr(struct iwl_priv *priv)
-{
-       int i;
-       u32 csr_tbl[] = {
-               CSR_HW_IF_CONFIG_REG,
-               CSR_INT_COALESCING,
-               CSR_INT,
-               CSR_INT_MASK,
-               CSR_FH_INT_STATUS,
-               CSR_GPIO_IN,
-               CSR_RESET,
-               CSR_GP_CNTRL,
-               CSR_HW_REV,
-               CSR_EEPROM_REG,
-               CSR_EEPROM_GP,
-               CSR_OTP_GP_REG,
-               CSR_GIO_REG,
-               CSR_GP_UCODE_REG,
-               CSR_GP_DRIVER_REG,
-               CSR_UCODE_DRV_GP1,
-               CSR_UCODE_DRV_GP2,
-               CSR_LED_REG,
-               CSR_DRAM_INT_TBL_REG,
-               CSR_GIO_CHICKEN_BITS,
-               CSR_ANA_PLL_CFG,
-               CSR_HW_REV_WA_REG,
-               CSR_DBG_HPET_MEM_REG
-       };
-       IWL_ERR(priv, "CSR values:\n");
-       IWL_ERR(priv, "(2nd byte of CSR_INT_COALESCING is "
-               "CSR_INT_PERIODIC_REG)\n");
-       for (i = 0; i <  ARRAY_SIZE(csr_tbl); i++) {
-               IWL_ERR(priv, "  %25s: 0X%08x\n",
-                       get_csr_string(csr_tbl[i]),
-                       iwl_read32(priv, csr_tbl[i]));
-       }
-}
-EXPORT_SYMBOL(iwl_dump_csr);
-
 static const char *get_fh_string(int cmd)
 {
        switch (cmd) {
index 0bc7b7a28a307753410089201d3a5f8879db0059..7e99b7dccb84a0461ce594a2bc078c8f3b6803ab 100644 (file)
@@ -659,7 +659,6 @@ int iwl_pci_resume(struct pci_dev *pdev);
 void iwl_dump_nic_error_log(struct iwl_priv *priv);
 int iwl_dump_nic_event_log(struct iwl_priv *priv,
                           bool full_log, char **buf, bool display);
-void iwl_dump_csr(struct iwl_priv *priv);
 int iwl_dump_fh(struct iwl_priv *priv, char **buf, bool display);
 #ifdef CONFIG_IWLWIFI_DEBUG
 void iwl_print_rx_config_cmd(struct iwl_priv *priv,