iwlwifi: use S_IRUGO and S_IWUSR in module parameters
[safe/jmp/linux-2.6] / drivers / net / wireless / iwlwifi / iwl-debug.h
index 1555676..cbc6290 100644 (file)
@@ -30,6 +30,7 @@
 #define __iwl_debug_h__
 
 struct iwl_priv;
+extern u32 iwl_debug_level;
 
 #define IWL_ERR(p, f, a...) dev_err(&((p)->pci_dev->dev), f, ## a)
 #define IWL_WARN(p, f, a...) dev_warn(&((p)->pci_dev->dev), f, ## a)
@@ -45,7 +46,7 @@ do {                                                                  \
 #ifdef CONFIG_IWLWIFI_DEBUG
 #define IWL_DEBUG(__priv, level, fmt, args...)                         \
 do {                                                                   \
-       if (__priv->debug_level & (level))                              \
+       if (iwl_get_debug_level(__priv) & (level))                                      \
                dev_printk(KERN_ERR, &(__priv->hw->wiphy->dev),         \
                         "%c %s " fmt, in_interrupt() ? 'I' : 'U',      \
                        __func__ , ## args);                            \
@@ -53,7 +54,7 @@ do {                                                                  \
 
 #define IWL_DEBUG_LIMIT(__priv, level, fmt, args...)                   \
 do {                                                                   \
-       if ((__priv->debug_level & (level)) && net_ratelimit())         \
+       if ((iwl_get_debug_level(__priv) & (level)) && net_ratelimit())         \
                dev_printk(KERN_ERR, &(__priv->hw->wiphy->dev),         \
                        "%c %s " fmt, in_interrupt() ? 'I' : 'U',       \
                         __func__ , ## args);                           \
@@ -61,7 +62,7 @@ do {                                                                  \
 
 #define iwl_print_hex_dump(priv, level, p, len)                        \
 do {                                                                   \
-       if (priv->debug_level & level)                                  \
+       if (iwl_get_debug_level(priv) & level)                          \
                print_hex_dump(KERN_DEBUG, "iwl data: ",                \
                               DUMP_PREFIX_OFFSET, 16, 1, p, len, 1);   \
 } while (0)
@@ -71,24 +72,43 @@ struct iwl_debugfs {
        const char *name;
        struct dentry *dir_drv;
        struct dentry *dir_data;
+       struct dentry *dir_debug;
        struct dentry *dir_rf;
        struct dir_data_files {
                struct dentry *file_sram;
                struct dentry *file_nvm;
                struct dentry *file_stations;
-               struct dentry *file_rx_statistics;
-               struct dentry *file_tx_statistics;
                struct dentry *file_log_event;
                struct dentry *file_channels;
                struct dentry *file_status;
                struct dentry *file_interrupt;
                struct dentry *file_qos;
+               struct dentry *file_thermal_throttling;
+#ifdef CONFIG_IWLWIFI_LEDS
+               struct dentry *file_led;
+#endif
+               struct dentry *file_disable_ht40;
+               struct dentry *file_sleep_level_override;
+               struct dentry *file_current_sleep_command;
        } dbgfs_data_files;
        struct dir_rf_files {
                struct dentry *file_disable_sensitivity;
                struct dentry *file_disable_chain_noise;
                struct dentry *file_disable_tx_power;
        } dbgfs_rf_files;
+       struct dir_debug_files {
+               struct dentry *file_rx_statistics;
+               struct dentry *file_tx_statistics;
+               struct dentry *file_traffic_log;
+               struct dentry *file_rx_queue;
+               struct dentry *file_tx_queue;
+               struct dentry *file_ucode_rx_stats;
+               struct dentry *file_ucode_tx_stats;
+               struct dentry *file_ucode_general_stats;
+               struct dentry *file_sensitivity;
+               struct dentry *file_chain_noise;
+               struct dentry *file_tx_power;
+       } dbgfs_debug_files;
        u32 sram_offset;
        u32 sram_len;
 };