aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2018-03-23 18:54:37 -0400
committerKalle Valo <kvalo@codeaurora.org>2018-03-27 04:01:13 -0400
commit2ef00c53049b6a8758d118188992da01d75f3628 (patch)
treef7eb61964d5504c7d5c8bc7f675fd1fe810eb7f9
parent255dd5b79d5474dad3ecebe99be7818684921abd (diff)
wireless: Use octal not symbolic permissions
Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c6
-rw-r--r--drivers/net/wireless/ath/ath5k/debug.c37
-rw-r--r--drivers/net/wireless/ath/ath5k/sysfs.c8
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.c43
-rw-r--r--drivers/net/wireless/ath/ath9k/common-debug.c9
-rw-r--r--drivers/net/wireless/ath/ath9k/common-spectral.c10
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c40
-rw-r--r--drivers/net/wireless/ath/ath9k/debug_sta.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/dfs_debug.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_debug.c16
-rw-r--r--drivers/net/wireless/ath/ath9k/tx99.c4
-rw-r--r--drivers/net/wireless/ath/carl9170/debug.c8
-rw-r--r--drivers/net/wireless/ath/carl9170/main.c4
-rw-r--r--drivers/net/wireless/ath/wcn36xx/debug.c5
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c6
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c2
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c2
-rw-r--r--drivers/net/wireless/cisco/airo.c6
-rw-r--r--drivers/net/wireless/intel/ipw2x00/ipw2100.c29
-rw-r--r--drivers/net/wireless/intel/ipw2x00/ipw2200.c51
-rw-r--r--drivers/net/wireless/intel/ipw2x00/libipw_module.c2
-rw-r--r--drivers/net/wireless/intel/iwlegacy/3945-mac.c35
-rw-r--r--drivers/net/wireless/intel/iwlegacy/4965-mac.c19
-rw-r--r--drivers/net/wireless/intel/iwlegacy/4965-rs.c8
-rw-r--r--drivers/net/wireless/intel/iwlegacy/common.c4
-rw-r--r--drivers/net/wireless/intel/iwlegacy/debug.c58
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c78
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/rs.c16
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/debugfs.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-drv.c43
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c40
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c110
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rs.c12
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/trans.c12
-rw-r--r--drivers/net/wireless/intersil/p54/main.c2
-rw-r--r--drivers/net/wireless/mediatek/mt76/debugfs.c10
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x2_debugfs.c8
-rw-r--r--drivers/net/wireless/mediatek/mt7601u/debugfs.c16
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2500usb.c2
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2800pci.c2
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2800soc.c2
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2800usb.c2
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2x00debug.c64
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt61pci.c2
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt73usb.c2
-rw-r--r--drivers/net/wireless/ray_cs.c8
-rw-r--r--drivers/net/wireless/st/cw1200/debug.c6
-rw-r--r--drivers/net/wireless/st/cw1200/main.c2
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c27
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c8
-rw-r--r--drivers/net/wireless/ti/wlcore/sdio.c2
-rw-r--r--drivers/net/wireless/ti/wlcore/sysfs.c7
53 files changed, 427 insertions, 486 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 527afcf39246..a2351ef45ae0 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -73,16 +73,16 @@
73#include "trace.h" 73#include "trace.h"
74 74
75bool ath5k_modparam_nohwcrypt; 75bool ath5k_modparam_nohwcrypt;
76module_param_named(nohwcrypt, ath5k_modparam_nohwcrypt, bool, S_IRUGO); 76module_param_named(nohwcrypt, ath5k_modparam_nohwcrypt, bool, 0444);
77MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); 77MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
78 78
79static bool modparam_fastchanswitch; 79static bool modparam_fastchanswitch;
80module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO); 80module_param_named(fastchanswitch, modparam_fastchanswitch, bool, 0444);
81MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios."); 81MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios.");
82 82
83static bool ath5k_modparam_no_hw_rfkill_switch; 83static bool ath5k_modparam_no_hw_rfkill_switch;
84module_param_named(no_hw_rfkill_switch, ath5k_modparam_no_hw_rfkill_switch, 84module_param_named(no_hw_rfkill_switch, ath5k_modparam_no_hw_rfkill_switch,
85 bool, S_IRUGO); 85 bool, 0444);
86MODULE_PARM_DESC(no_hw_rfkill_switch, "Ignore the GPIO RFKill switch state"); 86MODULE_PARM_DESC(no_hw_rfkill_switch, "Ignore the GPIO RFKill switch state");
87 87
88 88
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index bd7f6d7b199e..3513bbec4639 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -1004,32 +1004,17 @@ ath5k_debug_init_device(struct ath5k_hw *ah)
1004 if (!phydir) 1004 if (!phydir)
1005 return; 1005 return;
1006 1006
1007 debugfs_create_file("debug", S_IWUSR | S_IRUSR, phydir, ah, 1007 debugfs_create_file("debug", 0600, phydir, ah, &fops_debug);
1008 &fops_debug); 1008 debugfs_create_file("registers", 0400, phydir, ah, &fops_registers);
1009 1009 debugfs_create_file("beacon", 0600, phydir, ah, &fops_beacon);
1010 debugfs_create_file("registers", S_IRUSR, phydir, ah, &fops_registers); 1010 debugfs_create_file("reset", 0200, phydir, ah, &fops_reset);
1011 1011 debugfs_create_file("antenna", 0600, phydir, ah, &fops_antenna);
1012 debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah, 1012 debugfs_create_file("misc", 0400, phydir, ah, &fops_misc);
1013 &fops_beacon); 1013 debugfs_create_file("eeprom", 0400, phydir, ah, &fops_eeprom);
1014 1014 debugfs_create_file("frameerrors", 0600, phydir, ah, &fops_frameerrors);
1015 debugfs_create_file("reset", S_IWUSR, phydir, ah, &fops_reset); 1015 debugfs_create_file("ani", 0600, phydir, ah, &fops_ani);
1016 1016 debugfs_create_file("queue", 0600, phydir, ah, &fops_queue);
1017 debugfs_create_file("antenna", S_IWUSR | S_IRUSR, phydir, ah, 1017 debugfs_create_bool("32khz_clock", 0600, phydir,
1018 &fops_antenna);
1019
1020 debugfs_create_file("misc", S_IRUSR, phydir, ah, &fops_misc);
1021
1022 debugfs_create_file("eeprom", S_IRUSR, phydir, ah, &fops_eeprom);
1023
1024 debugfs_create_file("frameerrors", S_IWUSR | S_IRUSR, phydir, ah,
1025 &fops_frameerrors);
1026
1027 debugfs_create_file("ani", S_IWUSR | S_IRUSR, phydir, ah, &fops_ani);
1028
1029 debugfs_create_file("queue", S_IWUSR | S_IRUSR, phydir, ah,
1030 &fops_queue);
1031
1032 debugfs_create_bool("32khz_clock", S_IWUSR | S_IRUSR, phydir,
1033 &ah->ah_use_32khz_clock); 1018 &ah->ah_use_32khz_clock);
1034} 1019}
1035 1020
diff --git a/drivers/net/wireless/ath/ath5k/sysfs.c b/drivers/net/wireless/ath/ath5k/sysfs.c
index 25978c732fe1..8113baddd8fc 100644
--- a/drivers/net/wireless/ath/ath5k/sysfs.c
+++ b/drivers/net/wireless/ath/ath5k/sysfs.c
@@ -31,7 +31,7 @@ static ssize_t ath5k_attr_store_##name(struct device *dev, \
31 set(ah, val); \ 31 set(ah, val); \
32 return count; \ 32 return count; \
33} \ 33} \
34static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, \ 34static DEVICE_ATTR(name, 0644, \
35 ath5k_attr_show_##name, ath5k_attr_store_##name) 35 ath5k_attr_show_##name, ath5k_attr_store_##name)
36 36
37#define SIMPLE_SHOW(name, get) \ 37#define SIMPLE_SHOW(name, get) \
@@ -43,7 +43,7 @@ static ssize_t ath5k_attr_show_##name(struct device *dev, \
43 struct ath5k_hw *ah = hw->priv; \ 43 struct ath5k_hw *ah = hw->priv; \
44 return snprintf(buf, PAGE_SIZE, "%d\n", get); \ 44 return snprintf(buf, PAGE_SIZE, "%d\n", get); \
45} \ 45} \
46static DEVICE_ATTR(name, S_IRUGO, ath5k_attr_show_##name, NULL) 46static DEVICE_ATTR(name, 0444, ath5k_attr_show_##name, NULL)
47 47
48/*** ANI ***/ 48/*** ANI ***/
49 49
@@ -66,7 +66,7 @@ static ssize_t ath5k_attr_show_noise_immunity_level_max(struct device *dev,
66{ 66{
67 return snprintf(buf, PAGE_SIZE, "%d\n", ATH5K_ANI_MAX_NOISE_IMM_LVL); 67 return snprintf(buf, PAGE_SIZE, "%d\n", ATH5K_ANI_MAX_NOISE_IMM_LVL);
68} 68}
69static DEVICE_ATTR(noise_immunity_level_max, S_IRUGO, 69static DEVICE_ATTR(noise_immunity_level_max, 0444,
70 ath5k_attr_show_noise_immunity_level_max, NULL); 70 ath5k_attr_show_noise_immunity_level_max, NULL);
71 71
72static ssize_t ath5k_attr_show_firstep_level_max(struct device *dev, 72static ssize_t ath5k_attr_show_firstep_level_max(struct device *dev,
@@ -75,7 +75,7 @@ static ssize_t ath5k_attr_show_firstep_level_max(struct device *dev,
75{ 75{
76 return snprintf(buf, PAGE_SIZE, "%d\n", ATH5K_ANI_MAX_FIRSTEP_LVL); 76 return snprintf(buf, PAGE_SIZE, "%d\n", ATH5K_ANI_MAX_FIRSTEP_LVL);
77} 77}
78static DEVICE_ATTR(firstep_level_max, S_IRUGO, 78static DEVICE_ATTR(firstep_level_max, 0444,
79 ath5k_attr_show_firstep_level_max, NULL); 79 ath5k_attr_show_firstep_level_max, NULL);
80 80
81static struct attribute *ath5k_sysfs_entries_ani[] = { 81static struct attribute *ath5k_sysfs_entries_ani[] = {
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 1eea6c23976f..0f965e9f38a4 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1794,69 +1794,68 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)
1794 if (!ar->debugfs_phy) 1794 if (!ar->debugfs_phy)
1795 return -ENOMEM; 1795 return -ENOMEM;
1796 1796
1797 debugfs_create_file("tgt_stats", S_IRUSR, ar->debugfs_phy, ar, 1797 debugfs_create_file("tgt_stats", 0400, ar->debugfs_phy, ar,
1798 &fops_tgt_stats); 1798 &fops_tgt_stats);
1799 1799
1800 if (ar->hif_type == ATH6KL_HIF_TYPE_SDIO) 1800 if (ar->hif_type == ATH6KL_HIF_TYPE_SDIO)
1801 debugfs_create_file("credit_dist_stats", S_IRUSR, 1801 debugfs_create_file("credit_dist_stats", 0400,
1802 ar->debugfs_phy, ar, 1802 ar->debugfs_phy, ar,
1803 &fops_credit_dist_stats); 1803 &fops_credit_dist_stats);
1804 1804
1805 debugfs_create_file("endpoint_stats", S_IRUSR | S_IWUSR, 1805 debugfs_create_file("endpoint_stats", 0600,
1806 ar->debugfs_phy, ar, &fops_endpoint_stats); 1806 ar->debugfs_phy, ar, &fops_endpoint_stats);
1807 1807
1808 debugfs_create_file("fwlog", S_IRUSR, ar->debugfs_phy, ar, 1808 debugfs_create_file("fwlog", 0400, ar->debugfs_phy, ar, &fops_fwlog);
1809 &fops_fwlog);
1810 1809
1811 debugfs_create_file("fwlog_block", S_IRUSR, ar->debugfs_phy, ar, 1810 debugfs_create_file("fwlog_block", 0400, ar->debugfs_phy, ar,
1812 &fops_fwlog_block); 1811 &fops_fwlog_block);
1813 1812
1814 debugfs_create_file("fwlog_mask", S_IRUSR | S_IWUSR, ar->debugfs_phy, 1813 debugfs_create_file("fwlog_mask", 0600, ar->debugfs_phy,
1815 ar, &fops_fwlog_mask); 1814 ar, &fops_fwlog_mask);
1816 1815
1817 debugfs_create_file("reg_addr", S_IRUSR | S_IWUSR, ar->debugfs_phy, ar, 1816 debugfs_create_file("reg_addr", 0600, ar->debugfs_phy, ar,
1818 &fops_diag_reg_read); 1817 &fops_diag_reg_read);
1819 1818
1820 debugfs_create_file("reg_dump", S_IRUSR, ar->debugfs_phy, ar, 1819 debugfs_create_file("reg_dump", 0400, ar->debugfs_phy, ar,
1821 &fops_reg_dump); 1820 &fops_reg_dump);
1822 1821
1823 debugfs_create_file("lrssi_roam_threshold", S_IRUSR | S_IWUSR, 1822 debugfs_create_file("lrssi_roam_threshold", 0600,
1824 ar->debugfs_phy, ar, &fops_lrssi_roam_threshold); 1823 ar->debugfs_phy, ar, &fops_lrssi_roam_threshold);
1825 1824
1826 debugfs_create_file("reg_write", S_IRUSR | S_IWUSR, 1825 debugfs_create_file("reg_write", 0600,
1827 ar->debugfs_phy, ar, &fops_diag_reg_write); 1826 ar->debugfs_phy, ar, &fops_diag_reg_write);
1828 1827
1829 debugfs_create_file("war_stats", S_IRUSR, ar->debugfs_phy, ar, 1828 debugfs_create_file("war_stats", 0400, ar->debugfs_phy, ar,
1830 &fops_war_stats); 1829 &fops_war_stats);
1831 1830
1832 debugfs_create_file("roam_table", S_IRUSR, ar->debugfs_phy, ar, 1831 debugfs_create_file("roam_table", 0400, ar->debugfs_phy, ar,
1833 &fops_roam_table); 1832 &fops_roam_table);
1834 1833
1835 debugfs_create_file("force_roam", S_IWUSR, ar->debugfs_phy, ar, 1834 debugfs_create_file("force_roam", 0200, ar->debugfs_phy, ar,
1836 &fops_force_roam); 1835 &fops_force_roam);
1837 1836
1838 debugfs_create_file("roam_mode", S_IWUSR, ar->debugfs_phy, ar, 1837 debugfs_create_file("roam_mode", 0200, ar->debugfs_phy, ar,
1839 &fops_roam_mode); 1838 &fops_roam_mode);
1840 1839
1841 debugfs_create_file("keepalive", S_IRUSR | S_IWUSR, ar->debugfs_phy, ar, 1840 debugfs_create_file("keepalive", 0600, ar->debugfs_phy, ar,
1842 &fops_keepalive); 1841 &fops_keepalive);
1843 1842
1844 debugfs_create_file("disconnect_timeout", S_IRUSR | S_IWUSR, 1843 debugfs_create_file("disconnect_timeout", 0600,
1845 ar->debugfs_phy, ar, &fops_disconnect_timeout); 1844 ar->debugfs_phy, ar, &fops_disconnect_timeout);
1846 1845
1847 debugfs_create_file("create_qos", S_IWUSR, ar->debugfs_phy, ar, 1846 debugfs_create_file("create_qos", 0200, ar->debugfs_phy, ar,
1848 &fops_create_qos); 1847 &fops_create_qos);
1849 1848
1850 debugfs_create_file("delete_qos", S_IWUSR, ar->debugfs_phy, ar, 1849 debugfs_create_file("delete_qos", 0200, ar->debugfs_phy, ar,
1851 &fops_delete_qos); 1850 &fops_delete_qos);
1852 1851
1853 debugfs_create_file("bgscan_interval", S_IWUSR, 1852 debugfs_create_file("bgscan_interval", 0200,
1854 ar->debugfs_phy, ar, &fops_bgscan_int); 1853 ar->debugfs_phy, ar, &fops_bgscan_int);
1855 1854
1856 debugfs_create_file("listen_interval", S_IRUSR | S_IWUSR, 1855 debugfs_create_file("listen_interval", 0600,
1857 ar->debugfs_phy, ar, &fops_listen_int); 1856 ar->debugfs_phy, ar, &fops_listen_int);
1858 1857
1859 debugfs_create_file("power_params", S_IWUSR, ar->debugfs_phy, ar, 1858 debugfs_create_file("power_params", 0200, ar->debugfs_phy, ar,
1860 &fops_power_params); 1859 &fops_power_params);
1861 1860
1862 return 0; 1861 return 0;
diff --git a/drivers/net/wireless/ath/ath9k/common-debug.c b/drivers/net/wireless/ath/ath9k/common-debug.c
index 84afcf78151f..239429f10378 100644
--- a/drivers/net/wireless/ath/ath9k/common-debug.c
+++ b/drivers/net/wireless/ath/ath9k/common-debug.c
@@ -47,7 +47,7 @@ static const struct file_operations fops_modal_eeprom = {
47void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy, 47void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
48 struct ath_hw *ah) 48 struct ath_hw *ah)
49{ 49{
50 debugfs_create_file("modal_eeprom", S_IRUSR, debugfs_phy, ah, 50 debugfs_create_file("modal_eeprom", 0400, debugfs_phy, ah,
51 &fops_modal_eeprom); 51 &fops_modal_eeprom);
52} 52}
53EXPORT_SYMBOL(ath9k_cmn_debug_modal_eeprom); 53EXPORT_SYMBOL(ath9k_cmn_debug_modal_eeprom);
@@ -82,7 +82,7 @@ static const struct file_operations fops_base_eeprom = {
82void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy, 82void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
83 struct ath_hw *ah) 83 struct ath_hw *ah)
84{ 84{
85 debugfs_create_file("base_eeprom", S_IRUSR, debugfs_phy, ah, 85 debugfs_create_file("base_eeprom", 0400, debugfs_phy, ah,
86 &fops_base_eeprom); 86 &fops_base_eeprom);
87} 87}
88EXPORT_SYMBOL(ath9k_cmn_debug_base_eeprom); 88EXPORT_SYMBOL(ath9k_cmn_debug_base_eeprom);
@@ -178,8 +178,7 @@ static const struct file_operations fops_recv = {
178void ath9k_cmn_debug_recv(struct dentry *debugfs_phy, 178void ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
179 struct ath_rx_stats *rxstats) 179 struct ath_rx_stats *rxstats)
180{ 180{
181 debugfs_create_file("recv", S_IRUSR, debugfs_phy, rxstats, 181 debugfs_create_file("recv", 0400, debugfs_phy, rxstats, &fops_recv);
182 &fops_recv);
183} 182}
184EXPORT_SYMBOL(ath9k_cmn_debug_recv); 183EXPORT_SYMBOL(ath9k_cmn_debug_recv);
185 184
@@ -255,7 +254,7 @@ static const struct file_operations fops_phy_err = {
255void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy, 254void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
256 struct ath_rx_stats *rxstats) 255 struct ath_rx_stats *rxstats)
257{ 256{
258 debugfs_create_file("phy_err", S_IRUSR, debugfs_phy, rxstats, 257 debugfs_create_file("phy_err", 0400, debugfs_phy, rxstats,
259 &fops_phy_err); 258 &fops_phy_err);
260} 259}
261EXPORT_SYMBOL(ath9k_cmn_debug_phy_err); 260EXPORT_SYMBOL(ath9k_cmn_debug_phy_err);
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c
index a41bcbda1d9e..440e16e641e4 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -1098,23 +1098,23 @@ void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,
1098 return; 1098 return;
1099 1099
1100 debugfs_create_file("spectral_scan_ctl", 1100 debugfs_create_file("spectral_scan_ctl",
1101 S_IRUSR | S_IWUSR, 1101 0600,
1102 debugfs_phy, spec_priv, 1102 debugfs_phy, spec_priv,
1103 &fops_spec_scan_ctl); 1103 &fops_spec_scan_ctl);
1104 debugfs_create_file("spectral_short_repeat", 1104 debugfs_create_file("spectral_short_repeat",
1105 S_IRUSR | S_IWUSR, 1105 0600,
1106 debugfs_phy, spec_priv, 1106 debugfs_phy, spec_priv,
1107 &fops_spectral_short_repeat); 1107 &fops_spectral_short_repeat);
1108 debugfs_create_file("spectral_count", 1108 debugfs_create_file("spectral_count",
1109 S_IRUSR | S_IWUSR, 1109 0600,
1110 debugfs_phy, spec_priv, 1110 debugfs_phy, spec_priv,
1111 &fops_spectral_count); 1111 &fops_spectral_count);
1112 debugfs_create_file("spectral_period", 1112 debugfs_create_file("spectral_period",
1113 S_IRUSR | S_IWUSR, 1113 0600,
1114 debugfs_phy, spec_priv, 1114 debugfs_phy, spec_priv,
1115 &fops_spectral_period); 1115 &fops_spectral_period);
1116 debugfs_create_file("spectral_fft_period", 1116 debugfs_create_file("spectral_fft_period",
1117 S_IRUSR | S_IWUSR, 1117 0600,
1118 debugfs_phy, spec_priv, 1118 debugfs_phy, spec_priv,
1119 &fops_spectral_fft_period); 1119 &fops_spectral_fft_period);
1120} 1120}
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 9e8aed5c478c..f685843a2ff3 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1385,7 +1385,7 @@ int ath9k_init_debug(struct ath_hw *ah)
1385 return -ENOMEM; 1385 return -ENOMEM;
1386 1386
1387#ifdef CONFIG_ATH_DEBUG 1387#ifdef CONFIG_ATH_DEBUG
1388 debugfs_create_file("debug", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, 1388 debugfs_create_file("debug", 0600, sc->debug.debugfs_phy,
1389 sc, &fops_debug); 1389 sc, &fops_debug);
1390#endif 1390#endif
1391 1391
@@ -1409,22 +1409,22 @@ int ath9k_init_debug(struct ath_hw *ah)
1409 ath9k_cmn_debug_recv(sc->debug.debugfs_phy, &sc->debug.stats.rxstats); 1409 ath9k_cmn_debug_recv(sc->debug.debugfs_phy, &sc->debug.stats.rxstats);
1410 ath9k_cmn_debug_phy_err(sc->debug.debugfs_phy, &sc->debug.stats.rxstats); 1410 ath9k_cmn_debug_phy_err(sc->debug.debugfs_phy, &sc->debug.stats.rxstats);
1411 1411
1412 debugfs_create_u8("rx_chainmask", S_IRUSR, sc->debug.debugfs_phy, 1412 debugfs_create_u8("rx_chainmask", 0400, sc->debug.debugfs_phy,
1413 &ah->rxchainmask); 1413 &ah->rxchainmask);
1414 debugfs_create_u8("tx_chainmask", S_IRUSR, sc->debug.debugfs_phy, 1414 debugfs_create_u8("tx_chainmask", 0400, sc->debug.debugfs_phy,
1415 &ah->txchainmask); 1415 &ah->txchainmask);
1416 debugfs_create_file("ani", S_IRUSR | S_IWUSR, 1416 debugfs_create_file("ani", 0600,
1417 sc->debug.debugfs_phy, sc, &fops_ani); 1417 sc->debug.debugfs_phy, sc, &fops_ani);
1418 debugfs_create_bool("paprd", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, 1418 debugfs_create_bool("paprd", 0600, sc->debug.debugfs_phy,
1419 &sc->sc_ah->config.enable_paprd); 1419 &sc->sc_ah->config.enable_paprd);
1420 debugfs_create_file("regidx", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, 1420 debugfs_create_file("regidx", 0600, sc->debug.debugfs_phy,
1421 sc, &fops_regidx); 1421 sc, &fops_regidx);
1422 debugfs_create_file("regval", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, 1422 debugfs_create_file("regval", 0600, sc->debug.debugfs_phy,
1423 sc, &fops_regval); 1423 sc, &fops_regval);
1424 debugfs_create_bool("ignore_extcca", S_IRUSR | S_IWUSR, 1424 debugfs_create_bool("ignore_extcca", 0600,
1425 sc->debug.debugfs_phy, 1425 sc->debug.debugfs_phy,
1426 &ah->config.cwm_ignore_extcca); 1426 &ah->config.cwm_ignore_extcca);
1427 debugfs_create_file("regdump", S_IRUSR, sc->debug.debugfs_phy, sc, 1427 debugfs_create_file("regdump", 0400, sc->debug.debugfs_phy, sc,
1428 &fops_regdump); 1428 &fops_regdump);
1429 debugfs_create_devm_seqfile(sc->dev, "dump_nfcal", 1429 debugfs_create_devm_seqfile(sc->dev, "dump_nfcal",
1430 sc->debug.debugfs_phy, 1430 sc->debug.debugfs_phy,
@@ -1433,35 +1433,33 @@ int ath9k_init_debug(struct ath_hw *ah)
1433 ath9k_cmn_debug_base_eeprom(sc->debug.debugfs_phy, sc->sc_ah); 1433 ath9k_cmn_debug_base_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
1434 ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah); 1434 ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
1435 1435
1436 debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR, 1436 debugfs_create_u32("gpio_mask", 0600,
1437 sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask); 1437 sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask);
1438 debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR, 1438 debugfs_create_u32("gpio_val", 0600,
1439 sc->debug.debugfs_phy, &sc->sc_ah->gpio_val); 1439 sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);
1440 debugfs_create_file("antenna_diversity", S_IRUSR, 1440 debugfs_create_file("antenna_diversity", 0400,
1441 sc->debug.debugfs_phy, sc, &fops_antenna_diversity); 1441 sc->debug.debugfs_phy, sc, &fops_antenna_diversity);
1442#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT 1442#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
1443 debugfs_create_file("bt_ant_diversity", S_IRUSR | S_IWUSR, 1443 debugfs_create_file("bt_ant_diversity", 0600,
1444 sc->debug.debugfs_phy, sc, &fops_bt_ant_diversity); 1444 sc->debug.debugfs_phy, sc, &fops_bt_ant_diversity);
1445 debugfs_create_file("btcoex", S_IRUSR, sc->debug.debugfs_phy, sc, 1445 debugfs_create_file("btcoex", 0400, sc->debug.debugfs_phy, sc,
1446 &fops_btcoex); 1446 &fops_btcoex);
1447#endif 1447#endif
1448 1448
1449#ifdef CONFIG_ATH9K_WOW 1449#ifdef CONFIG_ATH9K_WOW
1450 debugfs_create_file("wow", S_IRUSR | S_IWUSR, 1450 debugfs_create_file("wow", 0600, sc->debug.debugfs_phy, sc, &fops_wow);
1451 sc->debug.debugfs_phy, sc, &fops_wow);
1452#endif 1451#endif
1453 1452
1454#ifdef CONFIG_ATH9K_DYNACK 1453#ifdef CONFIG_ATH9K_DYNACK
1455 debugfs_create_file("ack_to", S_IRUSR, sc->debug.debugfs_phy, 1454 debugfs_create_file("ack_to", 0400, sc->debug.debugfs_phy,
1456 sc, &fops_ackto); 1455 sc, &fops_ackto);
1457#endif 1456#endif
1458 debugfs_create_file("tpc", S_IRUSR | S_IWUSR, 1457 debugfs_create_file("tpc", 0600, sc->debug.debugfs_phy, sc, &fops_tpc);
1459 sc->debug.debugfs_phy, sc, &fops_tpc);
1460 1458
1461 debugfs_create_u16("airtime_flags", S_IRUSR | S_IWUSR, 1459 debugfs_create_u16("airtime_flags", 0600,
1462 sc->debug.debugfs_phy, &sc->airtime_flags); 1460 sc->debug.debugfs_phy, &sc->airtime_flags);
1463 1461
1464 debugfs_create_file("nf_override", S_IRUSR | S_IWUSR, 1462 debugfs_create_file("nf_override", 0600,
1465 sc->debug.debugfs_phy, sc, &fops_nf_override); 1463 sc->debug.debugfs_phy, sc, &fops_nf_override);
1466 1464
1467 return 0; 1465 return 0;
diff --git a/drivers/net/wireless/ath/ath9k/debug_sta.c b/drivers/net/wireless/ath/ath9k/debug_sta.c
index efc692ee67d4..a6f45f1bb5bb 100644
--- a/drivers/net/wireless/ath/ath9k/debug_sta.c
+++ b/drivers/net/wireless/ath/ath9k/debug_sta.c
@@ -302,7 +302,7 @@ void ath9k_sta_add_debugfs(struct ieee80211_hw *hw,
302{ 302{
303 struct ath_node *an = (struct ath_node *)sta->drv_priv; 303 struct ath_node *an = (struct ath_node *)sta->drv_priv;
304 304
305 debugfs_create_file("node_aggr", S_IRUGO, dir, an, &fops_node_aggr); 305 debugfs_create_file("node_aggr", 0444, dir, an, &fops_node_aggr);
306 debugfs_create_file("node_recv", S_IRUGO, dir, an, &fops_node_recv); 306 debugfs_create_file("node_recv", 0444, dir, an, &fops_node_recv);
307 debugfs_create_file("airtime", S_IRUGO, dir, an, &fops_airtime); 307 debugfs_create_file("airtime", 0444, dir, an, &fops_airtime);
308} 308}
diff --git a/drivers/net/wireless/ath/ath9k/dfs_debug.c b/drivers/net/wireless/ath/ath9k/dfs_debug.c
index 8824610c21fb..3251c9abe270 100644
--- a/drivers/net/wireless/ath/ath9k/dfs_debug.c
+++ b/drivers/net/wireless/ath/ath9k/dfs_debug.c
@@ -144,8 +144,8 @@ static const struct file_operations fops_dfs_stats = {
144 144
145void ath9k_dfs_init_debug(struct ath_softc *sc) 145void ath9k_dfs_init_debug(struct ath_softc *sc)
146{ 146{
147 debugfs_create_file("dfs_stats", S_IRUSR, 147 debugfs_create_file("dfs_stats", 0400,
148 sc->debug.debugfs_phy, sc, &fops_dfs_stats); 148 sc->debug.debugfs_phy, sc, &fops_dfs_stats);
149 debugfs_create_file("dfs_simulate_radar", S_IWUSR, 149 debugfs_create_file("dfs_simulate_radar", 0200,
150 sc->debug.debugfs_phy, sc, &fops_simulate_radar); 150 sc->debug.debugfs_phy, sc, &fops_simulate_radar);
151} 151}
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index dc79afd7e151..b3ed65e5c4da 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -496,25 +496,25 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
496 496
497 ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy); 497 ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy);
498 498
499 debugfs_create_file("tgt_int_stats", S_IRUSR, priv->debug.debugfs_phy, 499 debugfs_create_file("tgt_int_stats", 0400, priv->debug.debugfs_phy,
500 priv, &fops_tgt_int_stats); 500 priv, &fops_tgt_int_stats);
501 debugfs_create_file("tgt_tx_stats", S_IRUSR, priv->debug.debugfs_phy, 501 debugfs_create_file("tgt_tx_stats", 0400, priv->debug.debugfs_phy,
502 priv, &fops_tgt_tx_stats); 502 priv, &fops_tgt_tx_stats);
503 debugfs_create_file("tgt_rx_stats", S_IRUSR, priv->debug.debugfs_phy, 503 debugfs_create_file("tgt_rx_stats", 0400, priv->debug.debugfs_phy,
504 priv, &fops_tgt_rx_stats); 504 priv, &fops_tgt_rx_stats);
505 debugfs_create_file("xmit", S_IRUSR, priv->debug.debugfs_phy, 505 debugfs_create_file("xmit", 0400, priv->debug.debugfs_phy,
506 priv, &fops_xmit); 506 priv, &fops_xmit);
507 debugfs_create_file("skb_rx", S_IRUSR, priv->debug.debugfs_phy, 507 debugfs_create_file("skb_rx", 0400, priv->debug.debugfs_phy,
508 priv, &fops_skb_rx); 508 priv, &fops_skb_rx);
509 509
510 ath9k_cmn_debug_recv(priv->debug.debugfs_phy, &priv->debug.rx_stats); 510 ath9k_cmn_debug_recv(priv->debug.debugfs_phy, &priv->debug.rx_stats);
511 ath9k_cmn_debug_phy_err(priv->debug.debugfs_phy, &priv->debug.rx_stats); 511 ath9k_cmn_debug_phy_err(priv->debug.debugfs_phy, &priv->debug.rx_stats);
512 512
513 debugfs_create_file("slot", S_IRUSR, priv->debug.debugfs_phy, 513 debugfs_create_file("slot", 0400, priv->debug.debugfs_phy,
514 priv, &fops_slot); 514 priv, &fops_slot);
515 debugfs_create_file("queue", S_IRUSR, priv->debug.debugfs_phy, 515 debugfs_create_file("queue", 0400, priv->debug.debugfs_phy,
516 priv, &fops_queue); 516 priv, &fops_queue);
517 debugfs_create_file("debug", S_IRUSR | S_IWUSR, priv->debug.debugfs_phy, 517 debugfs_create_file("debug", 0600, priv->debug.debugfs_phy,
518 priv, &fops_debug); 518 priv, &fops_debug);
519 519
520 ath9k_cmn_debug_base_eeprom(priv->debug.debugfs_phy, priv->ah); 520 ath9k_cmn_debug_base_eeprom(priv->debug.debugfs_phy, priv->ah);
diff --git a/drivers/net/wireless/ath/ath9k/tx99.c b/drivers/net/wireless/ath/ath9k/tx99.c
index fe3a8263b224..ce50d8f5835e 100644
--- a/drivers/net/wireless/ath/ath9k/tx99.c
+++ b/drivers/net/wireless/ath/ath9k/tx99.c
@@ -278,10 +278,10 @@ void ath9k_tx99_init_debug(struct ath_softc *sc)
278 if (!AR_SREV_9280_20_OR_LATER(sc->sc_ah)) 278 if (!AR_SREV_9280_20_OR_LATER(sc->sc_ah))
279 return; 279 return;
280 280
281 debugfs_create_file("tx99", S_IRUSR | S_IWUSR, 281 debugfs_create_file("tx99", 0600,
282 sc->debug.debugfs_phy, sc, 282 sc->debug.debugfs_phy, sc,
283 &fops_tx99); 283 &fops_tx99);
284 debugfs_create_file("tx99_power", S_IRUSR | S_IWUSR, 284 debugfs_create_file("tx99_power", 0600,
285 sc->debug.debugfs_phy, sc, 285 sc->debug.debugfs_phy, sc,
286 &fops_tx99_power); 286 &fops_tx99_power);
287} 287}
diff --git a/drivers/net/wireless/ath/carl9170/debug.c b/drivers/net/wireless/ath/carl9170/debug.c
index ec3a64e5d2bb..a9b6dc17e408 100644
--- a/drivers/net/wireless/ath/carl9170/debug.c
+++ b/drivers/net/wireless/ath/carl9170/debug.c
@@ -187,21 +187,21 @@ static const struct carl9170_debugfs_fops carl_debugfs_##name ##_ops = {\
187 187
188#define DEBUGFS_DECLARE_RO_FILE(name, _read_bufsize) \ 188#define DEBUGFS_DECLARE_RO_FILE(name, _read_bufsize) \
189 DEBUGFS_DECLARE_FILE(name, carl9170_debugfs_##name ##_read, \ 189 DEBUGFS_DECLARE_FILE(name, carl9170_debugfs_##name ##_read, \
190 NULL, _read_bufsize, S_IRUSR) 190 NULL, _read_bufsize, 0400)
191 191
192#define DEBUGFS_DECLARE_WO_FILE(name) \ 192#define DEBUGFS_DECLARE_WO_FILE(name) \
193 DEBUGFS_DECLARE_FILE(name, NULL, carl9170_debugfs_##name ##_write,\ 193 DEBUGFS_DECLARE_FILE(name, NULL, carl9170_debugfs_##name ##_write,\
194 0, S_IWUSR) 194 0, 0200)
195 195
196#define DEBUGFS_DECLARE_RW_FILE(name, _read_bufsize) \ 196#define DEBUGFS_DECLARE_RW_FILE(name, _read_bufsize) \
197 DEBUGFS_DECLARE_FILE(name, carl9170_debugfs_##name ##_read, \ 197 DEBUGFS_DECLARE_FILE(name, carl9170_debugfs_##name ##_read, \
198 carl9170_debugfs_##name ##_write, \ 198 carl9170_debugfs_##name ##_write, \
199 _read_bufsize, S_IRUSR | S_IWUSR) 199 _read_bufsize, 0600)
200 200
201#define __DEBUGFS_DECLARE_RW_FILE(name, _read_bufsize, _dstate) \ 201#define __DEBUGFS_DECLARE_RW_FILE(name, _read_bufsize, _dstate) \
202 __DEBUGFS_DECLARE_FILE(name, carl9170_debugfs_##name ##_read, \ 202 __DEBUGFS_DECLARE_FILE(name, carl9170_debugfs_##name ##_read, \
203 carl9170_debugfs_##name ##_write, \ 203 carl9170_debugfs_##name ##_write, \
204 _read_bufsize, S_IRUSR | S_IWUSR, _dstate) 204 _read_bufsize, 0600, _dstate)
205 205
206#define DEBUGFS_READONLY_FILE(name, _read_bufsize, fmt, value...) \ 206#define DEBUGFS_READONLY_FILE(name, _read_bufsize, fmt, value...) \
207static char *carl9170_debugfs_ ##name ## _read(struct ar9170 *ar, \ 207static char *carl9170_debugfs_ ##name ## _read(struct ar9170 *ar, \
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index 988c8857d78c..29e93c953d93 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -48,11 +48,11 @@
48#include "cmd.h" 48#include "cmd.h"
49 49
50static bool modparam_nohwcrypt; 50static bool modparam_nohwcrypt;
51module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); 51module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
52MODULE_PARM_DESC(nohwcrypt, "Disable hardware crypto offload."); 52MODULE_PARM_DESC(nohwcrypt, "Disable hardware crypto offload.");
53 53
54int modparam_noht; 54int modparam_noht;
55module_param_named(noht, modparam_noht, int, S_IRUGO); 55module_param_named(noht, modparam_noht, int, 0444);
56MODULE_PARM_DESC(noht, "Disable MPDU aggregation."); 56MODULE_PARM_DESC(noht, "Disable MPDU aggregation.");
57 57
58#define RATE(_bitrate, _hw_rate, _txpidx, _flags) { \ 58#define RATE(_bitrate, _hw_rate, _txpidx, _flags) { \
diff --git a/drivers/net/wireless/ath/wcn36xx/debug.c b/drivers/net/wireless/ath/wcn36xx/debug.c
index 2a6bb62e785c..389b5e7129a6 100644
--- a/drivers/net/wireless/ath/wcn36xx/debug.c
+++ b/drivers/net/wireless/ath/wcn36xx/debug.c
@@ -161,9 +161,8 @@ void wcn36xx_debugfs_init(struct wcn36xx *wcn)
161 dfs->rootdir = NULL; 161 dfs->rootdir = NULL;
162 } 162 }
163 163
164 ADD_FILE(bmps_switcher, S_IRUSR | S_IWUSR, 164 ADD_FILE(bmps_switcher, 0600, &fops_wcn36xx_bmps, wcn);
165 &fops_wcn36xx_bmps, wcn); 165 ADD_FILE(dump, 0200, &fops_wcn36xx_dump, wcn);
166 ADD_FILE(dump, S_IWUSR, &fops_wcn36xx_dump, wcn);
167} 166}
168 167
169void wcn36xx_debugfs_exit(struct wcn36xx *wcn) 168void wcn36xx_debugfs_exit(struct wcn36xx *wcn)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
index 70ef9835b647..74f7b56bc7d4 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
@@ -51,7 +51,7 @@ MODULE_PARM_DESC(txglomsz, "Maximum tx packet chain size [SDIO]");
51 51
52/* Debug level configuration. See debug.h for bits, sysfs modifiable */ 52/* Debug level configuration. See debug.h for bits, sysfs modifiable */
53int brcmf_msg_level; 53int brcmf_msg_level;
54module_param_named(debug, brcmf_msg_level, int, S_IRUSR | S_IWUSR); 54module_param_named(debug, brcmf_msg_level, int, 0600);
55MODULE_PARM_DESC(debug, "Level of debug output"); 55MODULE_PARM_DESC(debug, "Level of debug output");
56 56
57static int brcmf_p2p_enable; 57static int brcmf_p2p_enable;
@@ -64,7 +64,7 @@ MODULE_PARM_DESC(feature_disable, "Disable features");
64 64
65static char brcmf_firmware_path[BRCMF_FW_ALTPATH_LEN]; 65static char brcmf_firmware_path[BRCMF_FW_ALTPATH_LEN];
66module_param_string(alternative_fw_path, brcmf_firmware_path, 66module_param_string(alternative_fw_path, brcmf_firmware_path,
67 BRCMF_FW_ALTPATH_LEN, S_IRUSR); 67 BRCMF_FW_ALTPATH_LEN, 0400);
68MODULE_PARM_DESC(alternative_fw_path, "Alternative firmware path"); 68MODULE_PARM_DESC(alternative_fw_path, "Alternative firmware path");
69 69
70static int brcmf_fcmode; 70static int brcmf_fcmode;
@@ -72,7 +72,7 @@ module_param_named(fcmode, brcmf_fcmode, int, 0);
72MODULE_PARM_DESC(fcmode, "Mode of firmware signalled flow control"); 72MODULE_PARM_DESC(fcmode, "Mode of firmware signalled flow control");
73 73
74static int brcmf_roamoff; 74static int brcmf_roamoff;
75module_param_named(roamoff, brcmf_roamoff, int, S_IRUSR); 75module_param_named(roamoff, brcmf_roamoff, int, 0400);
76MODULE_PARM_DESC(roamoff, "Do not use internal roaming engine"); 76MODULE_PARM_DESC(roamoff, "Do not use internal roaming engine");
77 77
78#ifdef DEBUG 78#ifdef DEBUG
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c
index 7a1fbb2e3a71..2fe1f6863278 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c
@@ -214,7 +214,7 @@ brcms_debugfs_add_entry(struct brcms_pub *drvr, const char *fn,
214 entry->read = read_fn; 214 entry->read = read_fn;
215 entry->drvr = drvr; 215 entry->drvr = drvr;
216 216
217 dentry = debugfs_create_file(fn, S_IRUGO, dentry, entry, 217 dentry = debugfs_create_file(fn, 0444, dentry, entry,
218 &brcms_debugfs_def_ops); 218 &brcms_debugfs_def_ops);
219 219
220 return PTR_ERR_OR_ZERO(dentry); 220 return PTR_ERR_OR_ZERO(dentry);
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
index ddfdfe177e24..8e58f6800483 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
@@ -108,7 +108,7 @@ MODULE_DEVICE_TABLE(bcma, brcms_coreid_table);
108 * flags are specified by the BRCM_DL_* macros in 108 * flags are specified by the BRCM_DL_* macros in
109 * drivers/net/wireless/brcm80211/include/defs.h. 109 * drivers/net/wireless/brcm80211/include/defs.h.
110 */ 110 */
111module_param_named(debug, brcm_msg_level, uint, S_IRUGO | S_IWUSR); 111module_param_named(debug, brcm_msg_level, uint, 0644);
112#endif 112#endif
113 113
114static struct ieee80211_channel brcms_2ghz_chantable[] = { 114static struct ieee80211_channel brcms_2ghz_chantable[] = {
diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c
index 54201c02fdb8..ce0fbf83285f 100644
--- a/drivers/net/wireless/cisco/airo.c
+++ b/drivers/net/wireless/cisco/airo.c
@@ -4519,21 +4519,21 @@ static int setup_proc_entry( struct net_device *dev,
4519 proc_set_user(apriv->proc_entry, proc_kuid, proc_kgid); 4519 proc_set_user(apriv->proc_entry, proc_kuid, proc_kgid);
4520 4520
4521 /* Setup the StatsDelta */ 4521 /* Setup the StatsDelta */
4522 entry = proc_create_data("StatsDelta", S_IRUGO & proc_perm, 4522 entry = proc_create_data("StatsDelta", 0444 & proc_perm,
4523 apriv->proc_entry, &proc_statsdelta_ops, dev); 4523 apriv->proc_entry, &proc_statsdelta_ops, dev);
4524 if (!entry) 4524 if (!entry)
4525 goto fail; 4525 goto fail;
4526 proc_set_user(entry, proc_kuid, proc_kgid); 4526 proc_set_user(entry, proc_kuid, proc_kgid);
4527 4527
4528 /* Setup the Stats */ 4528 /* Setup the Stats */
4529 entry = proc_create_data("Stats", S_IRUGO & proc_perm, 4529 entry = proc_create_data("Stats", 0444 & proc_perm,
4530 apriv->proc_entry, &proc_stats_ops, dev); 4530 apriv->proc_entry, &proc_stats_ops, dev);
4531 if (!entry) 4531 if (!entry)
4532 goto fail; 4532 goto fail;
4533 proc_set_user(entry, proc_kuid, proc_kgid); 4533 proc_set_user(entry, proc_kuid, proc_kgid);
4534 4534
4535 /* Setup the Status */ 4535 /* Setup the Status */
4536 entry = proc_create_data("Status", S_IRUGO & proc_perm, 4536 entry = proc_create_data("Status", 0444 & proc_perm,
4537 apriv->proc_entry, &proc_status_ops, dev); 4537 apriv->proc_entry, &proc_status_ops, dev);
4538 if (!entry) 4538 if (!entry)
4539 goto fail; 4539 goto fail;
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index 19c442cb93e4..236b52423506 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -3538,7 +3538,7 @@ static ssize_t show_pci(struct device *d, struct device_attribute *attr,
3538 return out - buf; 3538 return out - buf;
3539} 3539}
3540 3540
3541static DEVICE_ATTR(pci, S_IRUGO, show_pci, NULL); 3541static DEVICE_ATTR(pci, 0444, show_pci, NULL);
3542 3542
3543static ssize_t show_cfg(struct device *d, struct device_attribute *attr, 3543static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
3544 char *buf) 3544 char *buf)
@@ -3547,7 +3547,7 @@ static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
3547 return sprintf(buf, "0x%08x\n", (int)p->config); 3547 return sprintf(buf, "0x%08x\n", (int)p->config);
3548} 3548}
3549 3549
3550static DEVICE_ATTR(cfg, S_IRUGO, show_cfg, NULL); 3550static DEVICE_ATTR(cfg, 0444, show_cfg, NULL);
3551 3551
3552static ssize_t show_status(struct device *d, struct device_attribute *attr, 3552static ssize_t show_status(struct device *d, struct device_attribute *attr,
3553 char *buf) 3553 char *buf)
@@ -3556,7 +3556,7 @@ static ssize_t show_status(struct device *d, struct device_attribute *attr,
3556 return sprintf(buf, "0x%08x\n", (int)p->status); 3556 return sprintf(buf, "0x%08x\n", (int)p->status);
3557} 3557}
3558 3558
3559static DEVICE_ATTR(status, S_IRUGO, show_status, NULL); 3559static DEVICE_ATTR(status, 0444, show_status, NULL);
3560 3560
3561static ssize_t show_capability(struct device *d, struct device_attribute *attr, 3561static ssize_t show_capability(struct device *d, struct device_attribute *attr,
3562 char *buf) 3562 char *buf)
@@ -3565,7 +3565,7 @@ static ssize_t show_capability(struct device *d, struct device_attribute *attr,
3565 return sprintf(buf, "0x%08x\n", (int)p->capability); 3565 return sprintf(buf, "0x%08x\n", (int)p->capability);
3566} 3566}
3567 3567
3568static DEVICE_ATTR(capability, S_IRUGO, show_capability, NULL); 3568static DEVICE_ATTR(capability, 0444, show_capability, NULL);
3569 3569
3570#define IPW2100_REG(x) { IPW_ ##x, #x } 3570#define IPW2100_REG(x) { IPW_ ##x, #x }
3571static const struct { 3571static const struct {
@@ -3822,7 +3822,7 @@ static ssize_t show_registers(struct device *d, struct device_attribute *attr,
3822 return out - buf; 3822 return out - buf;
3823} 3823}
3824 3824
3825static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL); 3825static DEVICE_ATTR(registers, 0444, show_registers, NULL);
3826 3826
3827static ssize_t show_hardware(struct device *d, struct device_attribute *attr, 3827static ssize_t show_hardware(struct device *d, struct device_attribute *attr,
3828 char *buf) 3828 char *buf)
@@ -3863,7 +3863,7 @@ static ssize_t show_hardware(struct device *d, struct device_attribute *attr,
3863 return out - buf; 3863 return out - buf;
3864} 3864}
3865 3865
3866static DEVICE_ATTR(hardware, S_IRUGO, show_hardware, NULL); 3866static DEVICE_ATTR(hardware, 0444, show_hardware, NULL);
3867 3867
3868static ssize_t show_memory(struct device *d, struct device_attribute *attr, 3868static ssize_t show_memory(struct device *d, struct device_attribute *attr,
3869 char *buf) 3869 char *buf)
@@ -3957,7 +3957,7 @@ static ssize_t store_memory(struct device *d, struct device_attribute *attr,
3957 return count; 3957 return count;
3958} 3958}
3959 3959
3960static DEVICE_ATTR(memory, S_IWUSR | S_IRUGO, show_memory, store_memory); 3960static DEVICE_ATTR(memory, 0644, show_memory, store_memory);
3961 3961
3962static ssize_t show_ordinals(struct device *d, struct device_attribute *attr, 3962static ssize_t show_ordinals(struct device *d, struct device_attribute *attr,
3963 char *buf) 3963 char *buf)
@@ -3993,7 +3993,7 @@ static ssize_t show_ordinals(struct device *d, struct device_attribute *attr,
3993 return len; 3993 return len;
3994} 3994}
3995 3995
3996static DEVICE_ATTR(ordinals, S_IRUGO, show_ordinals, NULL); 3996static DEVICE_ATTR(ordinals, 0444, show_ordinals, NULL);
3997 3997
3998static ssize_t show_stats(struct device *d, struct device_attribute *attr, 3998static ssize_t show_stats(struct device *d, struct device_attribute *attr,
3999 char *buf) 3999 char *buf)
@@ -4014,7 +4014,7 @@ static ssize_t show_stats(struct device *d, struct device_attribute *attr,
4014 return out - buf; 4014 return out - buf;
4015} 4015}
4016 4016
4017static DEVICE_ATTR(stats, S_IRUGO, show_stats, NULL); 4017static DEVICE_ATTR(stats, 0444, show_stats, NULL);
4018 4018
4019static int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode) 4019static int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode)
4020{ 4020{
@@ -4112,7 +4112,7 @@ static ssize_t show_internals(struct device *d, struct device_attribute *attr,
4112 return len; 4112 return len;
4113} 4113}
4114 4114
4115static DEVICE_ATTR(internals, S_IRUGO, show_internals, NULL); 4115static DEVICE_ATTR(internals, 0444, show_internals, NULL);
4116 4116
4117static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr, 4117static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
4118 char *buf) 4118 char *buf)
@@ -4157,7 +4157,7 @@ static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
4157 return out - buf; 4157 return out - buf;
4158} 4158}
4159 4159
4160static DEVICE_ATTR(bssinfo, S_IRUGO, show_bssinfo, NULL); 4160static DEVICE_ATTR(bssinfo, 0444, show_bssinfo, NULL);
4161 4161
4162#ifdef CONFIG_IPW2100_DEBUG 4162#ifdef CONFIG_IPW2100_DEBUG
4163static ssize_t debug_level_show(struct device_driver *d, char *buf) 4163static ssize_t debug_level_show(struct device_driver *d, char *buf)
@@ -4216,8 +4216,7 @@ static ssize_t store_fatal_error(struct device *d,
4216 return count; 4216 return count;
4217} 4217}
4218 4218
4219static DEVICE_ATTR(fatal_error, S_IWUSR | S_IRUGO, show_fatal_error, 4219static DEVICE_ATTR(fatal_error, 0644, show_fatal_error, store_fatal_error);
4220 store_fatal_error);
4221 4220
4222static ssize_t show_scan_age(struct device *d, struct device_attribute *attr, 4221static ssize_t show_scan_age(struct device *d, struct device_attribute *attr,
4223 char *buf) 4222 char *buf)
@@ -4250,7 +4249,7 @@ static ssize_t store_scan_age(struct device *d, struct device_attribute *attr,
4250 return strnlen(buf, count); 4249 return strnlen(buf, count);
4251} 4250}
4252 4251
4253static DEVICE_ATTR(scan_age, S_IWUSR | S_IRUGO, show_scan_age, store_scan_age); 4252static DEVICE_ATTR(scan_age, 0644, show_scan_age, store_scan_age);
4254 4253
4255static ssize_t show_rf_kill(struct device *d, struct device_attribute *attr, 4254static ssize_t show_rf_kill(struct device *d, struct device_attribute *attr,
4256 char *buf) 4255 char *buf)
@@ -4304,7 +4303,7 @@ static ssize_t store_rf_kill(struct device *d, struct device_attribute *attr,
4304 return count; 4303 return count;
4305} 4304}
4306 4305
4307static DEVICE_ATTR(rf_kill, S_IWUSR | S_IRUGO, show_rf_kill, store_rf_kill); 4306static DEVICE_ATTR(rf_kill, 0644, show_rf_kill, store_rf_kill);
4308 4307
4309static struct attribute *ipw2100_sysfs_entries[] = { 4308static struct attribute *ipw2100_sysfs_entries[] = {
4310 &dev_attr_hardware.attr, 4309 &dev_attr_hardware.attr,
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index 8da87496cb58..87a5e414c2f7 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -1303,7 +1303,7 @@ static ssize_t show_event_log(struct device *d,
1303 return len; 1303 return len;
1304} 1304}
1305 1305
1306static DEVICE_ATTR(event_log, S_IRUGO, show_event_log, NULL); 1306static DEVICE_ATTR(event_log, 0444, show_event_log, NULL);
1307 1307
1308static ssize_t show_error(struct device *d, 1308static ssize_t show_error(struct device *d,
1309 struct device_attribute *attr, char *buf) 1309 struct device_attribute *attr, char *buf)
@@ -1351,7 +1351,7 @@ static ssize_t clear_error(struct device *d,
1351 return count; 1351 return count;
1352} 1352}
1353 1353
1354static DEVICE_ATTR(error, S_IRUGO | S_IWUSR, show_error, clear_error); 1354static DEVICE_ATTR(error, 0644, show_error, clear_error);
1355 1355
1356static ssize_t show_cmd_log(struct device *d, 1356static ssize_t show_cmd_log(struct device *d,
1357 struct device_attribute *attr, char *buf) 1357 struct device_attribute *attr, char *buf)
@@ -1378,7 +1378,7 @@ static ssize_t show_cmd_log(struct device *d,
1378 return len; 1378 return len;
1379} 1379}
1380 1380
1381static DEVICE_ATTR(cmd_log, S_IRUGO, show_cmd_log, NULL); 1381static DEVICE_ATTR(cmd_log, 0444, show_cmd_log, NULL);
1382 1382
1383#ifdef CONFIG_IPW2200_PROMISCUOUS 1383#ifdef CONFIG_IPW2200_PROMISCUOUS
1384static void ipw_prom_free(struct ipw_priv *priv); 1384static void ipw_prom_free(struct ipw_priv *priv);
@@ -1443,8 +1443,7 @@ static ssize_t show_rtap_iface(struct device *d,
1443 } 1443 }
1444} 1444}
1445 1445
1446static DEVICE_ATTR(rtap_iface, S_IWUSR | S_IRUSR, show_rtap_iface, 1446static DEVICE_ATTR(rtap_iface, 0600, show_rtap_iface, store_rtap_iface);
1447 store_rtap_iface);
1448 1447
1449static ssize_t store_rtap_filter(struct device *d, 1448static ssize_t store_rtap_filter(struct device *d,
1450 struct device_attribute *attr, 1449 struct device_attribute *attr,
@@ -1475,8 +1474,7 @@ static ssize_t show_rtap_filter(struct device *d,
1475 priv->prom_priv ? priv->prom_priv->filter : 0); 1474 priv->prom_priv ? priv->prom_priv->filter : 0);
1476} 1475}
1477 1476
1478static DEVICE_ATTR(rtap_filter, S_IWUSR | S_IRUSR, show_rtap_filter, 1477static DEVICE_ATTR(rtap_filter, 0600, show_rtap_filter, store_rtap_filter);
1479 store_rtap_filter);
1480#endif 1478#endif
1481 1479
1482static ssize_t show_scan_age(struct device *d, struct device_attribute *attr, 1480static ssize_t show_scan_age(struct device *d, struct device_attribute *attr,
@@ -1520,7 +1518,7 @@ static ssize_t store_scan_age(struct device *d, struct device_attribute *attr,
1520 return len; 1518 return len;
1521} 1519}
1522 1520
1523static DEVICE_ATTR(scan_age, S_IWUSR | S_IRUGO, show_scan_age, store_scan_age); 1521static DEVICE_ATTR(scan_age, 0644, show_scan_age, store_scan_age);
1524 1522
1525static ssize_t show_led(struct device *d, struct device_attribute *attr, 1523static ssize_t show_led(struct device *d, struct device_attribute *attr,
1526 char *buf) 1524 char *buf)
@@ -1553,7 +1551,7 @@ static ssize_t store_led(struct device *d, struct device_attribute *attr,
1553 return count; 1551 return count;
1554} 1552}
1555 1553
1556static DEVICE_ATTR(led, S_IWUSR | S_IRUGO, show_led, store_led); 1554static DEVICE_ATTR(led, 0644, show_led, store_led);
1557 1555
1558static ssize_t show_status(struct device *d, 1556static ssize_t show_status(struct device *d,
1559 struct device_attribute *attr, char *buf) 1557 struct device_attribute *attr, char *buf)
@@ -1562,7 +1560,7 @@ static ssize_t show_status(struct device *d,
1562 return sprintf(buf, "0x%08x\n", (int)p->status); 1560 return sprintf(buf, "0x%08x\n", (int)p->status);
1563} 1561}
1564 1562
1565static DEVICE_ATTR(status, S_IRUGO, show_status, NULL); 1563static DEVICE_ATTR(status, 0444, show_status, NULL);
1566 1564
1567static ssize_t show_cfg(struct device *d, struct device_attribute *attr, 1565static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
1568 char *buf) 1566 char *buf)
@@ -1571,7 +1569,7 @@ static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
1571 return sprintf(buf, "0x%08x\n", (int)p->config); 1569 return sprintf(buf, "0x%08x\n", (int)p->config);
1572} 1570}
1573 1571
1574static DEVICE_ATTR(cfg, S_IRUGO, show_cfg, NULL); 1572static DEVICE_ATTR(cfg, 0444, show_cfg, NULL);
1575 1573
1576static ssize_t show_nic_type(struct device *d, 1574static ssize_t show_nic_type(struct device *d,
1577 struct device_attribute *attr, char *buf) 1575 struct device_attribute *attr, char *buf)
@@ -1580,7 +1578,7 @@ static ssize_t show_nic_type(struct device *d,
1580 return sprintf(buf, "TYPE: %d\n", priv->nic_type); 1578 return sprintf(buf, "TYPE: %d\n", priv->nic_type);
1581} 1579}
1582 1580
1583static DEVICE_ATTR(nic_type, S_IRUGO, show_nic_type, NULL); 1581static DEVICE_ATTR(nic_type, 0444, show_nic_type, NULL);
1584 1582
1585static ssize_t show_ucode_version(struct device *d, 1583static ssize_t show_ucode_version(struct device *d,
1586 struct device_attribute *attr, char *buf) 1584 struct device_attribute *attr, char *buf)
@@ -1594,7 +1592,7 @@ static ssize_t show_ucode_version(struct device *d,
1594 return sprintf(buf, "0x%08x\n", tmp); 1592 return sprintf(buf, "0x%08x\n", tmp);
1595} 1593}
1596 1594
1597static DEVICE_ATTR(ucode_version, S_IWUSR | S_IRUGO, show_ucode_version, NULL); 1595static DEVICE_ATTR(ucode_version, 0644, show_ucode_version, NULL);
1598 1596
1599static ssize_t show_rtc(struct device *d, struct device_attribute *attr, 1597static ssize_t show_rtc(struct device *d, struct device_attribute *attr,
1600 char *buf) 1598 char *buf)
@@ -1608,7 +1606,7 @@ static ssize_t show_rtc(struct device *d, struct device_attribute *attr,
1608 return sprintf(buf, "0x%08x\n", tmp); 1606 return sprintf(buf, "0x%08x\n", tmp);
1609} 1607}
1610 1608
1611static DEVICE_ATTR(rtc, S_IWUSR | S_IRUGO, show_rtc, NULL); 1609static DEVICE_ATTR(rtc, 0644, show_rtc, NULL);
1612 1610
1613/* 1611/*
1614 * Add a device attribute to view/control the delay between eeprom 1612 * Add a device attribute to view/control the delay between eeprom
@@ -1630,8 +1628,7 @@ static ssize_t store_eeprom_delay(struct device *d,
1630 return strnlen(buf, count); 1628 return strnlen(buf, count);
1631} 1629}
1632 1630
1633static DEVICE_ATTR(eeprom_delay, S_IWUSR | S_IRUGO, 1631static DEVICE_ATTR(eeprom_delay, 0644, show_eeprom_delay, store_eeprom_delay);
1634 show_eeprom_delay, store_eeprom_delay);
1635 1632
1636static ssize_t show_command_event_reg(struct device *d, 1633static ssize_t show_command_event_reg(struct device *d,
1637 struct device_attribute *attr, char *buf) 1634 struct device_attribute *attr, char *buf)
@@ -1654,7 +1651,7 @@ static ssize_t store_command_event_reg(struct device *d,
1654 return strnlen(buf, count); 1651 return strnlen(buf, count);
1655} 1652}
1656 1653
1657static DEVICE_ATTR(command_event_reg, S_IWUSR | S_IRUGO, 1654static DEVICE_ATTR(command_event_reg, 0644,
1658 show_command_event_reg, store_command_event_reg); 1655 show_command_event_reg, store_command_event_reg);
1659 1656
1660static ssize_t show_mem_gpio_reg(struct device *d, 1657static ssize_t show_mem_gpio_reg(struct device *d,
@@ -1678,8 +1675,7 @@ static ssize_t store_mem_gpio_reg(struct device *d,
1678 return strnlen(buf, count); 1675 return strnlen(buf, count);
1679} 1676}
1680 1677
1681static DEVICE_ATTR(mem_gpio_reg, S_IWUSR | S_IRUGO, 1678static DEVICE_ATTR(mem_gpio_reg, 0644, show_mem_gpio_reg, store_mem_gpio_reg);
1682 show_mem_gpio_reg, store_mem_gpio_reg);
1683 1679
1684static ssize_t show_indirect_dword(struct device *d, 1680static ssize_t show_indirect_dword(struct device *d,
1685 struct device_attribute *attr, char *buf) 1681 struct device_attribute *attr, char *buf)
@@ -1705,7 +1701,7 @@ static ssize_t store_indirect_dword(struct device *d,
1705 return strnlen(buf, count); 1701 return strnlen(buf, count);
1706} 1702}
1707 1703
1708static DEVICE_ATTR(indirect_dword, S_IWUSR | S_IRUGO, 1704static DEVICE_ATTR(indirect_dword, 0644,
1709 show_indirect_dword, store_indirect_dword); 1705 show_indirect_dword, store_indirect_dword);
1710 1706
1711static ssize_t show_indirect_byte(struct device *d, 1707static ssize_t show_indirect_byte(struct device *d,
@@ -1732,7 +1728,7 @@ static ssize_t store_indirect_byte(struct device *d,
1732 return strnlen(buf, count); 1728 return strnlen(buf, count);
1733} 1729}
1734 1730
1735static DEVICE_ATTR(indirect_byte, S_IWUSR | S_IRUGO, 1731static DEVICE_ATTR(indirect_byte, 0644,
1736 show_indirect_byte, store_indirect_byte); 1732 show_indirect_byte, store_indirect_byte);
1737 1733
1738static ssize_t show_direct_dword(struct device *d, 1734static ssize_t show_direct_dword(struct device *d,
@@ -1759,8 +1755,7 @@ static ssize_t store_direct_dword(struct device *d,
1759 return strnlen(buf, count); 1755 return strnlen(buf, count);
1760} 1756}
1761 1757
1762static DEVICE_ATTR(direct_dword, S_IWUSR | S_IRUGO, 1758static DEVICE_ATTR(direct_dword, 0644, show_direct_dword, store_direct_dword);
1763 show_direct_dword, store_direct_dword);
1764 1759
1765static int rf_kill_active(struct ipw_priv *priv) 1760static int rf_kill_active(struct ipw_priv *priv)
1766{ 1761{
@@ -1831,7 +1826,7 @@ static ssize_t store_rf_kill(struct device *d, struct device_attribute *attr,
1831 return count; 1826 return count;
1832} 1827}
1833 1828
1834static DEVICE_ATTR(rf_kill, S_IWUSR | S_IRUGO, show_rf_kill, store_rf_kill); 1829static DEVICE_ATTR(rf_kill, 0644, show_rf_kill, store_rf_kill);
1835 1830
1836static ssize_t show_speed_scan(struct device *d, struct device_attribute *attr, 1831static ssize_t show_speed_scan(struct device *d, struct device_attribute *attr,
1837 char *buf) 1832 char *buf)
@@ -1884,8 +1879,7 @@ static ssize_t store_speed_scan(struct device *d, struct device_attribute *attr,
1884 return count; 1879 return count;
1885} 1880}
1886 1881
1887static DEVICE_ATTR(speed_scan, S_IWUSR | S_IRUGO, show_speed_scan, 1882static DEVICE_ATTR(speed_scan, 0644, show_speed_scan, store_speed_scan);
1888 store_speed_scan);
1889 1883
1890static ssize_t show_net_stats(struct device *d, struct device_attribute *attr, 1884static ssize_t show_net_stats(struct device *d, struct device_attribute *attr,
1891 char *buf) 1885 char *buf)
@@ -1906,8 +1900,7 @@ static ssize_t store_net_stats(struct device *d, struct device_attribute *attr,
1906 return count; 1900 return count;
1907} 1901}
1908 1902
1909static DEVICE_ATTR(net_stats, S_IWUSR | S_IRUGO, 1903static DEVICE_ATTR(net_stats, 0644, show_net_stats, store_net_stats);
1910 show_net_stats, store_net_stats);
1911 1904
1912static ssize_t show_channels(struct device *d, 1905static ssize_t show_channels(struct device *d,
1913 struct device_attribute *attr, 1906 struct device_attribute *attr,
@@ -1953,7 +1946,7 @@ static ssize_t show_channels(struct device *d,
1953 return len; 1946 return len;
1954} 1947}
1955 1948
1956static DEVICE_ATTR(channels, S_IRUSR, show_channels, NULL); 1949static DEVICE_ATTR(channels, 0400, show_channels, NULL);
1957 1950
1958static void notify_wx_assoc_event(struct ipw_priv *priv) 1951static void notify_wx_assoc_event(struct ipw_priv *priv)
1959{ 1952{
diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_module.c b/drivers/net/wireless/intel/ipw2x00/libipw_module.c
index c58c5b2dcce5..f00d45f54c76 100644
--- a/drivers/net/wireless/intel/ipw2x00/libipw_module.c
+++ b/drivers/net/wireless/intel/ipw2x00/libipw_module.c
@@ -276,7 +276,7 @@ static int __init libipw_init(void)
276 " proc directory\n"); 276 " proc directory\n");
277 return -EIO; 277 return -EIO;
278 } 278 }
279 e = proc_create("debug_level", S_IRUGO | S_IWUSR, libipw_proc, 279 e = proc_create("debug_level", 0644, libipw_proc,
280 &debug_level_proc_fops); 280 &debug_level_proc_fops);
281 if (!e) { 281 if (!e) {
282 remove_proc_entry(DRV_PROCNAME, init_net.proc_net); 282 remove_proc_entry(DRV_PROCNAME, init_net.proc_net);
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
index 4b53ebf00c7f..62a9794f952b 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
@@ -3122,7 +3122,7 @@ il3945_store_debug_level(struct device *d, struct device_attribute *attr,
3122 return strnlen(buf, count); 3122 return strnlen(buf, count);
3123} 3123}
3124 3124
3125static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, il3945_show_debug_level, 3125static DEVICE_ATTR(debug_level, 0644, il3945_show_debug_level,
3126 il3945_store_debug_level); 3126 il3945_store_debug_level);
3127 3127
3128#endif /* CONFIG_IWLEGACY_DEBUG */ 3128#endif /* CONFIG_IWLEGACY_DEBUG */
@@ -3139,7 +3139,7 @@ il3945_show_temperature(struct device *d, struct device_attribute *attr,
3139 return sprintf(buf, "%d\n", il3945_hw_get_temperature(il)); 3139 return sprintf(buf, "%d\n", il3945_hw_get_temperature(il));
3140} 3140}
3141 3141
3142static DEVICE_ATTR(temperature, S_IRUGO, il3945_show_temperature, NULL); 3142static DEVICE_ATTR(temperature, 0444, il3945_show_temperature, NULL);
3143 3143
3144static ssize_t 3144static ssize_t
3145il3945_show_tx_power(struct device *d, struct device_attribute *attr, char *buf) 3145il3945_show_tx_power(struct device *d, struct device_attribute *attr, char *buf)
@@ -3165,8 +3165,7 @@ il3945_store_tx_power(struct device *d, struct device_attribute *attr,
3165 return count; 3165 return count;
3166} 3166}
3167 3167
3168static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, il3945_show_tx_power, 3168static DEVICE_ATTR(tx_power, 0644, il3945_show_tx_power, il3945_store_tx_power);
3169 il3945_store_tx_power);
3170 3169
3171static ssize_t 3170static ssize_t
3172il3945_show_flags(struct device *d, struct device_attribute *attr, char *buf) 3171il3945_show_flags(struct device *d, struct device_attribute *attr, char *buf)
@@ -3199,8 +3198,7 @@ il3945_store_flags(struct device *d, struct device_attribute *attr,
3199 return count; 3198 return count;
3200} 3199}
3201 3200
3202static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, il3945_show_flags, 3201static DEVICE_ATTR(flags, 0644, il3945_show_flags, il3945_store_flags);
3203 il3945_store_flags);
3204 3202
3205static ssize_t 3203static ssize_t
3206il3945_show_filter_flags(struct device *d, struct device_attribute *attr, 3204il3945_show_filter_flags(struct device *d, struct device_attribute *attr,
@@ -3235,7 +3233,7 @@ il3945_store_filter_flags(struct device *d, struct device_attribute *attr,
3235 return count; 3233 return count;
3236} 3234}
3237 3235
3238static DEVICE_ATTR(filter_flags, S_IWUSR | S_IRUGO, il3945_show_filter_flags, 3236static DEVICE_ATTR(filter_flags, 0644, il3945_show_filter_flags,
3239 il3945_store_filter_flags); 3237 il3945_store_filter_flags);
3240 3238
3241static ssize_t 3239static ssize_t
@@ -3306,7 +3304,7 @@ il3945_store_measurement(struct device *d, struct device_attribute *attr,
3306 return count; 3304 return count;
3307} 3305}
3308 3306
3309static DEVICE_ATTR(measurement, S_IRUSR | S_IWUSR, il3945_show_measurement, 3307static DEVICE_ATTR(measurement, 0600, il3945_show_measurement,
3310 il3945_store_measurement); 3308 il3945_store_measurement);
3311 3309
3312static ssize_t 3310static ssize_t
@@ -3330,7 +3328,7 @@ il3945_show_retry_rate(struct device *d, struct device_attribute *attr,
3330 return sprintf(buf, "%d", il->retry_rate); 3328 return sprintf(buf, "%d", il->retry_rate);
3331} 3329}
3332 3330
3333static DEVICE_ATTR(retry_rate, S_IWUSR | S_IRUSR, il3945_show_retry_rate, 3331static DEVICE_ATTR(retry_rate, 0600, il3945_show_retry_rate,
3334 il3945_store_retry_rate); 3332 il3945_store_retry_rate);
3335 3333
3336static ssize_t 3334static ssize_t
@@ -3340,7 +3338,7 @@ il3945_show_channels(struct device *d, struct device_attribute *attr, char *buf)
3340 return 0; 3338 return 0;
3341} 3339}
3342 3340
3343static DEVICE_ATTR(channels, S_IRUSR, il3945_show_channels, NULL); 3341static DEVICE_ATTR(channels, 0400, il3945_show_channels, NULL);
3344 3342
3345static ssize_t 3343static ssize_t
3346il3945_show_antenna(struct device *d, struct device_attribute *attr, char *buf) 3344il3945_show_antenna(struct device *d, struct device_attribute *attr, char *buf)
@@ -3377,8 +3375,7 @@ il3945_store_antenna(struct device *d, struct device_attribute *attr,
3377 return count; 3375 return count;
3378} 3376}
3379 3377
3380static DEVICE_ATTR(antenna, S_IWUSR | S_IRUGO, il3945_show_antenna, 3378static DEVICE_ATTR(antenna, 0644, il3945_show_antenna, il3945_store_antenna);
3381 il3945_store_antenna);
3382 3379
3383static ssize_t 3380static ssize_t
3384il3945_show_status(struct device *d, struct device_attribute *attr, char *buf) 3381il3945_show_status(struct device *d, struct device_attribute *attr, char *buf)
@@ -3389,7 +3386,7 @@ il3945_show_status(struct device *d, struct device_attribute *attr, char *buf)
3389 return sprintf(buf, "0x%08x\n", (int)il->status); 3386 return sprintf(buf, "0x%08x\n", (int)il->status);
3390} 3387}
3391 3388
3392static DEVICE_ATTR(status, S_IRUGO, il3945_show_status, NULL); 3389static DEVICE_ATTR(status, 0444, il3945_show_status, NULL);
3393 3390
3394static ssize_t 3391static ssize_t
3395il3945_dump_error_log(struct device *d, struct device_attribute *attr, 3392il3945_dump_error_log(struct device *d, struct device_attribute *attr,
@@ -3404,7 +3401,7 @@ il3945_dump_error_log(struct device *d, struct device_attribute *attr,
3404 return strnlen(buf, count); 3401 return strnlen(buf, count);
3405} 3402}
3406 3403
3407static DEVICE_ATTR(dump_errors, S_IWUSR, NULL, il3945_dump_error_log); 3404static DEVICE_ATTR(dump_errors, 0200, NULL, il3945_dump_error_log);
3408 3405
3409/***************************************************************************** 3406/*****************************************************************************
3410 * 3407 *
@@ -3943,18 +3940,18 @@ il3945_exit(void)
3943 3940
3944MODULE_FIRMWARE(IL3945_MODULE_FIRMWARE(IL3945_UCODE_API_MAX)); 3941MODULE_FIRMWARE(IL3945_MODULE_FIRMWARE(IL3945_UCODE_API_MAX));
3945 3942
3946module_param_named(antenna, il3945_mod_params.antenna, int, S_IRUGO); 3943module_param_named(antenna, il3945_mod_params.antenna, int, 0444);
3947MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])"); 3944MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])");
3948module_param_named(swcrypto, il3945_mod_params.sw_crypto, int, S_IRUGO); 3945module_param_named(swcrypto, il3945_mod_params.sw_crypto, int, 0444);
3949MODULE_PARM_DESC(swcrypto, "using software crypto (default 1 [software])"); 3946MODULE_PARM_DESC(swcrypto, "using software crypto (default 1 [software])");
3950module_param_named(disable_hw_scan, il3945_mod_params.disable_hw_scan, int, 3947module_param_named(disable_hw_scan, il3945_mod_params.disable_hw_scan, int,
3951 S_IRUGO); 3948 0444);
3952MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)"); 3949MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)");
3953#ifdef CONFIG_IWLEGACY_DEBUG 3950#ifdef CONFIG_IWLEGACY_DEBUG
3954module_param_named(debug, il_debug_level, uint, S_IRUGO | S_IWUSR); 3951module_param_named(debug, il_debug_level, uint, 0644);
3955MODULE_PARM_DESC(debug, "debug output mask"); 3952MODULE_PARM_DESC(debug, "debug output mask");
3956#endif 3953#endif
3957module_param_named(fw_restart, il3945_mod_params.restart_fw, int, S_IRUGO); 3954module_param_named(fw_restart, il3945_mod_params.restart_fw, int, 0444);
3958MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); 3955MODULE_PARM_DESC(fw_restart, "restart firmware in case of error");
3959 3956
3960module_exit(il3945_exit); 3957module_exit(il3945_exit);
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
index de63f2518f23..562e94870a9c 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
@@ -4591,7 +4591,7 @@ il4965_store_debug_level(struct device *d, struct device_attribute *attr,
4591 return strnlen(buf, count); 4591 return strnlen(buf, count);
4592} 4592}
4593 4593
4594static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, il4965_show_debug_level, 4594static DEVICE_ATTR(debug_level, 0644, il4965_show_debug_level,
4595 il4965_store_debug_level); 4595 il4965_store_debug_level);
4596 4596
4597#endif /* CONFIG_IWLEGACY_DEBUG */ 4597#endif /* CONFIG_IWLEGACY_DEBUG */
@@ -4608,7 +4608,7 @@ il4965_show_temperature(struct device *d, struct device_attribute *attr,
4608 return sprintf(buf, "%d\n", il->temperature); 4608 return sprintf(buf, "%d\n", il->temperature);
4609} 4609}
4610 4610
4611static DEVICE_ATTR(temperature, S_IRUGO, il4965_show_temperature, NULL); 4611static DEVICE_ATTR(temperature, 0444, il4965_show_temperature, NULL);
4612 4612
4613static ssize_t 4613static ssize_t
4614il4965_show_tx_power(struct device *d, struct device_attribute *attr, char *buf) 4614il4965_show_tx_power(struct device *d, struct device_attribute *attr, char *buf)
@@ -4642,7 +4642,7 @@ il4965_store_tx_power(struct device *d, struct device_attribute *attr,
4642 return ret; 4642 return ret;
4643} 4643}
4644 4644
4645static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, il4965_show_tx_power, 4645static DEVICE_ATTR(tx_power, 0644, il4965_show_tx_power,
4646 il4965_store_tx_power); 4646 il4965_store_tx_power);
4647 4647
4648static struct attribute *il_sysfs_entries[] = { 4648static struct attribute *il_sysfs_entries[] = {
@@ -6859,18 +6859,17 @@ module_exit(il4965_exit);
6859module_init(il4965_init); 6859module_init(il4965_init);
6860 6860
6861#ifdef CONFIG_IWLEGACY_DEBUG 6861#ifdef CONFIG_IWLEGACY_DEBUG
6862module_param_named(debug, il_debug_level, uint, S_IRUGO | S_IWUSR); 6862module_param_named(debug, il_debug_level, uint, 0644);
6863MODULE_PARM_DESC(debug, "debug output mask"); 6863MODULE_PARM_DESC(debug, "debug output mask");
6864#endif 6864#endif
6865 6865
6866module_param_named(swcrypto, il4965_mod_params.sw_crypto, int, S_IRUGO); 6866module_param_named(swcrypto, il4965_mod_params.sw_crypto, int, 0444);
6867MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])"); 6867MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])");
6868module_param_named(queues_num, il4965_mod_params.num_of_queues, int, S_IRUGO); 6868module_param_named(queues_num, il4965_mod_params.num_of_queues, int, 0444);
6869MODULE_PARM_DESC(queues_num, "number of hw queues."); 6869MODULE_PARM_DESC(queues_num, "number of hw queues.");
6870module_param_named(11n_disable, il4965_mod_params.disable_11n, int, S_IRUGO); 6870module_param_named(11n_disable, il4965_mod_params.disable_11n, int, 0444);
6871MODULE_PARM_DESC(11n_disable, "disable 11n functionality"); 6871MODULE_PARM_DESC(11n_disable, "disable 11n functionality");
6872module_param_named(amsdu_size_8K, il4965_mod_params.amsdu_size_8K, int, 6872module_param_named(amsdu_size_8K, il4965_mod_params.amsdu_size_8K, int, 0444);
6873 S_IRUGO);
6874MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size (default 0 [disabled])"); 6873MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size (default 0 [disabled])");
6875module_param_named(fw_restart, il4965_mod_params.restart_fw, int, S_IRUGO); 6874module_param_named(fw_restart, il4965_mod_params.restart_fw, int, 0444);
6876MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); 6875MODULE_PARM_DESC(fw_restart, "restart firmware in case of error");
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-rs.c b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
index 365a4187fc37..54ff83829afb 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965-rs.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
@@ -2768,16 +2768,16 @@ il4965_rs_add_debugfs(void *il, void *il_sta, struct dentry *dir)
2768{ 2768{
2769 struct il_lq_sta *lq_sta = il_sta; 2769 struct il_lq_sta *lq_sta = il_sta;
2770 lq_sta->rs_sta_dbgfs_scale_table_file = 2770 lq_sta->rs_sta_dbgfs_scale_table_file =
2771 debugfs_create_file("rate_scale_table", S_IRUSR | S_IWUSR, dir, 2771 debugfs_create_file("rate_scale_table", 0600, dir,
2772 lq_sta, &rs_sta_dbgfs_scale_table_ops); 2772 lq_sta, &rs_sta_dbgfs_scale_table_ops);
2773 lq_sta->rs_sta_dbgfs_stats_table_file = 2773 lq_sta->rs_sta_dbgfs_stats_table_file =
2774 debugfs_create_file("rate_stats_table", S_IRUSR, dir, lq_sta, 2774 debugfs_create_file("rate_stats_table", 0400, dir, lq_sta,
2775 &rs_sta_dbgfs_stats_table_ops); 2775 &rs_sta_dbgfs_stats_table_ops);
2776 lq_sta->rs_sta_dbgfs_rate_scale_data_file = 2776 lq_sta->rs_sta_dbgfs_rate_scale_data_file =
2777 debugfs_create_file("rate_scale_data", S_IRUSR, dir, lq_sta, 2777 debugfs_create_file("rate_scale_data", 0400, dir, lq_sta,
2778 &rs_sta_dbgfs_rate_scale_data_ops); 2778 &rs_sta_dbgfs_rate_scale_data_ops);
2779 lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file = 2779 lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file =
2780 debugfs_create_u8("tx_agg_tid_enable", S_IRUSR | S_IWUSR, dir, 2780 debugfs_create_u8("tx_agg_tid_enable", 0600, dir,
2781 &lq_sta->tx_agg_tid_en); 2781 &lq_sta->tx_agg_tid_en);
2782 2782
2783} 2783}
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index 558bb16bfd46..063e19ced7c8 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -435,7 +435,7 @@ EXPORT_SYMBOL(il_send_cmd_pdu_async);
435 435
436/* default: IL_LED_BLINK(0) using blinking idx table */ 436/* default: IL_LED_BLINK(0) using blinking idx table */
437static int led_mode; 437static int led_mode;
438module_param(led_mode, int, S_IRUGO); 438module_param(led_mode, int, 0444);
439MODULE_PARM_DESC(led_mode, 439MODULE_PARM_DESC(led_mode,
440 "0=system default, " "1=On(RF On)/Off(RF Off), 2=blinking"); 440 "0=system default, " "1=On(RF On)/Off(RF Off), 2=blinking");
441 441
@@ -3372,7 +3372,7 @@ MODULE_LICENSE("GPL");
3372 * default: bt_coex_active = true (BT_COEX_ENABLE) 3372 * default: bt_coex_active = true (BT_COEX_ENABLE)
3373 */ 3373 */
3374static bool bt_coex_active = true; 3374static bool bt_coex_active = true;
3375module_param(bt_coex_active, bool, S_IRUGO); 3375module_param(bt_coex_active, bool, 0444);
3376MODULE_PARM_DESC(bt_coex_active, "enable wifi/bluetooth co-exist"); 3376MODULE_PARM_DESC(bt_coex_active, "enable wifi/bluetooth co-exist");
3377 3377
3378u32 il_debug_level; 3378u32 il_debug_level;
diff --git a/drivers/net/wireless/intel/iwlegacy/debug.c b/drivers/net/wireless/intel/iwlegacy/debug.c
index 6fc6b7ff9849..d76073def677 100644
--- a/drivers/net/wireless/intel/iwlegacy/debug.c
+++ b/drivers/net/wireless/intel/iwlegacy/debug.c
@@ -135,16 +135,14 @@ EXPORT_SYMBOL(il_update_stats);
135 135
136#define DEBUGFS_ADD_BOOL(name, parent, ptr) do { \ 136#define DEBUGFS_ADD_BOOL(name, parent, ptr) do { \
137 struct dentry *__tmp; \ 137 struct dentry *__tmp; \
138 __tmp = debugfs_create_bool(#name, S_IWUSR | S_IRUSR, \ 138 __tmp = debugfs_create_bool(#name, 0600, parent, ptr); \
139 parent, ptr); \
140 if (IS_ERR(__tmp) || !__tmp) \ 139 if (IS_ERR(__tmp) || !__tmp) \
141 goto err; \ 140 goto err; \
142} while (0) 141} while (0)
143 142
144#define DEBUGFS_ADD_X32(name, parent, ptr) do { \ 143#define DEBUGFS_ADD_X32(name, parent, ptr) do { \
145 struct dentry *__tmp; \ 144 struct dentry *__tmp; \
146 __tmp = debugfs_create_x32(#name, S_IWUSR | S_IRUSR, \ 145 __tmp = debugfs_create_x32(#name, 0600, parent, ptr); \
147 parent, ptr); \
148 if (IS_ERR(__tmp) || !__tmp) \ 146 if (IS_ERR(__tmp) || !__tmp) \
149 goto err; \ 147 goto err; \
150} while (0) 148} while (0)
@@ -1365,35 +1363,35 @@ il_dbgfs_register(struct il_priv *il, const char *name)
1365 if (!dir_debug) 1363 if (!dir_debug)
1366 goto err; 1364 goto err;
1367 1365
1368 DEBUGFS_ADD_FILE(nvm, dir_data, S_IRUSR); 1366 DEBUGFS_ADD_FILE(nvm, dir_data, 0400);
1369 DEBUGFS_ADD_FILE(sram, dir_data, S_IWUSR | S_IRUSR); 1367 DEBUGFS_ADD_FILE(sram, dir_data, 0600);
1370 DEBUGFS_ADD_FILE(stations, dir_data, S_IRUSR); 1368 DEBUGFS_ADD_FILE(stations, dir_data, 0400);
1371 DEBUGFS_ADD_FILE(channels, dir_data, S_IRUSR); 1369 DEBUGFS_ADD_FILE(channels, dir_data, 0400);
1372 DEBUGFS_ADD_FILE(status, dir_data, S_IRUSR); 1370 DEBUGFS_ADD_FILE(status, dir_data, 0400);
1373 DEBUGFS_ADD_FILE(interrupt, dir_data, S_IWUSR | S_IRUSR); 1371 DEBUGFS_ADD_FILE(interrupt, dir_data, 0600);
1374 DEBUGFS_ADD_FILE(qos, dir_data, S_IRUSR); 1372 DEBUGFS_ADD_FILE(qos, dir_data, 0400);
1375 DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); 1373 DEBUGFS_ADD_FILE(disable_ht40, dir_data, 0600);
1376 DEBUGFS_ADD_FILE(rx_stats, dir_debug, S_IRUSR); 1374 DEBUGFS_ADD_FILE(rx_stats, dir_debug, 0400);
1377 DEBUGFS_ADD_FILE(tx_stats, dir_debug, S_IRUSR); 1375 DEBUGFS_ADD_FILE(tx_stats, dir_debug, 0400);
1378 DEBUGFS_ADD_FILE(rx_queue, dir_debug, S_IRUSR); 1376 DEBUGFS_ADD_FILE(rx_queue, dir_debug, 0400);
1379 DEBUGFS_ADD_FILE(tx_queue, dir_debug, S_IRUSR); 1377 DEBUGFS_ADD_FILE(tx_queue, dir_debug, 0400);
1380 DEBUGFS_ADD_FILE(power_save_status, dir_debug, S_IRUSR); 1378 DEBUGFS_ADD_FILE(power_save_status, dir_debug, 0400);
1381 DEBUGFS_ADD_FILE(clear_ucode_stats, dir_debug, S_IWUSR); 1379 DEBUGFS_ADD_FILE(clear_ucode_stats, dir_debug, 0200);
1382 DEBUGFS_ADD_FILE(clear_traffic_stats, dir_debug, S_IWUSR); 1380 DEBUGFS_ADD_FILE(clear_traffic_stats, dir_debug, 0200);
1383 DEBUGFS_ADD_FILE(fh_reg, dir_debug, S_IRUSR); 1381 DEBUGFS_ADD_FILE(fh_reg, dir_debug, 0400);
1384 DEBUGFS_ADD_FILE(missed_beacon, dir_debug, S_IWUSR); 1382 DEBUGFS_ADD_FILE(missed_beacon, dir_debug, 0200);
1385 DEBUGFS_ADD_FILE(force_reset, dir_debug, S_IWUSR | S_IRUSR); 1383 DEBUGFS_ADD_FILE(force_reset, dir_debug, 0600);
1386 DEBUGFS_ADD_FILE(ucode_rx_stats, dir_debug, S_IRUSR); 1384 DEBUGFS_ADD_FILE(ucode_rx_stats, dir_debug, 0400);
1387 DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, S_IRUSR); 1385 DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, 0400);
1388 DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, S_IRUSR); 1386 DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, 0400);
1389 1387
1390 if (il->cfg->sensitivity_calib_by_driver) 1388 if (il->cfg->sensitivity_calib_by_driver)
1391 DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR); 1389 DEBUGFS_ADD_FILE(sensitivity, dir_debug, 0400);
1392 if (il->cfg->chain_noise_calib_by_driver) 1390 if (il->cfg->chain_noise_calib_by_driver)
1393 DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR); 1391 DEBUGFS_ADD_FILE(chain_noise, dir_debug, 0400);
1394 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); 1392 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, 0200);
1395 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); 1393 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, 0200);
1396 DEBUGFS_ADD_FILE(wd_timeout, dir_debug, S_IWUSR); 1394 DEBUGFS_ADD_FILE(wd_timeout, dir_debug, 0200);
1397 if (il->cfg->sensitivity_calib_by_driver) 1395 if (il->cfg->sensitivity_calib_by_driver)
1398 DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, 1396 DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf,
1399 &il->disable_sens_cal); 1397 &il->disable_sens_cal);
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
index 482ac8fdc67b..096a07c5a33f 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
@@ -48,16 +48,14 @@
48 48
49#define DEBUGFS_ADD_BOOL(name, parent, ptr) do { \ 49#define DEBUGFS_ADD_BOOL(name, parent, ptr) do { \
50 struct dentry *__tmp; \ 50 struct dentry *__tmp; \
51 __tmp = debugfs_create_bool(#name, S_IWUSR | S_IRUSR, \ 51 __tmp = debugfs_create_bool(#name, 0600, parent, ptr); \
52 parent, ptr); \
53 if (IS_ERR(__tmp) || !__tmp) \ 52 if (IS_ERR(__tmp) || !__tmp) \
54 goto err; \ 53 goto err; \
55} while (0) 54} while (0)
56 55
57#define DEBUGFS_ADD_X32(name, parent, ptr) do { \ 56#define DEBUGFS_ADD_X32(name, parent, ptr) do { \
58 struct dentry *__tmp; \ 57 struct dentry *__tmp; \
59 __tmp = debugfs_create_x32(#name, S_IWUSR | S_IRUSR, \ 58 __tmp = debugfs_create_x32(#name, 0600, parent, ptr); \
60 parent, ptr); \
61 if (IS_ERR(__tmp) || !__tmp) \ 59 if (IS_ERR(__tmp) || !__tmp) \
62 goto err; \ 60 goto err; \
63} while (0) 61} while (0)
@@ -2370,48 +2368,48 @@ int iwl_dbgfs_register(struct iwl_priv *priv, struct dentry *dbgfs_dir)
2370 if (!dir_debug) 2368 if (!dir_debug)
2371 goto err; 2369 goto err;
2372 2370
2373 DEBUGFS_ADD_FILE(nvm, dir_data, S_IRUSR); 2371 DEBUGFS_ADD_FILE(nvm, dir_data, 0400);
2374 DEBUGFS_ADD_FILE(sram, dir_data, S_IWUSR | S_IRUSR); 2372 DEBUGFS_ADD_FILE(sram, dir_data, 0600);
2375 DEBUGFS_ADD_FILE(wowlan_sram, dir_data, S_IRUSR); 2373 DEBUGFS_ADD_FILE(wowlan_sram, dir_data, 0400);
2376 DEBUGFS_ADD_FILE(stations, dir_data, S_IRUSR); 2374 DEBUGFS_ADD_FILE(stations, dir_data, 0400);
2377 DEBUGFS_ADD_FILE(channels, dir_data, S_IRUSR); 2375 DEBUGFS_ADD_FILE(channels, dir_data, 0400);
2378 DEBUGFS_ADD_FILE(status, dir_data, S_IRUSR); 2376 DEBUGFS_ADD_FILE(status, dir_data, 0400);
2379 DEBUGFS_ADD_FILE(rx_handlers, dir_data, S_IWUSR | S_IRUSR); 2377 DEBUGFS_ADD_FILE(rx_handlers, dir_data, 0600);
2380 DEBUGFS_ADD_FILE(qos, dir_data, S_IRUSR); 2378 DEBUGFS_ADD_FILE(qos, dir_data, 0400);
2381 DEBUGFS_ADD_FILE(sleep_level_override, dir_data, S_IWUSR | S_IRUSR); 2379 DEBUGFS_ADD_FILE(sleep_level_override, dir_data, 0600);
2382 DEBUGFS_ADD_FILE(current_sleep_command, dir_data, S_IRUSR); 2380 DEBUGFS_ADD_FILE(current_sleep_command, dir_data, 0400);
2383 DEBUGFS_ADD_FILE(thermal_throttling, dir_data, S_IRUSR); 2381 DEBUGFS_ADD_FILE(thermal_throttling, dir_data, 0400);
2384 DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); 2382 DEBUGFS_ADD_FILE(disable_ht40, dir_data, 0600);
2385 DEBUGFS_ADD_FILE(temperature, dir_data, S_IRUSR); 2383 DEBUGFS_ADD_FILE(temperature, dir_data, 0400);
2386 2384
2387 DEBUGFS_ADD_FILE(power_save_status, dir_debug, S_IRUSR); 2385 DEBUGFS_ADD_FILE(power_save_status, dir_debug, 0400);
2388 DEBUGFS_ADD_FILE(clear_ucode_statistics, dir_debug, S_IWUSR); 2386 DEBUGFS_ADD_FILE(clear_ucode_statistics, dir_debug, 0200);
2389 DEBUGFS_ADD_FILE(missed_beacon, dir_debug, S_IWUSR); 2387 DEBUGFS_ADD_FILE(missed_beacon, dir_debug, 0200);
2390 DEBUGFS_ADD_FILE(plcp_delta, dir_debug, S_IWUSR | S_IRUSR); 2388 DEBUGFS_ADD_FILE(plcp_delta, dir_debug, 0600);
2391 DEBUGFS_ADD_FILE(rf_reset, dir_debug, S_IWUSR | S_IRUSR); 2389 DEBUGFS_ADD_FILE(rf_reset, dir_debug, 0600);
2392 DEBUGFS_ADD_FILE(ucode_rx_stats, dir_debug, S_IRUSR); 2390 DEBUGFS_ADD_FILE(ucode_rx_stats, dir_debug, 0400);
2393 DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, S_IRUSR); 2391 DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, 0400);
2394 DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, S_IRUSR); 2392 DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, 0400);
2395 DEBUGFS_ADD_FILE(txfifo_flush, dir_debug, S_IWUSR); 2393 DEBUGFS_ADD_FILE(txfifo_flush, dir_debug, 0200);
2396 DEBUGFS_ADD_FILE(protection_mode, dir_debug, S_IWUSR | S_IRUSR); 2394 DEBUGFS_ADD_FILE(protection_mode, dir_debug, 0600);
2397 DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR); 2395 DEBUGFS_ADD_FILE(sensitivity, dir_debug, 0400);
2398 DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR); 2396 DEBUGFS_ADD_FILE(chain_noise, dir_debug, 0400);
2399 DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR); 2397 DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, 0600);
2400 DEBUGFS_ADD_FILE(ucode_bt_stats, dir_debug, S_IRUSR); 2398 DEBUGFS_ADD_FILE(ucode_bt_stats, dir_debug, 0400);
2401 DEBUGFS_ADD_FILE(reply_tx_error, dir_debug, S_IRUSR); 2399 DEBUGFS_ADD_FILE(reply_tx_error, dir_debug, 0400);
2402 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); 2400 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, 0200);
2403 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); 2401 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, 0200);
2404 DEBUGFS_ADD_FILE(echo_test, dir_debug, S_IWUSR); 2402 DEBUGFS_ADD_FILE(echo_test, dir_debug, 0200);
2405 DEBUGFS_ADD_FILE(fw_restart, dir_debug, S_IWUSR); 2403 DEBUGFS_ADD_FILE(fw_restart, dir_debug, 0200);
2406#ifdef CONFIG_IWLWIFI_DEBUG 2404#ifdef CONFIG_IWLWIFI_DEBUG
2407 DEBUGFS_ADD_FILE(log_event, dir_debug, S_IWUSR | S_IRUSR); 2405 DEBUGFS_ADD_FILE(log_event, dir_debug, 0600);
2408#endif 2406#endif
2409 2407
2410 if (iwl_advanced_bt_coexist(priv)) 2408 if (iwl_advanced_bt_coexist(priv))
2411 DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR); 2409 DEBUGFS_ADD_FILE(bt_traffic, dir_debug, 0400);
2412 2410
2413 /* Calibrations disabled/enabled status*/ 2411 /* Calibrations disabled/enabled status*/
2414 DEBUGFS_ADD_FILE(calib_disabled, dir_rf, S_IWUSR | S_IRUSR); 2412 DEBUGFS_ADD_FILE(calib_disabled, dir_rf, 0600);
2415 2413
2416 /* 2414 /*
2417 * Create a symlink with mac80211. This is not very robust, as it does 2415 * Create a symlink with mac80211. This is not very robust, as it does
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
index ddcd8c2d66cd..98050d7be411 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
@@ -3276,17 +3276,17 @@ static void rs_add_debugfs(void *priv, void *priv_sta,
3276{ 3276{
3277 struct iwl_lq_sta *lq_sta = priv_sta; 3277 struct iwl_lq_sta *lq_sta = priv_sta;
3278 lq_sta->rs_sta_dbgfs_scale_table_file = 3278 lq_sta->rs_sta_dbgfs_scale_table_file =
3279 debugfs_create_file("rate_scale_table", S_IRUSR | S_IWUSR, dir, 3279 debugfs_create_file("rate_scale_table", 0600, dir,
3280 lq_sta, &rs_sta_dbgfs_scale_table_ops); 3280 lq_sta, &rs_sta_dbgfs_scale_table_ops);
3281 lq_sta->rs_sta_dbgfs_stats_table_file = 3281 lq_sta->rs_sta_dbgfs_stats_table_file =
3282 debugfs_create_file("rate_stats_table", S_IRUSR, dir, 3282 debugfs_create_file("rate_stats_table", 0400, dir,
3283 lq_sta, &rs_sta_dbgfs_stats_table_ops); 3283 lq_sta, &rs_sta_dbgfs_stats_table_ops);
3284 lq_sta->rs_sta_dbgfs_rate_scale_data_file = 3284 lq_sta->rs_sta_dbgfs_rate_scale_data_file =
3285 debugfs_create_file("rate_scale_data", S_IRUSR, dir, 3285 debugfs_create_file("rate_scale_data", 0400, dir,
3286 lq_sta, &rs_sta_dbgfs_rate_scale_data_ops); 3286 lq_sta, &rs_sta_dbgfs_rate_scale_data_ops);
3287 lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file = 3287 lq_sta->rs_sta_dbgfs_tx_agg_tid_en_file =
3288 debugfs_create_u8("tx_agg_tid_enable", S_IRUSR | S_IWUSR, dir, 3288 debugfs_create_u8("tx_agg_tid_enable", 0600, dir,
3289 &lq_sta->tx_agg_tid_en); 3289 &lq_sta->tx_agg_tid_en);
3290 3290
3291} 3291}
3292 3292
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
index e2ded29a145d..baec2fbaaf68 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c
@@ -187,7 +187,7 @@ int iwl_fwrt_dbgfs_register(struct iwl_fw_runtime *fwrt,
187 struct dentry *dbgfs_dir) 187 struct dentry *dbgfs_dir)
188{ 188{
189 INIT_DELAYED_WORK(&fwrt->timestamp.wk, iwl_fw_timestamp_marker_wk); 189 INIT_DELAYED_WORK(&fwrt->timestamp.wk, iwl_fw_timestamp_marker_wk);
190 FWRT_DEBUGFS_ADD_FILE(timestamp_marker, dbgfs_dir, S_IWUSR); 190 FWRT_DEBUGFS_ADD_FILE(timestamp_marker, dbgfs_dir, 0200);
191 return 0; 191 return 0;
192err: 192err:
193 IWL_ERR(fwrt, "Can't create the fwrt debugfs directory\n"); 193 IWL_ERR(fwrt, "Can't create the fwrt debugfs directory\n");
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index 9c4a7f648a44..aa2d5c14e202 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1768,41 +1768,36 @@ static void __exit iwl_drv_exit(void)
1768module_exit(iwl_drv_exit); 1768module_exit(iwl_drv_exit);
1769 1769
1770#ifdef CONFIG_IWLWIFI_DEBUG 1770#ifdef CONFIG_IWLWIFI_DEBUG
1771module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 1771module_param_named(debug, iwlwifi_mod_params.debug_level, uint, 0644);
1772 S_IRUGO | S_IWUSR);
1773MODULE_PARM_DESC(debug, "debug output mask"); 1772MODULE_PARM_DESC(debug, "debug output mask");
1774#endif 1773#endif
1775 1774
1776module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, S_IRUGO); 1775module_param_named(swcrypto, iwlwifi_mod_params.swcrypto, int, 0444);
1777MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])"); 1776MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])");
1778module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, S_IRUGO); 1777module_param_named(11n_disable, iwlwifi_mod_params.disable_11n, uint, 0444);
1779MODULE_PARM_DESC(11n_disable, 1778MODULE_PARM_DESC(11n_disable,
1780 "disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX"); 1779 "disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX");
1781module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, 1780module_param_named(amsdu_size, iwlwifi_mod_params.amsdu_size, int, 0444);
1782 int, S_IRUGO);
1783MODULE_PARM_DESC(amsdu_size, 1781MODULE_PARM_DESC(amsdu_size,
1784 "amsdu size 0: 12K for multi Rx queue devices, 4K for other devices 1:4K 2:8K 3:12K (default 0)"); 1782 "amsdu size 0: 12K for multi Rx queue devices, 4K for other devices 1:4K 2:8K 3:12K (default 0)");
1785module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, S_IRUGO); 1783module_param_named(fw_restart, iwlwifi_mod_params.fw_restart, bool, 0444);
1786MODULE_PARM_DESC(fw_restart, "restart firmware in case of error (default true)"); 1784MODULE_PARM_DESC(fw_restart, "restart firmware in case of error (default true)");
1787 1785
1788module_param_named(antenna_coupling, iwlwifi_mod_params.antenna_coupling, 1786module_param_named(antenna_coupling, iwlwifi_mod_params.antenna_coupling,
1789 int, S_IRUGO); 1787 int, 0444);
1790MODULE_PARM_DESC(antenna_coupling, 1788MODULE_PARM_DESC(antenna_coupling,
1791 "specify antenna coupling in dB (default: 0 dB)"); 1789 "specify antenna coupling in dB (default: 0 dB)");
1792 1790
1793module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, S_IRUGO); 1791module_param_named(nvm_file, iwlwifi_mod_params.nvm_file, charp, 0444);
1794MODULE_PARM_DESC(nvm_file, "NVM file name"); 1792MODULE_PARM_DESC(nvm_file, "NVM file name");
1795 1793
1796module_param_named(d0i3_disable, iwlwifi_mod_params.d0i3_disable, 1794module_param_named(d0i3_disable, iwlwifi_mod_params.d0i3_disable, bool, 0444);
1797 bool, S_IRUGO);
1798MODULE_PARM_DESC(d0i3_disable, "disable d0i3 functionality (default: Y)"); 1795MODULE_PARM_DESC(d0i3_disable, "disable d0i3 functionality (default: Y)");
1799 1796
1800module_param_named(lar_disable, iwlwifi_mod_params.lar_disable, 1797module_param_named(lar_disable, iwlwifi_mod_params.lar_disable, bool, 0444);
1801 bool, S_IRUGO);
1802MODULE_PARM_DESC(lar_disable, "disable LAR functionality (default: N)"); 1798MODULE_PARM_DESC(lar_disable, "disable LAR functionality (default: N)");
1803 1799
1804module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, 1800module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable, uint, 0644);
1805 uint, S_IRUGO | S_IWUSR);
1806MODULE_PARM_DESC(uapsd_disable, 1801MODULE_PARM_DESC(uapsd_disable,
1807 "disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 3)"); 1802 "disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 3)");
1808 1803
@@ -1823,31 +1818,27 @@ MODULE_PARM_DESC(uapsd_disable,
1823 * default: bt_coex_active = true (BT_COEX_ENABLE) 1818 * default: bt_coex_active = true (BT_COEX_ENABLE)
1824 */ 1819 */
1825module_param_named(bt_coex_active, iwlwifi_mod_params.bt_coex_active, 1820module_param_named(bt_coex_active, iwlwifi_mod_params.bt_coex_active,
1826 bool, S_IRUGO); 1821 bool, 0444);
1827MODULE_PARM_DESC(bt_coex_active, "enable wifi/bt co-exist (default: enable)"); 1822MODULE_PARM_DESC(bt_coex_active, "enable wifi/bt co-exist (default: enable)");
1828 1823
1829module_param_named(led_mode, iwlwifi_mod_params.led_mode, int, S_IRUGO); 1824module_param_named(led_mode, iwlwifi_mod_params.led_mode, int, 0444);
1830MODULE_PARM_DESC(led_mode, "0=system default, " 1825MODULE_PARM_DESC(led_mode, "0=system default, "
1831 "1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0)"); 1826 "1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0)");
1832 1827
1833module_param_named(power_save, iwlwifi_mod_params.power_save, 1828module_param_named(power_save, iwlwifi_mod_params.power_save, bool, 0444);
1834 bool, S_IRUGO);
1835MODULE_PARM_DESC(power_save, 1829MODULE_PARM_DESC(power_save,
1836 "enable WiFi power management (default: disable)"); 1830 "enable WiFi power management (default: disable)");
1837 1831
1838module_param_named(power_level, iwlwifi_mod_params.power_level, 1832module_param_named(power_level, iwlwifi_mod_params.power_level, int, 0444);
1839 int, S_IRUGO);
1840MODULE_PARM_DESC(power_level, 1833MODULE_PARM_DESC(power_level,
1841 "default power save level (range from 1 - 5, default: 1)"); 1834 "default power save level (range from 1 - 5, default: 1)");
1842 1835
1843module_param_named(fw_monitor, iwlwifi_mod_params.fw_monitor, bool, S_IRUGO); 1836module_param_named(fw_monitor, iwlwifi_mod_params.fw_monitor, bool, 0444);
1844MODULE_PARM_DESC(fw_monitor, 1837MODULE_PARM_DESC(fw_monitor,
1845 "firmware monitor - to debug FW (default: false - needs lots of memory)"); 1838 "firmware monitor - to debug FW (default: false - needs lots of memory)");
1846 1839
1847module_param_named(d0i3_timeout, iwlwifi_mod_params.d0i3_timeout, 1840module_param_named(d0i3_timeout, iwlwifi_mod_params.d0i3_timeout, uint, 0444);
1848 uint, S_IRUGO);
1849MODULE_PARM_DESC(d0i3_timeout, "Timeout to D0i3 entry when idle (ms)"); 1841MODULE_PARM_DESC(d0i3_timeout, "Timeout to D0i3 entry when idle (ms)");
1850 1842
1851module_param_named(disable_11ac, iwlwifi_mod_params.disable_11ac, bool, 1843module_param_named(disable_11ac, iwlwifi_mod_params.disable_11ac, bool, 0444);
1852 S_IRUGO);
1853MODULE_PARM_DESC(disable_11ac, "Disable VHT capabilities (default: false)"); 1844MODULE_PARM_DESC(disable_11ac, "Disable VHT capabilities (default: false)");
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
index 4228fac77f41..4e9d1792baf3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
@@ -1506,44 +1506,36 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
1506 if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM && 1506 if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM &&
1507 ((vif->type == NL80211_IFTYPE_STATION && !vif->p2p) || 1507 ((vif->type == NL80211_IFTYPE_STATION && !vif->p2p) ||
1508 (vif->type == NL80211_IFTYPE_STATION && vif->p2p))) 1508 (vif->type == NL80211_IFTYPE_STATION && vif->p2p)))
1509 MVM_DEBUGFS_ADD_FILE_VIF(pm_params, mvmvif->dbgfs_dir, S_IWUSR | 1509 MVM_DEBUGFS_ADD_FILE_VIF(pm_params, mvmvif->dbgfs_dir, 0600);
1510 S_IRUSR); 1510
1511 1511 MVM_DEBUGFS_ADD_FILE_VIF(tx_pwr_lmt, mvmvif->dbgfs_dir, 0400);
1512 MVM_DEBUGFS_ADD_FILE_VIF(tx_pwr_lmt, mvmvif->dbgfs_dir, S_IRUSR); 1512 MVM_DEBUGFS_ADD_FILE_VIF(mac_params, mvmvif->dbgfs_dir, 0400);
1513 MVM_DEBUGFS_ADD_FILE_VIF(mac_params, mvmvif->dbgfs_dir, S_IRUSR); 1513 MVM_DEBUGFS_ADD_FILE_VIF(low_latency, mvmvif->dbgfs_dir, 0600);
1514 MVM_DEBUGFS_ADD_FILE_VIF(low_latency, mvmvif->dbgfs_dir, 1514 MVM_DEBUGFS_ADD_FILE_VIF(uapsd_misbehaving, mvmvif->dbgfs_dir, 0600);
1515 S_IRUSR | S_IWUSR); 1515 MVM_DEBUGFS_ADD_FILE_VIF(rx_phyinfo, mvmvif->dbgfs_dir, 0600);
1516 MVM_DEBUGFS_ADD_FILE_VIF(uapsd_misbehaving, mvmvif->dbgfs_dir, 1516 MVM_DEBUGFS_ADD_FILE_VIF(quota_min, mvmvif->dbgfs_dir, 0600);
1517 S_IRUSR | S_IWUSR); 1517 MVM_DEBUGFS_ADD_FILE_VIF(os_device_timediff, mvmvif->dbgfs_dir, 0400);
1518 MVM_DEBUGFS_ADD_FILE_VIF(rx_phyinfo, mvmvif->dbgfs_dir,
1519 S_IRUSR | S_IWUSR);
1520 MVM_DEBUGFS_ADD_FILE_VIF(quota_min, mvmvif->dbgfs_dir,
1521 S_IRUSR | S_IWUSR);
1522 MVM_DEBUGFS_ADD_FILE_VIF(os_device_timediff,
1523 mvmvif->dbgfs_dir, S_IRUSR);
1524 1518
1525 if (vif->type == NL80211_IFTYPE_STATION && !vif->p2p && 1519 if (vif->type == NL80211_IFTYPE_STATION && !vif->p2p &&
1526 mvmvif == mvm->bf_allowed_vif) 1520 mvmvif == mvm->bf_allowed_vif)
1527 MVM_DEBUGFS_ADD_FILE_VIF(bf_params, mvmvif->dbgfs_dir, 1521 MVM_DEBUGFS_ADD_FILE_VIF(bf_params, mvmvif->dbgfs_dir, 0600);
1528 S_IRUSR | S_IWUSR);
1529 1522
1530 if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TOF_SUPPORT) && 1523 if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TOF_SUPPORT) &&
1531 !vif->p2p && (vif->type != NL80211_IFTYPE_P2P_DEVICE)) { 1524 !vif->p2p && (vif->type != NL80211_IFTYPE_P2P_DEVICE)) {
1532 if (IWL_MVM_TOF_IS_RESPONDER && vif->type == NL80211_IFTYPE_AP) 1525 if (IWL_MVM_TOF_IS_RESPONDER && vif->type == NL80211_IFTYPE_AP)
1533 MVM_DEBUGFS_ADD_FILE_VIF(tof_responder_params, 1526 MVM_DEBUGFS_ADD_FILE_VIF(tof_responder_params,
1534 mvmvif->dbgfs_dir, 1527 mvmvif->dbgfs_dir, 0600);
1535 S_IRUSR | S_IWUSR);
1536 1528
1537 MVM_DEBUGFS_ADD_FILE_VIF(tof_range_request, mvmvif->dbgfs_dir, 1529 MVM_DEBUGFS_ADD_FILE_VIF(tof_range_request, mvmvif->dbgfs_dir,
1538 S_IRUSR | S_IWUSR); 1530 0600);
1539 MVM_DEBUGFS_ADD_FILE_VIF(tof_range_req_ext, mvmvif->dbgfs_dir, 1531 MVM_DEBUGFS_ADD_FILE_VIF(tof_range_req_ext, mvmvif->dbgfs_dir,
1540 S_IRUSR | S_IWUSR); 1532 0600);
1541 MVM_DEBUGFS_ADD_FILE_VIF(tof_enable, mvmvif->dbgfs_dir, 1533 MVM_DEBUGFS_ADD_FILE_VIF(tof_enable, mvmvif->dbgfs_dir,
1542 S_IRUSR | S_IWUSR); 1534 0600);
1543 MVM_DEBUGFS_ADD_FILE_VIF(tof_range_abort, mvmvif->dbgfs_dir, 1535 MVM_DEBUGFS_ADD_FILE_VIF(tof_range_abort, mvmvif->dbgfs_dir,
1544 S_IRUSR | S_IWUSR); 1536 0600);
1545 MVM_DEBUGFS_ADD_FILE_VIF(tof_range_response, mvmvif->dbgfs_dir, 1537 MVM_DEBUGFS_ADD_FILE_VIF(tof_range_response, mvmvif->dbgfs_dir,
1546 S_IRUSR); 1538 0400);
1547 } 1539 }
1548 1540
1549 /* 1541 /*
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 9c436d8d001d..0e6401cd7ccc 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -1914,7 +1914,7 @@ void iwl_mvm_sta_add_debugfs(struct ieee80211_hw *hw,
1914 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 1914 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
1915 1915
1916 if (iwl_mvm_has_tlc_offload(mvm)) 1916 if (iwl_mvm_has_tlc_offload(mvm))
1917 MVM_DEBUGFS_ADD_STA_FILE(rs_data, dir, S_IRUSR); 1917 MVM_DEBUGFS_ADD_STA_FILE(rs_data, dir, 0400);
1918 1918
1919 return; 1919 return;
1920err: 1920err:
@@ -1930,48 +1930,45 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
1930 1930
1931 mvm->debugfs_dir = dbgfs_dir; 1931 mvm->debugfs_dir = dbgfs_dir;
1932 1932
1933 MVM_DEBUGFS_ADD_FILE(tx_flush, mvm->debugfs_dir, S_IWUSR); 1933 MVM_DEBUGFS_ADD_FILE(tx_flush, mvm->debugfs_dir, 0200);
1934 MVM_DEBUGFS_ADD_FILE(sta_drain, mvm->debugfs_dir, S_IWUSR); 1934 MVM_DEBUGFS_ADD_FILE(sta_drain, mvm->debugfs_dir, 0200);
1935 MVM_DEBUGFS_ADD_FILE(sram, mvm->debugfs_dir, S_IWUSR | S_IRUSR); 1935 MVM_DEBUGFS_ADD_FILE(sram, mvm->debugfs_dir, 0600);
1936 MVM_DEBUGFS_ADD_FILE(set_nic_temperature, mvm->debugfs_dir, 1936 MVM_DEBUGFS_ADD_FILE(set_nic_temperature, mvm->debugfs_dir, 0600);
1937 S_IWUSR | S_IRUSR); 1937 MVM_DEBUGFS_ADD_FILE(nic_temp, dbgfs_dir, 0400);
1938 MVM_DEBUGFS_ADD_FILE(nic_temp, dbgfs_dir, S_IRUSR); 1938 MVM_DEBUGFS_ADD_FILE(ctdp_budget, dbgfs_dir, 0400);
1939 MVM_DEBUGFS_ADD_FILE(ctdp_budget, dbgfs_dir, S_IRUSR); 1939 MVM_DEBUGFS_ADD_FILE(stop_ctdp, dbgfs_dir, 0200);
1940 MVM_DEBUGFS_ADD_FILE(stop_ctdp, dbgfs_dir, S_IWUSR); 1940 MVM_DEBUGFS_ADD_FILE(force_ctkill, dbgfs_dir, 0200);
1941 MVM_DEBUGFS_ADD_FILE(force_ctkill, dbgfs_dir, S_IWUSR); 1941 MVM_DEBUGFS_ADD_FILE(stations, dbgfs_dir, 0400);
1942 MVM_DEBUGFS_ADD_FILE(stations, dbgfs_dir, S_IRUSR); 1942 MVM_DEBUGFS_ADD_FILE(bt_notif, dbgfs_dir, 0400);
1943 MVM_DEBUGFS_ADD_FILE(bt_notif, dbgfs_dir, S_IRUSR); 1943 MVM_DEBUGFS_ADD_FILE(bt_cmd, dbgfs_dir, 0400);
1944 MVM_DEBUGFS_ADD_FILE(bt_cmd, dbgfs_dir, S_IRUSR); 1944 MVM_DEBUGFS_ADD_FILE(disable_power_off, mvm->debugfs_dir, 0600);
1945 MVM_DEBUGFS_ADD_FILE(disable_power_off, mvm->debugfs_dir, 1945 MVM_DEBUGFS_ADD_FILE(fw_ver, mvm->debugfs_dir, 0400);
1946 S_IRUSR | S_IWUSR); 1946 MVM_DEBUGFS_ADD_FILE(fw_rx_stats, mvm->debugfs_dir, 0400);
1947 MVM_DEBUGFS_ADD_FILE(fw_ver, mvm->debugfs_dir, S_IRUSR); 1947 MVM_DEBUGFS_ADD_FILE(drv_rx_stats, mvm->debugfs_dir, 0400);
1948 MVM_DEBUGFS_ADD_FILE(fw_rx_stats, mvm->debugfs_dir, S_IRUSR); 1948 MVM_DEBUGFS_ADD_FILE(fw_restart, mvm->debugfs_dir, 0200);
1949 MVM_DEBUGFS_ADD_FILE(drv_rx_stats, mvm->debugfs_dir, S_IRUSR); 1949 MVM_DEBUGFS_ADD_FILE(fw_nmi, mvm->debugfs_dir, 0200);
1950 MVM_DEBUGFS_ADD_FILE(fw_restart, mvm->debugfs_dir, S_IWUSR); 1950 MVM_DEBUGFS_ADD_FILE(bt_tx_prio, mvm->debugfs_dir, 0200);
1951 MVM_DEBUGFS_ADD_FILE(fw_nmi, mvm->debugfs_dir, S_IWUSR); 1951 MVM_DEBUGFS_ADD_FILE(bt_force_ant, mvm->debugfs_dir, 0200);
1952 MVM_DEBUGFS_ADD_FILE(bt_tx_prio, mvm->debugfs_dir, S_IWUSR); 1952 MVM_DEBUGFS_ADD_FILE(scan_ant_rxchain, mvm->debugfs_dir, 0600);
1953 MVM_DEBUGFS_ADD_FILE(bt_force_ant, mvm->debugfs_dir, S_IWUSR); 1953 MVM_DEBUGFS_ADD_FILE(prph_reg, mvm->debugfs_dir, 0600);
1954 MVM_DEBUGFS_ADD_FILE(scan_ant_rxchain, mvm->debugfs_dir, 1954 MVM_DEBUGFS_ADD_FILE(d0i3_refs, mvm->debugfs_dir, 0600);
1955 S_IWUSR | S_IRUSR); 1955 MVM_DEBUGFS_ADD_FILE(fw_dbg_conf, mvm->debugfs_dir, 0600);
1956 MVM_DEBUGFS_ADD_FILE(prph_reg, mvm->debugfs_dir, S_IWUSR | S_IRUSR); 1956 MVM_DEBUGFS_ADD_FILE(fw_dbg_collect, mvm->debugfs_dir, 0200);
1957 MVM_DEBUGFS_ADD_FILE(d0i3_refs, mvm->debugfs_dir, S_IRUSR | S_IWUSR); 1957 MVM_DEBUGFS_ADD_FILE(max_amsdu_len, mvm->debugfs_dir, 0200);
1958 MVM_DEBUGFS_ADD_FILE(fw_dbg_conf, mvm->debugfs_dir, S_IRUSR | S_IWUSR); 1958 MVM_DEBUGFS_ADD_FILE(send_echo_cmd, mvm->debugfs_dir, 0200);
1959 MVM_DEBUGFS_ADD_FILE(fw_dbg_collect, mvm->debugfs_dir, S_IWUSR); 1959 MVM_DEBUGFS_ADD_FILE(cont_recording, mvm->debugfs_dir, 0200);
1960 MVM_DEBUGFS_ADD_FILE(max_amsdu_len, mvm->debugfs_dir, S_IWUSR); 1960 MVM_DEBUGFS_ADD_FILE(indirection_tbl, mvm->debugfs_dir, 0200);
1961 MVM_DEBUGFS_ADD_FILE(send_echo_cmd, mvm->debugfs_dir, S_IWUSR); 1961 MVM_DEBUGFS_ADD_FILE(inject_packet, mvm->debugfs_dir, 0200);
1962 MVM_DEBUGFS_ADD_FILE(cont_recording, mvm->debugfs_dir, S_IWUSR);
1963 MVM_DEBUGFS_ADD_FILE(indirection_tbl, mvm->debugfs_dir, S_IWUSR);
1964 MVM_DEBUGFS_ADD_FILE(inject_packet, mvm->debugfs_dir, S_IWUSR);
1965#ifdef CONFIG_ACPI 1962#ifdef CONFIG_ACPI
1966 MVM_DEBUGFS_ADD_FILE(sar_geo_profile, dbgfs_dir, S_IRUSR); 1963 MVM_DEBUGFS_ADD_FILE(sar_geo_profile, dbgfs_dir, 0400);
1967#endif 1964#endif
1968 1965
1969 if (!debugfs_create_bool("enable_scan_iteration_notif", 1966 if (!debugfs_create_bool("enable_scan_iteration_notif",
1970 S_IRUSR | S_IWUSR, 1967 0600,
1971 mvm->debugfs_dir, 1968 mvm->debugfs_dir,
1972 &mvm->scan_iter_notif_enabled)) 1969 &mvm->scan_iter_notif_enabled))
1973 goto err; 1970 goto err;
1974 if (!debugfs_create_bool("drop_bcn_ap_mode", S_IRUSR | S_IWUSR, 1971 if (!debugfs_create_bool("drop_bcn_ap_mode", 0600,
1975 mvm->debugfs_dir, &mvm->drop_bcn_ap_mode)) 1972 mvm->debugfs_dir, &mvm->drop_bcn_ap_mode))
1976 goto err; 1973 goto err;
1977 1974
@@ -1982,50 +1979,49 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
1982 if (!bcast_dir) 1979 if (!bcast_dir)
1983 goto err; 1980 goto err;
1984 1981
1985 if (!debugfs_create_bool("override", S_IRUSR | S_IWUSR, 1982 if (!debugfs_create_bool("override", 0600,
1986 bcast_dir, 1983 bcast_dir,
1987 &mvm->dbgfs_bcast_filtering.override)) 1984 &mvm->dbgfs_bcast_filtering.override))
1988 goto err; 1985 goto err;
1989 1986
1990 MVM_DEBUGFS_ADD_FILE_ALIAS("filters", bcast_filters, 1987 MVM_DEBUGFS_ADD_FILE_ALIAS("filters", bcast_filters,
1991 bcast_dir, S_IWUSR | S_IRUSR); 1988 bcast_dir, 0600);
1992 MVM_DEBUGFS_ADD_FILE_ALIAS("macs", bcast_filters_macs, 1989 MVM_DEBUGFS_ADD_FILE_ALIAS("macs", bcast_filters_macs,
1993 bcast_dir, S_IWUSR | S_IRUSR); 1990 bcast_dir, 0600);
1994 } 1991 }
1995#endif 1992#endif
1996 1993
1997#ifdef CONFIG_PM_SLEEP 1994#ifdef CONFIG_PM_SLEEP
1998 MVM_DEBUGFS_ADD_FILE(d3_sram, mvm->debugfs_dir, S_IRUSR | S_IWUSR); 1995 MVM_DEBUGFS_ADD_FILE(d3_sram, mvm->debugfs_dir, 0600);
1999 MVM_DEBUGFS_ADD_FILE(d3_test, mvm->debugfs_dir, S_IRUSR); 1996 MVM_DEBUGFS_ADD_FILE(d3_test, mvm->debugfs_dir, 0400);
2000 if (!debugfs_create_bool("d3_wake_sysassert", S_IRUSR | S_IWUSR, 1997 if (!debugfs_create_bool("d3_wake_sysassert", 0600,
2001 mvm->debugfs_dir, &mvm->d3_wake_sysassert)) 1998 mvm->debugfs_dir, &mvm->d3_wake_sysassert))
2002 goto err; 1999 goto err;
2003 if (!debugfs_create_u32("last_netdetect_scans", S_IRUSR, 2000 if (!debugfs_create_u32("last_netdetect_scans", 0400,
2004 mvm->debugfs_dir, &mvm->last_netdetect_scans)) 2001 mvm->debugfs_dir, &mvm->last_netdetect_scans))
2005 goto err; 2002 goto err;
2006#endif 2003#endif
2007 2004
2008 if (!debugfs_create_u8("ps_disabled", S_IRUSR, 2005 if (!debugfs_create_u8("ps_disabled", 0400,
2009 mvm->debugfs_dir, &mvm->ps_disabled)) 2006 mvm->debugfs_dir, &mvm->ps_disabled))
2010 goto err; 2007 goto err;
2011 if (!debugfs_create_blob("nvm_hw", S_IRUSR, 2008 if (!debugfs_create_blob("nvm_hw", 0400,
2012 mvm->debugfs_dir, &mvm->nvm_hw_blob)) 2009 mvm->debugfs_dir, &mvm->nvm_hw_blob))
2013 goto err; 2010 goto err;
2014 if (!debugfs_create_blob("nvm_sw", S_IRUSR, 2011 if (!debugfs_create_blob("nvm_sw", 0400,
2015 mvm->debugfs_dir, &mvm->nvm_sw_blob)) 2012 mvm->debugfs_dir, &mvm->nvm_sw_blob))
2016 goto err; 2013 goto err;
2017 if (!debugfs_create_blob("nvm_calib", S_IRUSR, 2014 if (!debugfs_create_blob("nvm_calib", 0400,
2018 mvm->debugfs_dir, &mvm->nvm_calib_blob)) 2015 mvm->debugfs_dir, &mvm->nvm_calib_blob))
2019 goto err; 2016 goto err;
2020 if (!debugfs_create_blob("nvm_prod", S_IRUSR, 2017 if (!debugfs_create_blob("nvm_prod", 0400,
2021 mvm->debugfs_dir, &mvm->nvm_prod_blob)) 2018 mvm->debugfs_dir, &mvm->nvm_prod_blob))
2022 goto err; 2019 goto err;
2023 if (!debugfs_create_blob("nvm_phy_sku", S_IRUSR, 2020 if (!debugfs_create_blob("nvm_phy_sku", 0400,
2024 mvm->debugfs_dir, &mvm->nvm_phy_sku_blob)) 2021 mvm->debugfs_dir, &mvm->nvm_phy_sku_blob))
2025 goto err; 2022 goto err;
2026 2023
2027 debugfs_create_file("mem", S_IRUSR | S_IWUSR, dbgfs_dir, mvm, 2024 debugfs_create_file("mem", 0600, dbgfs_dir, mvm, &iwl_dbgfs_mem_ops);
2028 &iwl_dbgfs_mem_ops);
2029 2025
2030 /* 2026 /*
2031 * Create a symlink with mac80211. It will be removed when mac80211 2027 * Create a symlink with mac80211. It will be removed when mac80211
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index ab7fb5aad984..224bfa1bcf53 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -104,14 +104,14 @@ struct iwl_mvm_mod_params iwlmvm_mod_params = {
104 /* rest of fields are 0 by default */ 104 /* rest of fields are 0 by default */
105}; 105};
106 106
107module_param_named(init_dbg, iwlmvm_mod_params.init_dbg, bool, S_IRUGO); 107module_param_named(init_dbg, iwlmvm_mod_params.init_dbg, bool, 0444);
108MODULE_PARM_DESC(init_dbg, 108MODULE_PARM_DESC(init_dbg,
109 "set to true to debug an ASSERT in INIT fw (default: false"); 109 "set to true to debug an ASSERT in INIT fw (default: false");
110module_param_named(power_scheme, iwlmvm_mod_params.power_scheme, int, S_IRUGO); 110module_param_named(power_scheme, iwlmvm_mod_params.power_scheme, int, 0444);
111MODULE_PARM_DESC(power_scheme, 111MODULE_PARM_DESC(power_scheme,
112 "power management scheme: 1-active, 2-balanced, 3-low power, default: 2"); 112 "power management scheme: 1-active, 2-balanced, 3-low power, default: 2");
113module_param_named(tfd_q_hang_detect, iwlmvm_mod_params.tfd_q_hang_detect, 113module_param_named(tfd_q_hang_detect, iwlmvm_mod_params.tfd_q_hang_detect,
114 bool, S_IRUGO); 114 bool, 0444);
115MODULE_PARM_DESC(tfd_q_hang_detect, 115MODULE_PARM_DESC(tfd_q_hang_detect,
116 "TFD queues hang detection (default: true"); 116 "TFD queues hang detection (default: true");
117 117
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index 47f4c7a1d80d..5d776ec1840f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -4010,18 +4010,18 @@ static void rs_drv_add_sta_debugfs(void *mvm, void *priv_sta,
4010 if (!mvmsta->vif) 4010 if (!mvmsta->vif)
4011 return; 4011 return;
4012 4012
4013 debugfs_create_file("rate_scale_table", S_IRUSR | S_IWUSR, dir, 4013 debugfs_create_file("rate_scale_table", 0600, dir,
4014 lq_sta, &rs_sta_dbgfs_scale_table_ops); 4014 lq_sta, &rs_sta_dbgfs_scale_table_ops);
4015 debugfs_create_file("rate_stats_table", S_IRUSR, dir, 4015 debugfs_create_file("rate_stats_table", 0400, dir,
4016 lq_sta, &rs_sta_dbgfs_stats_table_ops); 4016 lq_sta, &rs_sta_dbgfs_stats_table_ops);
4017 debugfs_create_file("drv_tx_stats", S_IRUSR | S_IWUSR, dir, 4017 debugfs_create_file("drv_tx_stats", 0600, dir,
4018 lq_sta, &rs_sta_dbgfs_drv_tx_stats_ops); 4018 lq_sta, &rs_sta_dbgfs_drv_tx_stats_ops);
4019 debugfs_create_u8("tx_agg_tid_enable", S_IRUSR | S_IWUSR, dir, 4019 debugfs_create_u8("tx_agg_tid_enable", 0600, dir,
4020 &lq_sta->tx_agg_tid_en); 4020 &lq_sta->tx_agg_tid_en);
4021 debugfs_create_u8("reduced_tpc", S_IRUSR | S_IWUSR, dir, 4021 debugfs_create_u8("reduced_tpc", 0600, dir,
4022 &lq_sta->pers.dbg_fixed_txp_reduction); 4022 &lq_sta->pers.dbg_fixed_txp_reduction);
4023 4023
4024 MVM_DEBUGFS_ADD_FILE_RS(ss_force, dir, S_IRUSR | S_IWUSR); 4024 MVM_DEBUGFS_ADD_FILE_RS(ss_force, dir, 0600);
4025 return; 4025 return;
4026err: 4026err:
4027 IWL_ERR((struct iwl_mvm *)mvm, "Can't create debugfs entity\n"); 4027 IWL_ERR((struct iwl_mvm *)mvm, "Can't create debugfs entity\n");
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index b406b536c850..f8a0234d332c 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -2616,12 +2616,12 @@ int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans)
2616{ 2616{
2617 struct dentry *dir = trans->dbgfs_dir; 2617 struct dentry *dir = trans->dbgfs_dir;
2618 2618
2619 DEBUGFS_ADD_FILE(rx_queue, dir, S_IRUSR); 2619 DEBUGFS_ADD_FILE(rx_queue, dir, 0400);
2620 DEBUGFS_ADD_FILE(tx_queue, dir, S_IRUSR); 2620 DEBUGFS_ADD_FILE(tx_queue, dir, 0400);
2621 DEBUGFS_ADD_FILE(interrupt, dir, S_IWUSR | S_IRUSR); 2621 DEBUGFS_ADD_FILE(interrupt, dir, 0600);
2622 DEBUGFS_ADD_FILE(csr, dir, S_IWUSR); 2622 DEBUGFS_ADD_FILE(csr, dir, 0200);
2623 DEBUGFS_ADD_FILE(fh_reg, dir, S_IRUSR); 2623 DEBUGFS_ADD_FILE(fh_reg, dir, 0400);
2624 DEBUGFS_ADD_FILE(rfkill, dir, S_IWUSR | S_IRUSR); 2624 DEBUGFS_ADD_FILE(rfkill, dir, 0600);
2625 return 0; 2625 return 0;
2626 2626
2627err: 2627err:
diff --git a/drivers/net/wireless/intersil/p54/main.c b/drivers/net/wireless/intersil/p54/main.c
index ab6d39e12069..1c6d428515a4 100644
--- a/drivers/net/wireless/intersil/p54/main.c
+++ b/drivers/net/wireless/intersil/p54/main.c
@@ -27,7 +27,7 @@
27#include "lmac.h" 27#include "lmac.h"
28 28
29static bool modparam_nohwcrypt; 29static bool modparam_nohwcrypt;
30module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); 30module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
31MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); 31MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
32MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>"); 32MODULE_AUTHOR("Michael Wu <flamingice@sourmilk.net>");
33MODULE_DESCRIPTION("Softmac Prism54 common code"); 33MODULE_DESCRIPTION("Softmac Prism54 common code");
diff --git a/drivers/net/wireless/mediatek/mt76/debugfs.c b/drivers/net/wireless/mediatek/mt76/debugfs.c
index c121b502a462..a38d05dea599 100644
--- a/drivers/net/wireless/mediatek/mt76/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/debugfs.c
@@ -64,13 +64,13 @@ struct dentry *mt76_register_debugfs(struct mt76_dev *dev)
64 if (!dir) 64 if (!dir)
65 return NULL; 65 return NULL;
66 66
67 debugfs_create_u8("led_pin", S_IRUSR | S_IWUSR, dir, &dev->led_pin); 67 debugfs_create_u8("led_pin", 0600, dir, &dev->led_pin);
68 debugfs_create_u32("regidx", S_IRUSR | S_IWUSR, dir, &dev->debugfs_reg); 68 debugfs_create_u32("regidx", 0600, dir, &dev->debugfs_reg);
69 debugfs_create_file_unsafe("regval", S_IRUSR | S_IWUSR, dir, dev, 69 debugfs_create_file_unsafe("regval", 0600, dir, dev,
70 &fops_regval); 70 &fops_regval);
71 debugfs_create_blob("eeprom", S_IRUSR, dir, &dev->eeprom); 71 debugfs_create_blob("eeprom", 0400, dir, &dev->eeprom);
72 if (dev->otp.data) 72 if (dev->otp.data)
73 debugfs_create_blob("otp", S_IRUSR, dir, &dev->otp); 73 debugfs_create_blob("otp", 0400, dir, &dev->otp);
74 debugfs_create_devm_seqfile(dev->dev, "queues", dir, mt76_queues_read); 74 debugfs_create_devm_seqfile(dev->dev, "queues", dir, mt76_queues_read);
75 75
76 return dir; 76 return dir;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_debugfs.c b/drivers/net/wireless/mediatek/mt76/mt76x2_debugfs.c
index 612feb593d7d..955ea3e692dd 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_debugfs.c
@@ -123,11 +123,11 @@ void mt76x2_init_debugfs(struct mt76x2_dev *dev)
123 if (!dir) 123 if (!dir)
124 return; 124 return;
125 125
126 debugfs_create_u8("temperature", S_IRUSR, dir, &dev->cal.temp); 126 debugfs_create_u8("temperature", 0400, dir, &dev->cal.temp);
127 debugfs_create_bool("tpc", S_IRUSR | S_IWUSR, dir, &dev->enable_tpc); 127 debugfs_create_bool("tpc", 0600, dir, &dev->enable_tpc);
128 128
129 debugfs_create_file("ampdu_stat", S_IRUSR, dir, dev, &fops_ampdu_stat); 129 debugfs_create_file("ampdu_stat", 0400, dir, dev, &fops_ampdu_stat);
130 debugfs_create_file("dfs_stats", S_IRUSR, dir, dev, &fops_dfs_stat); 130 debugfs_create_file("dfs_stats", 0400, dir, dev, &fops_dfs_stat);
131 debugfs_create_devm_seqfile(dev->mt76.dev, "txpower", dir, 131 debugfs_create_devm_seqfile(dev->mt76.dev, "txpower", dir,
132 read_txpower); 132 read_txpower);
133} 133}
diff --git a/drivers/net/wireless/mediatek/mt7601u/debugfs.c b/drivers/net/wireless/mediatek/mt7601u/debugfs.c
index fc008475a03b..991a6a729b1e 100644
--- a/drivers/net/wireless/mediatek/mt7601u/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt7601u/debugfs.c
@@ -160,13 +160,11 @@ void mt7601u_init_debugfs(struct mt7601u_dev *dev)
160 if (!dir) 160 if (!dir)
161 return; 161 return;
162 162
163 debugfs_create_u8("temperature", S_IRUSR, dir, &dev->raw_temp); 163 debugfs_create_u8("temperature", 0400, dir, &dev->raw_temp);
164 debugfs_create_u32("temp_mode", S_IRUSR, dir, &dev->temp_mode); 164 debugfs_create_u32("temp_mode", 0400, dir, &dev->temp_mode);
165 165
166 debugfs_create_u32("regidx", S_IRUSR | S_IWUSR, dir, &dev->debugfs_reg); 166 debugfs_create_u32("regidx", 0600, dir, &dev->debugfs_reg);
167 debugfs_create_file("regval", S_IRUSR | S_IWUSR, dir, dev, 167 debugfs_create_file("regval", 0600, dir, dev, &fops_regval);
168 &fops_regval); 168 debugfs_create_file("ampdu_stat", 0400, dir, dev, &fops_ampdu_stat);
169 debugfs_create_file("ampdu_stat", S_IRUSR, dir, dev, &fops_ampdu_stat); 169 debugfs_create_file("eeprom_param", 0400, dir, dev, &fops_eeprom_param);
170 debugfs_create_file("eeprom_param", S_IRUSR, dir, dev,
171 &fops_eeprom_param);
172} 170}
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
index f4b48b77c491..3df8c4b895e7 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
@@ -37,7 +37,7 @@
37 * Allow hardware encryption to be disabled. 37 * Allow hardware encryption to be disabled.
38 */ 38 */
39static bool modparam_nohwcrypt; 39static bool modparam_nohwcrypt;
40module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); 40module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
41MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); 41MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
42 42
43/* 43/*
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800pci.c b/drivers/net/wireless/ralink/rt2x00/rt2800pci.c
index 5cf655ff1430..1172eefd1c1a 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800pci.c
@@ -49,7 +49,7 @@
49 * Allow hardware encryption to be disabled. 49 * Allow hardware encryption to be disabled.
50 */ 50 */
51static bool modparam_nohwcrypt = false; 51static bool modparam_nohwcrypt = false;
52module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); 52module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
53MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); 53MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
54 54
55static bool rt2800pci_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev) 55static bool rt2800pci_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
index a985a5a7945e..6848ebc83534 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
@@ -41,7 +41,7 @@
41 41
42/* Allow hardware encryption to be disabled. */ 42/* Allow hardware encryption to be disabled. */
43static bool modparam_nohwcrypt; 43static bool modparam_nohwcrypt;
44module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); 44module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
45MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); 45MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
46 46
47static bool rt2800soc_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev) 47static bool rt2800soc_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
index 24fc6d2045ef..d901a41d36e4 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
@@ -43,7 +43,7 @@
43 * Allow hardware encryption to be disabled. 43 * Allow hardware encryption to be disabled.
44 */ 44 */
45static bool modparam_nohwcrypt; 45static bool modparam_nohwcrypt;
46module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); 46module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
47MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); 47MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
48 48
49static bool rt2800usb_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev) 49static bool rt2800usb_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c b/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
index ac2572943ed0..0eee479583b8 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
@@ -606,7 +606,7 @@ static struct dentry *rt2x00debug_create_file_driver(const char *name,
606 data += sprintf(data, "version:\t%s\n", DRV_VERSION); 606 data += sprintf(data, "version:\t%s\n", DRV_VERSION);
607 blob->size = strlen(blob->data); 607 blob->size = strlen(blob->data);
608 608
609 return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); 609 return debugfs_create_blob(name, 0400, intf->driver_folder, blob);
610} 610}
611 611
612static struct dentry *rt2x00debug_create_file_chipset(const char *name, 612static struct dentry *rt2x00debug_create_file_chipset(const char *name,
@@ -647,7 +647,7 @@ static struct dentry *rt2x00debug_create_file_chipset(const char *name,
647 647
648 blob->size = strlen(blob->data); 648 blob->size = strlen(blob->data);
649 649
650 return debugfs_create_blob(name, S_IRUSR, intf->driver_folder, blob); 650 return debugfs_create_blob(name, 0400, intf->driver_folder, blob);
651} 651}
652 652
653void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) 653void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
@@ -682,13 +682,13 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
682 if (IS_ERR(intf->chipset_entry) || !intf->chipset_entry) 682 if (IS_ERR(intf->chipset_entry) || !intf->chipset_entry)
683 goto exit; 683 goto exit;
684 684
685 intf->dev_flags = debugfs_create_file("dev_flags", S_IRUSR, 685 intf->dev_flags = debugfs_create_file("dev_flags", 0400,
686 intf->driver_folder, intf, 686 intf->driver_folder, intf,
687 &rt2x00debug_fop_dev_flags); 687 &rt2x00debug_fop_dev_flags);
688 if (IS_ERR(intf->dev_flags) || !intf->dev_flags) 688 if (IS_ERR(intf->dev_flags) || !intf->dev_flags)
689 goto exit; 689 goto exit;
690 690
691 intf->cap_flags = debugfs_create_file("cap_flags", S_IRUSR, 691 intf->cap_flags = debugfs_create_file("cap_flags", 0400,
692 intf->driver_folder, intf, 692 intf->driver_folder, intf,
693 &rt2x00debug_fop_cap_flags); 693 &rt2x00debug_fop_cap_flags);
694 if (IS_ERR(intf->cap_flags) || !intf->cap_flags) 694 if (IS_ERR(intf->cap_flags) || !intf->cap_flags)
@@ -699,27 +699,28 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
699 if (IS_ERR(intf->register_folder) || !intf->register_folder) 699 if (IS_ERR(intf->register_folder) || !intf->register_folder)
700 goto exit; 700 goto exit;
701 701
702#define RT2X00DEBUGFS_CREATE_REGISTER_ENTRY(__intf, __name) \ 702#define RT2X00DEBUGFS_CREATE_REGISTER_ENTRY(__intf, __name) \
703({ \ 703({ \
704 if (debug->__name.read) { \ 704 if (debug->__name.read) { \
705 (__intf)->__name##_off_entry = \ 705 (__intf)->__name##_off_entry = \
706 debugfs_create_u32(__stringify(__name) "_offset", \ 706 debugfs_create_u32(__stringify(__name) "_offset", \
707 S_IRUSR | S_IWUSR, \ 707 0600, \
708 (__intf)->register_folder, \ 708 (__intf)->register_folder, \
709 &(__intf)->offset_##__name); \ 709 &(__intf)->offset_##__name); \
710 if (IS_ERR((__intf)->__name##_off_entry) \ 710 if (IS_ERR((__intf)->__name##_off_entry) || \
711 || !(__intf)->__name##_off_entry) \ 711 !(__intf)->__name##_off_entry) \
712 goto exit; \ 712 goto exit; \
713 \ 713 \
714 (__intf)->__name##_val_entry = \ 714 (__intf)->__name##_val_entry = \
715 debugfs_create_file(__stringify(__name) "_value", \ 715 debugfs_create_file(__stringify(__name) "_value", \
716 S_IRUSR | S_IWUSR, \ 716 0600, \
717 (__intf)->register_folder, \ 717 (__intf)->register_folder, \
718 (__intf), &rt2x00debug_fop_##__name); \ 718 (__intf), \
719 if (IS_ERR((__intf)->__name##_val_entry) \ 719 &rt2x00debug_fop_##__name); \
720 || !(__intf)->__name##_val_entry) \ 720 if (IS_ERR((__intf)->__name##_val_entry) || \
721 goto exit; \ 721 !(__intf)->__name##_val_entry) \
722 } \ 722 goto exit; \
723 } \
723}) 724})
724 725
725 RT2X00DEBUGFS_CREATE_REGISTER_ENTRY(intf, csr); 726 RT2X00DEBUGFS_CREATE_REGISTER_ENTRY(intf, csr);
@@ -736,8 +737,8 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
736 goto exit; 737 goto exit;
737 738
738 intf->queue_frame_dump_entry = 739 intf->queue_frame_dump_entry =
739 debugfs_create_file("dump", S_IRUSR, intf->queue_folder, 740 debugfs_create_file("dump", 0400, intf->queue_folder,
740 intf, &rt2x00debug_fop_queue_dump); 741 intf, &rt2x00debug_fop_queue_dump);
741 if (IS_ERR(intf->queue_frame_dump_entry) 742 if (IS_ERR(intf->queue_frame_dump_entry)
742 || !intf->queue_frame_dump_entry) 743 || !intf->queue_frame_dump_entry)
743 goto exit; 744 goto exit;
@@ -746,14 +747,15 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
746 init_waitqueue_head(&intf->frame_dump_waitqueue); 747 init_waitqueue_head(&intf->frame_dump_waitqueue);
747 748
748 intf->queue_stats_entry = 749 intf->queue_stats_entry =
749 debugfs_create_file("queue", S_IRUSR, intf->queue_folder, 750 debugfs_create_file("queue", 0400, intf->queue_folder,
750 intf, &rt2x00debug_fop_queue_stats); 751 intf, &rt2x00debug_fop_queue_stats);
751 752
752#ifdef CONFIG_RT2X00_LIB_CRYPTO 753#ifdef CONFIG_RT2X00_LIB_CRYPTO
753 if (rt2x00_has_cap_hw_crypto(rt2x00dev)) 754 if (rt2x00_has_cap_hw_crypto(rt2x00dev))
754 intf->crypto_stats_entry = 755 intf->crypto_stats_entry =
755 debugfs_create_file("crypto", S_IRUGO, intf->queue_folder, 756 debugfs_create_file("crypto", 0444, intf->queue_folder,
756 intf, &rt2x00debug_fop_crypto_stats); 757 intf,
758 &rt2x00debug_fop_crypto_stats);
757#endif 759#endif
758 760
759 return; 761 return;
diff --git a/drivers/net/wireless/ralink/rt2x00/rt61pci.c b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
index 234310200759..cb0e1196f2c2 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
@@ -40,7 +40,7 @@
40 * Allow hardware encryption to be disabled. 40 * Allow hardware encryption to be disabled.
41 */ 41 */
42static bool modparam_nohwcrypt = false; 42static bool modparam_nohwcrypt = false;
43module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); 43module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
44MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); 44MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
45 45
46/* 46/*
diff --git a/drivers/net/wireless/ralink/rt2x00/rt73usb.c b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
index 9a212823f42c..319ec4f2d9d2 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
@@ -38,7 +38,7 @@
38 * Allow hardware encryption to be disabled. 38 * Allow hardware encryption to be disabled.
39 */ 39 */
40static bool modparam_nohwcrypt; 40static bool modparam_nohwcrypt;
41module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); 41module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
42MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); 42MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
43 43
44/* 44/*
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 0133fcd4601b..7f9b16b97ea3 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -2815,9 +2815,11 @@ static int __init init_ray_cs(void)
2815 proc_mkdir("driver/ray_cs", NULL); 2815 proc_mkdir("driver/ray_cs", NULL);
2816 2816
2817 proc_create("driver/ray_cs/ray_cs", 0, NULL, &ray_cs_proc_fops); 2817 proc_create("driver/ray_cs/ray_cs", 0, NULL, &ray_cs_proc_fops);
2818 proc_create("driver/ray_cs/essid", S_IWUSR, NULL, &ray_cs_essid_proc_fops); 2818 proc_create("driver/ray_cs/essid", 0200, NULL, &ray_cs_essid_proc_fops);
2819 proc_create_data("driver/ray_cs/net_type", S_IWUSR, NULL, &int_proc_fops, &net_type); 2819 proc_create_data("driver/ray_cs/net_type", 0200, NULL, &int_proc_fops,
2820 proc_create_data("driver/ray_cs/translate", S_IWUSR, NULL, &int_proc_fops, &translate); 2820 &net_type);
2821 proc_create_data("driver/ray_cs/translate", 0200, NULL, &int_proc_fops,
2822 &translate);
2821#endif 2823#endif
2822 if (translate != 0) 2824 if (translate != 0)
2823 translate = 1; 2825 translate = 1;
diff --git a/drivers/net/wireless/st/cw1200/debug.c b/drivers/net/wireless/st/cw1200/debug.c
index 34f97c31eecf..295cb1a29f25 100644
--- a/drivers/net/wireless/st/cw1200/debug.c
+++ b/drivers/net/wireless/st/cw1200/debug.c
@@ -398,15 +398,15 @@ int cw1200_debug_init(struct cw1200_common *priv)
398 if (!d->debugfs_phy) 398 if (!d->debugfs_phy)
399 goto err; 399 goto err;
400 400
401 if (!debugfs_create_file("status", S_IRUSR, d->debugfs_phy, 401 if (!debugfs_create_file("status", 0400, d->debugfs_phy,
402 priv, &fops_status)) 402 priv, &fops_status))
403 goto err; 403 goto err;
404 404
405 if (!debugfs_create_file("counters", S_IRUSR, d->debugfs_phy, 405 if (!debugfs_create_file("counters", 0400, d->debugfs_phy,
406 priv, &fops_counters)) 406 priv, &fops_counters))
407 goto err; 407 goto err;
408 408
409 if (!debugfs_create_file("wsm_dumps", S_IWUSR, d->debugfs_phy, 409 if (!debugfs_create_file("wsm_dumps", 0200, d->debugfs_phy,
410 priv, &fops_wsm_dumps)) 410 priv, &fops_wsm_dumps))
411 goto err; 411 goto err;
412 412
diff --git a/drivers/net/wireless/st/cw1200/main.c b/drivers/net/wireless/st/cw1200/main.c
index a186d1df1f29..90dc979f260b 100644
--- a/drivers/net/wireless/st/cw1200/main.c
+++ b/drivers/net/wireless/st/cw1200/main.c
@@ -46,7 +46,7 @@ MODULE_ALIAS("cw1200_core");
46 46
47/* Accept MAC address of the form macaddr=0x00,0x80,0xE1,0x30,0x40,0x50 */ 47/* Accept MAC address of the form macaddr=0x00,0x80,0xE1,0x30,0x40,0x50 */
48static u8 cw1200_mac_template[ETH_ALEN] = {0x02, 0x80, 0xe1, 0x00, 0x00, 0x00}; 48static u8 cw1200_mac_template[ETH_ALEN] = {0x02, 0x80, 0xe1, 0x00, 0x00, 0x00};
49module_param_array_named(macaddr, cw1200_mac_template, byte, NULL, S_IRUGO); 49module_param_array_named(macaddr, cw1200_mac_template, byte, NULL, 0444);
50MODULE_PARM_DESC(macaddr, "Override platform_data MAC address"); 50MODULE_PARM_DESC(macaddr, "Override platform_data MAC address");
51 51
52static char *cw1200_sdd_path; 52static char *cw1200_sdd_path;
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index 0cf3b4013dd6..ca0f936fc119 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -2092,54 +2092,51 @@ static struct platform_driver wl18xx_driver = {
2092}; 2092};
2093 2093
2094module_platform_driver(wl18xx_driver); 2094module_platform_driver(wl18xx_driver);
2095module_param_named(ht_mode, ht_mode_param, charp, S_IRUSR); 2095module_param_named(ht_mode, ht_mode_param, charp, 0400);
2096MODULE_PARM_DESC(ht_mode, "Force HT mode: wide or siso20"); 2096MODULE_PARM_DESC(ht_mode, "Force HT mode: wide or siso20");
2097 2097
2098module_param_named(board_type, board_type_param, charp, S_IRUSR); 2098module_param_named(board_type, board_type_param, charp, 0400);
2099MODULE_PARM_DESC(board_type, "Board type: fpga, hdk (default), evb, com8 or " 2099MODULE_PARM_DESC(board_type, "Board type: fpga, hdk (default), evb, com8 or "
2100 "dvp"); 2100 "dvp");
2101 2101
2102module_param_named(checksum, checksum_param, bool, S_IRUSR); 2102module_param_named(checksum, checksum_param, bool, 0400);
2103MODULE_PARM_DESC(checksum, "Enable TCP checksum: boolean (defaults to false)"); 2103MODULE_PARM_DESC(checksum, "Enable TCP checksum: boolean (defaults to false)");
2104 2104
2105module_param_named(dc2dc, dc2dc_param, int, S_IRUSR); 2105module_param_named(dc2dc, dc2dc_param, int, 0400);
2106MODULE_PARM_DESC(dc2dc, "External DC2DC: u8 (defaults to 0)"); 2106MODULE_PARM_DESC(dc2dc, "External DC2DC: u8 (defaults to 0)");
2107 2107
2108module_param_named(n_antennas_2, n_antennas_2_param, int, S_IRUSR); 2108module_param_named(n_antennas_2, n_antennas_2_param, int, 0400);
2109MODULE_PARM_DESC(n_antennas_2, 2109MODULE_PARM_DESC(n_antennas_2,
2110 "Number of installed 2.4GHz antennas: 1 (default) or 2"); 2110 "Number of installed 2.4GHz antennas: 1 (default) or 2");
2111 2111
2112module_param_named(n_antennas_5, n_antennas_5_param, int, S_IRUSR); 2112module_param_named(n_antennas_5, n_antennas_5_param, int, 0400);
2113MODULE_PARM_DESC(n_antennas_5, 2113MODULE_PARM_DESC(n_antennas_5,
2114 "Number of installed 5GHz antennas: 1 (default) or 2"); 2114 "Number of installed 5GHz antennas: 1 (default) or 2");
2115 2115
2116module_param_named(low_band_component, low_band_component_param, int, 2116module_param_named(low_band_component, low_band_component_param, int, 0400);
2117 S_IRUSR);
2118MODULE_PARM_DESC(low_band_component, "Low band component: u8 " 2117MODULE_PARM_DESC(low_band_component, "Low band component: u8 "
2119 "(default is 0x01)"); 2118 "(default is 0x01)");
2120 2119
2121module_param_named(low_band_component_type, low_band_component_type_param, 2120module_param_named(low_band_component_type, low_band_component_type_param,
2122 int, S_IRUSR); 2121 int, 0400);
2123MODULE_PARM_DESC(low_band_component_type, "Low band component type: u8 " 2122MODULE_PARM_DESC(low_band_component_type, "Low band component type: u8 "
2124 "(default is 0x05 or 0x06 depending on the board_type)"); 2123 "(default is 0x05 or 0x06 depending on the board_type)");
2125 2124
2126module_param_named(high_band_component, high_band_component_param, int, 2125module_param_named(high_band_component, high_band_component_param, int, 0400);
2127 S_IRUSR);
2128MODULE_PARM_DESC(high_band_component, "High band component: u8, " 2126MODULE_PARM_DESC(high_band_component, "High band component: u8, "
2129 "(default is 0x01)"); 2127 "(default is 0x01)");
2130 2128
2131module_param_named(high_band_component_type, high_band_component_type_param, 2129module_param_named(high_band_component_type, high_band_component_type_param,
2132 int, S_IRUSR); 2130 int, 0400);
2133MODULE_PARM_DESC(high_band_component_type, "High band component type: u8 " 2131MODULE_PARM_DESC(high_band_component_type, "High band component type: u8 "
2134 "(default is 0x09)"); 2132 "(default is 0x09)");
2135 2133
2136module_param_named(pwr_limit_reference_11_abg, 2134module_param_named(pwr_limit_reference_11_abg,
2137 pwr_limit_reference_11_abg_param, int, S_IRUSR); 2135 pwr_limit_reference_11_abg_param, int, 0400);
2138MODULE_PARM_DESC(pwr_limit_reference_11_abg, "Power limit reference: u8 " 2136MODULE_PARM_DESC(pwr_limit_reference_11_abg, "Power limit reference: u8 "
2139 "(default is 0xc8)"); 2137 "(default is 0xc8)");
2140 2138
2141module_param_named(num_rx_desc, 2139module_param_named(num_rx_desc, num_rx_desc_param, int, 0400);
2142 num_rx_desc_param, int, S_IRUSR);
2143MODULE_PARM_DESC(num_rx_desc_param, 2140MODULE_PARM_DESC(num_rx_desc_param,
2144 "Number of Rx descriptors: u8 (default is 32)"); 2141 "Number of Rx descriptors: u8 (default is 32)");
2145 2142
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 09714034dbf1..3a51ab116e79 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -6630,20 +6630,20 @@ EXPORT_SYMBOL_GPL(wlcore_remove);
6630 6630
6631u32 wl12xx_debug_level = DEBUG_NONE; 6631u32 wl12xx_debug_level = DEBUG_NONE;
6632EXPORT_SYMBOL_GPL(wl12xx_debug_level); 6632EXPORT_SYMBOL_GPL(wl12xx_debug_level);
6633module_param_named(debug_level, wl12xx_debug_level, uint, S_IRUSR | S_IWUSR); 6633module_param_named(debug_level, wl12xx_debug_level, uint, 0600);
6634MODULE_PARM_DESC(debug_level, "wl12xx debugging level"); 6634MODULE_PARM_DESC(debug_level, "wl12xx debugging level");
6635 6635
6636module_param_named(fwlog, fwlog_param, charp, 0); 6636module_param_named(fwlog, fwlog_param, charp, 0);
6637MODULE_PARM_DESC(fwlog, 6637MODULE_PARM_DESC(fwlog,
6638 "FW logger options: continuous, dbgpins or disable"); 6638 "FW logger options: continuous, dbgpins or disable");
6639 6639
6640module_param(fwlog_mem_blocks, int, S_IRUSR | S_IWUSR); 6640module_param(fwlog_mem_blocks, int, 0600);
6641MODULE_PARM_DESC(fwlog_mem_blocks, "fwlog mem_blocks"); 6641MODULE_PARM_DESC(fwlog_mem_blocks, "fwlog mem_blocks");
6642 6642
6643module_param(bug_on_recovery, int, S_IRUSR | S_IWUSR); 6643module_param(bug_on_recovery, int, 0600);
6644MODULE_PARM_DESC(bug_on_recovery, "BUG() on fw recovery"); 6644MODULE_PARM_DESC(bug_on_recovery, "BUG() on fw recovery");
6645 6645
6646module_param(no_recovery, int, S_IRUSR | S_IWUSR); 6646module_param(no_recovery, int, 0600);
6647MODULE_PARM_DESC(no_recovery, "Prevent HW recovery. FW will remain stuck."); 6647MODULE_PARM_DESC(no_recovery, "Prevent HW recovery. FW will remain stuck.");
6648 6648
6649MODULE_LICENSE("GPL"); 6649MODULE_LICENSE("GPL");
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index f8a1fea64e25..1f727babbea0 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -469,7 +469,7 @@ static void __exit wl1271_exit(void)
469module_init(wl1271_init); 469module_init(wl1271_init);
470module_exit(wl1271_exit); 470module_exit(wl1271_exit);
471 471
472module_param(dump, bool, S_IRUSR | S_IWUSR); 472module_param(dump, bool, 0600);
473MODULE_PARM_DESC(dump, "Enable sdio read/write dumps."); 473MODULE_PARM_DESC(dump, "Enable sdio read/write dumps.");
474 474
475MODULE_LICENSE("GPL"); 475MODULE_LICENSE("GPL");
diff --git a/drivers/net/wireless/ti/wlcore/sysfs.c b/drivers/net/wireless/ti/wlcore/sysfs.c
index b72e2101488b..d31eb775e023 100644
--- a/drivers/net/wireless/ti/wlcore/sysfs.c
+++ b/drivers/net/wireless/ti/wlcore/sysfs.c
@@ -80,7 +80,7 @@ static ssize_t wl1271_sysfs_store_bt_coex_state(struct device *dev,
80 return count; 80 return count;
81} 81}
82 82
83static DEVICE_ATTR(bt_coex_state, S_IRUGO | S_IWUSR, 83static DEVICE_ATTR(bt_coex_state, 0644,
84 wl1271_sysfs_show_bt_coex_state, 84 wl1271_sysfs_show_bt_coex_state,
85 wl1271_sysfs_store_bt_coex_state); 85 wl1271_sysfs_store_bt_coex_state);
86 86
@@ -103,8 +103,7 @@ static ssize_t wl1271_sysfs_show_hw_pg_ver(struct device *dev,
103 return len; 103 return len;
104} 104}
105 105
106static DEVICE_ATTR(hw_pg_ver, S_IRUGO, 106static DEVICE_ATTR(hw_pg_ver, 0444, wl1271_sysfs_show_hw_pg_ver, NULL);
107 wl1271_sysfs_show_hw_pg_ver, NULL);
108 107
109static ssize_t wl1271_sysfs_read_fwlog(struct file *filp, struct kobject *kobj, 108static ssize_t wl1271_sysfs_read_fwlog(struct file *filp, struct kobject *kobj,
110 struct bin_attribute *bin_attr, 109 struct bin_attribute *bin_attr,
@@ -139,7 +138,7 @@ static ssize_t wl1271_sysfs_read_fwlog(struct file *filp, struct kobject *kobj,
139} 138}
140 139
141static const struct bin_attribute fwlog_attr = { 140static const struct bin_attribute fwlog_attr = {
142 .attr = {.name = "fwlog", .mode = S_IRUSR}, 141 .attr = { .name = "fwlog", .mode = 0400 },
143 .read = wl1271_sysfs_read_fwlog, 142 .read = wl1271_sysfs_read_fwlog,
144}; 143};
145 144