Commit 011159a0 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by John W. Linville

airo: correct proc entry creation interfaces

* use proc_mkdir_mode() instead of create_proc_entry(S_IFDIR|...),
  export proc_mkdir_mode() for that, oh well.
* don't supply S_IFREG to proc_create_data(), it's unnecessary
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9368a9a2
...@@ -4500,17 +4500,15 @@ static int setup_proc_entry( struct net_device *dev, ...@@ -4500,17 +4500,15 @@ static int setup_proc_entry( struct net_device *dev,
struct proc_dir_entry *entry; struct proc_dir_entry *entry;
/* First setup the device directory */ /* First setup the device directory */
strcpy(apriv->proc_name,dev->name); strcpy(apriv->proc_name,dev->name);
apriv->proc_entry = create_proc_entry(apriv->proc_name, apriv->proc_entry = proc_mkdir_mode(apriv->proc_name, airo_perm,
S_IFDIR|airo_perm, airo_entry);
airo_entry);
if (!apriv->proc_entry) if (!apriv->proc_entry)
goto fail; goto fail;
apriv->proc_entry->uid = proc_uid; apriv->proc_entry->uid = proc_uid;
apriv->proc_entry->gid = proc_gid; apriv->proc_entry->gid = proc_gid;
/* Setup the StatsDelta */ /* Setup the StatsDelta */
entry = proc_create_data("StatsDelta", entry = proc_create_data("StatsDelta", S_IRUGO & proc_perm,
S_IFREG | (S_IRUGO&proc_perm),
apriv->proc_entry, &proc_statsdelta_ops, dev); apriv->proc_entry, &proc_statsdelta_ops, dev);
if (!entry) if (!entry)
goto fail_stats_delta; goto fail_stats_delta;
...@@ -4518,8 +4516,7 @@ static int setup_proc_entry( struct net_device *dev, ...@@ -4518,8 +4516,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the Stats */ /* Setup the Stats */
entry = proc_create_data("Stats", entry = proc_create_data("Stats", S_IRUGO & proc_perm,
S_IFREG | (S_IRUGO&proc_perm),
apriv->proc_entry, &proc_stats_ops, dev); apriv->proc_entry, &proc_stats_ops, dev);
if (!entry) if (!entry)
goto fail_stats; goto fail_stats;
...@@ -4527,8 +4524,7 @@ static int setup_proc_entry( struct net_device *dev, ...@@ -4527,8 +4524,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the Status */ /* Setup the Status */
entry = proc_create_data("Status", entry = proc_create_data("Status", S_IRUGO & proc_perm,
S_IFREG | (S_IRUGO&proc_perm),
apriv->proc_entry, &proc_status_ops, dev); apriv->proc_entry, &proc_status_ops, dev);
if (!entry) if (!entry)
goto fail_status; goto fail_status;
...@@ -4536,8 +4532,7 @@ static int setup_proc_entry( struct net_device *dev, ...@@ -4536,8 +4532,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the Config */ /* Setup the Config */
entry = proc_create_data("Config", entry = proc_create_data("Config", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_config_ops, dev); apriv->proc_entry, &proc_config_ops, dev);
if (!entry) if (!entry)
goto fail_config; goto fail_config;
...@@ -4545,8 +4540,7 @@ static int setup_proc_entry( struct net_device *dev, ...@@ -4545,8 +4540,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the SSID */ /* Setup the SSID */
entry = proc_create_data("SSID", entry = proc_create_data("SSID", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_SSID_ops, dev); apriv->proc_entry, &proc_SSID_ops, dev);
if (!entry) if (!entry)
goto fail_ssid; goto fail_ssid;
...@@ -4554,8 +4548,7 @@ static int setup_proc_entry( struct net_device *dev, ...@@ -4554,8 +4548,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the APList */ /* Setup the APList */
entry = proc_create_data("APList", entry = proc_create_data("APList", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_APList_ops, dev); apriv->proc_entry, &proc_APList_ops, dev);
if (!entry) if (!entry)
goto fail_aplist; goto fail_aplist;
...@@ -4563,8 +4556,7 @@ static int setup_proc_entry( struct net_device *dev, ...@@ -4563,8 +4556,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the BSSList */ /* Setup the BSSList */
entry = proc_create_data("BSSList", entry = proc_create_data("BSSList", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_BSSList_ops, dev); apriv->proc_entry, &proc_BSSList_ops, dev);
if (!entry) if (!entry)
goto fail_bsslist; goto fail_bsslist;
...@@ -4572,8 +4564,7 @@ static int setup_proc_entry( struct net_device *dev, ...@@ -4572,8 +4564,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the WepKey */ /* Setup the WepKey */
entry = proc_create_data("WepKey", entry = proc_create_data("WepKey", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_wepkey_ops, dev); apriv->proc_entry, &proc_wepkey_ops, dev);
if (!entry) if (!entry)
goto fail_wepkey; goto fail_wepkey;
...@@ -5705,9 +5696,7 @@ static int __init airo_init_module( void ) ...@@ -5705,9 +5696,7 @@ static int __init airo_init_module( void )
{ {
int i; int i;
airo_entry = create_proc_entry("driver/aironet", airo_entry = proc_mkdir_mode("driver/aironet", airo_perm, NULL);
S_IFDIR | airo_perm,
NULL);
if (airo_entry) { if (airo_entry) {
airo_entry->uid = proc_uid; airo_entry->uid = proc_uid;
......
...@@ -674,6 +674,7 @@ struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, ...@@ -674,6 +674,7 @@ struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode,
} }
return ent; return ent;
} }
EXPORT_SYMBOL(proc_mkdir_mode);
struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name,
struct proc_dir_entry *parent) struct proc_dir_entry *parent)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment