Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Dec 2013 09:34:01 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r259460 - stable/9/sys/dev/usb/wlan
Message-ID:  <201312160934.rBG9Y1pK059306@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Dec 16 09:34:01 2013
New Revision: 259460
URL: http://svnweb.freebsd.org/changeset/base/259460

Log:
  MFC r253757:
  Fix alignment of USB WLAN radiotap headers. This makes USB WLAN adapters
  work on ARM, MIPS and similar platforms, where alignment matters.

Modified:
  stable/9/sys/dev/usb/wlan/if_rumvar.h
  stable/9/sys/dev/usb/wlan/if_runvar.h
  stable/9/sys/dev/usb/wlan/if_uathvar.h
  stable/9/sys/dev/usb/wlan/if_upgtvar.h
  stable/9/sys/dev/usb/wlan/if_uralvar.h
  stable/9/sys/dev/usb/wlan/if_urtwvar.h
  stable/9/sys/dev/usb/wlan/if_zydreg.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/wlan/if_rumvar.h
==============================================================================
--- stable/9/sys/dev/usb/wlan/if_rumvar.h	Mon Dec 16 09:31:15 2013	(r259459)
+++ stable/9/sys/dev/usb/wlan/if_rumvar.h	Mon Dec 16 09:34:01 2013	(r259460)
@@ -29,7 +29,7 @@ struct rum_rx_radiotap_header {
 	int8_t		wr_antsignal;
 	int8_t		wr_antnoise;
 	uint8_t		wr_antenna;
-};
+} __packed __aligned(8);
 
 #define RT2573_RX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
@@ -47,7 +47,7 @@ struct rum_tx_radiotap_header {
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
 	uint8_t		wt_antenna;
-};
+} __packed __aligned(8);
 
 #define RT2573_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/9/sys/dev/usb/wlan/if_runvar.h
==============================================================================
--- stable/9/sys/dev/usb/wlan/if_runvar.h	Mon Dec 16 09:31:15 2013	(r259459)
+++ stable/9/sys/dev/usb/wlan/if_runvar.h	Mon Dec 16 09:34:01 2013	(r259460)
@@ -52,7 +52,7 @@ struct run_rx_radiotap_header {
 	int8_t		wr_dbm_antsignal;
 	uint8_t		wr_antenna;
 	uint8_t		wr_antsignal;
-} __packed;
+} __packed __aligned(8);
 
 #define RUN_RX_RADIOTAP_PRESENT				\
 	(1 << IEEE80211_RADIOTAP_FLAGS |		\
@@ -69,7 +69,7 @@ struct run_tx_radiotap_header {
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
 	uint8_t		wt_hwqueue;
-} __packed;
+} __packed __aligned(8);
 
 #define IEEE80211_RADIOTAP_HWQUEUE 15
 

Modified: stable/9/sys/dev/usb/wlan/if_uathvar.h
==============================================================================
--- stable/9/sys/dev/usb/wlan/if_uathvar.h	Mon Dec 16 09:31:15 2013	(r259459)
+++ stable/9/sys/dev/usb/wlan/if_uathvar.h	Mon Dec 16 09:34:01 2013	(r259460)
@@ -52,7 +52,7 @@ struct uath_rx_radiotap_header {
 	int8_t		wr_antsignal;
 	int8_t		wr_antnoise;
 	u_int8_t	wr_antenna;
-} __packed;
+} __packed __aligned(8);
 
 #define UATH_RX_RADIOTAP_PRESENT (		\
 	(1 << IEEE80211_RADIOTAP_TSFT)		| \
@@ -69,7 +69,7 @@ struct uath_tx_radiotap_header {
 	uint8_t		wt_flags;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed;
+} __packed __aligned(8);
 
 #define	UATH_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/9/sys/dev/usb/wlan/if_upgtvar.h
==============================================================================
--- stable/9/sys/dev/usb/wlan/if_upgtvar.h	Mon Dec 16 09:31:15 2013	(r259459)
+++ stable/9/sys/dev/usb/wlan/if_upgtvar.h	Mon Dec 16 09:34:01 2013	(r259460)
@@ -380,7 +380,7 @@ struct upgt_rx_radiotap_header {
 	uint16_t	wr_chan_freq;
 	uint16_t	wr_chan_flags;
 	int8_t		wr_antsignal;
-} __packed;
+} __packed __aligned(8);
 
 #define UPGT_RX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
@@ -394,7 +394,7 @@ struct upgt_tx_radiotap_header {
 	uint8_t		wt_rate;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed;
+} __packed __aligned(8);
 
 #define UPGT_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/9/sys/dev/usb/wlan/if_uralvar.h
==============================================================================
--- stable/9/sys/dev/usb/wlan/if_uralvar.h	Mon Dec 16 09:31:15 2013	(r259459)
+++ stable/9/sys/dev/usb/wlan/if_uralvar.h	Mon Dec 16 09:34:01 2013	(r259460)
@@ -34,7 +34,7 @@ struct ural_rx_radiotap_header {
 	int8_t		wr_antsignal;
 	int8_t		wr_antnoise;
 	uint8_t		wr_antenna;
-};
+} __packed __aligned(8);
 
 #define RAL_RX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
@@ -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);
 
 #define RAL_TX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/9/sys/dev/usb/wlan/if_urtwvar.h
==============================================================================
--- stable/9/sys/dev/usb/wlan/if_urtwvar.h	Mon Dec 16 09:31:15 2013	(r259459)
+++ stable/9/sys/dev/usb/wlan/if_urtwvar.h	Mon Dec 16 09:34:01 2013	(r259460)
@@ -63,7 +63,7 @@ struct urtw_rx_radiotap_header {
 	uint16_t	wr_chan_freq;
 	uint16_t	wr_chan_flags;
 	int8_t		wr_dbm_antsignal;
-} __packed;
+} __packed __aligned(8);
 
 #define URTW_RX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
@@ -75,7 +75,7 @@ struct urtw_tx_radiotap_header {
 	uint8_t		wt_flags;
 	uint16_t	wt_chan_freq;
 	uint16_t	wt_chan_flags;
-} __packed;
+} __packed __aligned(8);
 
 #define URTW_TX_RADIOTAP_PRESENT					\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\

Modified: stable/9/sys/dev/usb/wlan/if_zydreg.h
==============================================================================
--- stable/9/sys/dev/usb/wlan/if_zydreg.h	Mon Dec 16 09:31:15 2013	(r259459)
+++ stable/9/sys/dev/usb/wlan/if_zydreg.h	Mon Dec 16 09:34:01 2013	(r259460)
@@ -1185,7 +1185,7 @@ struct zyd_rx_radiotap_header {
 	uint16_t		wr_chan_flags;
 	int8_t			wr_antsignal;
 	int8_t			wr_antnoise;
-} __packed;
+} __packed __aligned(8);
 
 #define ZYD_RX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\
@@ -1200,7 +1200,7 @@ struct zyd_tx_radiotap_header {
 	uint8_t			wt_rate;
 	uint16_t		wt_chan_freq;
 	uint16_t		wt_chan_flags;
-} __packed;
+} __packed __aligned(8);
 
 #define ZYD_TX_RADIOTAP_PRESENT						\
 	((1 << IEEE80211_RADIOTAP_FLAGS) |				\



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