[03/58] cfg80211: fix P2P GO interface teardown

Message ID 1378225442-20654-4-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa Sept. 3, 2013, 4:23 p.m. -stable review patch.  If anyone has any objections, please let me know.


From: Johannes Berg <johannes.berg@intel.com>

commit 74418edec915d0f446debebde08d170c7b8ba0ee upstream.

When a P2P GO interface goes down, cfg80211 doesn't properly
tear it down, leading to warnings later. Add the GO interface
type to the enumeration to tear it down like AP interfaces.
Otherwise, we leave it pending and mac80211's state can get
very confused, leading to warnings later.

Reported-by: Ilan Peer <ilan.peer@intel.com>
Tested-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
 net/wireless/core.c | 1 +
 1 file changed, 1 insertion(+)


diff --git a/net/wireless/core.c b/net/wireless/core.c
index ce1eff7..e4f226c 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -841,6 +841,7 @@  void cfg80211_leave(struct cfg80211_registered_device *rdev,
 		cfg80211_leave_mesh(rdev, dev);
 	case NL80211_IFTYPE_AP:
+	case NL80211_IFTYPE_P2P_GO:
 		cfg80211_stop_ap(rdev, dev);