aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-05-21 10:15:46 +0100
committerDaniel Golle <daniel@makrotopia.org>2020-05-21 10:21:59 +0100
commit017320ead3a21415ab876012d1a2844e783c071f (patch)
tree55903a1a5033ec72527e62cf7f3a9c3d7e3aba1d /package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch
parenta860fe2304c5c555af9113c93377ed7bb6e6abca (diff)
downloadupstream-017320ead3a21415ab876012d1a2844e783c071f.tar.gz
upstream-017320ead3a21415ab876012d1a2844e783c071f.tar.bz2
upstream-017320ead3a21415ab876012d1a2844e783c071f.zip
hostapd: bring back mesh patches
Bring back 802.11s mesh features to the level previously available before the recent hostapd version bump. This is mostly to support use of 802.11s on DFS channels, but also making mesh forwarding configurable which is crucial for use of 802.11s MAC with other routing protocols, such as batman-adv, on top. While at it, fix new compiler warning by adapting 700-wifi-reload.patch to upstream changes, now building without any warnings again. Fixes: 0a3ec87a66 ("hostapd: update to latest Git hostap_2_9-1238-gdd2daf0848ed") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch')
-rw-r--r--package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch b/package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch
new file mode 100644
index 0000000000..3d623a65b2
--- /dev/null
+++ b/package/network/services/hostapd/patches/015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch
@@ -0,0 +1,52 @@
+From 71e9c65a7c8af90a5fd11072062b596421316452 Mon Sep 17 00:00:00 2001
+From: Peter Oh <peter.oh@bowerswilkins.com>
+Date: Mon, 27 Aug 2018 14:28:46 -0700
+Subject: [PATCH 4/7] mesh: do not set offchanok on DFS channels in non-ETSI
+
+mac80211 does not allow mgmt tx to use off channel on
+DFS channels in non-ETSI domain, because it will invalidate
+CAC result on current operating channel.
+(mac80211 commit: 34373d12f3cbb74960a73431138ef619d857996f)
+Hence don't set offchanok for mgmt tx in case of DFS channels
+in non-ETSI.
+
+Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
+---
+ src/drivers/driver_nl80211.c | 21 ++++++++++++++++++++-
+ 1 file changed, 20 insertions(+), 1 deletion(-)
+
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -7788,6 +7788,10 @@ static int wpa_driver_nl80211_send_actio
+ u8 *buf;
+ struct ieee80211_hdr *hdr;
+ int offchanok = 1;
++ struct hostapd_hw_modes *modes;
++ int i;
++ u16 num_modes, flags;
++ u8 dfs_domain;
+
+ if (is_ap_interface(drv->nlmode) && (int) freq == bss->freq &&
+ bss->beacon_set)
+@@ -7816,6 +7820,21 @@ static int wpa_driver_nl80211_send_actio
+ os_memset(bss->rand_addr, 0, ETH_ALEN);
+ }
+
++ if (is_mesh_interface(drv->nlmode)) {
++ modes = nl80211_get_hw_feature_data(bss, &num_modes,
++ &flags, &dfs_domain);
++ if (dfs_domain != HOSTAPD_DFS_REGION_ETSI &&
++ ieee80211_is_dfs(bss->freq, modes, num_modes))
++ offchanok = 0;
++ if (modes) {
++ for (i = 0; i < num_modes; i++) {
++ os_free(modes[i].channels);
++ os_free(modes[i].rates);
++ }
++ os_free(modes);
++ }
++ }
++
+ if (is_ap_interface(drv->nlmode) &&
+ (!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) ||
+ (int) freq == bss->freq || drv->device_ap_sme ||