Search Linux Wireless

[PATCH] wireless: make drivers include the TSF RX flag where appropriate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These drivers pass full mactime information to the stack, make them
indicate this via the new RX_FLAG_TSFT to get mac80211 to show this
information in monitor mode.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
---
iwlwifi does own radiotap headers (well, tries, it's broken) so is not
modified.

 drivers/net/wireless/b43/xmit.c       |    1 +
 drivers/net/wireless/b43legacy/xmit.c |    1 +
 drivers/net/wireless/p54common.c      |    1 +
 drivers/net/wireless/rtl8180_dev.c    |    1 +
 drivers/net/wireless/rtl8187_dev.c    |    1 +
 5 files changed, 5 insertions(+)

--- everything.orig/drivers/net/wireless/p54common.c	2007-12-04 20:32:32.036952636 +0100
+++ everything/drivers/net/wireless/p54common.c	2007-12-04 20:33:17.886948839 +0100
@@ -314,6 +314,7 @@ static void p54_rx_data(struct ieee80211
 	rx_status.phymode = MODE_IEEE80211G;
 	rx_status.antenna = hdr->antenna;
 	rx_status.mactime = le64_to_cpu(hdr->timestamp);
+	rx_status.flag |= RX_FLAG_TSFT;
 
 	skb_pull(skb, sizeof(*hdr));
 	skb_trim(skb, le16_to_cpu(hdr->len));
--- everything.orig/drivers/net/wireless/b43/xmit.c	2007-12-04 20:32:32.096962565 +0100
+++ everything/drivers/net/wireless/b43/xmit.c	2007-12-04 20:33:11.046949707 +0100
@@ -541,6 +541,7 @@ void b43_rx(struct b43_wldev *dev, struc
 		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;
--- everything.orig/drivers/net/wireless/b43legacy/xmit.c	2007-12-04 20:32:32.076950086 +0100
+++ everything/drivers/net/wireless/b43legacy/xmit.c	2007-12-04 20:33:13.996951714 +0100
@@ -548,6 +548,7 @@ void b43legacy_rx(struct b43legacy_wldev
 		status.mactime += mactime;
 		if (low_mactime_now <= mactime)
 			status.mactime -= 0x10000;
+		status.flag |= RX_FLAG_TSFT;
 	}
 
 	chanid = (chanstat & B43legacy_RX_CHAN_ID) >>
--- everything.orig/drivers/net/wireless/rtl8180_dev.c	2007-12-04 20:32:32.136949327 +0100
+++ everything/drivers/net/wireless/rtl8180_dev.c	2007-12-04 20:33:21.696948567 +0100
@@ -103,6 +103,7 @@ static void rtl8180_handle_rx(struct iee
 			rx_status.channel = dev->conf.channel;
 			rx_status.phymode = dev->conf.phymode;
 			rx_status.mactime = le64_to_cpu(entry->tsft);
+			rx_status.flag |= RX_FLAG_TSFT;
 			ieee80211_rx_irqsafe(dev, skb, &rx_status);
 
 			skb = new_skb;
--- everything.orig/drivers/net/wireless/rtl8187_dev.c	2007-12-04 20:32:32.166950629 +0100
+++ everything/drivers/net/wireless/rtl8187_dev.c	2007-12-04 20:33:26.936948459 +0100
@@ -228,6 +228,7 @@ static void rtl8187_rx_cb(struct urb *ur
 	rx_status.channel = dev->conf.channel;
 	rx_status.phymode = dev->conf.phymode;
 	rx_status.mactime = le64_to_cpu(hdr->mac_time);
+	rx_status.flag |= RX_FLAG_TSFT;
 	if (flags & (1 << 13))
 		rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;
 	ieee80211_rx_irqsafe(dev, skb, &rx_status);


-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux