]> err.no Git - linux-2.6/commitdiff
wireless: cleanup some merge errors
authorJohn W. Linville <linville@tuxdriver.com>
Mon, 21 Jan 2008 18:41:18 +0000 (13:41 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:08:45 +0000 (15:08 -0800)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/xmit.c
drivers/net/wireless/b43legacy/xmit.c

index a455a6beac4a54029d0a9fe978e401b6f812ef61..e60e54d59ab1104b4f1bd70180d8e7c4632d54ec 100644 (file)
@@ -525,8 +525,24 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
        else
                status.rate = b43_plcp_get_bitrate_cck(plcp);
        status.antenna = !!(phystat0 & B43_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;
+
+               b43_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 & B43_RX_CHAN_ID) >> B43_RX_CHAN_ID_SHIFT;
        switch (chanstat & B43_RX_CHAN_PHYTYPE) {
index c24399dc0ede4014ecf8d05dde281aadb03d44d5..fa095d43237faecc49984534e85ce8b454cce690 100644 (file)
@@ -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;