aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211/ieee80211_crypt_ccmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee80211/ieee80211_crypt_ccmp.c')
-rw-r--r--net/ieee80211/ieee80211_crypt_ccmp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c
index 1e6644b133dc..d3b5cdee69ef 100644
--- a/net/ieee80211/ieee80211_crypt_ccmp.c
+++ b/net/ieee80211/ieee80211_crypt_ccmp.c
@@ -119,7 +119,7 @@ static inline void xor_block(u8 * b, u8 * a, size_t len)
119} 119}
120 120
121static void ccmp_init_blocks(struct crypto_tfm *tfm, 121static void ccmp_init_blocks(struct crypto_tfm *tfm,
122 struct ieee80211_hdr *hdr, 122 struct ieee80211_hdr_4addr *hdr,
123 u8 * pn, size_t dlen, u8 * b0, u8 * auth, u8 * s0) 123 u8 * pn, size_t dlen, u8 * b0, u8 * auth, u8 * s0)
124{ 124{
125 u8 *pos, qc = 0; 125 u8 *pos, qc = 0;
@@ -196,7 +196,7 @@ static int ieee80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
196 struct ieee80211_ccmp_data *key = priv; 196 struct ieee80211_ccmp_data *key = priv;
197 int data_len, i, blocks, last, len; 197 int data_len, i, blocks, last, len;
198 u8 *pos, *mic; 198 u8 *pos, *mic;
199 struct ieee80211_hdr *hdr; 199 struct ieee80211_hdr_4addr *hdr;
200 u8 *b0 = key->tx_b0; 200 u8 *b0 = key->tx_b0;
201 u8 *b = key->tx_b; 201 u8 *b = key->tx_b;
202 u8 *e = key->tx_e; 202 u8 *e = key->tx_e;
@@ -229,7 +229,7 @@ static int ieee80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
229 *pos++ = key->tx_pn[1]; 229 *pos++ = key->tx_pn[1];
230 *pos++ = key->tx_pn[0]; 230 *pos++ = key->tx_pn[0];
231 231
232 hdr = (struct ieee80211_hdr *)skb->data; 232 hdr = (struct ieee80211_hdr_4addr *)skb->data;
233 ccmp_init_blocks(key->tfm, hdr, key->tx_pn, data_len, b0, b, s0); 233 ccmp_init_blocks(key->tfm, hdr, key->tx_pn, data_len, b0, b, s0);
234 234
235 blocks = (data_len + AES_BLOCK_LEN - 1) / AES_BLOCK_LEN; 235 blocks = (data_len + AES_BLOCK_LEN - 1) / AES_BLOCK_LEN;
@@ -258,7 +258,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
258{ 258{
259 struct ieee80211_ccmp_data *key = priv; 259 struct ieee80211_ccmp_data *key = priv;
260 u8 keyidx, *pos; 260 u8 keyidx, *pos;
261 struct ieee80211_hdr *hdr; 261 struct ieee80211_hdr_4addr *hdr;
262 u8 *b0 = key->rx_b0; 262 u8 *b0 = key->rx_b0;
263 u8 *b = key->rx_b; 263 u8 *b = key->rx_b;
264 u8 *a = key->rx_a; 264 u8 *a = key->rx_a;
@@ -272,7 +272,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
272 return -1; 272 return -1;
273 } 273 }
274 274
275 hdr = (struct ieee80211_hdr *)skb->data; 275 hdr = (struct ieee80211_hdr_4addr *)skb->data;
276 pos = skb->data + hdr_len; 276 pos = skb->data + hdr_len;
277 keyidx = pos[3]; 277 keyidx = pos[3];
278 if (!(keyidx & (1 << 5))) { 278 if (!(keyidx & (1 << 5))) {