Align radiotap structures in ral(4)

Currently all radiotap structures in ral(4) are packed, but are not
aligned, which causes ral based devices to crash when one does
'ifconfig wlan0 up' for a wlan interface with a ral wlandev on arches
that care about structure alignment (e.g., MIPS).

Adding an aligned attribute helps fix this problem and ral devices
can be properly brought up.

Reviewed by:	adrian
Sponsored by:	Smartcom - Bulgaria AD
This commit is contained in:
Stanislav Galabov 2016-05-25 06:29:23 +00:00
parent dade2a02e3
commit 83cb053574
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ struct rt2661_rx_radiotap_header {
uint16_t wr_chan_flags;
int8_t wr_antsignal;
int8_t wr_antnoise;
} __packed;
} __packed __aligned(8);
#define RT2661_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_TSFT) | \
@ -42,7 +42,7 @@ struct rt2661_tx_radiotap_header {
uint8_t wt_rate;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
} __packed;
} __packed __aligned(8);
#define RT2661_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \

View File

@ -38,7 +38,7 @@ struct rt2860_rx_radiotap_header {
uint8_t wr_antenna;
int8_t wr_antsignal;
int8_t wr_antnoise;
} __packed;
} __packed __aligned(8);
#define RT2860_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_TSFT) | \
@ -55,7 +55,7 @@ struct rt2860_tx_radiotap_header {
uint8_t wt_rate;
uint16_t wt_chan_freq;
uint16_t wt_chan_flags;
} __packed;
} __packed __aligned(8);
#define RT2860_TX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \