2020-07-23 17:34:00 +00:00
|
|
|
From af8dcbc87466ed6472850a4f1cfe252652cb3d26 Mon Sep 17 00:00:00 2001
|
2020-05-21 09:15:46 +00:00
|
|
|
From: Peter Oh <peter.oh@bowerswilkins.com>
|
2020-07-23 17:34:00 +00:00
|
|
|
Date: Tue, 30 Jun 2020 14:18:59 +0200
|
|
|
|
Subject: [PATCH 11/19] mesh: do not set offchanok on DFS channels in non-ETSI
|
2020-05-21 09:15:46 +00:00
|
|
|
|
|
|
|
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>
|
|
|
|
---
|
2020-07-23 17:34:00 +00:00
|
|
|
src/drivers/driver_nl80211.c | 19 +++++++++++++++++++
|
|
|
|
1 file changed, 19 insertions(+)
|
2020-05-21 09:15:46 +00:00
|
|
|
|
|
|
|
--- a/src/drivers/driver_nl80211.c
|
|
|
|
+++ b/src/drivers/driver_nl80211.c
|
2020-07-23 17:34:00 +00:00
|
|
|
@@ -7788,7 +7788,11 @@ static int wpa_driver_nl80211_send_actio
|
|
|
|
int ret = -1;
|
2020-05-21 09:15:46 +00:00
|
|
|
u8 *buf;
|
|
|
|
struct ieee80211_hdr *hdr;
|
|
|
|
+ struct hostapd_hw_modes *modes;
|
2020-07-23 17:34:00 +00:00
|
|
|
int offchanok = 1;
|
2020-05-21 09:15:46 +00:00
|
|
|
+ u16 num_modes, flags;
|
|
|
|
+ u8 dfs_domain;
|
2020-07-23 17:34:00 +00:00
|
|
|
+ int i;
|
2020-05-21 09:15:46 +00:00
|
|
|
|
|
|
|
if (is_ap_interface(drv->nlmode) && (int) freq == bss->freq &&
|
|
|
|
bss->beacon_set)
|
2020-06-08 15:35:32 +00:00
|
|
|
@@ -7817,6 +7821,21 @@ static int wpa_driver_nl80211_send_actio
|
2020-05-21 09:15:46 +00:00
|
|
|
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 ||
|