svn commit: r217680 - in head/tools/tools/ath: . athdebug athdecode
athprom athrd athregs athstats
Adrian Chadd
adrian at FreeBSD.org
Fri Jan 21 02:53:32 UTC 2011
Author: adrian
Date: Fri Jan 21 02:53:32 2011
New Revision: 217680
URL: http://svn.freebsd.org/changeset/base/217680
Log:
Make the existing ath tools build again.
* add missing includes to quieten warnings
* fix an inline function decl to have a return type
* since .h files are created during the build (opt_ah.h, ah_osdep.h)
which modify the behaviour of the HAL include/source files,
include OBJDIR in the path so the #include's work.
The tools should now build when the directory is added to LOCAL_DIRS
during a make buildworld.
Modified:
head/tools/tools/ath/Makefile.inc
head/tools/tools/ath/athdebug/athdebug.c
head/tools/tools/ath/athdecode/main.c
head/tools/tools/ath/athprom/athprom.c
head/tools/tools/ath/athrd/athrd.c
head/tools/tools/ath/athregs/dumpregs.c
head/tools/tools/ath/athstats/athstats.c
head/tools/tools/ath/athstats/main.c
Modified: head/tools/tools/ath/Makefile.inc
==============================================================================
--- head/tools/tools/ath/Makefile.inc Fri Jan 21 01:24:00 2011 (r217679)
+++ head/tools/tools/ath/Makefile.inc Fri Jan 21 02:53:32 2011 (r217680)
@@ -11,3 +11,4 @@ CFLAGS+=-I${.CURDIR}/../common
CFLAGS+=-I${.CURDIR}/../../../../sys
CFLAGS+=-I${.CURDIR}/../../../../sys/dev/ath
CFLAGS+=-I${.CURDIR}/../../../../sys/dev/ath/ath_hal
+CFLAGS+=-I${.OBJDIR}/
Modified: head/tools/tools/ath/athdebug/athdebug.c
==============================================================================
--- head/tools/tools/ath/athdebug/athdebug.c Fri Jan 21 01:24:00 2011 (r217679)
+++ head/tools/tools/ath/athdebug/athdebug.c Fri Jan 21 02:53:32 2011 (r217680)
@@ -37,11 +37,15 @@
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <sys/sysctl.h>
#include <stdio.h>
#include <ctype.h>
#include <getopt.h>
#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <err.h>
#define N(a) (sizeof(a)/sizeof(a[0]))
Modified: head/tools/tools/ath/athdecode/main.c
==============================================================================
--- head/tools/tools/ath/athdecode/main.c Fri Jan 21 01:24:00 2011 (r217679)
+++ head/tools/tools/ath/athdecode/main.c Fri Jan 21 02:53:32 2011 (r217680)
@@ -37,6 +37,8 @@
#include "dumpregs.h"
#include <stdlib.h>
+#include <string.h>
+#include <err.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/mman.h>
Modified: head/tools/tools/ath/athprom/athprom.c
==============================================================================
--- head/tools/tools/ath/athprom/athprom.c Fri Jan 21 01:24:00 2011 (r217679)
+++ head/tools/tools/ath/athprom/athprom.c Fri Jan 21 02:53:32 2011 (r217680)
@@ -43,6 +43,7 @@
#include <err.h>
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
#ifndef DIR_TEMPLATE
#define DIR_TEMPLATE "/usr/local/libdata/athprom"
Modified: head/tools/tools/ath/athrd/athrd.c
==============================================================================
--- head/tools/tools/ath/athrd/athrd.c Fri Jan 21 01:24:00 2011 (r217679)
+++ head/tools/tools/ath/athrd/athrd.c Fri Jan 21 02:53:32 2011 (r217680)
@@ -43,6 +43,7 @@
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
+#include <ctype.h>
int ath_hal_debug = 0;
HAL_CTRY_CODE cc = CTRY_DEFAULT;
Modified: head/tools/tools/ath/athregs/dumpregs.c
==============================================================================
--- head/tools/tools/ath/athregs/dumpregs.c Fri Jan 21 01:24:00 2011 (r217679)
+++ head/tools/tools/ath/athregs/dumpregs.c Fri Jan 21 02:53:32 2011 (r217680)
@@ -41,6 +41,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include <err.h>
typedef struct {
HAL_REVS revs;
@@ -353,7 +354,7 @@ register_range(u_int brange, u_int erang
def_srev_min, def_srev_max, def_phy_min, def_phy_max);
}
-static __inline
+static __inline int
match(const struct dumpreg *dr, const HAL_REVS *revs)
{
if (!MAC_MATCH(dr, revs->ah_macVersion, revs->ah_macRev))
Modified: head/tools/tools/ath/athstats/athstats.c
==============================================================================
--- head/tools/tools/ath/athstats/athstats.c Fri Jan 21 01:24:00 2011 (r217679)
+++ head/tools/tools/ath/athstats/athstats.c Fri Jan 21 02:53:32 2011 (r217680)
@@ -47,10 +47,18 @@
#include <unistd.h>
#include <err.h>
+/* Use the system net80211 headers, rather than the kernel tree */
+/*
+ * XXX this means that if you build a separate net80211 stack
+ * XXX with your kernel and don't install the new/changed headers,
+ * XXX this tool may break.
+ * XXX -adrian
+ */
+#include <net80211/ieee80211_ioctl.h>
+#include <net80211/ieee80211_radiotap.h>
+
#include "ah.h"
#include "ah_desc.h"
-#include "ieee80211_ioctl.h"
-#include "ieee80211_radiotap.h"
#include "if_athioctl.h"
#include "athstats.h"
Modified: head/tools/tools/ath/athstats/main.c
==============================================================================
--- head/tools/tools/ath/athstats/main.c Fri Jan 21 01:24:00 2011 (r217679)
+++ head/tools/tools/ath/athstats/main.c Fri Jan 21 02:53:32 2011 (r217680)
@@ -45,6 +45,7 @@
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
+#include <string.h>
#include <err.h>
#include "athstats.h"
More information about the svn-src-head
mailing list