diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-12-28 21:05:49 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-12-28 21:05:49 +0000 |
commit | ff6fdc0f9b206577dc389f7f5741550ac5277793 (patch) | |
tree | c7b8389c8745f828bccbfd2091955f91c018d4f7 /package/mac80211/patches/542-mac80211_optimize_wireless_struct.patch | |
parent | c28528a91301949a64b96317ae095da6cf2c4b2b (diff) | |
download | master-187ad058-ff6fdc0f9b206577dc389f7f5741550ac5277793.tar.gz master-187ad058-ff6fdc0f9b206577dc389f7f5741550ac5277793.tar.bz2 master-187ad058-ff6fdc0f9b206577dc389f7f5741550ac5277793.zip |
mac80211: assume 2-byte aligning for 802.11 packets, slightly improves code size and performance
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34910 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/542-mac80211_optimize_wireless_struct.patch')
-rw-r--r-- | package/mac80211/patches/542-mac80211_optimize_wireless_struct.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/package/mac80211/patches/542-mac80211_optimize_wireless_struct.patch b/package/mac80211/patches/542-mac80211_optimize_wireless_struct.patch new file mode 100644 index 0000000000..6b62d12b42 --- /dev/null +++ b/package/mac80211/patches/542-mac80211_optimize_wireless_struct.patch @@ -0,0 +1,71 @@ +--- a/include/linux/ieee80211.h ++++ b/include/linux/ieee80211.h +@@ -180,7 +180,7 @@ struct ieee80211_hdr { + u8 addr3[6]; + __le16 seq_ctrl; + u8 addr4[6]; +-} __packed; ++} __packed __aligned(2); + + struct ieee80211_hdr_3addr { + __le16 frame_control; +@@ -189,7 +189,7 @@ struct ieee80211_hdr_3addr { + u8 addr2[6]; + u8 addr3[6]; + __le16 seq_ctrl; +-} __packed; ++} __packed __aligned(2); + + struct ieee80211_qos_hdr { + __le16 frame_control; +@@ -199,7 +199,7 @@ struct ieee80211_qos_hdr { + u8 addr3[6]; + __le16 seq_ctrl; + __le16 qos_ctrl; +-} __packed; ++} __packed __aligned(2); + + /** + * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set +@@ -576,7 +576,7 @@ struct ieee80211s_hdr { + __le32 seqnum; + u8 eaddr1[6]; + u8 eaddr2[6]; +-} __packed; ++} __packed __aligned(2); + + /* Mesh flags */ + #define MESH_FLAGS_AE_A4 0x1 +@@ -830,7 +830,7 @@ struct ieee80211_mgmt { + } u; + } __packed action; + } u; +-} __packed; ++} __packed __aligned(2); + + /* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */ + #define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 +@@ -861,20 +861,20 @@ struct ieee80211_rts { + __le16 duration; + u8 ra[6]; + u8 ta[6]; +-} __packed; ++} __packed __aligned(2); + + struct ieee80211_cts { + __le16 frame_control; + __le16 duration; + u8 ra[6]; +-} __packed; ++} __packed __aligned(2); + + struct ieee80211_pspoll { + __le16 frame_control; + __le16 aid; + u8 bssid[6]; + u8 ta[6]; +-} __packed; ++} __packed __aligned(2); + + /* TDLS */ + |