cfg80211: enable TDLS on P2P client interfaces

There's no reason TDLS should be prevented on P2P client
interfaces, and most of the code already handles it, so
allow adding stations for it.

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 93d08f0b785dd3878a3b84a9013a15e57e6b4344
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
[jjohnson@codeaurora.org: resolved 3.4 backport issues]
Change-Id: I75b5ebd4254c60d4e01aaf54f741468bc6f8d3f1
CRs-fixed: 458139
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d3e8c6e..69318b0 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2977,6 +2977,7 @@
 			return -EINVAL;
 		break;
 	case NL80211_IFTYPE_STATION:
+	case NL80211_IFTYPE_P2P_CLIENT:
 		/* Only TDLS peers can be added */
 		if (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)))
 			return -EINVAL;