mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
78f1974bc5
Clean up conflicts/provides/depends hell and add PROVIDES for eapol-test variants while at it. Update mesh-DFS patchset from Peter Oh to v5 (with local fixes) which allows to drop two revert-patches for upstream commits which previously were necessary to un-break mesh-DFS support. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
80 lines
2.5 KiB
Diff
80 lines
2.5 KiB
Diff
From bbaa6142eadf229334436fdbf51aa65bb819f771 Mon Sep 17 00:00:00 2001
|
|
From: Peter Oh <peter.oh@bowerswilkins.com>
|
|
Date: Tue, 29 May 2018 14:39:15 -0700
|
|
Subject: [PATCH 11/18] 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
|
|
@@ -2060,6 +2060,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
|
struct hostapd_freq_params vht_freq;
|
|
int chwidth, seg0, seg1;
|
|
u32 vht_caps = 0;
|
|
+ int dfs_enabled = wpa_s->conf->country[0] &&
|
|
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
|
|
|
|
freq->freq = ssid->frequency;
|
|
|
|
@@ -2136,8 +2138,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;
|
|
|
|
#ifdef CONFIG_HT_OVERRIDES
|
|
if (ssid->disable_ht40)
|
|
@@ -2163,8 +2168,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;
|
|
|
|
freq->channel = pri_chan->chan;
|
|
|
|
@@ -2254,8 +2262,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
|
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 = VHT_CHANWIDTH_80MHZ;
|
|
@@ -2275,10 +2286,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
|
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 = VHT_CHANWIDTH_80P80MHZ;
|