ATH9k_HTC mactime vs. system timestamp (timeval)

Steger, Marco Marco.Steger at v2c2.at
Wed Mar 18 01:27:33 PDT 2015


Hi all,

I have a small question about the mactime timestamp. I want to get an accurate timestamp for the point in time when the packet is received (driver/hw).

Therefore, I took a look on the ath9k_rx_prepare.c file. In the function ath9k_rx_prepare the mactime is set:
rx_status->mactime = be64_to_cpu(rxstatus->rs_tstamp);

When I print this timestamp and compare it with the Debian/linux system timestamp (timeval) I recognized that:
* both are (should be) 64bit values
* but they are different: 
 [ 2141.033905] TS: timeval-ts [1426665454085102] mactime-ts [688414257]
 [ 2141.034290] TS: timeval-ts [1426665454085613] mactime-ts [688414675]
 [ 2141.034697] TS: timeval-ts [1426665454086024] mactime-ts [688415074]
 [ 2141.035071] TS: timeval-ts [1426665454086420] mactime-ts [688415456]
 [ 2141.035442] TS: timeval-ts [1426665454086797] mactime-ts [688415827]
 [ 2141.035817] TS: timeval-ts [1426665454087170] mactime-ts [688416203]
 [ 2141.036173] TS: timeval-ts [1426665454087544] mactime-ts [688416569]
 [ 2141.036566] TS: timeval-ts [1426665454087915] mactime-ts [688416953]
 [ 2141.036943] TS: timeval-ts [1426665454088301] mactime-ts [688417342]
 [ 2141.037345] TS: timeval-ts [1426665454088682] mactime-ts [688417745]

So I think there must/should be an easy way to get a system ts out of the mactime ts but I don't know how at the moment. 

Would be great if you can help me here!

Best regards,
Marco


Dipl.-Ing. Marco Steger
Junior Researcher
Area Electrics/Electronics & Software (Area E)
 
VIRTUAL VEHICLE
Kompetenzzentrum - Das virtuelle Fahrzeug Forschungs-GmbH
 
Inffeldgasse 21/A
8010  Graz  /  Austria
Tel:        +43 316 873 9009
E-Mail:     marco.steger at v2c2.at
Web:        www.v2c2.at <http://www.v2c2.at/> 
 
Firmenname: Kompetenzzentrum - Das virtuelle Fahrzeug, Forschungsgesellschaft mbH
Rechtsform: Gesellschaft mit beschränkter Haftung
Firmensitz: A-8010 Graz, Inffeldgasse 21/A
Firmenbuchnummer: 224755y
Firmenbuchgericht: Landesgericht fürZRS Graz





More information about the ath9k_htc_fw mailing list