svn commit: r346003 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan
Author: avos Date: Sun Apr 7 12:57:38 2019 New Revision: 346003 URL: https://svnweb.freebsd.org/changeset/base/346003 Log: MFC r345729: urtw(4): export TSF timestamp for received frames via radiotap Was tested with Netgear WG111 v3 (RTL8187B), STA mode. Modified: stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_urtwvar.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/usb/wlan/if_urtw.c stable/12/sys/dev/usb/wlan/if_urtwvar.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/usb/wlan/if_urtw.c == --- stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr 7 12:20:17 2019 (r346002) +++ stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr 7 12:57:38 2019 (r346003) @@ -3937,6 +3937,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da struct urtw_softc *sc = data->sc; struct ieee80211com *ic = >sc_ic; uint8_t noise = 0, rate; + uint64_t mactime; usbd_xfer_status(xfer, , NULL, NULL, NULL); @@ -3956,6 +3957,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da /* XXX correct? */ rssi = rx->rssi & URTW_RX_RSSI_MASK; noise = rx->noise; + + if (ieee80211_radiotap_active(ic)) + mactime = rx->mactime; } else { struct urtw_8187l_rxhdr *rx; @@ -3972,6 +3976,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da /* XXX correct? */ rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK; noise = rx->noise; + + if (ieee80211_radiotap_active(ic)) + mactime = rx->mactime; } if (flen < IEEE80211_ACK_LEN) @@ -3991,6 +3998,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da if (ieee80211_radiotap_active(ic)) { struct urtw_rx_radiotap_header *tap = >sc_rxtap; + tap->wr_tsf = mactime; tap->wr_flags = 0; tap->wr_dbm_antsignal = (int8_t)rssi; } Modified: stable/11/sys/dev/usb/wlan/if_urtwvar.h == --- stable/11/sys/dev/usb/wlan/if_urtwvar.h Sun Apr 7 12:20:17 2019 (r346002) +++ stable/11/sys/dev/usb/wlan/if_urtwvar.h Sun Apr 7 12:57:38 2019 (r346003) @@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead; struct urtw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; + uint64_twr_tsf; uint8_t wr_flags; uint8_t wr_pad; uint16_twr_chan_freq; @@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header { } __packed __aligned(8); #define URTW_RX_RADIOTAP_PRESENT \ - ((1 << IEEE80211_RADIOTAP_FLAGS) | \ + ((1 << IEEE80211_RADIOTAP_TSFT) | \ +(1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) |\ (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL)) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r346003 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan
Author: avos Date: Sun Apr 7 12:57:38 2019 New Revision: 346003 URL: https://svnweb.freebsd.org/changeset/base/346003 Log: MFC r345729: urtw(4): export TSF timestamp for received frames via radiotap Was tested with Netgear WG111 v3 (RTL8187B), STA mode. Modified: stable/12/sys/dev/usb/wlan/if_urtw.c stable/12/sys/dev/usb/wlan/if_urtwvar.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_urtwvar.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/usb/wlan/if_urtw.c == --- stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr 7 12:20:17 2019 (r346002) +++ stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr 7 12:57:38 2019 (r346003) @@ -3932,6 +3932,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da struct urtw_softc *sc = data->sc; struct ieee80211com *ic = >sc_ic; uint8_t noise = 0, rate; + uint64_t mactime; usbd_xfer_status(xfer, , NULL, NULL, NULL); @@ -3951,6 +3952,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da /* XXX correct? */ rssi = rx->rssi & URTW_RX_RSSI_MASK; noise = rx->noise; + + if (ieee80211_radiotap_active(ic)) + mactime = rx->mactime; } else { struct urtw_8187l_rxhdr *rx; @@ -3967,6 +3971,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da /* XXX correct? */ rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK; noise = rx->noise; + + if (ieee80211_radiotap_active(ic)) + mactime = rx->mactime; } if (flen < IEEE80211_ACK_LEN) @@ -3986,6 +3993,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da if (ieee80211_radiotap_active(ic)) { struct urtw_rx_radiotap_header *tap = >sc_rxtap; + tap->wr_tsf = mactime; tap->wr_flags = 0; tap->wr_dbm_antsignal = (int8_t)rssi; } Modified: stable/12/sys/dev/usb/wlan/if_urtwvar.h == --- stable/12/sys/dev/usb/wlan/if_urtwvar.h Sun Apr 7 12:20:17 2019 (r346002) +++ stable/12/sys/dev/usb/wlan/if_urtwvar.h Sun Apr 7 12:57:38 2019 (r346003) @@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead; struct urtw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; + uint64_twr_tsf; uint8_t wr_flags; uint8_t wr_pad; uint16_twr_chan_freq; @@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header { } __packed __aligned(8); #define URTW_RX_RADIOTAP_PRESENT \ - ((1 << IEEE80211_RADIOTAP_FLAGS) | \ + ((1 << IEEE80211_RADIOTAP_TSFT) | \ +(1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) |\ (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL)) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r346003 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan
Author: avos Date: Sun Apr 7 12:57:38 2019 New Revision: 346003 URL: https://svnweb.freebsd.org/changeset/base/346003 Log: MFC r345729: urtw(4): export TSF timestamp for received frames via radiotap Was tested with Netgear WG111 v3 (RTL8187B), STA mode. Modified: stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_urtwvar.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/usb/wlan/if_urtw.c stable/12/sys/dev/usb/wlan/if_urtwvar.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/usb/wlan/if_urtw.c == --- stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr 7 12:20:17 2019 (r346002) +++ stable/11/sys/dev/usb/wlan/if_urtw.cSun Apr 7 12:57:38 2019 (r346003) @@ -3937,6 +3937,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da struct urtw_softc *sc = data->sc; struct ieee80211com *ic = >sc_ic; uint8_t noise = 0, rate; + uint64_t mactime; usbd_xfer_status(xfer, , NULL, NULL, NULL); @@ -3956,6 +3957,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da /* XXX correct? */ rssi = rx->rssi & URTW_RX_RSSI_MASK; noise = rx->noise; + + if (ieee80211_radiotap_active(ic)) + mactime = rx->mactime; } else { struct urtw_8187l_rxhdr *rx; @@ -3972,6 +3976,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da /* XXX correct? */ rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK; noise = rx->noise; + + if (ieee80211_radiotap_active(ic)) + mactime = rx->mactime; } if (flen < IEEE80211_ACK_LEN) @@ -3991,6 +3998,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da if (ieee80211_radiotap_active(ic)) { struct urtw_rx_radiotap_header *tap = >sc_rxtap; + tap->wr_tsf = mactime; tap->wr_flags = 0; tap->wr_dbm_antsignal = (int8_t)rssi; } Modified: stable/11/sys/dev/usb/wlan/if_urtwvar.h == --- stable/11/sys/dev/usb/wlan/if_urtwvar.h Sun Apr 7 12:20:17 2019 (r346002) +++ stable/11/sys/dev/usb/wlan/if_urtwvar.h Sun Apr 7 12:57:38 2019 (r346003) @@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead; struct urtw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; + uint64_twr_tsf; uint8_t wr_flags; uint8_t wr_pad; uint16_twr_chan_freq; @@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header { } __packed __aligned(8); #define URTW_RX_RADIOTAP_PRESENT \ - ((1 << IEEE80211_RADIOTAP_FLAGS) | \ + ((1 << IEEE80211_RADIOTAP_TSFT) | \ +(1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) |\ (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL)) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r346003 - in stable: 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan
Author: avos Date: Sun Apr 7 12:57:38 2019 New Revision: 346003 URL: https://svnweb.freebsd.org/changeset/base/346003 Log: MFC r345729: urtw(4): export TSF timestamp for received frames via radiotap Was tested with Netgear WG111 v3 (RTL8187B), STA mode. Modified: stable/12/sys/dev/usb/wlan/if_urtw.c stable/12/sys/dev/usb/wlan/if_urtwvar.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/usb/wlan/if_urtw.c stable/11/sys/dev/usb/wlan/if_urtwvar.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/usb/wlan/if_urtw.c == --- stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr 7 12:20:17 2019 (r346002) +++ stable/12/sys/dev/usb/wlan/if_urtw.cSun Apr 7 12:57:38 2019 (r346003) @@ -3932,6 +3932,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da struct urtw_softc *sc = data->sc; struct ieee80211com *ic = >sc_ic; uint8_t noise = 0, rate; + uint64_t mactime; usbd_xfer_status(xfer, , NULL, NULL, NULL); @@ -3951,6 +3952,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da /* XXX correct? */ rssi = rx->rssi & URTW_RX_RSSI_MASK; noise = rx->noise; + + if (ieee80211_radiotap_active(ic)) + mactime = rx->mactime; } else { struct urtw_8187l_rxhdr *rx; @@ -3967,6 +3971,9 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da /* XXX correct? */ rssi = rx->rssi & URTW_RX_8187L_RSSI_MASK; noise = rx->noise; + + if (ieee80211_radiotap_active(ic)) + mactime = rx->mactime; } if (flen < IEEE80211_ACK_LEN) @@ -3986,6 +3993,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da if (ieee80211_radiotap_active(ic)) { struct urtw_rx_radiotap_header *tap = >sc_rxtap; + tap->wr_tsf = mactime; tap->wr_flags = 0; tap->wr_dbm_antsignal = (int8_t)rssi; } Modified: stable/12/sys/dev/usb/wlan/if_urtwvar.h == --- stable/12/sys/dev/usb/wlan/if_urtwvar.h Sun Apr 7 12:20:17 2019 (r346002) +++ stable/12/sys/dev/usb/wlan/if_urtwvar.h Sun Apr 7 12:57:38 2019 (r346003) @@ -55,6 +55,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead; struct urtw_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; + uint64_twr_tsf; uint8_t wr_flags; uint8_t wr_pad; uint16_twr_chan_freq; @@ -63,7 +64,8 @@ struct urtw_rx_radiotap_header { } __packed __aligned(8); #define URTW_RX_RADIOTAP_PRESENT \ - ((1 << IEEE80211_RADIOTAP_FLAGS) | \ + ((1 << IEEE80211_RADIOTAP_TSFT) | \ +(1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_CHANNEL) |\ (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL)) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"