summaryrefslogtreecommitdiffstats
path: root/net/wireless/rdev-ops.h
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2018-03-26 19:52:42 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-03-29 13:44:19 +0200
commit2576a9ace47eba28a682d249d1d6402f891808c9 (patch)
treeb45b4cfccad58ef11f8875b2fcf317f41deb03c7 /net/wireless/rdev-ops.h
parentnl80211: Add CMD_CONTROL_PORT_FRAME API (diff)
downloadlinux-2576a9ace47eba28a682d249d1d6402f891808c9.tar.xz
linux-2576a9ace47eba28a682d249d1d6402f891808c9.zip
nl80211: Implement TX of control port frames
This commit implements the TX side of NL80211_CMD_CONTROL_PORT_FRAME. Userspace provides the raw EAPoL frame using NL80211_ATTR_FRAME. Userspace should also provide the destination address and the protocol type to use when sending the frame. This is used to implement TX of Pre-authentication frames. If CONTROL_PORT_ETHERTYPE_NO_ENCRYPT is specified, then the driver will be asked not to encrypt the outgoing frame. A new EXT_FEATURE flag is introduced so that nl80211 code can check whether a given wiphy has capability to pass EAPoL frames over nl80211. Signed-off-by: Denis Kenzior <denkenz@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/rdev-ops.h')
-rw-r--r--net/wireless/rdev-ops.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 84f23ae015fc..87479a53411b 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -714,6 +714,21 @@ static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev,
return ret;
}
+static inline int rdev_tx_control_port(struct cfg80211_registered_device *rdev,
+ struct net_device *dev,
+ const void *buf, size_t len,
+ const u8 *dest, __be16 proto,
+ const bool noencrypt)
+{
+ int ret;
+ trace_rdev_tx_control_port(&rdev->wiphy, dev, buf, len,
+ dest, proto, noencrypt);
+ ret = rdev->ops->tx_control_port(&rdev->wiphy, dev, buf, len,
+ dest, proto, noencrypt);
+ trace_rdev_return_int(&rdev->wiphy, ret);
+ return ret;
+}
+
static inline int
rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev, u64 cookie)