+++ /dev/null
-From dea50507861b79f522c70500fe978072f143af8f Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <jouni.malinen@atheros.com>
-Date: Fri, 12 Nov 2010 18:31:56 +0200
-Subject: [PATCH] AP: Verify that HT40 secondary channel is supported
-
-Refuse to enable HT40 mode AP unless both the primary and secondary
-channels are enabled for AP use.
-(cherry picked from commit 8ea3dd21d2e8b760612af0c7b6a3bb5b89ba7304)
----
- src/ap/hw_features.c | 26 ++++++++++++++++++++++++++
- 1 files changed, 26 insertions(+), 0 deletions(-)
-
-diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
-index 0159c72..7fc5b83 100644
---- a/src/ap/hw_features.c
-+++ b/src/ap/hw_features.c
-@@ -642,6 +642,32 @@ int hostapd_select_hw_mode(struct hostapd_iface *iface)
- break;
- }
- }
-+ if (ok && iface->conf->secondary_channel) {
-+ int sec_ok = 0;
-+ int sec_chan = iface->conf->channel +
-+ iface->conf->secondary_channel * 4;
-+ for (j = 0; j < iface->current_mode->num_channels; j++) {
-+ struct hostapd_channel_data *chan =
-+ &iface->current_mode->channels[j];
-+ if (!(chan->flag & HOSTAPD_CHAN_DISABLED) &&
-+ (chan->chan == sec_chan)) {
-+ sec_ok = 1;
-+ break;
-+ }
-+ }
-+ if (!sec_ok) {
-+ hostapd_logger(iface->bss[0], NULL,
-+ HOSTAPD_MODULE_IEEE80211,
-+ HOSTAPD_LEVEL_WARNING,
-+ "Configured HT40 secondary channel "
-+ "(%d) not found from the channel list "
-+ "of current mode (%d) %s",
-+ sec_chan, iface->current_mode->mode,
-+ hostapd_hw_mode_txt(
-+ iface->current_mode->mode));
-+ ok = 0;
-+ }
-+ }
- if (iface->conf->channel == 0) {
- /* TODO: could request a scan of neighboring BSSes and select
- * the channel automatically */
---
-1.7.4-rc1
-
#
#############################################################
-HOSTAPD_VERSION = 0.7.3
+HOSTAPD_VERSION = 1.0
HOSTAPD_SITE = http://hostap.epitest.fi/releases
HOSTAPD_SUBDIR = hostapd
HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config
HOSTAPD_DEPENDENCIES = libnl
+HOSTAPD_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/
HOSTAPD_LDFLAGS = $(TARGET_LDFLAGS)
# libnl needs -lm (for rint) if linking statically
endif
define HOSTAPD_LIBNL_CONFIG
- echo "CONFIG_LIBNL20=y" >>$(HOSTAPD_CONFIG)
- echo "CFLAGS += -I$(STAGING_DIR)/usr/include/libnl3/" >>$(HOSTAPD_CONFIG)
+ echo "CONFIG_LIBNL32=y" >>$(HOSTAPD_CONFIG)
endef
define HOSTAPD_CRYPTO_CONFIG
echo "CONFIG_INTERNAL_LIBTOMMATH_FAST=y" >>$(HOSTAPD_CONFIG)
endef
-# Try to use openssl for TLS if it's already available
-# gnutls is also supported for TLS
+# Try to use openssl or gnutls if it's already available
ifeq ($(BR2_PACKAGE_OPENSSL),y)
HOSTAPD_DEPENDENCIES += openssl
define HOSTAPD_TLS_CONFIG
echo "CONFIG_TLS=openssl" >>$(HOSTAPD_CONFIG)
endef
else
+ifeq ($(BR2_PACKAGE_GNUTLS),y)
+ HOSTAPD_DEPENDENCIES += gnutls
+define HOSTAPD_TLS_CONFIG
+ echo "CONFIG_TLS=gnutls" >>$(HOSTAPD_CONFIG)
+endef
+else
define HOSTAPD_TLS_CONFIG
echo "CONFIG_TLS=internal" >>$(HOSTAPD_CONFIG)
endef
endif
+endif
ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y)
define HOSTAPD_EAP_CONFIG
endif
define HOSTAPD_CONFIGURE_CMDS
- cp $(@D)/$(HOSTAPD_SUBDIR)/defconfig $(HOSTAPD_CONFIG)
- $(SED) "s/\/local//" $(@D)/$(HOSTAPD_SUBDIR)/Makefile
- echo "CFLAGS += $(TARGET_CFLAGS)" >>$(HOSTAPD_CONFIG)
- echo "LDFLAGS += $(HOSTAPD_LDFLAGS)" >>$(HOSTAPD_CONFIG)
- echo "CC = $(TARGET_CC)" >>$(HOSTAPD_CONFIG)
-# Drivers
- $(SED) "s/^#CONFIG_DRIVER_WIRED/CONFIG_DRIVER_WIRED/" $(HOSTAPD_CONFIG)
- $(SED) "s/^#CONFIG_DRIVER_NL80211/CONFIG_DRIVER_NL80211/" $(HOSTAPD_CONFIG)
+ cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG)
# Misc
$(SED) "s/^CONFIG_IPV6/#CONFIG_IPV6/" $(HOSTAPD_CONFIG)
$(SED) "s/^#CONFIG_IEEE80211N/CONFIG_IEEE80211N/" $(HOSTAPD_CONFIG)
$(HOSTAPD_LIBNL_CONFIG)
endef
+define HOSTAPD_BUILD_CMDS
+ $(TARGET_MAKE_ENV) CFLAGS="$(HOSTAPD_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ $(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(HOSTAPD_SUBDIR)
+endef
+
define HOSTAPD_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd \
$(TARGET_DIR)/usr/sbin/hostapd
$(TARGET_DIR)/usr/bin/hostapd_cli
endef
-define HOSTAPD_UNINSTALL_TARGET_CMDS
- rm -f $(TARGET_DIR)/usr/sbin/hostapd
- rm -f $(TARGET_DIR)/usr/bin/hostapd
-endef
-
-$(eval $(call AUTOTARGETS))
+$(eval $(call GENTARGETS))