Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:05:57 -0000
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r345634 - in stable/12: share/man/man9 sys/dev/ath sys/dev/bwi sys/dev/bwn sys/dev/ipw sys/dev/iwi sys/dev/iwm sys/dev/iwn sys/dev/malo sys/dev/mwl sys/dev/otus sys/dev/ral sys/dev/rtwn...
Message-ID:  <201903280916.x2S9G0au018943@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Thu Mar 28 09:16:00 2019
New Revision: 345634
URL: https://svnweb.freebsd.org/changeset/base/345634

Log:
  MFC r344990:
  Fix ieee80211_radiotap(9) usage in wireless drivers:
  
  - Alignment issues:
   * Add missing __packed attributes + padding across all drivers; in
  most places there was an assumption that padding will be always
  minimally suitable; in few places - e.g., in urtw(4) / rtwn(4) -
  padding was just missing.
   * Add __aligned(8) attribute for all Rx radiotap headers since they can
  contain 64-bit TSF timestamp; it cannot appear in Tx radiotap headers, so
  just drop the attribute here. Refresh ieee80211_radiotap(9) man page
  accordingly.
  
  - Since net80211 automatically updates channel frequency / flags in
  ieee80211_radiotap_chan_change() drop duplicate setup for these fields
  in drivers.

Modified:
  stable/12/share/man/man9/ieee80211_radiotap.9
  stable/12/sys/dev/ath/if_athioctl.h
  stable/12/sys/dev/bwi/if_bwi.c
  stable/12/sys/dev/bwi/if_bwivar.h
  stable/12/sys/dev/bwn/if_bwn.c
  stable/12/sys/dev/bwn/if_bwnvar.h
  stable/12/sys/dev/ipw/if_ipwvar.h
  stable/12/sys/dev/iwi/if_iwivar.h
  stable/12/sys/dev/iwm/if_iwmvar.h
  stable/12/sys/dev/iwn/if_iwn.c
  stable/12/sys/dev/iwn/if_iwnvar.h
  stable/12/sys/dev/malo/if_maloioctl.h
  stable/12/sys/dev/mwl/if_mwlioctl.h
  stable/12/sys/dev/otus/if_otus.c
  stable/12/sys/dev/otus/if_otusreg.h
  stable/12/sys/dev/ral/rt2560var.h
  stable/12/sys/dev/ral/rt2661var.h
  stable/12/sys/dev/ral/rt2860var.h
  stable/12/sys/dev/rtwn/if_rtwn.c
  stable/12/sys/dev/rtwn/if_rtwnvar.h
  stable/12/sys/dev/usb/wlan/if_rsu.c
  stable/12/sys/dev/usb/wlan/if_rsureg.h
  stable/12/sys/dev/usb/wlan/if_rumvar.h
  stable/12/sys/dev/usb/wlan/if_run.c
  stable/12/sys/dev/usb/wlan/if_runvar.h
  stable/12/sys/dev/usb/wlan/if_uathvar.h
  stable/12/sys/dev/usb/wlan/if_upgtvar.h
  stable/12/sys/dev/usb/wlan/if_uralvar.h
  stable/12/sys/dev/usb/wlan/if_urtw.c
  stable/12/sys/dev/usb/wlan/if_urtwvar.h
  stable/12/sys/dev/usb/wlan/if_zydreg.h
  stable/12/sys/dev/wi/if_wireg.h
  stable/12/sys/dev/wpi/if_wpivar.h
  stable/12/sys/dev/wtap/if_wtapioctl.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man9/ieee80211_radiotap.9
==============================================================================
--- stable/12/share/man/man9/ieee80211_radiotap.9	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/share/man/man9/ieee80211_radiotap.9	Thu Mar 28 09:16:00 2019	(r345634)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 4, 2009
+.Dd March 11, 2019
 .Dt IEEE80211_RADIOTAP 9
 .Os
 .Sh NAME
@@ -257,7 +257,7 @@ struct wi_rx_radiotap_header {
         uint16_t       wr_chan_flags;
         uint8_t        wr_antsignal;
         uint8_t        wr_antnoise;
-} __packed;
+} __packed __aligned(8);
 .Ed
 .Pp
 and transmit definitions for the Atheros driver:

