]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlegacy: move debugfs_ops to il_priv
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 13 Feb 2012 10:23:14 +0000 (11:23 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 22 Feb 2012 19:51:13 +0000 (14:51 -0500)
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/3945-debug.c
drivers/net/wireless/iwlegacy/3945-mac.c
drivers/net/wireless/iwlegacy/3945.c
drivers/net/wireless/iwlegacy/3945.h
drivers/net/wireless/iwlegacy/4965-debug.c
drivers/net/wireless/iwlegacy/4965-mac.c
drivers/net/wireless/iwlegacy/4965.c
drivers/net/wireless/iwlegacy/4965.h
drivers/net/wireless/iwlegacy/common.h
drivers/net/wireless/iwlegacy/debug.c

index 5e1a19fd354dcd4ffcb3629642996556d2d0c346..f767dd106b09e53d4de130e38b22d0e5490a84a8 100644 (file)
@@ -503,3 +503,9 @@ il3945_ucode_general_stats_read(struct file *file, char __user *user_buf,
        kfree(buf);
        return ret;
 }
+
+const struct il_debugfs_ops il3945_debugfs_ops = {
+       .rx_stats_read = il3945_ucode_rx_stats_read,
+       .tx_stats_read = il3945_ucode_tx_stats_read,
+       .general_stats_read = il3945_ucode_general_stats_read,
+};
index 63ec05b15ba34ee1547d85952664523080e05af9..b7d5ebc512d3566c12b4608504442a9322fde9e6 100644 (file)
@@ -3619,6 +3619,9 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        D_INFO("*** LOAD DRIVER ***\n");
        il->cfg = cfg;
        il->ops = &il3945_ops;
+#ifdef CONFIG_IWLEGACY_DEBUGFS
+       il->debugfs_ops = &il3945_debugfs_ops;
+#endif
        il->pci_dev = pdev;
        il->inta_mask = CSR_INI_SET_MASK;
 
index 66a5dc072eb246271995290873d05b5f9560e8a1..4e63e7d48a7b56943d440314729a90439dd805d3 100644 (file)
@@ -2651,14 +2651,6 @@ static struct il_lib_ops il3945_lib = {
        },
        .send_tx_power = il3945_send_tx_power,
        .is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr,
-
-#ifdef CONFIG_IWLEGACY_DEBUGFS
-       .debugfs_ops = {
-                       .rx_stats_read = il3945_ucode_rx_stats_read,
-                       .tx_stats_read = il3945_ucode_tx_stats_read,
-                       .general_stats_read = il3945_ucode_general_stats_read,
-                       },
-#endif
 };
 
 static const struct il_legacy_ops il3945_legacy_ops = {
index c00a8d30b6feb7324707b1a9aa7102578a6095b5..1d45075e0d5b51a21e234b44c4603bb0c0481ce6 100644 (file)
@@ -595,13 +595,7 @@ struct il3945_tfd {
 } __packed;
 
 #ifdef CONFIG_IWLEGACY_DEBUGFS
-ssize_t il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
-                                  size_t count, loff_t *ppos);
-ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
-                                  size_t count, loff_t *ppos);
-ssize_t il3945_ucode_general_stats_read(struct file *file,
-                                       char __user *user_buf, size_t count,
-                                       loff_t *ppos);
+extern const struct il_debugfs_ops il3945_debugfs_ops;
 #endif
 
 #endif
index 98ec39f56ba34c107f5a6fd8498e8d9166afaea8..c8153fc64f7465b8bfb87ac8700840cb08e3ebc4 100644 (file)
@@ -744,3 +744,9 @@ il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
        kfree(buf);
        return ret;
 }
+
+const struct il_debugfs_ops il4965_debugfs_ops = {
+       .rx_stats_read = il4965_ucode_rx_stats_read,
+       .tx_stats_read = il4965_ucode_tx_stats_read,
+       .general_stats_read = il4965_ucode_general_stats_read,
+};
index 4560021bb96ddc53d49f467b92af3df12ea2ed37..36f85f289a2556075f1b4f56d2512e699abb7837 100644 (file)
@@ -6483,6 +6483,9 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        D_INFO("*** LOAD DRIVER ***\n");
        il->cfg = cfg;
        il->ops = &il4965_ops;
