blob: 997a034233c20bc5f2d134c56332f424d0bbff42 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Jiri Bencf0706e82007-05-05 11:45:53 -07002/*
3 * Software WEP encryption implementation
4 * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi>
5 * Copyright 2003, Instant802 Networks, Inc.
Jiri Bencf0706e82007-05-05 11:45:53 -07006 */
7
8#ifndef WEP_H
9#define WEP_H
10
11#include <linux/skbuff.h>
12#include <linux/types.h>
13#include "ieee80211_i.h"
Johannes Berg2c8dccc2008-04-08 15:14:40 -040014#include "key.h"
Jiri Bencf0706e82007-05-05 11:45:53 -070015
16int ieee80211_wep_init(struct ieee80211_local *local);
Ard Biesheuvel5fdb3732019-06-12 18:19:54 +020017int ieee80211_wep_encrypt_data(struct arc4_ctx *ctx, u8 *rc4key,
Jiri Bencf0706e82007-05-05 11:45:53 -070018 size_t klen, u8 *data, size_t data_len);
Johannes Bergfffd0932009-07-08 14:22:54 +020019int ieee80211_wep_encrypt(struct ieee80211_local *local,
20 struct sk_buff *skb,
21 const u8 *key, int keylen, int keyidx);
Ard Biesheuvel5fdb3732019-06-12 18:19:54 +020022int ieee80211_wep_decrypt_data(struct arc4_ctx *ctx, u8 *rc4key,
Jiri Bencf0706e82007-05-05 11:45:53 -070023 size_t klen, u8 *data, size_t data_len);
Jiri Bencf0706e82007-05-05 11:45:53 -070024
Johannes Berg9ae54c82008-01-31 19:48:20 +010025ieee80211_rx_result
Johannes Berg5cf121c2008-02-25 16:27:43 +010026ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx);
Johannes Berg9ae54c82008-01-31 19:48:20 +010027ieee80211_tx_result
Johannes Berg5cf121c2008-02-25 16:27:43 +010028ieee80211_crypto_wep_encrypt(struct ieee80211_tx_data *tx);
Johannes Berg4f0d18e2007-09-26 15:19:40 +020029
Jiri Bencf0706e82007-05-05 11:45:53 -070030#endif /* WEP_H */