Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213992
b: refs/heads/master
c: 0460079
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Aug 16, 2010
1 parent 26866e4 commit e6e65fd
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 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: d1f5b7a34aa5ff703c4966ea2652d4212ac75940
refs/heads/master: 04600794958f1833f5571c6cde40f260ab557f55
2 changes: 2 additions & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -2171,6 +2171,8 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
extern int netdev_class_create_file(struct class_attribute *class_attr);
extern void netdev_class_remove_file(struct class_attribute *class_attr);

extern struct kobj_ns_type_operations net_ns_type_operations;

extern char *netdev_drivername(const struct net_device *dev, char *buffer, int len);

extern void linkwatch_run_queue(void);
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,12 +789,13 @@ static const void *net_netlink_ns(struct sock *sk)
return sock_net(sk);
}

static struct kobj_ns_type_operations net_ns_type_operations = {
struct kobj_ns_type_operations net_ns_type_operations = {
.type = KOBJ_NS_TYPE_NET,
.current_ns = net_current_ns,
.netlink_ns = net_netlink_ns,
.initial_ns = net_initial_ns,
};
EXPORT_SYMBOL_GPL(net_ns_type_operations);

static void net_kobj_ns_exit(struct net *net)
{
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,16 @@ int cfg80211_switch_netns(struct cfg80211_registered_device *rdev,
WARN_ON(err);
wdev->netdev->features |= NETIF_F_NETNS_LOCAL;
}

return err;
}

wiphy_net_set(&rdev->wiphy, net);

return err;
err = device_rename(&rdev->wiphy.dev, dev_name(&rdev->wiphy.dev));
WARN_ON(err);

return 0;
}

static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data)
Expand Down
9 changes: 9 additions & 0 deletions trunk/net/wireless/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit e6e65fd

Please sign in to comment.