+#ifdef CONFIG_IWLEGACY_DEBUGFS
+       il->debugfs_ops = &il4965_debugfs_ops;
+#endif
        il->pci_dev = pdev;
        il->inta_mask = CSR_INI_SET_MASK;
 
index cf49a7af6c6e0f31fb5bb2c8d422b92520c77502..34fa3db822920996e93774414e2e72951116160e 100644 (file)
@@ -1913,13 +1913,6 @@ static struct il_lib_ops il4965_lib = {
        .temp_ops = {
                     .temperature = il4965_temperature_calib,
                     },
-#ifdef CONFIG_IWLEGACY_DEBUGFS
-       .debugfs_ops = {
-                       .rx_stats_read = il4965_ucode_rx_stats_read,
-                       .tx_stats_read = il4965_ucode_tx_stats_read,
-                       .general_stats_read = il4965_ucode_general_stats_read,
-                       },
-#endif
 };
 
 static const struct il_legacy_ops il4965_legacy_ops = {
index befa7e60e9567e501021f629b96c97b7d345903a..b3fcb8f30fe917e1910bae08dc676f0b710f0031 100644 (file)
@@ -928,13 +928,7 @@ void il4965_calib_free_results(struct il_priv *il);
 
 /* Debug */
 #ifdef CONFIG_IWLEGACY_DEBUGFS
-ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
-                                  size_t count, loff_t *ppos);
-ssize_t il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
-                                  size_t count, loff_t *ppos);
-ssize_t il4965_ucode_general_stats_read(struct file *file,
-                                       char __user *user_buf, size_t count,
-                                       loff_t *ppos);
+extern const struct il_debugfs_ops il4965_debugfs_ops;
 #endif
 
 /****************************/
index 1c0d969e9cf7bff15e6d1ee2a0cbb360b9d6c856..cd8f27d18b1c8d5eea43b63b53d982b8e745e699 100644 (file)
@@ -1155,13 +1155,15 @@ struct il_power_mgr {
 };
 
 struct il_priv {
-
-       /* ieee device used by generic ieee processing code */
        struct ieee80211_hw *hw;
        struct ieee80211_channel *ieee_channels;
        struct ieee80211_rate *ieee_rates;
+
        struct il_cfg *cfg;
        const struct il_ops *ops;
+#ifdef CONFIG_IWLEGACY_DEBUGFS
+       const struct il_debugfs_ops *debugfs_ops;
+#endif
 
        /* temporary frame storage list */
        struct list_head free_frames;
@@ -1624,10 +1626,6 @@ struct il_lib_ops {
        /* temperature */
        struct il_temp_ops temp_ops;
 
-#ifdef CONFIG_IWLEGACY_DEBUGFS
-       struct il_debugfs_ops debugfs_ops;
-#endif
-
 };
 
 struct il_led_ops {
index bb7c95607a69636f5499d04bfdcfd2ea2341a806..5091db813d66d1548c39e22fd9f4d7bf8f683dc7 100644 (file)
@@ -901,7 +901,8 @@ il_dbgfs_ucode_rx_stats_read(struct file *file, char __user *user_buf,
                             size_t count, loff_t *ppos)
 {
        struct il_priv *il = file->private_data;
-       return il->ops->lib->debugfs_ops.rx_stats_read(file, user_buf, count, ppos);
+
+       return il->debugfs_ops->rx_stats_read(file, user_buf, count, ppos);
 }
 
 static ssize_t
@@ -909,7 +910,8 @@ il_dbgfs_ucode_tx_stats_read(struct file *file, char __user *user_buf,
                             size_t count, loff_t *ppos)
 {
        struct il_priv *il = file->private_data;
-       return il->ops->lib->debugfs_ops.tx_stats_read(file, user_buf, count, ppos);
+
+       return il->debugfs_ops->tx_stats_read(file, user_buf, count, ppos);
 }
 
 static ssize_t
@@ -917,7 +919,8 @@ il_dbgfs_ucode_general_stats_read(struct file *file, char __user *user_buf,
                                  size_t count, loff_t *ppos)
 {
        struct il_priv *il = file->private_data;
-       return il->ops->lib->debugfs_ops.general_stats_read(file, user_buf, count, ppos);
+
+       return il->debugfs_ops->general_stats_read(file, user_buf, count, ppos);
 }
 
 static ssize_t