mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-10 15:03:07 +00:00
017320ead3
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>
79 lines
2.4 KiB
Diff
79 lines
2.4 KiB
Diff
From 89fa0d75fb1be82330258082ed3d7fd452eb6076 Mon Sep 17 00:00:00 2001
|
|
From: Peter Oh <peter.oh@bowerswilkins.com>
|
|
Date: Mon, 27 Aug 2018 14:28:45 -0700
|
|
Subject: [PATCH 3/7] mesh: Allow DFS channels to be selected if dfs is enabled
|
|
|
|
Note: DFS is assumed to be usable if a country code has been set
|
|
|
|
Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
|
|
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
|
---
|
|
wpa_supplicant/wpa_supplicant.c | 24 ++++++++++++++++++------
|
|
1 file changed, 18 insertions(+), 6 deletions(-)
|
|
|
|
--- a/wpa_supplicant/wpa_supplicant.c
|
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
|
@@ -2345,6 +2345,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
|
int chwidth, seg0, seg1;
|
|
u32 vht_caps = 0;
|
|
int is_24ghz;
|
|
+ int dfs_enabled = wpa_s->conf->country[0] &&
|
|
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
|
|
|
|
freq->freq = ssid->frequency;
|
|
|
|
@@ -2432,8 +2434,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
|
return;
|
|
|
|
/* Check primary channel flags */
|
|
- if (pri_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
|
|
+ if (pri_chan->flag & HOSTAPD_CHAN_DISABLED)
|
|
return;
|
|
+ if (pri_chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
|
|
+ if (!dfs_enabled)
|
|
+ return;
|
|
|
|
freq->channel = pri_chan->chan;
|
|
|
|
@@ -2466,8 +2471,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
|
return;
|
|
|
|
/* Check secondary channel flags */
|
|
- if (sec_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
|
|
+ if (sec_chan->flag & HOSTAPD_CHAN_DISABLED)
|
|
return;
|
|
+ if (sec_chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
|
|
+ if (!dfs_enabled)
|
|
+ return;
|
|
|
|
if (ht40 == -1) {
|
|
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
|
|
@@ -2560,8 +2568,11 @@ skip_ht40:
|
|
return;
|
|
|
|
/* Back to HT configuration if channel not usable */
|
|
- if (chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
|
|
+ if (chan->flag & HOSTAPD_CHAN_DISABLED)
|
|
return;
|
|
+ if (chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
|
|
+ if (!dfs_enabled)
|
|
+ return;
|
|
}
|
|
|
|
chwidth = CHANWIDTH_80MHZ;
|
|
@@ -2581,10 +2592,11 @@ skip_ht40:
|
|
if (!chan)
|
|
continue;
|
|
|
|
- if (chan->flag & (HOSTAPD_CHAN_DISABLED |
|
|
- HOSTAPD_CHAN_NO_IR |
|
|
- HOSTAPD_CHAN_RADAR))
|
|
+ if (chan->flag & HOSTAPD_CHAN_DISABLED)
|
|
continue;
|
|
+ if (chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
|
|
+ if (!dfs_enabled)
|
|
+ continue;
|
|
|
|
/* Found a suitable second segment for 80+80 */
|
|
chwidth = CHANWIDTH_80P80MHZ;
|