Modified: stable/12/sys/dev/ath/if_athioctl.h
==============================================================================
--- stable/12/sys/dev/ath/if_athioctl.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/ath/if_athioctl.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -373,7 +373,7 @@ struct ath_rx_radiotap_header {
 	 */
 	struct ath_radiotap_vendor_hdr wr_v;
 #endif	/* ATH_ENABLE_RADIOTAP_VENDOR_EXT */
-} __packed;
+} __packed __aligned(8);
 
 #define ATH_TX_RADIOTAP_PRESENT (		\
 	(1 << IEEE80211_RADIOTAP_FLAGS)		| \

Modified: stable/12/sys/dev/bwi/if_bwi.c
==============================================================================
--- stable/12/sys/dev/bwi/if_bwi.c	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/bwi/if_bwi.c	Thu Mar 28 09:16:00 2019	(r345634)
@@ -1729,15 +1729,6 @@ bwi_set_channel(struct ieee80211com *ic)
 	bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0);
 
 	sc->sc_rates = ieee80211_get_ratetable(c);
-
-	/*
-	 * Setup radio tap channel freq and flags
-	 */
-	sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
-		htole16(c->ic_freq);
-	sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
-		htole16(c->ic_flags & 0xffff);
-
 	BWI_UNLOCK(sc);
 }
 

Modified: stable/12/sys/dev/bwi/if_bwivar.h
==============================================================================
--- stable/12/sys/dev/bwi/if_bwivar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/bwi/if_bwivar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -513,7 +513,7 @@ struct bwi_tx_radiotap_hdr {
 	uint8_t		wt_rate;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-};
+} __packed;
 
 #define BWI_RX_RADIOTAP_PRESENT				\
 	((1 << IEEE80211_RADIOTAP_TSFT) |		\
@@ -533,7 +533,7 @@ struct bwi_rx_radiotap_hdr {
 	int8_t		wr_antsignal;
 	int8_t		wr_antnoise;
 	/* TODO: sq */
-};
+} __packed __aligned(8);
 
 struct bwi_vap {
 	struct ieee80211vap	bv_vap;

Modified: stable/12/sys/dev/bwn/if_bwn.c
==============================================================================
--- stable/12/sys/dev/bwn/if_bwn.c	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/bwn/if_bwn.c	Thu Mar 28 09:16:00 2019	(r345634)
@@ -2001,14 +2001,6 @@ bwn_set_channel(struct ieee80211com *ic)
 	bwn_mac_enable(mac);
 
 fail:
-	/*
-	 * Setup radio tap channel freq and flags
-	 */
-	sc->sc_tx_th.wt_chan_freq = sc->sc_rx_th.wr_chan_freq =
-		htole16(ic->ic_curchan->ic_freq);
-	sc->sc_tx_th.wt_chan_flags = sc->sc_rx_th.wr_chan_flags =
-		htole16(ic->ic_curchan->ic_flags & 0xffff);
-
 	BWN_UNLOCK(sc);
 }
 

Modified: stable/12/sys/dev/bwn/if_bwnvar.h
==============================================================================
--- stable/12/sys/dev/bwn/if_bwnvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/bwn/if_bwnvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -570,7 +570,7 @@ struct bwn_rx_radiotap_header {
 	int8_t				wr_antsignal;
 	int8_t				wr_antnoise;
 	u_int8_t			wr_antenna;
-};
+} __packed __aligned(8);
 
 #define	BWN_TX_RADIOTAP_PRESENT (		\
 	(1 << IEEE80211_RADIOTAP_FLAGS)		| \
