aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/ieee802_11.c
diff options
context:
space:
mode:
Diffstat (limited to 'hostapd/ieee802_11.c')
-rw-r--r--hostapd/ieee802_11.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c
index d877301..04dfef8 100644
--- a/hostapd/ieee802_11.c
+++ b/hostapd/ieee802_11.c
@@ -36,6 +36,7 @@
#include "accounting.h"
#include "driver.h"
#include "hostap_common.h"
+#include "ieee802_11h.h"
#include "mlme.h"
@@ -143,6 +144,9 @@ 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;
}
@@ -310,6 +314,14 @@ ParseRes ieee802_11_parse_elems(struct hostapd_data *hapd, u8 *start,
elems->rsn_ie = pos;
elems->rsn_ie_len = elen;
break;
+ case WLAN_EID_PWR_CAPABILITY:
+ elems->power_cap = pos;
+ elems->power_cap_len = elen;
+ break;
+ case WLAN_EID_SUPPORTED_CHANNELS:
+ elems->supp_channels = pos;
+ elems->supp_channels_len = elen;
+ break;
default:
unknown++;
if (!show_errors)
@@ -895,6 +907,20 @@ static void handle_assoc(struct hostapd_data *hapd,
goto fail;
}
+ 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++) {