summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorManikanta Pubbisetty <mpubbise@codeaurora.org>2019-05-08 12:25:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-25 06:36:01 +0300
commitccf6a155844bd7aad395f0c755b879fec870b7e0 (patch)
treed40ffbf96ea198ce0b13578c7b15638f1d57d0f6 /net/mac80211
parent0e879ef1cb5baddebe1f12a9a3940a87d8e61558 (diff)
downloadlinux-ccf6a155844bd7aad395f0c755b879fec870b7e0.tar.xz
{nl,mac}80211: allow 4addr AP operation on crypto controlled devices
commit 33d915d9e8ce811d8958915ccd18d71a66c7c495 upstream. As per the current design, in the case of sw crypto controlled devices, it is the device which advertises the support for AP/VLAN iftype based on it's ability to tranmsit packets encrypted in software (In VLAN functionality, group traffic generated for a specific VLAN group is always encrypted in software). Commit db3bdcb9c3ff ("mac80211: allow AP_VLAN operation on crypto controlled devices") has introduced this change. Since 4addr AP operation also uses AP/VLAN iftype, this conditional way of advertising AP/VLAN support has broken 4addr AP mode operation on crypto controlled devices which do not support VLAN functionality. In the case of ath10k driver, not all firmwares have support for VLAN functionality but all can support 4addr AP operation. Because AP/VLAN support is not advertised for these devices, 4addr AP operations are also blocked. Fix this by allowing 4addr operation on devices which do not support AP/VLAN iftype but can support 4addr AP operation (decision is based on the wiphy flag WIPHY_FLAG_4ADDR_AP). Cc: stable@vger.kernel.org Fixes: db3bdcb9c3ff ("mac80211: allow AP_VLAN operation on crypto controlled devices") Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 3deaa01ebee4..2558a34c9df1 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -3523,7 +3523,9 @@ int ieee80211_check_combinations(struct ieee80211_sub_if_data *sdata,
}
/* Always allow software iftypes */
- if (local->hw.wiphy->software_iftypes & BIT(iftype)) {
+ if (local->hw.wiphy->software_iftypes & BIT(iftype) ||
+ (iftype == NL80211_IFTYPE_AP_VLAN &&
+ local->hw.wiphy->flags & WIPHY_FLAG_4ADDR_AP)) {
if (radar_detect)
return -EINVAL;
return 0;