summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2014-06-11 17:18:25 +0300
committerJohannes Berg <johannes.berg@intel.com>2014-06-23 14:28:17 +0200
commitc887f0d3a03283cb6fe2c32aae62229bebd3fa32 (patch)
tree36a9a27755c5d10048974e98c3a90ff53c3ea03b /net
parentdb67d661e82da22f751585a7f284a9251e8a2a51 (diff)
downloadblackbird-op-linux-c887f0d3a03283cb6fe2c32aae62229bebd3fa32.tar.gz
blackbird-op-linux-c887f0d3a03283cb6fe2c32aae62229bebd3fa32.zip
mac80211: add API to request TDLS operation from userspace
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>
Diffstat (limited to 'net')
-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 0ba7e4c029c8..6f3a3ad0cb7c 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"
/* give usermode some time for retries in setting up the TDLS session */
@@ -514,3 +515,19 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
mutex_unlock(&local->mtx);
return ret;
}
+
+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);
OpenPOWER on IntegriCloud