@@ -588,7 +588,7 @@ struct bwn_tx_radiotap_header {
 	u_int16_t			wt_chan_flags;
 	u_int8_t			wt_txpower;
 	u_int8_t			wt_antenna;
-};
+} __packed;
 
 struct bwn_stats {
 	int32_t				rtsfail;

Modified: stable/12/sys/dev/ipw/if_ipwvar.h
==============================================================================
--- stable/12/sys/dev/ipw/if_ipwvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/ipw/if_ipwvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -57,11 +57,12 @@ struct ipw_soft_buf {
 struct ipw_rx_radiotap_header {
 	struct ieee80211_radiotap_header wr_ihdr;
 	uint8_t		wr_flags;
+	uint8_t		wr_pad;
 	uint16_t	wr_chan_freq;
 	uint16_t	wr_chan_flags;
 	int8_t		wr_antsignal;
 	int8_t		wr_antnoise;
-};
+} __packed __aligned(8);
 
 #define IPW_RX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
@@ -72,9 +73,10 @@ struct ipw_rx_radiotap_header {
 struct ipw_tx_radiotap_header {
 	struct ieee80211_radiotap_header wt_ihdr;
 	uint8_t		wt_flags;
+	uint8_t		wt_pad;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-};
+} __packed;
 
 #define IPW_TX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/iwi/if_iwivar.h
==============================================================================
--- stable/12/sys/dev/iwi/if_iwivar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/iwi/if_iwivar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -38,7 +38,7 @@ struct iwi_rx_radiotap_header {
 	int8_t		wr_antsignal;
 	int8_t		wr_antnoise;
 	uint8_t		wr_antenna;
-};
+} __packed __aligned(8);
 
 #define IWI_RX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
@@ -51,9 +51,10 @@ struct iwi_rx_radiotap_header {
 struct iwi_tx_radiotap_header {
 	struct ieee80211_radiotap_header wt_ihdr;
 	uint8_t		wt_flags;
+	uint8_t		wt_pad;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-};
+} __packed;
 
 #define IWI_TX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/iwm/if_iwmvar.h
==============================================================================
--- stable/12/sys/dev/iwm/if_iwmvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/iwm/if_iwmvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -113,7 +113,7 @@ struct iwm_rx_radiotap_header {
 	uint16_t	wr_chan_flags;
 	int8_t		wr_dbm_antsignal;
 	int8_t		wr_dbm_antnoise;
-} __packed;
+} __packed __aligned(8);
 
 #define IWM_RX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_TSFT) |				\

Modified: stable/12/sys/dev/iwn/if_iwn.c
==============================================================================
--- stable/12/sys/dev/iwn/if_iwn.c	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/iwn/if_iwn.c	Thu Mar 28 09:16:00 2019	(r345634)
@@ -9102,18 +9102,12 @@ iwn_scan_end(struct ieee80211com *ic)
 static void
 iwn_set_channel(struct ieee80211com *ic)
 {
-	const struct ieee80211_channel *c = ic->ic_curchan;
 	struct iwn_softc *sc = ic->ic_softc;
 	int error;
 
 	DPRINTF(sc, IWN_DEBUG_TRACE, "->Doing %s\n", __func__);
 
 	IWN_LOCK(sc);
-	sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq);
-	sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags);
-	sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq);
-	sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags);
-
 	/*
 	 * Only need to set the channel in Monitor mode. AP scanning and auth
 	 * are already taken care of by their respective firmware commands.

Modified: stable/12/sys/dev/iwn/if_iwnvar.h
==============================================================================
--- stable/12/sys/dev/iwn/if_iwnvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/iwn/if_iwnvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -62,7 +62,7 @@ struct iwn_rx_radiotap_header {
 	uint16_t	wr_chan_flags;
 	int8_t		wr_dbm_antsignal;
 	int8_t		wr_dbm_antnoise;
-} __packed;
+} __packed __aligned(8);
 
 #define IWN_RX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_TSFT) |				\

Modified: stable/12/sys/dev/malo/if_maloioctl.h
==============================================================================
--- stable/12/sys/dev/malo/if_maloioctl.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/malo/if_maloioctl.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -93,7 +93,7 @@ struct malo_rx_radiotap_header {
 	int8_t		wr_antsignal;
 	int8_t		wr_antnoise;
 	u_int8_t	wr_antenna;
-};
+} __packed __aligned(8);
 
 #define MALO_TX_RADIOTAP_PRESENT (		\
 	(1 << IEEE80211_RADIOTAP_FLAGS)		| \
@@ -111,6 +111,6 @@ struct malo_tx_radiotap_header {
 	u_int16_t	wt_chan_flags;
 	u_int8_t	wt_txpower;
 	u_int8_t	wt_antenna;
-};
+} __packed;
 
 #endif /* _DEV_MALO_MVIOCTL_H */

