Changeset 1865

Show
Ignore:
Timestamp:
12/21/06 11:49:18 (2 years ago)
Author:
scottr
Message:

TX timestamp was not being recorded correctly in TX capture frames.
Fixes #1025.

Signed-Off-By: Georg Lukas <georg@boerde.de>
Signed-Off-By: Scott Raynel <scottraynel@gmail.com>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ath/if_ath.c

    r1855 r1865  
    53635363                          A_MAX(sizeof(wlan_ng_prism2_header), ATHDESC_HEADER_SIZE)); 
    53645364        u_int64_t tsf; 
    5365  
     5365        u_int32_t tstamp; 
     5366         
    53665367        /* Pass up tsf clock in mactime 
    5367          * tx descriptor has the low 15 bits of the tsf at 
    5368          * the time the frame was received.  Use the current 
    5369          * tsf to extend this to 64 bits. 
    5370          */ 
    5371         tsf = ath_extend_tsf(sc->sc_ah, ds->ds_txstat.ts_tstamp); 
     5368         * TX descriptor contains the transmit time in TU's, 
     5369         * (bits 25-10 of the TSF). 
     5370         */ 
     5371        tsf = ath_hal_gettsf64(sc->sc_ah); 
     5372        tstamp = ds->ds_txstat.ts_tstamp << 10; 
     5373         
     5374        if ((tsf & 0x3ffffff) < tstamp) 
     5375                tsf -= 0x4000000; 
     5376        tsf = ((tsf &~ 0x3ffffff) | tstamp); 
    53725377 
    53735378        /*