]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Removed partial IEEE 802.11h implementation
authorJouni Malinen <j@w1.fi>
Fri, 21 Nov 2008 17:45:20 +0000 (19:45 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 21 Nov 2008 17:45:20 +0000 (19:45 +0200)
This code was not finished and did not work with the current mac80211
design. In order to avoid confusing users, it is better to remove this
completely for now and look at new implementation to work with mac80211.

hostapd/Makefile
hostapd/beacon.c
hostapd/config.c
hostapd/config.h
hostapd/hostapd.c
hostapd/hostapd.conf
hostapd/hostapd.h
hostapd/ieee802_11.c
hostapd/ieee802_11h.c [deleted file]
hostapd/ieee802_11h.h [deleted file]

index 423a0692a8dda0f20d868abfd525ae7b9b423f32..4a39ee7f967a4101ecc784123363aa9cf365f58f 100644 (file)
@@ -43,7 +43,7 @@ OBJS =        hostapd.o ieee802_1x.o eapol_sm.o \
        sta_info.o wpa.o ctrl_iface.o \
        drivers.o preauth.o pmksa_cache.o beacon.o \
        hw_features.o wme.o ap_list.o \
-       mlme.o vlan_init.o ieee802_11h.o wpa_auth_ie.o
+       mlme.o vlan_init.o wpa_auth_ie.o
 
 OBJS += ../src/utils/eloop.o
 OBJS += ../src/utils/common.o
index b1332b6e38575defe6da25b7ac2d0fb8e976d411..b720489c1ed4f9d5dc3e67a7f6368a72d3c2f695 100644 (file)
@@ -27,7 +27,6 @@
 #include "hw_features.h"
 #include "driver.h"
 #include "sta_info.h"
-#include "ieee802_11h.h"
 
 
 static u8 ieee802_11_erp_info(struct hostapd_data *hapd)
@@ -101,8 +100,7 @@ static u8 * hostapd_eid_country(struct hostapd_data *hapd, u8 *eid,
 {
        u8 *pos = eid;
 
-       if ((!hapd->iconf->ieee80211d && !hapd->iface->dfs_enable) ||
-           max_len < 6)
+       if (!hapd->iconf->ieee80211d || max_len < 6)
                return eid;
 
        *pos++ = WLAN_EID_COUNTRY;
@@ -119,45 +117,6 @@ static u8 * hostapd_eid_country(struct hostapd_data *hapd, u8 *eid,
 }
 
 
-static u8 * hostapd_eid_power_constraint(struct hostapd_data *hapd, u8 *eid)
-
-{
-       if (!hapd->iface->dfs_enable)
-               return eid;
-       *eid++ = WLAN_EID_PWR_CONSTRAINT;
-       *eid++ = 1;
-       *eid++ = hapd->iface->pwr_const;
-       return eid;
-}
-
-
-static u8 * hostapd_eid_tpc_report(struct hostapd_data *hapd, u8 *eid)
-
-{
-       if (!hapd->iface->dfs_enable)
-               return eid;
-       *eid++ = WLAN_EID_TPC_REPORT;
-       *eid++ = 2;
-       *eid++ = hapd->iface->tx_power; /* TX POWER */
-       *eid++ = 0; /* Link Margin */
-       return eid;
-}
-
-static u8 * hostapd_eid_channel_switch(struct hostapd_data *hapd, u8 *eid)
-
-{
-       if (!hapd->iface->dfs_enable || !hapd->iface->channel_switch)
-               return eid;
-       *eid++ = WLAN_EID_CHANNEL_SWITCH;
-       *eid++ = 3;
-       *eid++ = CHAN_SWITCH_MODE_QUIET;
-       *eid++ = hapd->iface->channel_switch; /* New channel */
-       /* 0 - very soon; 1 - before next TBTT; num - after num beacons */
-       *eid++ = 0;
-       return eid;
-}
-
-
 static u8 * hostapd_eid_wpa(struct hostapd_data *hapd, u8 *eid, size_t len,
                            struct sta_info *sta)
 {
@@ -270,9 +229,6 @@ void handle_probe_req(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
 
        pos = hostapd_eid_country(hapd, pos, epos - pos);
 
-       pos = hostapd_eid_power_constraint(hapd, pos);
-       pos = hostapd_eid_tpc_report(hapd, pos);
-
        /* ERP Information element */
        pos = hostapd_eid_erp_info(hapd, pos);
 
@@ -361,10 +317,6 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd)
        tailpos = hostapd_eid_country(hapd, tailpos,
                                      tail + BEACON_TAIL_BUF_SIZE - tailpos);
 
-       tailpos = hostapd_eid_power_constraint(hapd, tailpos);
-       tailpos = hostapd_eid_channel_switch(hapd, tailpos);
-       tailpos = hostapd_eid_tpc_report(hapd, tailpos);
-
        /* ERP Information element */
        tailpos = hostapd_eid_erp_info(hapd, tailpos);
 
index d10d64f280dfe9e88d4a7b64220bd3948a833e86..4b59b939b8345503954f18f3ba5dda8be16bc519 100644 (file)
@@ -1445,8 +1445,6 @@ struct hostapd_config * hostapd_config_read(const char *fname)
                        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, "assoc_ap_addr") == 0) {
                        if (hwaddr_aton(pos, bss->assoc_ap_addr)) {
                                printf("Line %d: invalid MAC address '%s'\n",
index 212e09967ddf0b4f49a2aeba3454b99f129fa177..cc39335be0f11b6b26c0463ba3f935ce71a795bf 100644 (file)
@@ -343,7 +343,6 @@ struct hostapd_config {
                          */
 
        int ieee80211d;
-       unsigned int ieee80211h; /* Enable/Disable 80211h */
 
        struct hostapd_tx_queue_params tx_queue[NUM_TX_QUEUES];
 
index 889f81e12fb47a1175ba8bd38fb7c9de8ea00658..9f6b16817676340806a84f8e5f8f92766251adaf 100644 (file)
@@ -1618,12 +1618,11 @@ static int setup_interface1(struct hostapd_iface *iface)
                return -1;
        }
 
-       if (hapd->iconf->ieee80211d || hapd->iconf->ieee80211h) {
-               if (hostapd_set_ieee80211d(hapd, 1) < 0) {
-                       printf("Failed to set ieee80211d (%d)\n",
-                              hapd->iconf->ieee80211d);
-                       return -1;
-               }
+       if (hapd->iconf->ieee80211d &&
+           hostapd_set_ieee80211d(hapd, 1) < 0) {
+               printf("Failed to set ieee80211d (%d)\n",
+                      hapd->iconf->ieee80211d);
+               return -1;
        }
 
        if (hapd->iconf->bridge_packets != INTERNAL_BRIDGE_DO_NOT_CONTROL &&
index 599d7f1a26ea87244f8389ea274efe0b17c75302..90381c8dfd351b4474a991375fc9b28b8091c392 100644 (file)
@@ -90,19 +90,6 @@ ssid=test
 # (default: 0 = disabled)
 #ieee80211d=1
 
-# Enable IEEE 802.11h. This enables the TPC and DFS services when operating
-# in a regulatory domain which requires them.  Once enabled it will be 
-# operational only when working in hw_mode a and in countries where it is
-# required. The end user should not be allowed to disable this.
-# The country_code setting must be configured with the correct country for
-# IEEE 802.11h to function. 
-# When IEEE 802.11h is operational, the configured channel settings will be
-# ignored and automatic channel selection is used. When IEEE 802.11h is enabled
-# but not operational (for example, if the radio mode is changed from "a" to
-# "b") the channel setting take effect again. 
-# (default: 0 = disabled)
-#ieee80211h=1
-
 # Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g,
 # Default: IEEE 802.11b
 hw_mode=a
index ab8f1ed8c5afb8c9744a6cd78e4543a193bf29fc..26daa47a20641f0c715e330fe0bcc9f27aa3d8e0 100644 (file)
@@ -234,13 +234,6 @@ struct hostapd_iface {
        /* Overlapping BSS information */
        int olbc_ht;
 
-       int dfs_enable;
-       u8 pwr_const;
-       unsigned int tx_power;
-       unsigned int sta_max_power;
-
-       unsigned int channel_switch;
-
 #ifdef CONFIG_IEEE80211N
        u16 ht_op_mode;
 #endif /* CONFIG_IEEE80211N */
index 0e5b08e5235332b0ee55fb091ad66d05e6329cbc..1ea0aacc31d18384ede853ebc5e8a7c0e6841cf1 100644 (file)
@@ -35,7 +35,6 @@
 #include "ap_list.h"
 #include "accounting.h"
 #include "driver.h"
-#include "ieee802_11h.h"
 #include "mlme.h"
 
 
@@ -283,9 +282,6 @@ u16 hostapd_own_capab_info(struct hostapd_data *hapd, struct sta_info *sta,
            hapd->iface->num_sta_no_short_slot_time == 0)
                capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME;
 
-       if (hapd->iface->dfs_enable) 
-               capab |= WLAN_CAPABILITY_SPECTRUM_MGMT;
-
        return capab;
 }
 
@@ -1004,20 +1000,6 @@ static void handle_assoc(struct hostapd_data *hapd,
 #endif /* CONFIG_IEEE80211R */
        }
 
-       if (hapd->iface->dfs_enable &&
-           hapd->iconf->ieee80211h == SPECT_STRICT_BINDING) {
-               if (hostapd_check_power_cap(hapd, elems.power_cap,
-                                           elems.power_cap_len)) {
-                       resp = WLAN_STATUS_PWR_CAPABILITY_NOT_VALID;
-                       hostapd_logger(hapd, sta->addr,
-                                      HOSTAPD_MODULE_IEEE80211,
-                                      HOSTAPD_LEVEL_DEBUG,
-                                      "Power capabilities of the station not "
-                                      "acceptable");
-                       goto fail;
-               }
-       }
-
        if (hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G)
                sta->flags |= WLAN_STA_NONERP;
        for (i = 0; i < sta->supported_rates_len; i++) {
diff --git a/hostapd/ieee802_11h.c b/hostapd/ieee802_11h.c
deleted file mode 100644 (file)
index 0229dca..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * hostapd / IEEE 802.11h
- * Copyright (c) 2005-2006, Devicescape Software, Inc.
- * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- */
-
-#include "includes.h"
-
-#include "hostapd.h"
-
-
-int hostapd_check_power_cap(struct hostapd_data *hapd, u8 *power, u8 len)
-{
-       unsigned int max_pwr;
-
-       if (len < 2) {
-               wpa_printf(MSG_DEBUG, "Too short power capability IE");
-               return -1;
-       }
-       max_pwr = power[1];
-       if (max_pwr > hapd->iface->sta_max_power)
-               return -1;
-       return 0;
-}
diff --git a/hostapd/ieee802_11h.h b/hostapd/ieee802_11h.h
deleted file mode 100644 (file)
index b2bd549..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * hostapd / IEEE 802.11h
- * Copyright (c) 2005-2006, Devicescape Software, Inc.
- * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- */
-
-#ifndef IEEE802_11H_H
-#define IEEE802_11H_H
-
-#define SPECT_LOOSE_BINDING    1
-#define SPECT_STRICT_BINDING   2
-
-#define CHAN_SWITCH_MODE_NOISY 0
-#define CHAN_SWITCH_MODE_QUIET 1
-
-int hostapd_check_power_cap(struct hostapd_data *hapd, u8 *power, u8 len);
-
-#endif /* IEEE802_11H_H */