Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Feb 2013 02:54:25 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r246649 - head/tools/tools/ath/athalq
Message-ID:  <201302110254.r1B2sPXu015653@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Mon Feb 11 02:54:24 2013
New Revision: 246649
URL: http://svnweb.freebsd.org/changeset/base/246649

Log:
  Teach athalq about the recent if_ath_alq timestamp format change.

Modified:
  head/tools/tools/ath/athalq/ar5210_ds.c
  head/tools/tools/ath/athalq/ar5211_ds.c
  head/tools/tools/ath/athalq/ar5212_ds.c
  head/tools/tools/ath/athalq/ar5416_ds.c
  head/tools/tools/ath/athalq/main.c

Modified: head/tools/tools/ath/athalq/ar5210_ds.c
==============================================================================
--- head/tools/tools/ath/athalq/ar5210_ds.c	Mon Feb 11 02:48:49 2013	(r246648)
+++ head/tools/tools/ath/athalq/ar5210_ds.c	Mon Feb 11 02:54:24 2013	(r246649)
@@ -45,8 +45,9 @@ ar5210_decode_txstatus(struct if_ath_alq
 	/* XXX assumes txs is smaller than PAYLOAD_LEN! */
 	memcpy(&txs, &a->payload, sizeof(struct ar5210_desc));
 
-	printf("[%u] [%llu] TXSTATUS\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] TXSTATUS\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid));
 
 	/* ds_txstatus0 */
@@ -78,8 +79,9 @@ ar5210_decode_txdesc(struct if_ath_alq_p
 	/* XXX assumes txs is smaller than PAYLOAD_LEN! */
 	memcpy(&txc, &a->payload, sizeof(struct ar5210_desc));
 
-	printf("[%u] [%llu] TXD\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] TXD\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid));
 
 	printf("  link=0x%08x, data=0x%08x\n",
@@ -116,8 +118,9 @@ ar5210_decode_rxstatus(struct if_ath_alq
 	/* XXX assumes rxs is smaller than PAYLOAD_LEN! */
 	memcpy(&rxs, &a->payload, sizeof(struct ar5210_desc));
 
-	printf("[%u] [%llu] RXSTATUS\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] RXSTATUS\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid));
 
 	printf("  link=0x%08x, data=0x%08x\n",
@@ -167,8 +170,9 @@ ar5210_alq_payload(struct if_ath_alq_pay
 				ar5210_decode_txdesc(a);
 				break;
 			default:
-				printf("[%d] [%lld] op: %d; len %d\n",
-				    be32toh(a->hdr.tstamp),
+				printf("[%d.%06d] [%lld] op: %d; len %d\n",
+				    be32toh(a->hdr.tstamp_sec),
+				    be32toh(a->hdr.tstamp_usec),
 				    be64toh(a->hdr.threadid),
 				    be16toh(a->hdr.op), be16toh(a->hdr.len));
 		}

Modified: head/tools/tools/ath/athalq/ar5211_ds.c
==============================================================================
--- head/tools/tools/ath/athalq/ar5211_ds.c	Mon Feb 11 02:48:49 2013	(r246648)
+++ head/tools/tools/ath/athalq/ar5211_ds.c	Mon Feb 11 02:54:24 2013	(r246649)
@@ -45,8 +45,9 @@ ar5211_decode_txstatus(struct if_ath_alq
 	/* XXX assumes txs is smaller than PAYLOAD_LEN! */
 	memcpy(&txs, &a->payload, sizeof(struct ar5211_desc));
 
-	printf("[%u] [%llu] TXSTATUS\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] TXSTATUS\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid));
 
 	/* ds_txstatus0 */
@@ -79,8 +80,9 @@ ar5211_decode_txdesc(struct if_ath_alq_p
 	/* XXX assumes txs is smaller than PAYLOAD_LEN! */
 	memcpy(&txc, &a->payload, sizeof(struct ar5211_desc));
 
-	printf("[%u] [%llu] TXD\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] TXD\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid));
 
 	printf("  link=0x%08x, data=0x%08x\n",
@@ -117,8 +119,9 @@ ar5211_decode_rxstatus(struct if_ath_alq
 	/* XXX assumes rxs is smaller than PAYLOAD_LEN! */
 	memcpy(&rxs, &a->payload, sizeof(struct ar5211_desc));
 
-	printf("[%u] [%llu] RXSTATUS\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] RXSTATUS\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid));
 
 	printf("  link=0x%08x, data=0x%08x\n",
@@ -168,8 +171,9 @@ ar5211_alq_payload(struct if_ath_alq_pay
 				ar5211_decode_txdesc(a);
 				break;
 			default:
-				printf("[%d] [%lld] op: %d; len %d\n",
-				    be32toh(a->hdr.tstamp),
+				printf("[%d.%06d] [%lld] op: %d; len %d\n",
+				    be32toh(a->hdr.tstamp_sec),
+				    be32toh(a->hdr.tstamp_usec),
 				    be64toh(a->hdr.threadid),
 				    be16toh(a->hdr.op), be16toh(a->hdr.len));
 		}

Modified: head/tools/tools/ath/athalq/ar5212_ds.c
==============================================================================
--- head/tools/tools/ath/athalq/ar5212_ds.c	Mon Feb 11 02:48:49 2013	(r246648)
+++ head/tools/tools/ath/athalq/ar5212_ds.c	Mon Feb 11 02:54:24 2013	(r246649)
@@ -45,8 +45,9 @@ ar5212_decode_txstatus(struct if_ath_alq
 	/* XXX assumes txs is smaller than PAYLOAD_LEN! */
 	memcpy(&txs, &a->payload, sizeof(struct ar5212_desc));
 
-	printf("[%u] [%llu] TXSTATUS: TxDone=%d, TS=0x%08x\n\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] TXSTATUS: TxDone=%d, TS=0x%08x\n\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid),
 	    MF(txs.u.tx.status1, AR_Done),
 	    MS(txs.u.tx.status0, AR_SendTimestamp));
@@ -85,8 +86,9 @@ ar5212_decode_txdesc(struct if_ath_alq_p
 	/* XXX assumes txs is smaller than PAYLOAD_LEN! */
 	memcpy(&txc, &a->payload, sizeof(struct ar5212_desc));
 
-	printf("[%u] [%llu] TXD\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] TXD\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid));
 
 	printf("  link=0x%08x, data=0x%08x\n",
@@ -149,8 +151,9 @@ ar5212_decode_rxstatus(struct if_ath_alq
 	/* XXX assumes rxs is smaller than PAYLOAD_LEN! */
 	memcpy(&rxs, &a->payload, sizeof(struct ar5212_desc));
 
-	printf("[%u] [%llu] RXSTATUS: RxOK=%d TS=0x%08x\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] RXSTATUS: RxOK=%d TS=0x%08x\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid),
 	    MF(rxs.ds_rxstatus1, AR_Done),
 	    MS(rxs.ds_rxstatus1, AR_RcvTimestamp));
@@ -214,8 +217,9 @@ ar5212_alq_payload(struct if_ath_alq_pay
 				ar5212_decode_txdesc(a);
 				break;
 			default:
-				printf("[%d] [%lld] op: %d; len %d\n",
-				    be32toh(a->hdr.tstamp),
+				printf("[%d.%06d] [%lld] op: %d; len %d\n",
+				    be32toh(a->hdr.tstamp_sec),
+				    be32toh(a->hdr.tstamp_usec),
 				    be64toh(a->hdr.threadid),
 				    be16toh(a->hdr.op), be16toh(a->hdr.len));
 		}

Modified: head/tools/tools/ath/athalq/ar5416_ds.c
==============================================================================
--- head/tools/tools/ath/athalq/ar5416_ds.c	Mon Feb 11 02:48:49 2013	(r246648)
+++ head/tools/tools/ath/athalq/ar5416_ds.c	Mon Feb 11 02:54:24 2013	(r246649)
@@ -45,8 +45,9 @@ ar5416_decode_txstatus(struct if_ath_alq
 	/* XXX assumes txs is smaller than PAYLOAD_LEN! */
 	memcpy(&txs, &a->payload, sizeof(struct ar5416_desc));
 
-	printf("[%u] [%llu] TXSTATUS: TxDone=%d, TS=0x%08x\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] TXSTATUS: TxDone=%d, TS=0x%08x\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid),
 	    MF(txs.u.tx.status[9], AR_TxDone),
 	    txs.u.tx.status[2]);
@@ -121,8 +122,9 @@ ar5416_decode_txdesc(struct if_ath_alq_p
 	/* XXX assumes txs is smaller than PAYLOAD_LEN! */
 	memcpy(&txc, &a->payload, sizeof(struct ar5416_desc));
 
-	printf("[%u] [%llu] TXD\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] TXD\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid));
 
 	printf("  link=0x%08x, data=0x%08x\n",
@@ -252,8 +254,9 @@ ar5416_decode_rxstatus(struct if_ath_alq
 	/* XXX assumes rxs is smaller than PAYLOAD_LEN! */
 	memcpy(&rxs, &a->payload, sizeof(struct ar5416_desc));
 
-	printf("[%u] [%llu] RXSTATUS: RxDone=%d, TS=0x%08x\n",
-	    (unsigned int) be32toh(a->hdr.tstamp),
+	printf("[%u.%06u] [%llu] RXSTATUS: RxDone=%d, TS=0x%08x\n",
+	    (unsigned int) be32toh(a->hdr.tstamp_sec),
+	    (unsigned int) be32toh(a->hdr.tstamp_usec),
 	    (unsigned long long) be64toh(a->hdr.threadid),
 	    MF(rxs.ds_rxstatus8, AR_RxDone),
 	    rxs.ds_rxstatus2);
@@ -352,8 +355,9 @@ ar5416_alq_payload(struct if_ath_alq_pay
 				ar5416_decode_txdesc(a);
 				break;
 			default:
-				printf("[%d] [%lld] op: %d; len %d\n",
-				    be32toh(a->hdr.tstamp),
+				printf("[%d.%06d] [%lld] op: %d; len %d\n",
+				    be32toh(a->hdr.tstamp_sec),
+				    be32toh(a->hdr.tstamp_usec),
 				    be64toh(a->hdr.threadid),
 				    be16toh(a->hdr.op), be16toh(a->hdr.len));
 		}

Modified: head/tools/tools/ath/athalq/main.c
==============================================================================
--- head/tools/tools/ath/athalq/main.c	Mon Feb 11 02:48:49 2013	(r246648)
+++ head/tools/tools/ath/athalq/main.c	Mon Feb 11 02:54:24 2013	(r246649)
@@ -126,8 +126,9 @@ main(int argc, const char *argv[])
 					ar9300_alq_payload(a);
 #endif
 				else
-					printf("[%d] [%lld] op: %d; len %d\n",
-					    be32toh(a->hdr.tstamp),
+					printf("[%d.%06d] [%lld] op: %d; len %d\n",
+					    be32toh(a->hdr.tstamp_sec),
+					    be32toh(a->hdr.tstamp_usec),
 					    be64toh(a->hdr.threadid),
 					    be16toh(a->hdr.op),
 					    be16toh(a->hdr.len));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302110254.r1B2sPXu015653>