]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DFS: Allow switch to DFS channel after radar detection in ETSI
authorVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Fri, 12 May 2017 07:48:01 +0000 (13:18 +0530)
committerJouni Malinen <j@w1.fi>
Sat, 13 May 2017 17:01:44 +0000 (20:01 +0300)
This is to comply with uniform spreading requirement for ETSI domain
(section 4.7.2.7 in EN 301 893 - V1.8.1). ETSI uniform spreading
requires equal probability for the usable channels. The previous channel
selection logic after a radar detection did not fully comply with the
uniform spreading requirement for the domain by ignoring DFS channels.
Consider DFS channels also during channel selection when the current DFS
domain is ETSI.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
src/ap/dfs.c
src/ap/hostapd.h
src/ap/hw_features.c

index 295720100e16c35ed173169b2b840a504ed045c9..5a0d7814b79bec3a68850e9a86149e0a57f27b92 100644 (file)
@@ -889,6 +889,13 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
        if (iface->cac_started)
                return hostapd_dfs_start_channel_switch_cac(iface);
 
+       /*
+        * Allow selection of DFS channel in ETSI to comply with
+        * uniform spreading.
+        */
+       if (iface->dfs_domain == HOSTAPD_DFS_REGION_ETSI)
+               skip_radar = 0;
+
        /* Perform channel switch/CSA */
        channel = dfs_get_valid_channel(iface, &secondary_channel,
                                        &vht_oper_centr_freq_seg0_idx,
index e7c65f7bb74b2b0069fe87147268c6909b7b6000..88749338fee53666f4f228328754aa2f80688418 100644 (file)
@@ -475,6 +475,8 @@ struct hostapd_iface {
 
        struct dl_list sta_seen; /* struct hostapd_sta_info */
        unsigned int num_sta_seen;
+
+       u8 dfs_domain;
 };
 
 /* hostapd.c */
index da7c3f6371e4cff091d84fcb51d28e330dc2352e..a53fd23419dd3aed12af71874ab642c869afd53f 100644 (file)
@@ -93,6 +93,7 @@ int hostapd_get_hw_features(struct hostapd_iface *iface)
        }
 
        iface->hw_flags = flags;
+       iface->dfs_domain = dfs_domain;
 
        hostapd_free_hw_features(iface->hw_features, iface->num_hw_features);
        iface->hw_features = modes;