From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 3/3] mac80211: allow using network namespaces
Date: Tue, 14 Jul 2009 00:33:36 +0200 [thread overview]
Message-ID: <20090713223413.628454212@sipsolutions.net> (raw)
In-Reply-To: 20090713223333.042733013@sipsolutions.net
This finally opens up the ability to put mac80211 devices
into different network namespaces. As long as you don't
have sysfs, that is.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
Semantically, this depends on both
mac80211: cooperate more with network namespaces
and
cfg80211: make aware of net namespaces
but in the code only the latter dependency is obvious,
so I'm sending it as a separate patch.
net/mac80211/iface.c | 1 +
net/mac80211/main.c | 1 +
2 files changed, 2 insertions(+)
--- wireless-testing.orig/net/mac80211/main.c 2009-07-14 00:29:34.000000000 +0200
+++ wireless-testing/net/mac80211/main.c 2009-07-14 00:30:10.000000000 +0200
@@ -620,6 +620,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(
if (!wiphy)
return NULL;
+ wiphy->netnsok = true;
wiphy->privid = mac80211_wiphy_privid;
/* Yes, putting cfg80211_bss into ieee80211_bss is a hack */
--- wireless-testing.orig/net/mac80211/iface.c 2009-07-14 00:30:05.000000000 +0200
+++ wireless-testing/net/mac80211/iface.c 2009-07-14 00:30:10.000000000 +0200
@@ -787,6 +787,7 @@ int ieee80211_if_add(struct ieee80211_lo
name, ieee80211_if_setup);
if (!ndev)
return -ENOMEM;
+ dev_net_set(ndev, wiphy_net(local->hw.wiphy));
ndev->needed_headroom = local->tx_headroom +
4*6 /* four MAC addresses */
--
next prev parent reply other threads:[~2009-07-13 22:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 22:33 [PATCH 0/3] wireless network namespace work Johannes Berg
2009-07-13 22:33 ` [PATCH 1/3] mac80211: cooperate more with network namespaces Johannes Berg
2009-07-27 0:04 ` Pavel Roskin
2009-07-27 8:27 ` Johannes Berg
2009-07-27 15:34 ` Pavel Roskin
2009-07-27 15:59 ` Johannes Berg
2009-07-27 16:02 ` Johannes Berg
2009-07-27 16:12 ` Pavel Roskin
2009-07-27 16:40 ` Pavel Roskin
2009-07-27 18:22 ` Johannes Berg
2009-07-27 19:02 ` Pavel Roskin
2009-07-27 19:07 ` Johannes Berg
2009-07-27 17:30 ` Johannes Berg
2009-07-13 22:33 ` [PATCH 2/3] cfg80211: make aware of net namespaces Johannes Berg
2009-07-13 22:33 ` Johannes Berg [this message]
2009-07-13 22:39 ` [HACK] mac80211: don't set netdev parent pointer Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090713223413.628454212@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).