]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Do not set offchanok on DFS channels in non-ETSI for mesh
authorPeter Oh <peter.oh@bowerswilkins.com>
Tue, 30 Jun 2020 12:18:59 +0000 (14:18 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 30 Nov 2020 18:12:08 +0000 (20:12 +0200)
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

index 94bf98210de114e297f683360e4f53503a226c43..60d3557df982e0de7ef3b5863605e0c7c7f1d7b6 100644 (file)
@@ -7950,6 +7950,28 @@ static int wpa_driver_nl80211_send_action(struct i802_bss *bss,
                os_memset(bss->rand_addr, 0, ETH_ALEN);
        }
 
+#ifdef CONFIG_MESH
+       if (is_mesh_interface(drv->nlmode)) {
+               struct hostapd_hw_modes *modes;
+               u16 num_modes, flags;
+               u8 dfs_domain;
+               int i;
+
+               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);
+               }
+       }
+#endif /* CONFIG_MESH */
+
        if (is_ap_interface(drv->nlmode) &&
            (!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) ||
             (int) freq == bss->freq || drv->device_ap_sme ||