提交 4e1bbd84 编写于 作者: U Ulrich Kunitz 提交者: John W. Linville

[PATCH] zd1211rw: Removed unneeded packed attributes

Inspired by an e-mail by Stephen Hemminger I decided to remove all
unneeded packed attributes from the code where the member variables are
already aligned. This avoids horrible code being generated on some
architectures.
Signed-off-by: NUlrich Kunitz <kune@deine-taler.de>
Signed-off-by: NDaniel Drake <dsd@gentoo.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 fc3e39be
...@@ -64,7 +64,7 @@ struct cck_plcp_header { ...@@ -64,7 +64,7 @@ struct cck_plcp_header {
u8 service; u8 service;
__le16 length; __le16 length;
__le16 crc16; __le16 crc16;
} __attribute__((packed)); };
static inline u8 zd_cck_plcp_header_rate(const struct cck_plcp_header *header) static inline u8 zd_cck_plcp_header_rate(const struct cck_plcp_header *header)
{ {
......
...@@ -714,7 +714,7 @@ struct zd_rt_hdr { ...@@ -714,7 +714,7 @@ struct zd_rt_hdr {
u8 rt_rate; u8 rt_rate;
u16 rt_channel; u16 rt_channel;
u16 rt_chbitmask; u16 rt_chbitmask;
} __attribute__((packed)); };
static void fill_rt_header(void *buffer, struct zd_mac *mac, static void fill_rt_header(void *buffer, struct zd_mac *mac,
const struct ieee80211_rx_stats *stats, const struct ieee80211_rx_stats *stats,
......
...@@ -82,7 +82,7 @@ struct zd_ctrlset { ...@@ -82,7 +82,7 @@ struct zd_ctrlset {
struct rx_length_info { struct rx_length_info {
__le16 length[3]; __le16 length[3];
__le16 tag; __le16 tag;
} __attribute__((packed)); };
#define RX_LENGTH_INFO_TAG 0x697e #define RX_LENGTH_INFO_TAG 0x697e
...@@ -93,7 +93,7 @@ struct rx_status { ...@@ -93,7 +93,7 @@ struct rx_status {
u8 signal_quality_ofdm; u8 signal_quality_ofdm;
u8 decryption_type; u8 decryption_type;
u8 frame_status; u8 frame_status;
} __attribute__((packed)); };
/* rx_status field decryption_type */ /* rx_status field decryption_type */
#define ZD_RX_NO_WEP 0 #define ZD_RX_NO_WEP 0
......
...@@ -74,17 +74,17 @@ enum control_requests { ...@@ -74,17 +74,17 @@ enum control_requests {
struct usb_req_read_regs { struct usb_req_read_regs {
__le16 id; __le16 id;
__le16 addr[0]; __le16 addr[0];
} __attribute__((packed)); };
struct reg_data { struct reg_data {
__le16 addr; __le16 addr;
__le16 value; __le16 value;
} __attribute__((packed)); };
struct usb_req_write_regs { struct usb_req_write_regs {
__le16 id; __le16 id;
struct reg_data reg_writes[0]; struct reg_data reg_writes[0];
} __attribute__((packed)); };
enum { enum {
RF_IF_LE = 0x02, RF_IF_LE = 0x02,
...@@ -101,7 +101,7 @@ struct usb_req_rfwrite { ...@@ -101,7 +101,7 @@ struct usb_req_rfwrite {
/* RF2595: 24 */ /* RF2595: 24 */
__le16 bit_values[0]; __le16 bit_values[0];
/* (CR203 & ~(RF_IF_LE | RF_CLK | RF_DATA)) | (bit ? RF_DATA : 0) */ /* (CR203 & ~(RF_IF_LE | RF_CLK | RF_DATA)) | (bit ? RF_DATA : 0) */
} __attribute__((packed)); };
/* USB interrupt */ /* USB interrupt */
...@@ -118,12 +118,12 @@ enum usb_int_flags { ...@@ -118,12 +118,12 @@ enum usb_int_flags {
struct usb_int_header { struct usb_int_header {
u8 type; /* must always be 1 */ u8 type; /* must always be 1 */
u8 id; u8 id;
} __attribute__((packed)); };
struct usb_int_regs { struct usb_int_regs {
struct usb_int_header hdr; struct usb_int_header hdr;
struct reg_data regs[0]; struct reg_data regs[0];
} __attribute__((packed)); };
struct usb_int_retry_fail { struct usb_int_retry_fail {
struct usb_int_header hdr; struct usb_int_header hdr;
...@@ -131,7 +131,7 @@ struct usb_int_retry_fail { ...@@ -131,7 +131,7 @@ struct usb_int_retry_fail {
u8 _dummy; u8 _dummy;
u8 addr[ETH_ALEN]; u8 addr[ETH_ALEN];
u8 ibss_wakeup_dest; u8 ibss_wakeup_dest;
} __attribute__((packed)); };
struct read_regs_int { struct read_regs_int {
struct completion completion; struct completion completion;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册