summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/xmit.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2008-01-21 19:41:18 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-29 00:08:45 +0100
commitc0ddd04d55e0a4d1506b6b8a4eb9e2b62f3aa41d (patch)
treec2ef87cc24fd7063c70d1979e127774e49e3ee56 /drivers/net/wireless/b43legacy/xmit.c
parent[IPV4]: Enable use of 240/4 address space. (diff)
downloadlinux-c0ddd04d55e0a4d1506b6b8a4eb9e2b62f3aa41d.tar.xz
linux-c0ddd04d55e0a4d1506b6b8a4eb9e2b62f3aa41d.zip
wireless: cleanup some merge errors
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy/xmit.c')
-rw-r--r--drivers/net/wireless/b43legacy/xmit.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
index c24399dc0ede..fa095d43237f 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -532,8 +532,24 @@ void b43legacy_rx(struct b43legacy_wldev *dev,
else
status.rate = b43legacy_plcp_get_bitrate_cck(plcp);
status.antenna = !!(phystat0 & B43legacy_RX_PHYST0_ANT);
- status.mactime = mactime;
- status.flag |= RX_FLAG_TSFT;
+
+ /*
+ * If monitors are present get full 64-bit timestamp. This
+ * code assumes we get to process the packet within 16 bits
+ * of timestamp, i.e. about 65 milliseconds after the PHY
+ * received the first symbol.
+ */
+ if (dev->wl->radiotap_enabled) {
+ u16 low_mactime_now;
+
+ b43legacy_tsf_read(dev, &status.mactime);
+ low_mactime_now = status.mactime;
+ status.mactime = status.mactime & ~0xFFFFULL;
+ status.mactime += mactime;
+ if (low_mactime_now <= mactime)
+ status.mactime -= 0x10000;
+ status.flag |= RX_FLAG_TSFT;
+ }
chanid = (chanstat & B43legacy_RX_CHAN_ID) >>
B43legacy_RX_CHAN_ID_SHIFT;