summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2008-06-05 14:15:23 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2008-06-05 14:15:23 +0000
commit79393b914272332958b86c2ec6cbe4f2b60d1126 (patch)
treecb1c6115a9dd8cf30443108ad8d6b53d11b32bdd
parentVersion bump (diff)
downloadgentoo-2-79393b914272332958b86c2ec6cbe4f2b60d1126.tar.gz
gentoo-2-79393b914272332958b86c2ec6cbe4f2b60d1126.tar.bz2
gentoo-2-79393b914272332958b86c2ec6cbe4f2b60d1126.zip
Bumping to 0.6.3-r1, finally adding support for nl80211.
(Portage version: 2.1.5.2)
-rw-r--r--net-wireless/hostapd/ChangeLog9
-rw-r--r--net-wireless/hostapd/files/004-nl80211-rename-STAT-to-INFO.patch55
-rw-r--r--net-wireless/hostapd/hostapd-0.6.3-r1.ebuild (renamed from net-wireless/hostapd/hostapd-0.6.3.ebuild)41
3 files changed, 95 insertions, 10 deletions
diff --git a/net-wireless/hostapd/ChangeLog b/net-wireless/hostapd/ChangeLog
index 1fee68133128..73914dc10be5 100644
--- a/net-wireless/hostapd/ChangeLog
+++ b/net-wireless/hostapd/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-wireless/hostapd
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/ChangeLog,v 1.79 2008/06/03 02:01:41 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/ChangeLog,v 1.80 2008/06/05 14:15:22 gurligebis Exp $
+
+*hostapd-0.6.3-r1 (05 Jun 2008)
+
+ 05 Jun 2008; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ +files/004-nl80211-rename-STAT-to-INFO.patch, -hostapd-0.6.3.ebuild,
+ +hostapd-0.6.3-r1.ebuild:
+ Bumping to 0.6.3-r1, finally adding support for nl80211.
03 Jun 2008; Michael Sterrett <mr_bones_@gentoo.org> hostapd-0.4.9.ebuild,
hostapd-0.5.10.ebuild, hostapd-0.6.3.ebuild:
diff --git a/net-wireless/hostapd/files/004-nl80211-rename-STAT-to-INFO.patch b/net-wireless/hostapd/files/004-nl80211-rename-STAT-to-INFO.patch
new file mode 100644
index 000000000000..7664a8633af0
--- /dev/null
+++ b/net-wireless/hostapd/files/004-nl80211-rename-STAT-to-INFO.patch
@@ -0,0 +1,55 @@
+Index: hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/driver_nl80211.c
+===================================================================
+--- hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576.orig/hostapd/driver_nl80211.c.orig 2008-04-09 14:03:17.000000000 +1200
++++ hostapd-20071107_03ec0ec5cdb974d51a4a2a566bea4c4568138576/hostapd/driver_nl80211.c 2008-04-09 14:06:37.000000000 +1200
+@@ -598,11 +598,11 @@
+ struct nlattr *tb[NL80211_ATTR_MAX + 1];
+ struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
+ struct hostap_sta_driver_data *data = arg;
+- struct nlattr *stats[NL80211_STA_STAT_MAX + 1];
+- static struct nla_policy stats_policy[NL80211_STA_STAT_MAX + 1] = {
+- [NL80211_STA_STAT_INACTIVE_TIME] = { .type = NLA_U32 },
+- [NL80211_STA_STAT_RX_BYTES] = { .type = NLA_U32 },
+- [NL80211_STA_STAT_TX_BYTES] = { .type = NLA_U32 },
++ struct nlattr *stats[NL80211_STA_INFO_MAX + 1];
++ static struct nla_policy stats_policy[NL80211_STA_INFO_MAX + 1] = {
++ [NL80211_STA_INFO_INACTIVE_TIME] = { .type = NLA_U32 },
++ [NL80211_STA_INFO_RX_BYTES] = { .type = NLA_U32 },
++ [NL80211_STA_INFO_TX_BYTES] = { .type = NLA_U32 },
+ };
+
+ nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
+@@ -614,24 +614,24 @@
+ * the kernel starts sending station notifications.
+ */
+
+- if (!tb[NL80211_ATTR_STA_STATS]) {
++ if (!tb[NL80211_ATTR_STA_INFO]) {
+ wpa_printf(MSG_DEBUG, "sta stats missing!");
+ return NL_SKIP;
+ }
+- if (nla_parse_nested(stats, NL80211_STA_STAT_MAX,
+- tb[NL80211_ATTR_STA_STATS],
++ if (nla_parse_nested(stats, NL80211_STA_INFO_MAX,
++ tb[NL80211_ATTR_STA_INFO],
+ stats_policy)) {
+ wpa_printf(MSG_DEBUG, "failed to parse nested attributes!");
+ return NL_SKIP;
+ }
+
+- if (stats[NL80211_STA_STAT_INACTIVE_TIME])
++ if (stats[NL80211_STA_INFO_INACTIVE_TIME])
+ data->inactive_msec =
+- nla_get_u32(stats[NL80211_STA_STAT_INACTIVE_TIME]);
+- if (stats[NL80211_STA_STAT_RX_BYTES])
+- data->rx_bytes = nla_get_u32(stats[NL80211_STA_STAT_RX_BYTES]);
+- if (stats[NL80211_STA_STAT_TX_BYTES])
+- data->rx_bytes = nla_get_u32(stats[NL80211_STA_STAT_TX_BYTES]);
++ nla_get_u32(stats[NL80211_STA_INFO_INACTIVE_TIME]);
++ if (stats[NL80211_STA_INFO_RX_BYTES])
++ data->rx_bytes = nla_get_u32(stats[NL80211_STA_INFO_RX_BYTES]);
++ if (stats[NL80211_STA_INFO_TX_BYTES])
++ data->rx_bytes = nla_get_u32(stats[NL80211_STA_INFO_TX_BYTES]);
+
+ return NL_SKIP;
+ }
diff --git a/net-wireless/hostapd/hostapd-0.6.3.ebuild b/net-wireless/hostapd/hostapd-0.6.3-r1.ebuild
index a9d33840d5e5..0fc5241866b3 100644
--- a/net-wireless/hostapd/hostapd-0.6.3.ebuild
+++ b/net-wireless/hostapd/hostapd-0.6.3-r1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/hostapd-0.6.3.ebuild,v 1.2 2008/06/03 02:01:41 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/hostapd-0.6.3-r1.ebuild,v 1.1 2008/06/05 14:15:22 gurligebis Exp $
-inherit toolchain-funcs linux-info
+inherit toolchain-funcs linux-info eutils
DESCRIPTION="IEEE 802.11 wireless LAN Host AP daemon"
HOMEPAGE="http://hostap.epitest.fi"
@@ -14,6 +14,7 @@ KEYWORDS="~amd64 ~ppc ~x86"
IUSE="ipv6 logwatch madwifi ssl"
DEPEND="ssl? ( dev-libs/openssl )
+ >=dev-libs/libnl-1.1
madwifi? ( ||
( >net-wireless/madwifi-ng-tools-0.9.3
net-wireless/madwifi-old ) )"
@@ -48,24 +49,43 @@ generate_config() {
echo "CONFIG_EAP_GPSK=y" >> ${CONFIG}
echo "CONFIG_EAP_GPSK_SHA256=y" >> ${CONFIG}
+ einfo "Enabling drivers: "
+
# drivers
echo "CONFIG_DRIVER_HOSTAP=y" >> ${CONFIG}
+ einfo " HostAP driver enabled"
echo "CONFIG_DRIVER_WIRED=y" >> ${CONFIG}
+ einfo " Wired driver enabled"
echo "CONFIG_DRIVER_PRISM54=y" >> ${CONFIG}
+ einfo " Prism54 driver enabled"
if use madwifi; then
# Add include path for madwifi-driver headers
+ einfo " Madwifi driver enabled"
echo "CFLAGS += -I/usr/include/madwifi" >> ${CONFIG}
echo "CONFIG_DRIVER_MADWIFI=y" >> ${CONFIG}
+ else
+ einfo " HostAP driver disabled"
fi
- # REMOVED FOR NOW, BROKEN
- #if [ -e "${KV_DIR}"/net/mac80211 ]; then
- # # Kernel source has the mac80211 subsystem, so we enable the driver
- # echo "CONFIG_DRIVER_DEVICESCAPE=y" >> ${CONFIG}
- # echo "WIRELESS_DEV=\"${KV_DIR}\"" >> ${CONFIG}
- # echo "CFLAGS += -I\$(WIRELESS_DEV)/net/mac80211" >> ${CONFIG}
- #fi
+ if [[ ${KV_MAJOR} -ge 2 && ${KV_MINOR} -ge 6 || ${KV_PATCH} -ge 26 ]] ; then
+ # Test if header version is new enough (2.6.26+)
+ if [ "$(grep NL80211_MNTR_FLAG_COOK_FRAMES /usr/include/linux/nl80211.h)" ]; then
+ # Test to see if cfg.c contains to code to enable AP mode
+ if [ "$(grep NL80211_IFTYPE_AP: ${KV_DIR}/net/mac80211/cfg.c)" ]; then
+ einfo " nl80211 driver enabled"
+ echo "CONFIG_DRIVER_NL80211=y" >> ${CONFIG}
+ echo "CFLAGS += -I/usr/include/netlink" >> ${CONFIG}
+ echo "LIBS += -L/usr/lib" >> ${CONFIG}
+ else
+ einfo " nl80211 driver disabled (due to no AP support in cfg.c file)"
+ fi
+ else
+ einfo " nl80211 driver disabled (due to header version below 2.6.26)"
+ fi
+ else
+ einfo " nl80211 driver disabled (due to kernel version below 2.6.26)"
+ fi
# misc
echo "CONFIG_PKCS12=y" >> ${CONFIG}
@@ -87,6 +107,9 @@ generate_config() {
src_unpack() {
unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/004-nl80211-rename-STAT-to-INFO.patch"
+
sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \
"${S}/hostapd.conf"