xref: /openbmc/linux/net/mac80211/wep.h (revision fffd0934)
1f0706e82SJiri Benc /*
2f0706e82SJiri Benc  * Software WEP encryption implementation
3f0706e82SJiri Benc  * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi>
4f0706e82SJiri Benc  * Copyright 2003, Instant802 Networks, Inc.
5f0706e82SJiri Benc  *
6f0706e82SJiri Benc  * This program is free software; you can redistribute it and/or modify
7f0706e82SJiri Benc  * it under the terms of the GNU General Public License version 2 as
8f0706e82SJiri Benc  * published by the Free Software Foundation.
9f0706e82SJiri Benc  */
10f0706e82SJiri Benc 
11f0706e82SJiri Benc #ifndef WEP_H
12f0706e82SJiri Benc #define WEP_H
13f0706e82SJiri Benc 
14f0706e82SJiri Benc #include <linux/skbuff.h>
15f0706e82SJiri Benc #include <linux/types.h>
16f0706e82SJiri Benc #include "ieee80211_i.h"
172c8dccc7SJohannes Berg #include "key.h"
18f0706e82SJiri Benc 
19f0706e82SJiri Benc int ieee80211_wep_init(struct ieee80211_local *local);
20f0706e82SJiri Benc void ieee80211_wep_free(struct ieee80211_local *local);
21f0706e82SJiri Benc void ieee80211_wep_encrypt_data(struct crypto_blkcipher *tfm, u8 *rc4key,
22f0706e82SJiri Benc 				size_t klen, u8 *data, size_t data_len);
23fffd0934SJohannes Berg int ieee80211_wep_encrypt(struct ieee80211_local *local,
24fffd0934SJohannes Berg 			  struct sk_buff *skb,
25fffd0934SJohannes Berg 			  const u8 *key, int keylen, int keyidx);
26f0706e82SJiri Benc int ieee80211_wep_decrypt_data(struct crypto_blkcipher *tfm, u8 *rc4key,
27f0706e82SJiri Benc 			       size_t klen, u8 *data, size_t data_len);
28c6a1fa12SJohannes Berg bool ieee80211_wep_is_weak_iv(struct sk_buff *skb, struct ieee80211_key *key);
29f0706e82SJiri Benc 
309ae54c84SJohannes Berg ieee80211_rx_result
315cf121c3SJohannes Berg ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx);
329ae54c84SJohannes Berg ieee80211_tx_result
335cf121c3SJohannes Berg ieee80211_crypto_wep_encrypt(struct ieee80211_tx_data *tx);
344f0d18e2SJohannes Berg 
35f0706e82SJiri Benc #endif /* WEP_H */
36