mac80211: add 802.11 encapsulation offloading support
authorJohn Crispin <john@phrozen.org>
Mon, 25 Nov 2019 10:04:37 +0000 (11:04 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 13 Dec 2019 19:02:36 +0000 (20:02 +0100)
commit50ff477a8639fa1fbbeecb5a6f2f8b6c5557ecec
tree80f92c0113ec7e174a6595cce0666cdc7ee5c3ce
parent9bcb084f0b648d032efdbb8226fe33663f8fca79
mac80211: add 802.11 encapsulation offloading support

This patch adds a new transmit path for hardware that supports 802.11
encapsulation offloading. In those cases 802.3 frames get passed
directly to the driver allowing the hardware to handle the encapsulation.
Some features such as monitor mode and TKIP would break when encapsulation
offloading is enabled. If any of these get enabled, the code will alwyas
fallback to the normal sw encapsulation data path.

The patch defines a secondary netdev_ops struct that the device gets
assigned if 802.11 encap support is available and enabled. The driver
needs to enable the support on a per vif basis if it finds that all
pre-reqs are meet.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: John Crispin <john@phrozen.org>
Link: https://lore.kernel.org/r/20191125100438.16539-1-john@phrozen.org
[reword comments, remove SUPPORTS_80211_ENCAP HW flag, minor cleanups]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/key.c
net/mac80211/status.c
net/mac80211/tx.c