Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166573
b: refs/heads/master
c: 8f1546c
h: refs/heads/master
i:
  166571: 60dda14
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Sep 28, 2009
1 parent e65eb5c commit ddb2ba0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 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: 8503bd8c7dc6f82ec2de9d05e0a476e6ca5adc8b
refs/heads/master: 8f1546cadf7ac5e9a40d54089a1c7302264ec49b
1 change: 1 addition & 0 deletions trunk/include/net/wext.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cm
void __user *arg);
extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
unsigned long arg);
extern struct iw_statistics *get_wireless_stats(struct net_device *dev);
#else
static inline int wext_proc_init(struct net *net)
{
Expand Down
12 changes: 5 additions & 7 deletions trunk/net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <net/sock.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
#include <net/iw_handler.h>
#include <net/wext.h>

#include "net-sysfs.h"

Expand Down Expand Up @@ -363,15 +363,13 @@ static ssize_t wireless_show(struct device *d, char *buf,
char *))
{
struct net_device *dev = to_net_dev(d);
const struct iw_statistics *iw = NULL;
const struct iw_statistics *iw;
ssize_t ret = -EINVAL;

read_lock(&dev_base_lock);
if (dev_isalive(dev)) {
if (dev->wireless_handlers &&
dev->wireless_handlers->get_wireless_stats)
iw = dev->wireless_handlers->get_wireless_stats(dev);
if (iw != NULL)
iw = get_wireless_stats(dev);
if (iw)
ret = (*format)(iw, buf);
}
read_unlock(&dev_base_lock);
Expand Down Expand Up @@ -505,7 +503,7 @@ int netdev_register_kobject(struct net_device *net)
*groups++ = &netstat_group;

#ifdef CONFIG_WIRELESS_EXT_SYSFS
if (net->wireless_handlers && net->wireless_handlers->get_wireless_stats)
if (net->wireless_handlers || net->ieee80211_ptr)
*groups++ = &wireless_group;
#endif
#endif /* CONFIG_SYSFS */
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/wireless/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ static iw_handler get_handler(struct net_device *dev, unsigned int cmd)
/*
* Get statistics out of the driver
*/
static struct iw_statistics *get_wireless_stats(struct net_device *dev)
struct iw_statistics *get_wireless_stats(struct net_device *dev)
{
/* New location */
if ((dev->wireless_handlers != NULL) &&
Expand Down

0 comments on commit ddb2ba0

Please sign in to comment.