Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ef00c53 authored by Joe Perches's avatar Joe Perches Committed by Kalle Valo
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 255dd5b7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -73,16 +73,16 @@
#include "trace.h"

bool ath5k_modparam_nohwcrypt;
module_param_named(nohwcrypt, ath5k_modparam_nohwcrypt, bool, S_IRUGO);
module_param_named(nohwcrypt, ath5k_modparam_nohwcrypt, bool, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");

static bool modparam_fastchanswitch;
module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO);
module_param_named(fastchanswitch, modparam_fastchanswitch, bool, 0444);
MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios.");

static bool ath5k_modparam_no_hw_rfkill_switch;
module_param_named(no_hw_rfkill_switch, ath5k_modparam_no_hw_rfkill_switch,
								bool, S_IRUGO);
		   bool, 0444);
MODULE_PARM_DESC(no_hw_rfkill_switch, "Ignore the GPIO RFKill switch state");


+11 −26
Original line number Diff line number Diff line
@@ -1004,32 +1004,17 @@ ath5k_debug_init_device(struct ath5k_hw *ah)
	if (!phydir)
		return;

	debugfs_create_file("debug", S_IWUSR | S_IRUSR, phydir, ah,
			    &fops_debug);

	debugfs_create_file("registers", S_IRUSR, phydir, ah, &fops_registers);

	debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah,
			    &fops_beacon);

	debugfs_create_file("reset", S_IWUSR, phydir, ah, &fops_reset);

	debugfs_create_file("antenna", S_IWUSR | S_IRUSR, phydir, ah,
			    &fops_antenna);

	debugfs_create_file("misc", S_IRUSR, phydir, ah, &fops_misc);

	debugfs_create_file("eeprom", S_IRUSR, phydir, ah, &fops_eeprom);

	debugfs_create_file("frameerrors", S_IWUSR | S_IRUSR, phydir, ah,
			    &fops_frameerrors);

	debugfs_create_file("ani", S_IWUSR | S_IRUSR, phydir, ah, &fops_ani);

	debugfs_create_file("queue", S_IWUSR | S_IRUSR, phydir, ah,
			    &fops_queue);

	debugfs_create_bool("32khz_clock", S_IWUSR | S_IRUSR, phydir,
	debugfs_create_file("debug", 0600, phydir, ah, &fops_debug);
	debugfs_create_file("registers", 0400, phydir, ah, &fops_registers);
	debugfs_create_file("beacon", 0600, phydir, ah, &fops_beacon);
	debugfs_create_file("reset", 0200, phydir, ah, &fops_reset);
	debugfs_create_file("antenna", 0600, phydir, ah, &fops_antenna);
	debugfs_create_file("misc", 0400, phydir, ah, &fops_misc);
	debugfs_create_file("eeprom", 0400, phydir, ah, &fops_eeprom);
	debugfs_create_file("frameerrors", 0600, phydir, ah, &fops_frameerrors);
	debugfs_create_file("ani", 0600, phydir, ah, &fops_ani);
	debugfs_create_file("queue", 0600, phydir, ah, &fops_queue);
	debugfs_create_bool("32khz_clock", 0600, phydir,
			    &ah->ah_use_32khz_clock);
}

