svn commit: r250899 - head/tools/tools/ath/athalq

Adrian Chadd adrian at FreeBSD.org
Wed May 22 01:03:42 UTC 2013


Author: adrian
Date: Wed May 22 01:03:41 2013
New Revision: 250899
URL: http://svnweb.freebsd.org/changeset/base/250899

Log:
  Implement beacon event debugging in athalq.

Modified:
  head/tools/tools/ath/athalq/main.c

Modified: head/tools/tools/ath/athalq/main.c
==============================================================================
--- head/tools/tools/ath/athalq/main.c	Wed May 22 00:58:03 2013	(r250898)
+++ head/tools/tools/ath/athalq/main.c	Wed May 22 01:03:41 2013	(r250899)
@@ -75,6 +75,36 @@ ath_alq_print_intr_status(struct if_ath_
 	    be32toh(is.intr_status));
 }
 
+static void
+ath_alq_print_beacon_miss(struct if_ath_alq_payload *a)
+{
+
+	printf("[%u.%06u] [%llu] BMISS\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
+	    (unsigned long long) be64toh(a->hdr.threadid));
+}
+
+static void
+ath_alq_print_beacon_stuck(struct if_ath_alq_payload *a)
+{
+
+	printf("[%u.%06u] [%llu] BSTUCK\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
+	    (unsigned long long) be64toh(a->hdr.threadid));
+}
+
+static void
+ath_alq_print_beacon_resume(struct if_ath_alq_payload *a)
+{
+
+	printf("[%u.%06u] [%llu] BRESUME\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
+	    (unsigned long long) be64toh(a->hdr.threadid));
+}
+
 int
 main(int argc, const char *argv[])
 {
@@ -147,6 +177,15 @@ main(int argc, const char *argv[])
 			case ATH_ALQ_INTR_STATUS:
 				ath_alq_print_intr_status(a);
 				break;
+			case ATH_ALQ_MISSED_BEACON:
+				ath_alq_print_beacon_miss(a);
+				break;
+			case ATH_ALQ_STUCK_BEACON:
+				ath_alq_print_beacon_stuck(a);
+				break;
+			case ATH_ALQ_RESUME_BEACON:
+				ath_alq_print_beacon_resume(a);
+				break;
 			default:
 				if (be32toh(hdr.sc_hal_magic) == AR5210_MAGIC)
 					ar5210_alq_payload(a);


More information about the svn-src-head mailing list