diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index ad25806dfaf1..f7ec2009cdf9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -55,6 +55,13 @@ | |||
55 | goto err; \ | 55 | goto err; \ |
56 | } while (0) | 56 | } while (0) |
57 | 57 | ||
58 | #define DEBUGFS_ADD_BOOL(name, parent, ptr) do { \ | ||
59 | dbgfs->dbgfs_##parent##_files.file_##name = \ | ||
60 | debugfs_create_bool(#name, 0644, dbgfs->dir_##parent, ptr); \ | ||
61 | if (IS_ERR(dbgfs->dbgfs_##parent##_files.file_##name)) \ | ||
62 | goto err; \ | ||
63 | } while (0) | ||
64 | |||
58 | #define DEBUGFS_REMOVE(name) do { \ | 65 | #define DEBUGFS_REMOVE(name) do { \ |
59 | debugfs_remove(name); \ | 66 | debugfs_remove(name); \ |
60 | name = NULL; \ | 67 | name = NULL; \ |
@@ -344,12 +351,17 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
344 | } | 351 | } |
345 | 352 | ||
346 | DEBUGFS_ADD_DIR(data, dbgfs->dir_drv); | 353 | DEBUGFS_ADD_DIR(data, dbgfs->dir_drv); |
354 | DEBUGFS_ADD_DIR(rf, dbgfs->dir_drv); | ||
347 | DEBUGFS_ADD_FILE(eeprom, data); | 355 | DEBUGFS_ADD_FILE(eeprom, data); |
348 | DEBUGFS_ADD_FILE(sram, data); | 356 | DEBUGFS_ADD_FILE(sram, data); |
349 | DEBUGFS_ADD_FILE(stations, data); | 357 | DEBUGFS_ADD_FILE(stations, data); |
350 | DEBUGFS_ADD_FILE(rx_statistics, data); | 358 | DEBUGFS_ADD_FILE(rx_statistics, data); |
351 | DEBUGFS_ADD_FILE(tx_statistics, data); | 359 | DEBUGFS_ADD_FILE(tx_statistics, data); |
352 | 360 | #ifdef CONFIG_IWLWIFI_RUN_TIME_CALIB | |
361 | DEBUGFS_ADD_BOOL(disable_sensitivity, rf, &priv->disable_sens_cal); | ||
362 | DEBUGFS_ADD_BOOL(disable_chain_noise, rf, | ||
363 | &priv->disable_chain_noise_cal); | ||
364 | #endif /* CONFIG_IWLWIFI_RUN_TIME_CALIB */ | ||
353 | return 0; | 365 | return 0; |
354 | 366 | ||
355 | err: | 367 | err: |
@@ -374,6 +386,11 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv) | |||
374 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_sram); | 386 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_sram); |
375 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_stations); | 387 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_stations); |
376 | DEBUGFS_REMOVE(priv->dbgfs->dir_data); | 388 | DEBUGFS_REMOVE(priv->dbgfs->dir_data); |
389 | #ifdef CONFIG_IWLWIFI_RUN_TIME_CALIB | ||
390 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_sensitivity); | ||
391 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_chain_noise); | ||
392 | #endif /* CONFIG_IWLWIFI_RUN_TIME_CALIB */ | ||
393 | DEBUGFS_REMOVE(priv->dbgfs->dir_rf); | ||
377 | DEBUGFS_REMOVE(priv->dbgfs->dir_drv); | 394 | DEBUGFS_REMOVE(priv->dbgfs->dir_drv); |
378 | kfree(priv->dbgfs); | 395 | kfree(priv->dbgfs); |
379 | priv->dbgfs = NULL; | 396 | priv->dbgfs = NULL; |
@@ -381,3 +398,4 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv) | |||
381 | EXPORT_SYMBOL(iwl_dbgfs_unregister); | 398 | EXPORT_SYMBOL(iwl_dbgfs_unregister); |
382 | 399 | ||
383 | 400 | ||
401 | |||