summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2014-06-11 17:18:25 +0300
committerBen Hutchings <ben@decadent.org.uk>2019-09-23 21:12:09 +0100
commit4ddb257573f61238bca2e3482e2f9cd94627f936 (patch)
tree3d532381a1bc6bf1fc73e7aa754b607e4ef3333f /net/mac80211
parentfd56118648c89adbd7a64bc8e3e26ac4871d1c1a (diff)
downloadlinux-stable-4ddb257573f61238bca2e3482e2f9cd94627f936.tar.gz
linux-stable-4ddb257573f61238bca2e3482e2f9cd94627f936.tar.bz2
linux-stable-4ddb257573f61238bca2e3482e2f9cd94627f936.zip
mac80211: add API to request TDLS operation from userspace
commit c887f0d3a03283cb6fe2c32aae62229bebd3fa32 upstream. Write a mac80211 to the cfg80211 API for requesting a userspace TDLS operation. Define TDLS specific reason codes that can be used here. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tdls.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index 652813b2d3df..f00f77462a81 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -8,6 +8,7 @@
*/
#include <linux/ieee80211.h>
+#include <net/cfg80211.h>
#include "ieee80211_i.h"
static void ieee80211_tdls_add_ext_capab(struct sk_buff *skb)
@@ -323,3 +324,19 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
return 0;
}
+
+void ieee80211_tdls_oper_request(struct ieee80211_vif *vif, const u8 *peer,
+ enum nl80211_tdls_operation oper,
+ u16 reason_code, gfp_t gfp)
+{
+ struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+
+ if (vif->type != NL80211_IFTYPE_STATION || !vif->bss_conf.assoc) {
+ sdata_err(sdata, "Discarding TDLS oper %d - not STA or disconnected\n",
+ oper);
+ return;
+ }
+
+ cfg80211_tdls_oper_request(sdata->dev, peer, oper, reason_code, gfp);
+}
+EXPORT_SYMBOL(ieee80211_tdls_oper_request);