summaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-04-10 14:03:17 +0200
committerJohannes Berg <johannes.berg@intel.com>2015-04-22 10:07:37 +0200
commite495c24731a2651fc2c1c7feedc8ba3b31f6b5d4 (patch)
tree4de1853ef9c79953f4f25966b26a72e27f5a03d9 /net/mac80211/sta_info.h
parent725b812c839643639d6135b1f7fb41e48de465a4 (diff)
downloadtalos-op-linux-e495c24731a2651fc2c1c7feedc8ba3b31f6b5d4.tar.gz
talos-op-linux-e495c24731a2651fc2c1c7feedc8ba3b31f6b5d4.zip
mac80211: extend fast-xmit for more ciphers
When crypto is offloaded then in some cases it's all handled by the device, and in others only some space for the IV must be reserved in the frame. Handle both of these cases in the fast-xmit path, up to a limit of 18 bytes of space for IVs. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r--net/mac80211/sta_info.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 0602363ff63b..c821fe47c2d1 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -241,6 +241,8 @@ struct sta_ampdu_mlme {
/* Value to indicate no TID reservation */
#define IEEE80211_TID_UNRESERVED 0xff
+#define IEEE80211_FAST_XMIT_MAX_IV 18
+
/**
* struct ieee80211_fast_tx - TX fastpath information
* @key: key to use for hw crypto
@@ -252,15 +254,17 @@ struct sta_ampdu_mlme {
* @band: band this will be transmitted on, for tx_info
* @rcu_head: RCU head to free this struct
*
- * Try to keep this struct small so it fits into a single cacheline.
+ * This struct is small enough so that the common case (maximum crypto
+ * header length of 8 like for CCMP/GCMP) fits into a single 64-byte
+ * cache line.
*/
struct ieee80211_fast_tx {
struct ieee80211_key *key;
- u8 hdr[30 + 2 + IEEE80211_CCMP_HDR_LEN +
- sizeof(rfc1042_header)];
u8 hdr_len;
u8 sa_offs, da_offs, pn_offs;
u8 band;
+ u8 hdr[30 + 2 + IEEE80211_FAST_XMIT_MAX_IV +
+ sizeof(rfc1042_header)];
struct rcu_head rcu_head;
};
OpenPOWER on IntegriCloud