Ticket #1025: madwifi_tx_tsf_r1864.patch
| File madwifi_tx_tsf_r1864.patch, 1.2 kB (added by scottr, 2 years ago) |
|---|
-
ath/if_ath.c
old new 5361 5361 struct ieee80211_frame *wh; 5362 5362 int extra = A_MAX(sizeof(struct ath_tx_radiotap_header), 5363 5363 A_MAX(sizeof(wlan_ng_prism2_header), ATHDESC_HEADER_SIZE)); 5364 u_int64_t tsf;5365 5364 5366 /* Pass up tsf clock in mactime5367 * t x descriptor has the low 15 bits of the tsf at5368 * the time the frame was received. Use the current5369 * tsf to extend this to 64 bits.5365 /* 5366 * ts_tstamp appears to be a 16-bit value, incremented approximately once 5367 * per millisecond. Shifting left by 10 bits gives better results than 5368 * muliplying by 10 when sorting a trace based on hardware timestamp. 5370 5369 */ 5371 tsf = ath_extend_tsf(sc->sc_ah, ds->ds_txstat.ts_tstamp); 5370 u_int32_t rstamp = ds->ds_txstat.ts_tstamp << 10; 5371 u_int64_t tsf = ath_hal_gettsf64(sc->sc_ah); 5372 5372 5373 if ((tsf & 0x3ffffff) < rstamp) 5374 tsf -= 0x4000000; 5375 tsf = ((tsf &~ 0x3ffffff) | rstamp); 5376 5373 5377 /* 5374 5378 * release the owner of this skb since we're basically 5375 5379 * recycling it
