diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-07-07 12:58:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-08 11:42:22 -0400 |
commit | 3ea542d3c2862142ae511fac5ce2dfc7419dcc53 (patch) | |
tree | 472807c6d2a0aefa050a63cc34d9e2a2f7a3f2a6 /net/mac80211/key.h | |
parent | 9e26297a56453315ae6829aec609b5a6309af7b4 (diff) |
mac80211: allow drivers to access key sequence counter
In order to implement GTK rekeying, the device needs
to be able to encrypt frames with the right PN/IV and
check the PN/IV in RX frames. To be able to tell it
about all those counters, we need to be able to get
them from mac80211, this adds the required API.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/key.h')
-rw-r--r-- | net/mac80211/key.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/key.h b/net/mac80211/key.h index beb9c20ff48..86b216b0141 100644 --- a/net/mac80211/key.h +++ b/net/mac80211/key.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define CCMP_PN_LEN 6 | 28 | #define CCMP_PN_LEN 6 |
29 | #define TKIP_IV_LEN 8 | 29 | #define TKIP_IV_LEN 8 |
30 | #define TKIP_ICV_LEN 4 | 30 | #define TKIP_ICV_LEN 4 |
31 | #define CMAC_PN_LEN 6 | ||
31 | 32 | ||
32 | #define NUM_RX_DATA_QUEUES 16 | 33 | #define NUM_RX_DATA_QUEUES 16 |
33 | 34 | ||
@@ -89,13 +90,13 @@ struct ieee80211_key { | |||
89 | * frames and the last counter is used with Robust | 90 | * frames and the last counter is used with Robust |
90 | * Management frames. | 91 | * Management frames. |
91 | */ | 92 | */ |
92 | u8 rx_pn[NUM_RX_DATA_QUEUES + 1][6]; | 93 | u8 rx_pn[NUM_RX_DATA_QUEUES + 1][CCMP_PN_LEN]; |
93 | struct crypto_cipher *tfm; | 94 | struct crypto_cipher *tfm; |
94 | u32 replays; /* dot11RSNAStatsCCMPReplays */ | 95 | u32 replays; /* dot11RSNAStatsCCMPReplays */ |
95 | } ccmp; | 96 | } ccmp; |
96 | struct { | 97 | struct { |
97 | atomic64_t tx_pn; | 98 | atomic64_t tx_pn; |
98 | u8 rx_pn[6]; | 99 | u8 rx_pn[CMAC_PN_LEN]; |
99 | struct crypto_cipher *tfm; | 100 | struct crypto_cipher *tfm; |
100 | u32 replays; /* dot11RSNAStatsCMACReplays */ | 101 | u32 replays; /* dot11RSNAStatsCMACReplays */ |
101 | u32 icverrors; /* dot11RSNAStatsCMACICVErrors */ | 102 | u32 icverrors; /* dot11RSNAStatsCMACICVErrors */ |