diff options
author | hselasky <hselasky@FreeBSD.org> | 2013-07-29 05:54:13 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2013-07-29 05:54:13 +0000 |
commit | 55ae76b4624de36a8036d06f90dc0177ae6677d7 (patch) | |
tree | 5644538263e9d13f3c7b89bdb903e8cd4e1132d0 /sys/dev/usb | |
parent | a12ce7755b6d0943bbc3c70dc49b08389c63fb13 (diff) | |
download | FreeBSD-src-55ae76b4624de36a8036d06f90dc0177ae6677d7.zip FreeBSD-src-55ae76b4624de36a8036d06f90dc0177ae6677d7.tar.gz |
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>
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/wlan/if_rumvar.h | 4 | ||||
-rw-r--r-- | sys/dev/usb/wlan/if_runvar.h | 4 | ||||
-rw-r--r-- | sys/dev/usb/wlan/if_uathvar.h | 4 | ||||
-rw-r--r-- | sys/dev/usb/wlan/if_upgtvar.h | 4 | ||||
-rw-r--r-- | sys/dev/usb/wlan/if_uralvar.h | 4 | ||||
-rw-r--r-- | sys/dev/usb/wlan/if_urtwnreg.h | 4 | ||||
-rw-r--r-- | sys/dev/usb/wlan/if_urtwvar.h | 4 | ||||
-rw-r--r-- | sys/dev/usb/wlan/if_zydreg.h | 4 |
8 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/usb/wlan/if_rumvar.h b/sys/dev/usb/wlan/if_rumvar.h index bc74e57..17944aa 100644 --- a/sys/dev/usb/wlan/if_rumvar.h +++ b/sys/dev/usb/wlan/if_rumvar.h @@ -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) | \ diff --git a/sys/dev/usb/wlan/if_runvar.h b/sys/dev/usb/wlan/if_runvar.h index 24f308e..37ae3fa 100644 --- a/sys/dev/usb/wlan/if_runvar.h +++ b/sys/dev/usb/wlan/if_runvar.h @@ -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 diff --git a/sys/dev/usb/wlan/if_uathvar.h b/sys/dev/usb/wlan/if_uathvar.h index ed84ba9..fae3604 100644 --- a/sys/dev/usb/wlan/if_uathvar.h +++ b/sys/dev/usb/wlan/if_uathvar.h @@ -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) | \ diff --git a/sys/dev/usb/wlan/if_upgtvar.h b/sys/dev/usb/wlan/if_upgtvar.h index 070f9f6..c50276b 100644 --- a/sys/dev/usb/wlan/if_upgtvar.h +++ b/sys/dev/usb/wlan/if_upgtvar.h @@ -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) | \ diff --git a/sys/dev/usb/wlan/if_uralvar.h b/sys/dev/usb/wlan/if_uralvar.h index 3bd015e..c62b0e4 100644 --- a/sys/dev/usb/wlan/if_uralvar.h +++ b/sys/dev/usb/wlan/if_uralvar.h @@ -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) | \ diff --git a/sys/dev/usb/wlan/if_urtwnreg.h b/sys/dev/usb/wlan/if_urtwnreg.h index c827b3e..51fa990 100644 --- a/sys/dev/usb/wlan/if_urtwnreg.h +++ b/sys/dev/usb/wlan/if_urtwnreg.h @@ -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 | \ diff --git a/sys/dev/usb/wlan/if_urtwvar.h b/sys/dev/usb/wlan/if_urtwvar.h index 6b55106..e99cbf4 100644 --- a/sys/dev/usb/wlan/if_urtwvar.h +++ b/sys/dev/usb/wlan/if_urtwvar.h @@ -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) | \ diff --git a/sys/dev/usb/wlan/if_zydreg.h b/sys/dev/usb/wlan/if_zydreg.h index 34742e9..06ba2ab 100644 --- a/sys/dev/usb/wlan/if_zydreg.h +++ b/sys/dev/usb/wlan/if_zydreg.h @@ -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) | \ |