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
#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)
{
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;
}
-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)
{
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);
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);
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",
*/
int ieee80211d;
- unsigned int ieee80211h; /* Enable/Disable 80211h */
struct hostapd_tx_queue_params tx_queue[NUM_TX_QUEUES];
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 &&
# (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
/* 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 */
#include "ap_list.h"
#include "accounting.h"
#include "driver.h"
-#include "ieee802_11h.h"
#include "mlme.h"
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;
}
#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++) {
+++ /dev/null
-/*
- * 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;
-}
+++ /dev/null
-/*
- * 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 */