aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/ieee802_11h.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2006-10-21 00:04:53 (GMT)
committerJouni Malinen <j@w1.fi>2006-10-21 00:04:53 (GMT)
commitf2c87bc794c6515779b8162a20d5792cd501c260 (patch)
tree103594ebcfd81e98d88c129e12df2f0768631580 /hostapd/ieee802_11h.c
parent25d7da278784a01a4a903012359b2260648f4a4f (diff)
downloadhostap-history-f2c87bc794c6515779b8162a20d5792cd501c260.zip
hostap-history-f2c87bc794c6515779b8162a20d5792cd501c260.tar.gz
hostap-history-f2c87bc794c6515779b8162a20d5792cd501c260.tar.bz2
Added preliminary code for IEEE 802.11d and 802.11h support. This is
not yet complete, so the functionality is not available, but the basic helper functions and some of the configuration options are now in. (from Devicescape)
Diffstat (limited to 'hostapd/ieee802_11h.c')
-rw-r--r--hostapd/ieee802_11h.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/hostapd/ieee802_11h.c b/hostapd/ieee802_11h.c
new file mode 100644
index 0000000..926a046
--- /dev/null
+++ b/hostapd/ieee802_11h.c
@@ -0,0 +1,34 @@
+/*
+ * hostapd / IEEE 802.11h
+ * Copyright 2005-2006, Devicescape Software, Inc.
+ *
+ * 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 min_pwr, max_pwr;
+
+ if (len < 2) {
+ HOSTAPD_DEBUG(HOSTAPD_DEBUG_MINIMAL,
+ "Too short power capability IE\n");
+ return -1;
+ }
+ min_pwr = power[0];
+ max_pwr = power[1];
+ if (max_pwr > hapd->iface->sta_max_power)
+ return -1;
+ return 0;
+}