Patchwork [3.5.y.z,extended,stable] Patch "nl80211: fix mgmt tx status and testmode reporting for netns" has been added to staging queue

mail settings
Submitter Luis Henriques
Date Aug. 4, 2013, 9:49 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/264474/
State New
Headers show


Luis Henriques - Aug. 4, 2013, 9:49 a.m.
This is a note to let you know that I have just added a patch titled

    nl80211: fix mgmt tx status and testmode reporting for netns

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From d235f1a7859a5e6ce2ab41010d3ed771b79d5580 Mon Sep 17 00:00:00 2001
From: Michal Kazior <>
Date: Tue, 25 Jun 2013 09:17:17 +0200
Subject: [PATCH] nl80211: fix mgmt tx status and testmode reporting for netns

commit a0ec570f4f69c4cb700d743a915096c2c8f56a99 upstream.

These two events were sent to the default network

This caused AP mode in a non-default netns to not
work correctly. Mgmt tx status was multicasted to
a different (default) netns instead of the one the
AP was in.

Signed-off-by: Michal Kazior <>
Signed-off-by: Johannes Berg <>
Signed-off-by: Luis Henriques <>
 net/wireless/nl80211.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)



diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 206465d..ad9a11c 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -5212,12 +5212,14 @@  EXPORT_SYMBOL(cfg80211_testmode_alloc_event_skb);

 void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp)
+	struct cfg80211_registered_device *rdev = ((void **)skb->cb)[0];
 	void *hdr = ((void **)skb->cb)[1];
 	struct nlattr *data = ((void **)skb->cb)[2];

 	nla_nest_end(skb, data);
 	genlmsg_end(skb, hdr);
-	genlmsg_multicast(skb, 0,, gfp);
+	genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), skb, 0,
+, gfp);
@@ -7925,7 +7927,8 @@  void nl80211_send_mgmt_tx_status(struct cfg80211_registered_device *rdev,

 	genlmsg_end(msg, hdr);

-	genlmsg_multicast(msg, 0,, gfp);
+	genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
+, gfp);