Modified: stable/12/sys/dev/mwl/if_mwlioctl.h
==============================================================================
--- stable/12/sys/dev/mwl/if_mwlioctl.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/mwl/if_mwlioctl.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -115,7 +115,7 @@ struct mwl_rx_radiotap_header {
 	int8_t		wr_antsignal;
 	int8_t		wr_antnoise;
 	u_int8_t	wr_antenna;
-};
+} __packed __aligned(8);
 
 #define MWL_TX_RADIOTAP_PRESENT (		\
 	(1 << IEEE80211_RADIOTAP_FLAGS)		| \
@@ -133,6 +133,6 @@ struct mwl_tx_radiotap_header {
 	u_int16_t	wt_chan_flags;
 	u_int8_t	wt_txpower;
 	u_int8_t	wt_antenna;
-};
+} __packed;
 
 #endif /* _DEV_MWL_MVIOCTL_H */

Modified: stable/12/sys/dev/otus/if_otus.c
==============================================================================
--- stable/12/sys/dev/otus/if_otus.c	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/otus/if_otus.c	Thu Mar 28 09:16:00 2019	(r345634)
@@ -1670,8 +1670,6 @@ otus_sub_rxeof(struct otus_softc *sc, uint8_t *buf, in
 		struct mbuf mb;
 
 		tap->wr_flags = 0;
-		tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
-		tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
 		tap->wr_antsignal = tail->rssi;
 		tap->wr_rate = 2;	/* In case it can't be found below. */
 		switch (tail->status & AR_RX_STATUS_MT_MASK) {

Modified: stable/12/sys/dev/otus/if_otusreg.h
==============================================================================
--- stable/12/sys/dev/otus/if_otusreg.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/otus/if_otusreg.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -900,7 +900,7 @@ struct otus_rx_radiotap_header {
 	uint16_t	wr_chan_freq;
 	uint16_t	wr_chan_flags;
 	uint8_t		wr_antsignal;
-} __packed;
+} __packed __aligned(8);
 
 #define OTUS_RX_RADIOTAP_PRESENT			\
 	(1 << IEEE80211_RADIOTAP_FLAGS |		\

Modified: stable/12/sys/dev/ral/rt2560var.h
==============================================================================
--- stable/12/sys/dev/ral/rt2560var.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/ral/rt2560var.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -27,7 +27,7 @@ struct rt2560_rx_radiotap_header {
 	int8_t		wr_antsignal;
 	int8_t		wr_antnoise;
 	uint8_t		wr_antenna;
-};
+} __packed __aligned(8);
 
 #define RT2560_RX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_TSFT) |				\
@@ -45,7 +45,7 @@ struct rt2560_tx_radiotap_header {
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
 	uint8_t		wt_antenna;
-};
+} __packed;
 
 #define RT2560_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/ral/rt2661var.h
==============================================================================
--- stable/12/sys/dev/ral/rt2661var.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/ral/rt2661var.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -42,7 +42,7 @@ struct rt2661_tx_radiotap_header {
 	uint8_t		wt_rate;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
 
 #define RT2661_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/ral/rt2860var.h
==============================================================================
--- stable/12/sys/dev/ral/rt2860var.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/ral/rt2860var.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -55,7 +55,7 @@ struct rt2860_tx_radiotap_header {
 	uint8_t		wt_rate;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
 
 #define RT2860_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/rtwn/if_rtwn.c
==============================================================================
--- stable/12/sys/dev/rtwn/if_rtwn.c	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/rtwn/if_rtwn.c	Thu Mar 28 09:16:00 2019	(r345634)
@@ -1560,10 +1560,6 @@ rtwn_set_channel(struct ieee80211com *ic)
 
 	RTWN_LOCK(sc);
 	rtwn_set_chan(sc, c);
-	sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq);
-	sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags);
-	sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq);
-	sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags);
 	RTWN_UNLOCK(sc);
 }
 

