summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-02-11 02:54:24 +0000
committeradrian <adrian@FreeBSD.org>2013-02-11 02:54:24 +0000
commitade04b56f74de25f7285c47b5373fc89dd9a34ee (patch)
tree090dc283a17139731dc34b382219adb415fe045c
parent283715c7dcf0c3852f95debb586debb8d9ec4605 (diff)
downloadFreeBSD-src-ade04b56f74de25f7285c47b5373fc89dd9a34ee.zip
FreeBSD-src-ade04b56f74de25f7285c47b5373fc89dd9a34ee.tar.gz
Teach athalq about the recent if_ath_alq timestamp format change.
-rw-r--r--tools/tools/ath/athalq/ar5210_ds.c20
-rw-r--r--tools/tools/ath/athalq/ar5211_ds.c20
-rw-r--r--tools/tools/ath/athalq/ar5212_ds.c20
-rw-r--r--tools/tools/ath/athalq/ar5416_ds.c20
-rw-r--r--tools/tools/ath/athalq/main.c5
5 files changed, 51 insertions, 34 deletions
diff --git a/tools/tools/ath/athalq/ar5210_ds.c b/tools/tools/ath/athalq/ar5210_ds.c
index 79b04d9..624092e 100644
--- a/tools/tools/ath/athalq/ar5210_ds.c
+++ b/tools/tools/ath/athalq/ar5210_ds.c
@@ -45,8 +45,9 @@ ar5210_decode_txstatus(struct if_ath_alq_payload *a)
/* 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_payload *a)
/* 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_payload *a)
/* 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_payload *a)
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));
}
diff --git a/tools/tools/ath/athalq/ar5211_ds.c b/tools/tools/ath/athalq/ar5211_ds.c
index 0f0984f..d389b5a 100644
--- a/tools/tools/ath/athalq/ar5211_ds.c
+++ b/tools/tools/ath/athalq/ar5211_ds.c
@@ -45,8 +45,9 @@ ar5211_decode_txstatus(struct if_ath_alq_payload *a)
/* 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_payload *a)
/* 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_payload *a)
/* 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_payload *a)
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));
}
diff --git a/tools/tools/ath/athalq/ar5212_ds.c b/tools/tools/ath/athalq/ar5212_ds.c
index a6364a4..f752f15 100644
--- a/tools/tools/ath/athalq/ar5212_ds.c
+++ b/tools/tools/ath/athalq/ar5212_ds.c
@@ -45,8 +45,9 @@ ar5212_decode_txstatus(struct if_ath_alq_payload *a)
/* 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_payload *a)
/* 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_payload *a)
/* 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_payload *a)
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));
}
diff --git a/tools/tools/ath/athalq/ar5416_ds.c b/tools/tools/ath/athalq/ar5416_ds.c
index 55fa1db..6157c62 100644
--- a/tools/tools/ath/athalq/ar5416_ds.c
+++ b/tools/tools/ath/athalq/ar5416_ds.c
@@ -45,8 +45,9 @@ ar5416_decode_txstatus(struct if_ath_alq_payload *a)
/* 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_payload *a)
/* 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_payload *a)
/* 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_payload *a)
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));
}
diff --git a/tools/tools/ath/athalq/main.c b/tools/tools/ath/athalq/main.c
index 28bbb51..e8e277c 100644
--- a/tools/tools/ath/athalq/main.c
+++ b/tools/tools/ath/athalq/main.c
@@ -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));
OpenPOWER on IntegriCloud