diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-11-20 15:04:58 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-23 17:05:33 -0500 |
commit | 43e851157adb966dd633e983b24040f72877737e (patch) | |
tree | 4d81aeaf7c738e5487ac40d15199ab2b39cc56ff /drivers/net/wireless/iwlwifi | |
parent | bc6c94f609d2f63347d4a05f28993792ae38caad (diff) |
iwlwifi: set read/write permission for debugfs files
Set the correct Read/Write file permission for iwlwifi debugfs files
based on the functionality of the files
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 58 |
2 files changed, 33 insertions, 33 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 2f09e3b7f0eb..fe511cbf012e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -2964,16 +2964,16 @@ static void rs_add_debugfs(void *priv, void *priv_sta, | |||
2964 | { | 2964 | { |
2965 | struct iwl_lq_sta *lq_sta = priv_sta; | 2965 | struct iwl_lq_sta *lq_sta = priv_sta; |
2966 | lq_sta->rs_sta_dbgfs_scale_table_file = | 2966 | lq_sta->rs_sta_dbgfs_scale_table_file = |
2967 | debugfs_create_file("rate_scale_table", 0600, dir, | 2967 | debugfs_create_file("rate_scale_table", S_IRUSR | S_IWUSR, dir, |
2968 | lq_sta, &rs_sta_dbgfs_scale_table_ops); | 2968 | lq_sta, &rs_sta_dbgfs_scale_table_ops); |
2969 | lq_sta->rs_sta_dbgfs_stats_table_file = | 2969 | lq_sta->rs_sta_dbgfs_stats_table_file = |
2970 | debugfs_create_file("rate_stats_table", 0600, dir, | 2970 | debugfs_create_file("rate_stats_table", S_IRUSR, dir, |
2971 | lq_sta, &rs_sta_dbgfs_stats_table_ops); | 2971 | lq_sta, &rs_sta_dbgfs_stats_table_ops); |
2972 | lq_sta->rs_sta_dbgfs_rate_scale_data_file = | 2972 | lq_sta->rs_sta_dbgfs_rate_scale_data_file = |
2973 | debugfs_create_file("rate_scale_data", 0600, dir, | 2973 | debugfs_create_file("rate_scale_data", S_IRUSR, dir, |
2974 | lq_sta, &rs_sta_dbgfs_rate_scale_data_ops); | 2974 | lq_sta, &rs_sta_dbgfs_rate_scale_data_ops); |
2975 | lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file = | 2975 | lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file = |
2976 | debugfs_create_u8("tx_agg_tid_enable", 0600, dir, | 2976 | debugfs_create_u8("tx_agg_tid_enable", S_IRUSR | S_IWUSR, dir, |
2977 | &lq_sta->tx_agg_tid_en); | 2977 | &lq_sta->tx_agg_tid_en); |
2978 | 2978 | ||
2979 | } | 2979 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index b8f9edc3d998..e6194c8e7f72 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -47,9 +47,9 @@ | |||
47 | goto err; \ | 47 | goto err; \ |
48 | } while (0) | 48 | } while (0) |
49 | 49 | ||
50 | #define DEBUGFS_ADD_FILE(name, parent) do { \ | 50 | #define DEBUGFS_ADD_FILE(name, parent, mode) do { \ |
51 | dbgfs->dbgfs_##parent##_files.file_##name = \ | 51 | dbgfs->dbgfs_##parent##_files.file_##name = \ |
52 | debugfs_create_file(#name, S_IWUSR | S_IRUSR, \ | 52 | debugfs_create_file(#name, mode, \ |
53 | dbgfs->dir_##parent, priv, \ | 53 | dbgfs->dir_##parent, priv, \ |
54 | &iwl_dbgfs_##name##_ops); \ | 54 | &iwl_dbgfs_##name##_ops); \ |
55 | if (!(dbgfs->dbgfs_##parent##_files.file_##name)) \ | 55 | if (!(dbgfs->dbgfs_##parent##_files.file_##name)) \ |
@@ -1868,34 +1868,34 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
1868 | DEBUGFS_ADD_DIR(data, dbgfs->dir_drv); | 1868 | DEBUGFS_ADD_DIR(data, dbgfs->dir_drv); |
1869 | DEBUGFS_ADD_DIR(rf, dbgfs->dir_drv); | 1869 | DEBUGFS_ADD_DIR(rf, dbgfs->dir_drv); |
1870 | DEBUGFS_ADD_DIR(debug, dbgfs->dir_drv); | 1870 | DEBUGFS_ADD_DIR(debug, dbgfs->dir_drv); |
1871 | DEBUGFS_ADD_FILE(nvm, data); | 1871 | DEBUGFS_ADD_FILE(nvm, data, S_IRUSR); |
1872 | DEBUGFS_ADD_FILE(sram, data); | 1872 | DEBUGFS_ADD_FILE(sram, data, S_IWUSR | S_IRUSR); |
1873 | DEBUGFS_ADD_FILE(log_event, data); | 1873 | DEBUGFS_ADD_FILE(log_event, data, S_IWUSR); |
1874 | DEBUGFS_ADD_FILE(stations, data); | 1874 | DEBUGFS_ADD_FILE(stations, data, S_IRUSR); |
1875 | DEBUGFS_ADD_FILE(channels, data); | 1875 | DEBUGFS_ADD_FILE(channels, data, S_IRUSR); |
1876 | DEBUGFS_ADD_FILE(status, data); | 1876 | DEBUGFS_ADD_FILE(status, data, S_IRUSR); |
1877 | DEBUGFS_ADD_FILE(interrupt, data); | 1877 | DEBUGFS_ADD_FILE(interrupt, data, S_IWUSR | S_IRUSR); |
1878 | DEBUGFS_ADD_FILE(qos, data); | 1878 | DEBUGFS_ADD_FILE(qos, data, S_IRUSR); |
1879 | DEBUGFS_ADD_FILE(led, data); | 1879 | DEBUGFS_ADD_FILE(led, data, S_IRUSR); |
1880 | DEBUGFS_ADD_FILE(sleep_level_override, data); | 1880 | DEBUGFS_ADD_FILE(sleep_level_override, data, S_IWUSR | S_IRUSR); |
1881 | DEBUGFS_ADD_FILE(current_sleep_command, data); | 1881 | DEBUGFS_ADD_FILE(current_sleep_command, data, S_IRUSR); |
1882 | DEBUGFS_ADD_FILE(thermal_throttling, data); | 1882 | DEBUGFS_ADD_FILE(thermal_throttling, data, S_IRUSR); |
1883 | DEBUGFS_ADD_FILE(disable_ht40, data); | 1883 | DEBUGFS_ADD_FILE(disable_ht40, data, S_IWUSR | S_IRUSR); |
1884 | DEBUGFS_ADD_FILE(rx_statistics, debug); | 1884 | DEBUGFS_ADD_FILE(rx_statistics, debug, S_IRUSR); |
1885 | DEBUGFS_ADD_FILE(tx_statistics, debug); | 1885 | DEBUGFS_ADD_FILE(tx_statistics, debug, S_IRUSR); |
1886 | DEBUGFS_ADD_FILE(traffic_log, debug); | 1886 | DEBUGFS_ADD_FILE(traffic_log, debug, S_IWUSR | S_IRUSR); |
1887 | DEBUGFS_ADD_FILE(rx_queue, debug); | 1887 | DEBUGFS_ADD_FILE(rx_queue, debug, S_IRUSR); |
1888 | DEBUGFS_ADD_FILE(tx_queue, debug); | 1888 | DEBUGFS_ADD_FILE(tx_queue, debug, S_IRUSR); |
1889 | DEBUGFS_ADD_FILE(tx_power, debug); | 1889 | DEBUGFS_ADD_FILE(tx_power, debug, S_IRUSR); |
1890 | DEBUGFS_ADD_FILE(power_save_status, debug); | 1890 | DEBUGFS_ADD_FILE(power_save_status, debug, S_IRUSR); |
1891 | DEBUGFS_ADD_FILE(clear_ucode_statistics, debug); | 1891 | DEBUGFS_ADD_FILE(clear_ucode_statistics, debug, S_IWUSR); |
1892 | DEBUGFS_ADD_FILE(clear_traffic_statistics, debug); | 1892 | DEBUGFS_ADD_FILE(clear_traffic_statistics, debug, S_IWUSR); |
1893 | if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) != CSR_HW_REV_TYPE_3945) { | 1893 | if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) != CSR_HW_REV_TYPE_3945) { |
1894 | DEBUGFS_ADD_FILE(ucode_rx_stats, debug); | 1894 | DEBUGFS_ADD_FILE(ucode_rx_stats, debug, S_IRUSR); |
1895 | DEBUGFS_ADD_FILE(ucode_tx_stats, debug); | 1895 | DEBUGFS_ADD_FILE(ucode_tx_stats, debug, S_IRUSR); |
1896 | DEBUGFS_ADD_FILE(ucode_general_stats, debug); | 1896 | DEBUGFS_ADD_FILE(ucode_general_stats, debug, S_IRUSR); |
1897 | DEBUGFS_ADD_FILE(sensitivity, debug); | 1897 | DEBUGFS_ADD_FILE(sensitivity, debug, S_IRUSR); |
1898 | DEBUGFS_ADD_FILE(chain_noise, debug); | 1898 | DEBUGFS_ADD_FILE(chain_noise, debug, S_IRUSR); |
1899 | } | 1899 | } |
1900 | DEBUGFS_ADD_BOOL(disable_sensitivity, rf, &priv->disable_sens_cal); | 1900 | DEBUGFS_ADD_BOOL(disable_sensitivity, rf, &priv->disable_sens_cal); |
1901 | DEBUGFS_ADD_BOOL(disable_chain_noise, rf, | 1901 | DEBUGFS_ADD_BOOL(disable_chain_noise, rf, |