+4 −4
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ static ssize_t ath5k_attr_store_##name(struct device *dev, \
	set(ah, val);						\
	return count;							\
}									\
static DEVICE_ATTR(name, S_IRUGO | S_IWUSR,				\
static DEVICE_ATTR(name, 0644,						\
		   ath5k_attr_show_##name, ath5k_attr_store_##name)

#define SIMPLE_SHOW(name, get)						\
@@ -43,7 +43,7 @@ static ssize_t ath5k_attr_show_##name(struct device *dev, \
	struct ath5k_hw *ah = hw->priv;				\
	return snprintf(buf, PAGE_SIZE, "%d\n", get);			\
}									\
static DEVICE_ATTR(name, S_IRUGO, ath5k_attr_show_##name, NULL)
static DEVICE_ATTR(name, 0444, ath5k_attr_show_##name, NULL)

/*** ANI ***/

@@ -66,7 +66,7 @@ static ssize_t ath5k_attr_show_noise_immunity_level_max(struct device *dev,
{
	return snprintf(buf, PAGE_SIZE, "%d\n", ATH5K_ANI_MAX_NOISE_IMM_LVL);
}
static DEVICE_ATTR(noise_immunity_level_max, S_IRUGO,
static DEVICE_ATTR(noise_immunity_level_max, 0444,
		   ath5k_attr_show_noise_immunity_level_max, NULL);

static 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,
{
	return snprintf(buf, PAGE_SIZE, "%d\n", ATH5K_ANI_MAX_FIRSTEP_LVL);
}
static DEVICE_ATTR(firstep_level_max, S_IRUGO,
static DEVICE_ATTR(firstep_level_max, 0444,
		   ath5k_attr_show_firstep_level_max, NULL);

static struct attribute *ath5k_sysfs_entries_ani[] = {
+21 −22
Original line number Diff line number Diff line
@@ -1794,69 +1794,68 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)
	if (!ar->debugfs_phy)
		return -ENOMEM;

	debugfs_create_file("tgt_stats", S_IRUSR, ar->debugfs_phy, ar,
	debugfs_create_file("tgt_stats", 0400, ar->debugfs_phy, ar,
			    &fops_tgt_stats);

	if (ar->hif_type == ATH6KL_HIF_TYPE_SDIO)
		debugfs_create_file("credit_dist_stats", S_IRUSR,
		debugfs_create_file("credit_dist_stats", 0400,
				    ar->debugfs_phy, ar,
				    &fops_credit_dist_stats);

	debugfs_create_file("endpoint_stats", S_IRUSR | S_IWUSR,
	debugfs_create_file("endpoint_stats", 0600,
			    ar->debugfs_phy, ar, &fops_endpoint_stats);

	debugfs_create_file("fwlog", S_IRUSR, ar->debugfs_phy, ar,
			    &fops_fwlog);
	debugfs_create_file("fwlog", 0400, ar->debugfs_phy, ar, &fops_fwlog);

	debugfs_create_file("fwlog_block", S_IRUSR, ar->debugfs_phy, ar,
	debugfs_create_file("fwlog_block", 0400, ar->debugfs_phy, ar,
			    &fops_fwlog_block);

	debugfs_create_file("fwlog_mask", S_IRUSR | S_IWUSR, ar->debugfs_phy,
	debugfs_create_file("fwlog_mask", 0600, ar->debugfs_phy,
			    ar, &fops_fwlog_mask);

	debugfs_create_file("reg_addr", S_IRUSR | S_IWUSR, ar->debugfs_phy, ar,
	debugfs_create_file("reg_addr", 0600, ar->debugfs_phy, ar,
			    &fops_diag_reg_read);

	debugfs_create_file("reg_dump", S_IRUSR, ar->debugfs_phy, ar,
	debugfs_create_file("reg_dump", 0400, ar->debugfs_phy, ar,
			    &fops_reg_dump);

	debugfs_create_file("lrssi_roam_threshold", S_IRUSR | S_IWUSR,
	debugfs_create_file("lrssi_roam_threshold", 0600,
			    ar->debugfs_phy, ar, &fops_lrssi_roam_threshold);

	debugfs_create_file("reg_write", S_IRUSR | S_IWUSR,
	debugfs_create_file("reg_write", 0600,
			    ar->debugfs_phy, ar, &fops_diag_reg_write);

	debugfs_create_file("war_stats", S_IRUSR, ar->debugfs_phy, ar,
	debugfs_create_file("war_stats", 0400, ar->debugfs_phy, ar,
			    &fops_war_stats);

	debugfs_create_file("roam_table", S_IRUSR, ar->debugfs_phy, ar,
	debugfs_create_file("roam_table", 0400, ar->debugfs_phy, ar,
			    &fops_roam_table);

	debugfs_create_file("force_roam", S_IWUSR, ar->debugfs_phy, ar,
	debugfs_create_file("force_roam", 0200, ar->debugfs_phy, ar,
			    &fops_force_roam);

	debugfs_create_file("roam_mode", S_IWUSR, ar->debugfs_phy, ar,
	debugfs_create_file("roam_mode", 0200, ar->debugfs_phy, ar,
			    &fops_roam_mode);

	debugfs_create_file("keepalive", S_IRUSR | S_IWUSR, ar->debugfs_phy, ar,
	debugfs_create_file("keepalive", 0600, ar->debugfs_phy, ar,
			    &fops_keepalive);

	debugfs_create_file("disconnect_timeout", S_IRUSR | S_IWUSR,
	debugfs_create_file("disconnect_timeout", 0600,
			    ar->debugfs_phy, ar, &fops_disconnect_timeout);

	debugfs_create_file("create_qos", S_IWUSR, ar->debugfs_phy, ar,
	debugfs_create_file("create_qos", 0200, ar->debugfs_phy, ar,
			    &fops_create_qos);

	debugfs_create_file("delete_qos", S_IWUSR, ar->debugfs_phy, ar,
	debugfs_create_file("delete_qos", 0200, ar->debugfs_phy, ar,
			    &fops_delete_qos);

	debugfs_create_file("bgscan_interval", S_IWUSR,
	debugfs_create_file("bgscan_interval", 0200,
			    ar->debugfs_phy, ar, &fops_bgscan_int);

	debugfs_create_file("listen_interval", S_IRUSR | S_IWUSR,
	debugfs_create_file("listen_interval", 0600,
			    ar->debugfs_phy, ar, &fops_listen_int);

	debugfs_create_file("power_params", S_IWUSR, ar->debugfs_phy, ar,
	debugfs_create_file("power_params", 0200, ar->debugfs_phy, ar,
			    &fops_power_params);

	return 0;
+4 −5
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ static const struct file_operations fops_modal_eeprom = {
void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
				  struct ath_hw *ah)
{
	debugfs_create_file("modal_eeprom", S_IRUSR, debugfs_phy, ah,
	debugfs_create_file("modal_eeprom", 0400, debugfs_phy, ah,
			    &fops_modal_eeprom);
}
EXPORT_SYMBOL(ath9k_cmn_debug_modal_eeprom);
@@ -82,7 +82,7 @@ static const struct file_operations fops_base_eeprom = {
void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
				 struct ath_hw *ah)
{
	debugfs_create_file("base_eeprom", S_IRUSR, debugfs_phy, ah,
	debugfs_create_file("base_eeprom", 0400, debugfs_phy, ah,
			    &fops_base_eeprom);
}
EXPORT_SYMBOL(ath9k_cmn_debug_base_eeprom);
@@ -178,8 +178,7 @@ static const struct file_operations fops_recv = {
void ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
			  struct ath_rx_stats *rxstats)
{
	debugfs_create_file("recv", S_IRUSR, debugfs_phy, rxstats,
			    &fops_recv);
	debugfs_create_file("recv", 0400, debugfs_phy, rxstats, &fops_recv);
}
EXPORT_SYMBOL(ath9k_cmn_debug_recv);

@@ -255,7 +254,7 @@ static const struct file_operations fops_phy_err = {
void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
			     struct ath_rx_stats *rxstats)
{
	debugfs_create_file("phy_err", S_IRUSR, debugfs_phy, rxstats,
	debugfs_create_file("phy_err", 0400, debugfs_phy, rxstats,
			    &fops_phy_err);
}
EXPORT_SYMBOL(ath9k_cmn_debug_phy_err);
Loading