Date: Mon, 29 Jul 2013 05:54:13 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253757 - head/sys/dev/usb/wlan Message-ID: <201307290554.r6T5sD1F059466@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Mon Jul 29 05:54:13 2013 New Revision: 253757 URL: http://svnweb.freebsd.org/changeset/base/253757 Log: Fix alignment of USB WLAN radiotap headers. This makes USB WLAN adapters work on ARM, MIPS and similar platforms, where alignment matters. MFC after: 1 week Reported by: XiaoQI Ge <ghw@7axu.com> Modified: head/sys/dev/usb/wlan/if_rumvar.h head/sys/dev/usb/wlan/if_runvar.h head/sys/dev/usb/wlan/if_uathvar.h head/sys/dev/usb/wlan/if_upgtvar.h head/sys/dev/usb/wlan/if_uralvar.h head/sys/dev/usb/wlan/if_urtwnreg.h head/sys/dev/usb/wlan/if_urtwvar.h head/sys/dev/usb/wlan/if_zydreg.h Modified: head/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_rumvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_rumvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -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: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_runvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -58,7 +58,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 | \ @@ -75,7 +75,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: head/sys/dev/usb/wlan/if_uathvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_uathvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_uathvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -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: head/sys/dev/usb/wlan/if_upgtvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_upgtvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_upgtvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -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: head/sys/dev/usb/wlan/if_uralvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_uralvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_uralvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -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: head/sys/dev/usb/wlan/if_urtwnreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnreg.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_urtwnreg.h Mon Jul 29 05:54:13 2013 (r253757) @@ -1030,7 +1030,7 @@ struct urtwn_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; uint8_t wr_dbm_antsignal; -} __packed; +} __packed __aligned(8); #define URTWN_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ @@ -1043,7 +1043,7 @@ struct urtwn_tx_radiotap_header { uint8_t wt_flags; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed; +} __packed __aligned(8); #define URTWN_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: head/sys/dev/usb/wlan/if_urtwvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_urtwvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -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: head/sys/dev/usb/wlan/if_zydreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_zydreg.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_zydreg.h Mon Jul 29 05:54:13 2013 (r253757) @@ -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?201307290554.r6T5sD1F059466>