mac80211: Honor SW_CRYPTO_CONTROL for unicast keys in AP VLAN mode
authorAlexander Wetzel <alexander@wetzel-home.de>
Sat, 9 Feb 2019 14:01:38 +0000 (15:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:21:54 +0000 (07:21 +0200)
commita78c3898de59bf790f0f98fd4c087505d1a16007
tree25801787bb8e3fbf957780cf25db18ecd4fd1372
parent574be221407e4f4780c413a87f1fc27dea86995f
mac80211: Honor SW_CRYPTO_CONTROL for unicast keys in AP VLAN mode

commit 78ad2341521d5ea96cb936244ed4c4c4ef9ec13b upstream.

Restore SW_CRYPTO_CONTROL operation on AP_VLAN interfaces for unicast
keys, the original override was intended to be done for group keys as
those are treated specially by mac80211 and would always have been
rejected.

Now the situation is that AP_VLAN support must be enabled by the driver
if it can support it (meaning it can support software crypto GTK TX).

Thus, also simplify the code - if we get here with AP_VLAN and non-
pairwise key, software crypto must be used (driver doesn't know about
the interface) and can be used (driver must've advertised AP_VLAN if
it also uses SW_CRYPTO_CONTROL).

Fixes: db3bdcb9c3ff ("mac80211: allow AP_VLAN operation on crypto controlled devices")
Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
[rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/key.c