aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-05-14 19:26:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-21 21:47:48 -0400
commita7b6f0c5558ad03281b8064d6a4ab2e124dea991 (patch)
tree2dcaade7792641a696597eb56197eb37a776a13c
parent1b19ca396621dcba573b20d4625526f5a460c886 (diff)
mac80211: add const, remove unused function, make one function static
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/michael.c7
-rw-r--r--net/mac80211/michael.h4
-rw-r--r--net/mac80211/tkip.c12
-rw-r--r--net/mac80211/tkip.h4
4 files changed, 7 insertions, 20 deletions
diff --git a/net/mac80211/michael.c b/net/mac80211/michael.c
index 4e151e0caeb7..1fcdf38cf60c 100644
--- a/net/mac80211/michael.c
+++ b/net/mac80211/michael.c
@@ -6,7 +6,6 @@
6 * it under the terms of the GNU General Public License version 2 as 6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 */ 8 */
9
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/bitops.h> 10#include <linux/bitops.h>
12#include <asm/unaligned.h> 11#include <asm/unaligned.h>
@@ -28,7 +27,7 @@ static void michael_block(struct michael_mic_ctx *mctx, u32 val)
28} 27}
29 28
30static void michael_mic_hdr(struct michael_mic_ctx *mctx, 29static void michael_mic_hdr(struct michael_mic_ctx *mctx,
31 u8 *key, u8 *da, u8 *sa, u8 priority) 30 const u8 *key, const u8 *da, const u8 *sa, u8 priority)
32{ 31{
33 mctx->l = get_unaligned_le32(key); 32 mctx->l = get_unaligned_le32(key);
34 mctx->r = get_unaligned_le32(key + 4); 33 mctx->r = get_unaligned_le32(key + 4);
@@ -44,8 +43,8 @@ static void michael_mic_hdr(struct michael_mic_ctx *mctx,
44 michael_block(mctx, priority); 43 michael_block(mctx, priority);
45} 44}
46 45
47void michael_mic(u8 *key, u8 *da, u8 *sa, u8 priority, 46void michael_mic(const u8 *key, const u8 *da, const u8 *sa, u8 priority,
48 u8 *data, size_t data_len, u8 *mic) 47 const u8 *data, size_t data_len, u8 *mic)
49{ 48{
50 u32 val; 49 u32 val;
51 size_t block, blocks, left; 50 size_t block, blocks, left;
diff --git a/net/mac80211/michael.h b/net/mac80211/michael.h
index 7d5707bf8843..69b4501f13ba 100644
--- a/net/mac80211/michael.h
+++ b/net/mac80211/michael.h
@@ -18,7 +18,7 @@ struct michael_mic_ctx {
18 u32 l, r; 18 u32 l, r;
19}; 19};
20 20
21void michael_mic(u8 *key, u8 *da, u8 *sa, u8 priority, 21void michael_mic(const u8 *key, const u8 *da, const u8 *sa, u8 priority,
22 u8 *data, size_t data_len, u8 *mic); 22 const u8 *data, size_t data_len, u8 *mic);
23 23
24#endif /* MICHAEL_H */ 24#endif /* MICHAEL_H */
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index a7c3febc5a45..8cdf053cb835 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -6,7 +6,6 @@
6 * it under the terms of the GNU General Public License version 2 as 6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 */ 8 */
9
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/bitops.h> 10#include <linux/bitops.h>
12#include <linux/types.h> 11#include <linux/types.h>
@@ -132,7 +131,7 @@ static void tkip_mixing_phase2(const u16 *p1k, const u8 *tk, u16 tsc_IV16,
132/* Add TKIP IV and Ext. IV at @pos. @iv0, @iv1, and @iv2 are the first octets 131/* Add TKIP IV and Ext. IV at @pos. @iv0, @iv1, and @iv2 are the first octets
133 * of the IV. Returns pointer to the octet following IVs (i.e., beginning of 132 * of the IV. Returns pointer to the octet following IVs (i.e., beginning of
134 * the packet payload). */ 133 * the packet payload). */
135u8 * ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key, 134u8 *ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key,
136 u8 iv0, u8 iv1, u8 iv2) 135 u8 iv0, u8 iv1, u8 iv2)
137{ 136{
138 *pos++ = iv0; 137 *pos++ = iv0;
@@ -143,14 +142,7 @@ u8 * ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key,
143 return pos + 4; 142 return pos + 4;
144} 143}
145 144
146void ieee80211_tkip_gen_phase1key(struct ieee80211_key *key, u8 *ta, 145static void ieee80211_tkip_gen_rc4key(struct ieee80211_key *key, u8 *ta,
147 u16 *phase1key)
148{
149 tkip_mixing_phase1(ta, &key->conf.key[ALG_TKIP_TEMP_ENCR_KEY],
150 key->u.tkip.iv32, phase1key);
151}
152
153void ieee80211_tkip_gen_rc4key(struct ieee80211_key *key, u8 *ta,
154 u8 *rc4key) 146 u8 *rc4key)
155{ 147{
156 /* Calculate per-packet key */ 148 /* Calculate per-packet key */
diff --git a/net/mac80211/tkip.h b/net/mac80211/tkip.h
index 1fa0bb4dba3c..b890427fc959 100644
--- a/net/mac80211/tkip.h
+++ b/net/mac80211/tkip.h
@@ -15,10 +15,6 @@
15 15
16u8 *ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key, 16u8 *ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key,
17 u8 iv0, u8 iv1, u8 iv2); 17 u8 iv0, u8 iv1, u8 iv2);
18void ieee80211_tkip_gen_phase1key(struct ieee80211_key *key, u8 *ta,
19 u16 *phase1key);
20void ieee80211_tkip_gen_rc4key(struct ieee80211_key *key, u8 *ta,
21 u8 *rc4key);
22void ieee80211_tkip_encrypt_data(struct crypto_blkcipher *tfm, 18void ieee80211_tkip_encrypt_data(struct crypto_blkcipher *tfm,
23 struct ieee80211_key *key, 19 struct ieee80211_key *key,
24 u8 *pos, size_t payload_len, u8 *ta); 20 u8 *pos, size_t payload_len, u8 *ta);