cfg80211: support sysfs namespaces
Enable using network namespaces with wireless devices even when sysfs is enabled using the same infrastructure that was built for netdevs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
d1f5b7a34a
commit
0460079495
@@ -110,6 +110,13 @@ static int wiphy_resume(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const void *wiphy_namespace(struct device *d)
|
||||
{
|
||||
struct wiphy *wiphy = container_of(d, struct wiphy, dev);
|
||||
|
||||
return wiphy_net(wiphy);
|
||||
}
|
||||
|
||||
struct class ieee80211_class = {
|
||||
.name = "ieee80211",
|
||||
.owner = THIS_MODULE,
|
||||
@@ -120,6 +127,8 @@ struct class ieee80211_class = {
|
||||
#endif
|
||||
.suspend = wiphy_suspend,
|
||||
.resume = wiphy_resume,
|
||||
.ns_type = &net_ns_type_operations,
|
||||
.namespace = wiphy_namespace,
|
||||
};
|
||||
|
||||
int wiphy_sysfs_init(void)
|
||||
|
Reference in New Issue
Block a user