* [PATCH] b43(legacy): include full timestamp in beacon frames
@ 2008-02-18 8:05 Johannes Berg
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2008-02-18 8:05 UTC (permalink / raw)
To: Michael Buesch; +Cc: Stefano Brivio, linux-wireless
Having the full RX timestamp in beacons is necessary for IBSS
merge to work properly so extend the 16-bit timestamp to the
full 64 bits for beacon frames (as well as when monitor mode
is active.)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
NB: I don't test IBSS, it doesn't interest me enough.
drivers/net/wireless/b43/xmit.c | 14 +++++++++-----
drivers/net/wireless/b43legacy/xmit.c | 14 +++++++++-----
2 files changed, 18 insertions(+), 10 deletions(-)
--- everything.orig/drivers/net/wireless/b43/xmit.c 2008-02-18 09:02:29.921823351 +0100
+++ everything/drivers/net/wireless/b43/xmit.c 2008-02-18 09:04:15.121823730 +0100
@@ -589,12 +589,16 @@ void b43_rx(struct b43_wldev *dev, struc
status.antenna = !!(phystat0 & B43_RX_PHYST0_ANT);
/*
- * 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.
+ * All frames on monitor interfaces and beacons always need a full
+ * 64-bit timestamp. Monitor interfaces need it for diagnostic
+ * purposes and beacons for IBSS merging.
+ * 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) {
+ if (((fctl & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE))
+ == (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON)) ||
+ dev->wl->radiotap_enabled) {
u16 low_mactime_now;
b43_tsf_read(dev, &status.mactime);
--- everything.orig/drivers/net/wireless/b43legacy/xmit.c 2008-02-06 17:38:25.416098905 +0100
+++ everything/drivers/net/wireless/b43legacy/xmit.c 2008-02-18 09:04:40.471819824 +0100
@@ -546,12 +546,16 @@ void b43legacy_rx(struct b43legacy_wldev
status.antenna = !!(phystat0 & B43legacy_RX_PHYST0_ANT);
/*
- * 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.
+ * All frames on monitor interfaces and beacons always need a full
+ * 64-bit timestamp. Monitor interfaces need it for diagnostic
+ * purposes and beacons for IBSS merging.
+ * 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) {
+ if (((fctl & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE))
+ == (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON)) ||
+ dev->wl->radiotap_enabled) {
u16 low_mactime_now;
b43legacy_tsf_read(dev, &status.mactime);
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] b43(legacy): include full timestamp in beacon frames
@ 2008-02-18 17:53 Michael Buesch
2008-02-18 19:45 ` Stefano Brivio
0 siblings, 1 reply; 3+ messages in thread
From: Michael Buesch @ 2008-02-18 17:53 UTC (permalink / raw)
To: John Linville; +Cc: bcm43xx-dev, linux-wireless, Stefano Brivio
From: Johannes Berg <johannes@sipsolutions.net>
Having the full RX timestamp in beacons is necessary for IBSS
merge to work properly so extend the 16-bit timestamp to the
full 64 bits for beacon frames (as well as when monitor mode
is active.)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
drivers/net/wireless/b43/xmit.c | 14 +++++++++-----
drivers/net/wireless/b43legacy/xmit.c | 14 +++++++++-----
2 files changed, 18 insertions(+), 10 deletions(-)
--- everything.orig/drivers/net/wireless/b43/xmit.c 2008-02-18 09:02:29.921823351 +0100
+++ everything/drivers/net/wireless/b43/xmit.c 2008-02-18 09:04:15.121823730 +0100
@@ -589,12 +589,16 @@ void b43_rx(struct b43_wldev *dev, struc
status.antenna = !!(phystat0 & B43_RX_PHYST0_ANT);
/*
- * 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.
+ * All frames on monitor interfaces and beacons always need a full
+ * 64-bit timestamp. Monitor interfaces need it for diagnostic
+ * purposes and beacons for IBSS merging.
+ * 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) {
+ if (((fctl & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE))
+ == (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON)) ||
+ dev->wl->radiotap_enabled) {
u16 low_mactime_now;
b43_tsf_read(dev, &status.mactime);
--- everything.orig/drivers/net/wireless/b43legacy/xmit.c 2008-02-06 17:38:25.416098905 +0100
+++ everything/drivers/net/wireless/b43legacy/xmit.c 2008-02-18 09:04:40.471819824 +0100
@@ -546,12 +546,16 @@ void b43legacy_rx(struct b43legacy_wldev
status.antenna = !!(phystat0 & B43legacy_RX_PHYST0_ANT);
/*
- * 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.
+ * All frames on monitor interfaces and beacons always need a full
+ * 64-bit timestamp. Monitor interfaces need it for diagnostic
+ * purposes and beacons for IBSS merging.
+ * 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) {
+ if (((fctl & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE))
+ == (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON)) ||
+ dev->wl->radiotap_enabled) {
u16 low_mactime_now;
b43legacy_tsf_read(dev, &status.mactime);
-------------------------------------------------------
--
Greetings Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] b43(legacy): include full timestamp in beacon frames
2008-02-18 17:53 [PATCH] b43(legacy): include full timestamp in beacon frames Michael Buesch
@ 2008-02-18 19:45 ` Stefano Brivio
0 siblings, 0 replies; 3+ messages in thread
From: Stefano Brivio @ 2008-02-18 19:45 UTC (permalink / raw)
To: Michael Buesch; +Cc: John Linville, bcm43xx-dev, linux-wireless
On Mon, 18 Feb 2008 18:53:55 +0100
Michael Buesch <mb@bu3sch.de> wrote:
> From: Johannes Berg <johannes@sipsolutions.net>
>
> Having the full RX timestamp in beacons is necessary for IBSS
> merge to work properly so extend the 16-bit timestamp to the
> full 64 bits for beacon frames (as well as when monitor mode
> is active.)
> --- everything.orig/drivers/net/wireless/b43legacy/xmit.c 2008-02-06 17:38:25.416098905 +0100
> +++ everything/drivers/net/wireless/b43legacy/xmit.c 2008-02-18 09:04:40.471819824 +0100
> @@ -546,12 +546,16 @@ void b43legacy_rx(struct b43legacy_wldev
> status.antenna = !!(phystat0 & B43legacy_RX_PHYST0_ANT);
>
> /*
> - * 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.
> + * All frames on monitor interfaces and beacons always need a full
> + * 64-bit timestamp. Monitor interfaces need it for diagnostic
> + * purposes and beacons for IBSS merging.
> + * 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) {
> + if (((fctl & (IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE))
> + == (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON)) ||
> + dev->wl->radiotap_enabled) {
> u16 low_mactime_now;
>
> b43legacy_tsf_read(dev, &status.mactime);
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
--
Ciao
Stefano
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-18 19:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-18 17:53 [PATCH] b43(legacy): include full timestamp in beacon frames Michael Buesch
2008-02-18 19:45 ` Stefano Brivio
-- strict thread matches above, loose matches on Subject: below --
2008-02-18 8:05 Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).