Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62fe7e37 authored by Jouni Malinen's avatar Jouni Malinen Committed by Jeff Garzik
Browse files

[PATCH] hostap: Replace crypto code with net/ieee80211 version



Replace Host AP version of WEP, TKIP, CCMP implementation with
net/ieee80211 that has more or less identical implementation (since
it is based on the Host AP implementation). Remove Host AP specific
implementation and modules from drivers/net/wireless/hostap.

Signed-off-by: default avatarJouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent ebed67d2
Loading
Loading
Loading
Loading
+0 −33
Original line number Diff line number Diff line
@@ -7,9 +7,6 @@ config HOSTAP
	Host AP mode that allows the card to act as an IEEE 802.11
	access point.

	In addition, this includes generic IEEE 802.11 code, e.g., for
	WEP/TKIP/CCMP encryption that can be shared with other drivers.

	See <http://hostap.epitest.fi/> for more information about the
	Host AP driver configuration and tools. This site includes
	information and tools (hostapd and wpa_supplicant) for WPA/WPA2
@@ -22,36 +19,6 @@ config HOSTAP
	The driver can be compiled as a module and it will be called
	"hostap.ko".

config HOSTAP_WEP
	tristate "IEEE 802.11 WEP encryption"
	depends on HOSTAP
	select CRYPTO
	---help---
	Software implementation of IEEE 802.11 WEP encryption.

	This can be compiled as a modules and it will be called
	"hostap_crypt_wep.ko".

config HOSTAP_TKIP
	tristate "IEEE 802.11 TKIP encryption"
	depends on HOSTAP
	select CRYPTO
	---help---
	Software implementation of IEEE 802.11 TKIP encryption.

	This can be compiled as a modules and it will be called
	"hostap_crypt_tkip.ko".

config HOSTAP_CCMP
	tristate "IEEE 802.11 CCMP encryption"
	depends on HOSTAP
	select CRYPTO
	---help---
	Software implementation of IEEE 802.11 CCMP encryption.

	This can be compiled as a modules and it will be called
	"hostap_crypt_ccmp.ko".

config HOSTAP_FIRMWARE
	bool "Support downloading firmware images with Host AP driver"
	depends on HOSTAP
+0 −3
Original line number Diff line number Diff line
obj-$(CONFIG_HOSTAP) += hostap.o
obj-$(CONFIG_HOSTAP_WEP) += hostap_crypt_wep.o
obj-$(CONFIG_HOSTAP_TKIP) += hostap_crypt_tkip.o
obj-$(CONFIG_HOSTAP_CCMP) += hostap_crypt_ccmp.o

obj-$(CONFIG_HOSTAP_CS) += hostap_cs.o
obj-$(CONFIG_HOSTAP_PLX) += hostap_plx.o
+2 −10
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 *
 * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
 * <jkmaline@cc.hut.fi>
 * Copyright (c) 2002-2004, Jouni Malinen <jkmaline@cc.hut.fi>
 * Copyright (c) 2002-2005, Jouni Malinen <jkmaline@cc.hut.fi>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
@@ -34,16 +34,12 @@
#include "hostap_80211.h"
#include "hostap_ap.h"
#include "hostap.h"
#include "hostap_crypt.h"

MODULE_AUTHOR("Jouni Malinen");
MODULE_DESCRIPTION("Host AP common routines");
MODULE_LICENSE("GPL");
MODULE_VERSION(PRISM2_VERSION);

/* Old hostap_crypt module is now part of hostap module. */
#include "hostap_crypt.c"

#define TX_TIMEOUT (2 * HZ)

#define PRISM2_MAX_FRAME_SIZE 2304
@@ -66,7 +62,7 @@ static int prism2_ap_translate_scan(struct net_device *dev, char *buffer);
static int prism2_hostapd(struct ap_data *ap,
			  struct prism2_hostapd_param *param);
static void * ap_crypt_get_ptrs(struct ap_data *ap, u8 *addr, int permanent,
				struct prism2_crypt_data ***crypt);
				struct ieee80211_crypt_data ***crypt);
static void ap_control_kickall(struct ap_data *ap);
#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
static int ap_control_add_mac(struct mac_restrictions *mac_restrictions,
@@ -1156,8 +1152,6 @@ struct proc_dir_entry *hostap_proc;

static int __init hostap_init(void)
{
	hostap_crypto_init();

	if (proc_net != NULL) {
		hostap_proc = proc_mkdir("hostap", proc_net);
		if (!hostap_proc)
@@ -1176,8 +1170,6 @@ static void __exit hostap_exit(void)
		hostap_proc = NULL;
		remove_proc_entry("hostap", proc_net);
	}

	hostap_crypto_deinit();
}


+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ void hostap_dump_tx_80211(const char *name, struct sk_buff *skb);
int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev);
int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev);
struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
				   struct prism2_crypt_data *crypt);
				   struct ieee80211_crypt_data *crypt);
int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev);

#endif /* HOSTAP_80211_H */
+3 −3
Original line number Diff line number Diff line
@@ -613,7 +613,7 @@ static int hostap_is_eapol_frame(local_info_t *local, struct sk_buff *skb)
/* Called only as a tasklet (software IRQ) */
static inline int
hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
			struct prism2_crypt_data *crypt)
			struct ieee80211_crypt_data *crypt)
{
	struct hostap_ieee80211_hdr *hdr;
	int res, hdrlen;
@@ -652,7 +652,7 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
/* Called only as a tasklet (software IRQ) */
static inline int
hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
			     int keyidx, struct prism2_crypt_data *crypt)
			     int keyidx, struct ieee80211_crypt_data *crypt)
{
	struct hostap_ieee80211_hdr *hdr;
	int res, hdrlen;
@@ -698,7 +698,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
	int from_assoc_ap = 0;
	u8 dst[ETH_ALEN];
	u8 src[ETH_ALEN];
	struct prism2_crypt_data *crypt = NULL;
	struct ieee80211_crypt_data *crypt = NULL;
	void *sta = NULL;
	int keyidx = 0;

Loading