Modified: stable/12/sys/dev/rtwn/if_rtwnvar.h
==============================================================================
--- stable/12/sys/dev/rtwn/if_rtwnvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/rtwn/if_rtwnvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -62,9 +62,10 @@ struct rtwn_rx_radiotap_header {
 struct rtwn_tx_radiotap_header {
 	struct ieee80211_radiotap_header wt_ihdr;
 	uint8_t		wt_flags;
+	uint8_t		wt_pad;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
 
 #define RTWN_TX_RADIOTAP_PRESENT			\
 	(1 << IEEE80211_RADIOTAP_FLAGS |		\

Modified: stable/12/sys/dev/usb/wlan/if_rsu.c
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_rsu.c	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_rsu.c	Thu Mar 28 09:16:00 2019	(r345634)
@@ -2447,8 +2447,6 @@ rsu_rx_frame(struct rsu_softc *sc, struct mbuf *m)
 
 		tap->wr_rate = rxs.c_rate;
 		tap->wr_dbm_antsignal = rssi;
-		tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
-		tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
 	};
 
 	(void) ieee80211_add_rx_params(m, &rxs);
@@ -2750,7 +2748,6 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no
     struct mbuf *m0, struct rsu_data *data)
 {
 	const struct ieee80211_txparam *tp = ni->ni_txparms;
-	struct ieee80211com *ic = &sc->sc_ic;
         struct ieee80211vap *vap = ni->ni_vap;
 	struct ieee80211_frame *wh;
 	struct ieee80211_key *k = NULL;
@@ -2894,8 +2891,6 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_no
 		struct rsu_tx_radiotap_header *tap = &sc->sc_txtap;
 
 		tap->wt_flags = 0;
-		tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
-		tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
 		ieee80211_radiotap_tx(vap, m0);
 	}
 

Modified: stable/12/sys/dev/usb/wlan/if_rsureg.h
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_rsureg.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_rsureg.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -800,9 +800,10 @@ struct rsu_rx_radiotap_header {
 struct rsu_tx_radiotap_header {
 	struct ieee80211_radiotap_header wt_ihdr;
 	uint8_t		wt_flags;
+	uint8_t		wt_pad;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
 
 #define RSU_TX_RADIOTAP_PRESENT			\
 	(1 << IEEE80211_RADIOTAP_FLAGS |	\

Modified: stable/12/sys/dev/usb/wlan/if_rumvar.h
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_rumvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_rumvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -49,7 +49,7 @@ struct rum_tx_radiotap_header {
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
 	uint8_t		wt_antenna;
-} __packed __aligned(8);
+} __packed;
 
 #define RT2573_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/usb/wlan/if_run.c
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_run.c	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_run.c	Thu Mar 28 09:16:00 2019	(r345634)
@@ -2900,8 +2900,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uin
 		uint16_t phy;
 
 		tap->wr_flags = 0;
-		tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
-		tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
 		tap->wr_antsignal = rssi;
 		tap->wr_antenna = ant;
 		tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant);
@@ -3173,8 +3171,6 @@ tr_setup:
 			    (struct rt2860_txwi *)(&data->desc + sizeof(struct rt2870_txd));
 			tap->wt_flags = 0;
 			tap->wt_rate = rt2860_rates[data->ridx].rate;
-			tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
-			tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
 			tap->wt_hwqueue = index;
 			if (le16toh(txwi->phy) & RT2860_PHY_SHPRE)
 				tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;

Modified: stable/12/sys/dev/usb/wlan/if_runvar.h
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_runvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_runvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -71,7 +71,7 @@ struct run_tx_radiotap_header {
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
 	uint8_t		wt_hwqueue;
-} __packed __aligned(8);
+} __packed;
 
 #define IEEE80211_RADIOTAP_HWQUEUE 15
 

Modified: stable/12/sys/dev/usb/wlan/if_uathvar.h
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_uathvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_uathvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -67,9 +67,10 @@ struct uath_rx_radiotap_header {
 struct uath_tx_radiotap_header {
 	struct ieee80211_radiotap_header wt_ihdr;
 	uint8_t		wt_flags;
+	uint8_t		wt_pad;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
 
 #define	UATH_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/usb/wlan/if_upgtvar.h
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_upgtvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_upgtvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -394,7 +394,7 @@ struct upgt_tx_radiotap_header {
 	uint8_t		wt_rate;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
 
 #define UPGT_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/usb/wlan/if_uralvar.h
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_uralvar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_uralvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -51,7 +51,7 @@ struct ural_tx_radiotap_header {
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
 	uint8_t		wt_antenna;
-} __packed __aligned(8);
+} __packed;
 
 #define RAL_TX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/usb/wlan/if_urtw.c
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_urtw.c	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_urtw.c	Thu Mar 28 09:16:00 2019	(r345634)
@@ -1697,11 +1697,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_
 	if (ieee80211_radiotap_active_vap(vap)) {
 		struct urtw_tx_radiotap_header *tap = &sc->sc_txtap;
 
-		/* XXX Are variables correct?  */
 		tap->wt_flags = 0;
-		tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
-		tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
-
 		ieee80211_radiotap_tx(vap, m0);
 	}
 
@@ -3990,9 +3986,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *da
 	if (ieee80211_radiotap_active(ic)) {
 		struct urtw_rx_radiotap_header *tap = &sc->sc_rxtap;
 
-		/* XXX Are variables correct?  */
-		tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
-		tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
+		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	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_urtwvar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -56,6 +56,7 @@ typedef STAILQ_HEAD(, urtw_data) urtw_datahead;
 struct urtw_rx_radiotap_header {
 	struct ieee80211_radiotap_header wr_ihdr;
 	uint8_t		wr_flags;
+	uint8_t		wr_pad;
 	uint16_t	wr_chan_freq;
 	uint16_t	wr_chan_flags;
 	int8_t		wr_dbm_antsignal;
@@ -69,9 +70,10 @@ struct urtw_rx_radiotap_header {
 struct urtw_tx_radiotap_header {
 	struct ieee80211_radiotap_header wt_ihdr;
 	uint8_t		wt_flags;
+	uint8_t		wt_pad;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
 
 #define URTW_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/usb/wlan/if_zydreg.h
==============================================================================
--- stable/12/sys/dev/usb/wlan/if_zydreg.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/usb/wlan/if_zydreg.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -1200,7 +1200,7 @@ struct zyd_tx_radiotap_header {
 	uint8_t			wt_rate;
 	uint16_t		wt_chan_freq;
 	uint16_t		wt_chan_flags;
-} __packed __aligned(8);
+} __packed;
 
 #define ZYD_TX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/12/sys/dev/wi/if_wireg.h
==============================================================================
--- stable/12/sys/dev/wi/if_wireg.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/wi/if_wireg.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -709,7 +709,7 @@ struct wi_rx_radiotap_header {
 	u_int16_t	wr_chan_flags;
 	u_int8_t	wr_antsignal;
 	u_int8_t	wr_antnoise;
-};
+} __packed __aligned(8);
 
 #define WI_TX_RADIOTAP_PRESENT \
 	((1 << IEEE80211_RADIOTAP_FLAGS) | \
@@ -722,5 +722,5 @@ struct wi_tx_radiotap_header {
 	u_int8_t	wt_rate;
 	u_int16_t	wt_chan_freq;
 	u_int16_t	wt_chan_flags;
-};
+} __packed;
 #endif /* IEEE80211_RADIOTAP_F_CFP */

Modified: stable/12/sys/dev/wpi/if_wpivar.h
==============================================================================
--- stable/12/sys/dev/wpi/if_wpivar.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/wpi/if_wpivar.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -26,7 +26,7 @@ struct wpi_rx_radiotap_header {
 	int8_t		wr_dbm_antsignal;
 	int8_t		wr_dbm_antnoise;
 	uint8_t		wr_antenna;
-} __packed;
+} __packed __aligned(8);
 
 #define WPI_RX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_TSFT) |				\

Modified: stable/12/sys/dev/wtap/if_wtapioctl.h
==============================================================================
--- stable/12/sys/dev/wtap/if_wtapioctl.h	Thu Mar 28 09:00:56 2019	(r345633)
+++ stable/12/sys/dev/wtap/if_wtapioctl.h	Thu Mar 28 09:16:00 2019	(r345634)
@@ -159,7 +159,7 @@ struct wtap_rx_radiotap_header {
 	u_int8_t	wr_chan_ieee;
 	int8_t		wr_chan_maxpow;
 #endif
-} __packed;
+} __packed __aligned(8);
 
 #define WTAP_TX_RADIOTAP_PRESENT (		\
 	0)
@@ -167,7 +167,6 @@ struct wtap_rx_radiotap_header {
 struct wtap_tx_radiotap_header {
 	struct ieee80211_radiotap_header wt_ihdr;
 #if 0
-	u_int64_t	wt_tsf;
 	u_int8_t	wt_flags;
 	u_int8_t	wt_rate;
 	u_int8_t	wt_txpower;





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903280916.x2S9G0au018943>