diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /net/wireless/sysfs.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'net/wireless/sysfs.c')
-rw-r--r-- | net/wireless/sysfs.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c index 9f2cef3e0ca0..c6e4ca6a7d2e 100644 --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c | |||
@@ -35,6 +35,14 @@ SHOW_FMT(index, "%d", wiphy_idx); | |||
35 | SHOW_FMT(macaddress, "%pM", wiphy.perm_addr); | 35 | SHOW_FMT(macaddress, "%pM", wiphy.perm_addr); |
36 | SHOW_FMT(address_mask, "%pM", wiphy.addr_mask); | 36 | SHOW_FMT(address_mask, "%pM", wiphy.addr_mask); |
37 | 37 | ||
38 | static ssize_t name_show(struct device *dev, | ||
39 | struct device_attribute *attr, | ||
40 | char *buf) { | ||
41 | struct wiphy *wiphy = &dev_to_rdev(dev)->wiphy; | ||
42 | return sprintf(buf, "%s\n", dev_name(&wiphy->dev)); | ||
43 | } | ||
44 | |||
45 | |||
38 | static ssize_t addresses_show(struct device *dev, | 46 | static ssize_t addresses_show(struct device *dev, |
39 | struct device_attribute *attr, | 47 | struct device_attribute *attr, |
40 | char *buf) | 48 | char *buf) |
@@ -57,6 +65,7 @@ static struct device_attribute ieee80211_dev_attrs[] = { | |||
57 | __ATTR_RO(macaddress), | 65 | __ATTR_RO(macaddress), |
58 | __ATTR_RO(address_mask), | 66 | __ATTR_RO(address_mask), |
59 | __ATTR_RO(addresses), | 67 | __ATTR_RO(addresses), |
68 | __ATTR_RO(name), | ||
60 | {} | 69 | {} |
61 | }; | 70 | }; |
62 | 71 | ||
@@ -84,7 +93,7 @@ static int wiphy_suspend(struct device *dev, pm_message_t state) | |||
84 | 93 | ||
85 | if (rdev->ops->suspend) { | 94 | if (rdev->ops->suspend) { |
86 | rtnl_lock(); | 95 | rtnl_lock(); |
87 | ret = rdev->ops->suspend(&rdev->wiphy); | 96 | ret = rdev->ops->suspend(&rdev->wiphy, rdev->wowlan); |
88 | rtnl_unlock(); | 97 | rtnl_unlock(); |
89 | } | 98 | } |
90 | 99 | ||
@@ -110,6 +119,13 @@ static int wiphy_resume(struct device *dev) | |||
110 | return ret; | 119 | return ret; |
111 | } | 120 | } |
112 | 121 | ||
122 | static const void *wiphy_namespace(struct device *d) | ||
123 | { | ||
124 | struct wiphy *wiphy = container_of(d, struct wiphy, dev); | ||
125 | |||
126 | return wiphy_net(wiphy); | ||
127 | } | ||
128 | |||
113 | struct class ieee80211_class = { | 129 | struct class ieee80211_class = { |
114 | .name = "ieee80211", | 130 | .name = "ieee80211", |
115 | .owner = THIS_MODULE, | 131 | .owner = THIS_MODULE, |
@@ -120,6 +136,8 @@ struct class ieee80211_class = { | |||
120 | #endif | 136 | #endif |
121 | .suspend = wiphy_suspend, | 137 | .suspend = wiphy_suspend, |
122 | .resume = wiphy_resume, | 138 | .resume = wiphy_resume, |
139 | .ns_type = &net_ns_type_operations, | ||
140 | .namespace = wiphy_namespace, | ||
123 | }; | 141 | }; |
124 | 142 | ||
125 | int wiphy_sysfs_init(void) | 143 | int wiphy_sysfs_init(void) |