Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370120
b: refs/heads/master
c: c4558a2
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Al Viro committed May 1, 2013
1 parent db3ee9d commit 0b84c41
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 270b5ac2151707c25d3327722c5badfbd95945bc
refs/heads/master: c4558a26ff661b5299942ce2b735f3cab4aed1e5
1 change: 0 additions & 1 deletion trunk/drivers/staging/rtl8187se/r8180.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ typedef struct r8180_priv
struct Stats stats;
struct _link_detect_t link_detect; //YJ,add,080828
struct iw_statistics wstats;
struct proc_dir_entry *dir_dev;

/*RX stuff*/
u32 *rxring;
Expand Down
26 changes: 8 additions & 18 deletions trunk/drivers/staging/rtl8187se/r8180_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,7 @@ void rtl8180_proc_module_remove(void)

void rtl8180_proc_remove_one(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
if (priv->dir_dev) {
remove_proc_entry("stats-hw", priv->dir_dev);
remove_proc_entry("stats-tx", priv->dir_dev);
remove_proc_entry("stats-rx", priv->dir_dev);
remove_proc_entry("registers", priv->dir_dev);
priv->dir_dev = NULL;
}
remove_proc_subtree(dev->name, rtl8180_proc);
}

/*
Expand Down Expand Up @@ -335,22 +328,19 @@ static const struct rtl8180_proc_file rtl8180_proc_files[] = {
void rtl8180_proc_init_one(struct net_device *dev)
{
const struct rtl8180_proc_file *f;
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct proc_dir_entry *dir;

priv->dir_dev = rtl8180_proc;
if (!priv->dir_dev) {
DMESGE("Unable to initialize /proc/net/r8180/%s\n",
dev->name);
dir = proc_mkdir_data(dev->name, 0, rtl8180_proc, dev);
if (!dir) {
DMESGE("Unable to initialize /proc/net/r8180/%s\n", dev->name);
return;
}
priv->dir_dev->data = dev;

for (f = rtl8180_proc_files; f->name[0]; f++) {
if (!proc_create_data(f->name, S_IFREG | S_IRUGO,
priv->dir_dev,
if (!proc_create_data(f->name, S_IFREG | S_IRUGO, dir,
&rtl8180_proc_fops, f->show)) {
DMESGE("Unable to initialize /proc/net/r8180/%s\n",
f->name);
DMESGE("Unable to initialize /proc/net/r8180/%s/%s\n",
dev->name, f->name);
return;
}
}
Expand Down

0 comments on commit 0b84c41

Please sign in to comment.