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:
Johannes Berg
2010-08-05 17:45:15 +02:00
committed by John W. Linville
parent d1f5b7a34a
commit 0460079495
4 changed files with 19 additions and 2 deletions

View File

@@ -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)