]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DFS: Add ieee80211h hostapd configuration parameter
authorSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Thu, 9 May 2013 17:14:53 +0000 (20:14 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 9 May 2013 17:14:53 +0000 (20:14 +0300)
This patch is based on the original work by Boris Presman and
Victor Goldenshtein. Channel Switch Announcement support has been
removed and event handling as well as channel set handling was
changed, among various other changes.

Cc: Boris Presman <boris.presman@ti.com>
Cc: Victor Goldenshtein <victorg@ti.com>
Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.h

index 62136cabff1f94fb66a09fb1a097b6414d282937..3394f0013a55b53b6b9b9ab049f7dc57ae1c218e 100644 (file)
@@ -1223,6 +1223,12 @@ static int hostapd_config_check(struct hostapd_config *conf)
                return -1;
        }
 
+       if (conf->ieee80211h && !conf->ieee80211d) {
+               wpa_printf(MSG_ERROR, "Cannot enable IEEE 802.11h without "
+                          "IEEE 802.11d enabled");
+               return -1;
+       }
+
        for (i = 0; i < conf->num_bss; i++) {
                if (hostapd_config_check_bss(&conf->bss[i], conf))
                        return -1;
@@ -1784,6 +1790,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
                        conf->country[2] = ' ';
                } else if (os_strcmp(buf, "ieee80211d") == 0) {
                        conf->ieee80211d = atoi(pos);
+               } else if (os_strcmp(buf, "ieee80211h") == 0) {
+                       conf->ieee80211h = atoi(pos);
                } else if (os_strcmp(buf, "ieee8021x") == 0) {
                        bss->ieee802_1x = atoi(pos);
                } else if (os_strcmp(buf, "eapol_version") == 0) {
index 86015bf19646e8a699e699006deb1b7390a38988..be15b860f703ad932f8300b2e3595679c33ad4af 100644 (file)
@@ -105,6 +105,12 @@ ssid=test
 # (default: 0 = disabled)
 #ieee80211d=1
 
+# Enable IEEE 802.11h. This enables radar detection and DFS support if
+# available. DFS support is required on outdoor 5 GHz channels in most countries
+# of the world. This can be used only with ieee80211d=1.
+# (default: 0 = disabled)
+#ieee80211h=1
+
 # Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g,
 # ad = IEEE 802.11ad (60 GHz); a/g options are used with IEEE 802.11n, too, to
 # specify band)
index 16134da97a95c0db07ee3d89b04b791d9a00c80e..7c9ea907466826de3eaa5f1176e6d8a7ac67cfaa 100644 (file)
@@ -498,6 +498,8 @@ struct hostapd_config {
 
        int ieee80211d;
 
+       int ieee80211h; /* DFS */
+
        struct hostapd_tx_queue_params tx_queue[NUM_TX_QUEUES];
 
        /*