summaryrefslogtreecommitdiffstats
path: root/tools/tools
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-01-08 17:12:47 +0000
committersam <sam@FreeBSD.org>2009-01-08 17:12:47 +0000
commit98ad45c3d3f257c3649d4e198723267231203184 (patch)
tree6038542738398db4d8d4a8e36ed50ac642a506ac /tools/tools
parent6f4df3b74deeeb200dfc7f23a8344f50eb34942c (diff)
downloadFreeBSD-src-98ad45c3d3f257c3649d4e198723267231203184.zip
FreeBSD-src-98ad45c3d3f257c3649d4e198723267231203184.tar.gz
TDMA support for long distance point-to-point links using ath devices:
o add net80211 support for a tdma vap that is built on top of the existing adhoc-demo support o add tdma scheduling of frame transmission to the ath driver; it's conceivable other devices might be capable of this too in which case they can make use of the 802.11 protocol additions etc. o add minor bits to user tools that need to know: ifconfig to setup and configure, new statistics in athstats, and new debug mask bits While the architecture can support >2 slots in a TDMA BSS the current design is intended (and tested) for only 2 slots. Sponsored by: Intel
Diffstat (limited to 'tools/tools')
-rw-r--r--tools/tools/ath/athdebug/athdebug.c4
-rw-r--r--tools/tools/ath/athstats/Makefile1
-rw-r--r--tools/tools/ath/athstats/athstats.c15
-rw-r--r--tools/tools/ath/athstats/main.c5
4 files changed, 21 insertions, 4 deletions
diff --git a/tools/tools/ath/athdebug/athdebug.c b/tools/tools/ath/athdebug/athdebug.c
index 76d5932..a219aae 100644
--- a/tools/tools/ath/athdebug/athdebug.c
+++ b/tools/tools/ath/athdebug/athdebug.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
+ * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -69,6 +69,7 @@ enum {
ATH_DEBUG_FF = 0x00200000, /* fast frames */
ATH_DEBUG_DFS = 0x00400000, /* DFS processing */
ATH_DEBUG_TDMA = 0x00800000, /* TDMA processing */
+ ATH_DEBUG_TDMA_TIMER = 0x01000000, /* TDMA timer processing */
ATH_DEBUG_REGDOMAIN = 0x02000000, /* regulatory processing */
ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */
ATH_DEBUG_ANY = 0xffffffff
@@ -99,6 +100,7 @@ static struct {
{ "ff", ATH_DEBUG_FF },
{ "dfs", ATH_DEBUG_DFS },
{ "tdma", ATH_DEBUG_TDMA },
+ { "tdma_timer", ATH_DEBUG_TDMA_TIMER },
{ "regdomain", ATH_DEBUG_REGDOMAIN },
{ "fatal", ATH_DEBUG_FATAL },
};
diff --git a/tools/tools/ath/athstats/Makefile b/tools/tools/ath/athstats/Makefile
index cd05e96..4eb1e51 100644
--- a/tools/tools/ath/athstats/Makefile
+++ b/tools/tools/ath/athstats/Makefile
@@ -11,6 +11,7 @@ SRCDIR= ${.CURDIR}/../../../..
CLEANFILES+= opt_ah.h ah_osdep.h
CFLAGS+=-DATH_SUPPORT_ANI
+CFLAGS+=-DATH_SUPPORT_TDMA
CFLAGS+=-I${.CURDIR}
CFLAGS+=-I${SRCDIR}/sys/net80211
diff --git a/tools/tools/ath/athstats/athstats.c b/tools/tools/ath/athstats/athstats.c
index a7c397c..41505e4 100644
--- a/tools/tools/ath/athstats/athstats.c
+++ b/tools/tools/ath/athstats/athstats.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
+ * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -215,7 +215,9 @@ static const struct fmt athstats[] = {
{ 5, "tdmab", "tdmab", "TDMA slot update set beacon timers" },
#define S_TDMA_TSF AFTER(S_TDMA_TIMERS)
{ 5, "tdmat", "tdmat", "TDMA slot update set TSF" },
-#define S_RATE_CALLS AFTER(S_TDMA_TSF)
+#define S_TDMA_TSFADJ AFTER(S_TDMA_TSF)
+ { 8, "tdmadj", "tdmadj", "TDMA slot adjust (usecs, smoothed)" },
+#define S_RATE_CALLS AFTER(S_TDMA_TSFADJ)
#else
#define S_RATE_CALLS AFTER(S_PER_RFGAIN)
#endif
@@ -603,6 +605,10 @@ ath_get_curstat(struct statfoo *sf, int s, char b[], size_t bs)
case S_TDMA_UPDATE: STAT(tdma_update);
case S_TDMA_TIMERS: STAT(tdma_timers);
case S_TDMA_TSF: STAT(tdma_tsf);
+ case S_TDMA_TSFADJ:
+ snprintf(b, bs, "-%d/+%d",
+ wf->cur.ath.ast_tdma_tsfadjm, wf->cur.ath.ast_tdma_tsfadjp);
+ return 1;
#endif
case S_RATE_CALLS: STAT(rate_calls);
case S_RATE_RAISE: STAT(rate_raise);
@@ -813,6 +819,11 @@ ath_get_totstat(struct statfoo *sf, int s, char b[], size_t bs)
case S_TDMA_UPDATE: STAT(tdma_update);
case S_TDMA_TIMERS: STAT(tdma_timers);
case S_TDMA_TSF: STAT(tdma_tsf);
+ case S_TDMA_TSFADJ:
+ snprintf(b, bs, "-%d/+%d",
+ wf->total.ath.ast_tdma_tsfadjm,
+ wf->total.ath.ast_tdma_tsfadjp);
+ return 1;
#endif
case S_RATE_CALLS: STAT(rate_calls);
case S_RATE_RAISE: STAT(rate_raise);
diff --git a/tools/tools/ath/athstats/main.c b/tools/tools/ath/athstats/main.c
index 328d066..299b078 100644
--- a/tools/tools/ath/athstats/main.c
+++ b/tools/tools/ath/athstats/main.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
+ * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -59,6 +59,9 @@ static struct {
{ "ani",
"avgbrssi,avgrssi,avgtxrssi,NI,SI,step,owsd,cwst,NI+,NI-,SI+,SI-,OFDM,CCK,LISTEN"
},
+ { "tdma",
+ "input,output,bexmit,tdmau,tdmadj,crcerr,phyerr,phytor,rssi,noise,rate"
+ },
};
static const char *
OpenPOWER on IntegriCloud