summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/tools/ath/athdebug/athdebug.c7
-rw-r--r--tools/tools/ath/athstats/main.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/tools/tools/ath/athdebug/athdebug.c b/tools/tools/ath/athdebug/athdebug.c
index 9915347..0f60f2c 100644
--- a/tools/tools/ath/athdebug/athdebug.c
+++ b/tools/tools/ath/athdebug/athdebug.c
@@ -67,6 +67,7 @@ enum {
ATH_DEBUG_LED = 0x00100000, /* led management */
ATH_DEBUG_FF = 0x00200000, /* fast frames */
ATH_DEBUG_DFS = 0x00400000, /* DFS processing */
+ ATH_DEBUG_TDMA = 0x00800000, /* TDMA processing */
ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */
ATH_DEBUG_ANY = 0xffffffff
};
@@ -95,6 +96,7 @@ static struct {
{ "led", ATH_DEBUG_LED },
{ "ff", ATH_DEBUG_FF },
{ "dfs", ATH_DEBUG_DFS },
+ { "tdma", ATH_DEBUG_TDMA },
{ "fatal", ATH_DEBUG_FATAL },
};
@@ -135,7 +137,7 @@ usage(void)
int
main(int argc, char *argv[])
{
- const char *ifname = "ath0";
+ const char *ifname;
const char *cp, *tp;
const char *sep;
int c, op, i;
@@ -143,6 +145,9 @@ main(int argc, char *argv[])
size_t debuglen;
char oid[256];
+ ifname = getenv("ATH");
+ if (ifname == NULL)
+ ifname = "ath0";
progname = argv[0];
if (argc > 1) {
if (strcmp(argv[1], "-i") == 0) {
diff --git a/tools/tools/ath/athstats/main.c b/tools/tools/ath/athstats/main.c
index dbd2a1b..8bf23b1 100644
--- a/tools/tools/ath/athstats/main.c
+++ b/tools/tools/ath/athstats/main.c
@@ -42,6 +42,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <err.h>
@@ -63,9 +64,13 @@ int
main(int argc, char *argv[])
{
struct athstatfoo *wf;
+ const char *ifname;
int c;
- wf = athstats_new("ath0", S_DEFAULT);
+ ifname = getenv("ATH");
+ if (ifname == NULL)
+ ifname = "ath0";
+ wf = athstats_new(ifname, S_DEFAULT);
while ((c = getopt(argc, argv, "i:lo:")) != -1) {
switch (c) {
case 'i':
OpenPOWER on IntegriCloud