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

Commit 3b148be0 authored by Sean MacLennan's avatar Sean MacLennan Committed by Greg Kroah-Hartman
Browse files

staging/rtl8192e: Register against lib80211



Convert rtllib from registering the crypt drivers against rtllib_crypt
and instead register the against lib80211. The crypto functions have
R- prepended (R-CCMP, R-TKIP, R-WEP) so they will not clash with the
lib80211 versions.

We cannot use the lib80211 crypt drivers since the rtl8192e has some
hardware support that is not handled by the lib80211 crypt drivers.

Signed-off-by: default avatarSean MacLennan <seanm@seanm.ca>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0ddcf5fd
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ config RTLLIB
	tristate "Support for rtllib wireless devices"
	depends on WLAN && m
	default n
	select RTLLIB_CRYPTO
	select LIB80211
	---help---
	  If you have a wireless card that uses rtllib, say
	  Y. Currently the only card is the rtl8192e.
@@ -11,14 +11,9 @@ config RTLLIB

if RTLLIB

config RTLLIB_CRYPTO
	tristate "Support for rtllib crypto support"
	---help---
	  Base crypto driver for rtllib.

config RTLLIB_CRYPTO_CCMP
	tristate "Support for rtllib CCMP crypto"
	depends on RTLLIB_CRYPTO
	depends on RTLLIB
	default y
	---help---
	  CCMP crypto driver for rtllib.
@@ -27,7 +22,7 @@ config RTLLIB_CRYPTO_CCMP

config RTLLIB_CRYPTO_TKIP
	tristate "Support for rtllib TKIP crypto"
	depends on RTLLIB_CRYPTO
	depends on RTLLIB
	default y
	---help---
	  TKIP crypto driver for rtllib.
@@ -36,7 +31,7 @@ config RTLLIB_CRYPTO_TKIP

config RTLLIB_CRYPTO_WEP
	tristate "Support for rtllib WEP crypto"
	depends on RTLLIB_CRYPTO
	depends on RTLLIB
	default y
	---help---
	  TKIP crypto driver for rtllib.
+0 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ rtllib-objs := \

obj-$(CONFIG_RTLLIB) += rtllib.o

obj-$(CONFIG_RTLLIB_CRYPTO) += rtllib_crypt.o
obj-$(CONFIG_RTLLIB_CRYPTO_CCMP) += rtllib_crypt_ccmp.o
obj-$(CONFIG_RTLLIB_CRYPTO_TKIP) += rtllib_crypt_tkip.o
obj-$(CONFIG_RTLLIB_CRYPTO_WEP) += rtllib_crypt_wep.o
+1 −25
Original line number Diff line number Diff line
@@ -1060,8 +1060,6 @@ struct rtllib_stats {

struct rtllib_device;

#include "rtllib_crypt.h"

#define SEC_KEY_1	 (1<<0)
#define SEC_KEY_2	 (1<<1)
#define SEC_KEY_3	 (1<<2)
@@ -2985,21 +2983,6 @@ static inline const char *escape_essid(const char *essid, u8 essid_len)
	(HTMcsToDataRate(_ieee, (u8)_MGN_RATE)))

/* fun with the built-in rtllib stack... */
int rtllib_init(void);
void rtllib_exit(void);
int rtllib_crypto_init(void);
void rtllib_crypto_deinit(void);
int rtllib_crypto_tkip_init(void);
void rtllib_crypto_tkip_exit(void);
int rtllib_crypto_ccmp_init(void);
void rtllib_crypto_ccmp_exit(void);
int rtllib_crypto_wep_init(void);
void rtllib_crypto_wep_exit(void);

void rtllib_MgntDisconnectIBSS(struct rtllib_device *rtllib);
void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib, u8 *asSta,
				    u8 asRsn);
void rtllib_MgntDisconnectAP(struct rtllib_device *rtllib, u8 asRsn);
bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn);


@@ -3066,12 +3049,5 @@ extern void rtllib_TURBO_Info(struct rtllib_device *ieee, u8 **tag_p);
#define MUTEX_LOCK_PRIV(pmutex) mutex_lock(pmutex)
#define MUTEX_UNLOCK_PRIV(pmutex) mutex_unlock(pmutex)
#endif
static inline void dump_buf(u8 *buf, u32 len)
{
	u32 i;
	printk(KERN_INFO "-----------------Len %d----------------\n", len);
	for (i = 0; i < len; i++)
		printk("%2.2x-", *(buf+i));
	printk("\n");
}

#endif /* RTLLIB_H */
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ int __init rtllib_crypto_init(void)
	INIT_LIST_HEAD(&hcrypt->algs);
	spin_lock_init(&hcrypt->lock);

	ret = rtllib_register_crypto_ops(&rtllib_crypt_null);
	ret = lib80211_register_crypto_ops(&rtllib_crypt_null);
	if (ret < 0) {
		kfree(hcrypt);
		hcrypt = NULL;
+3 −3
Original line number Diff line number Diff line
@@ -428,7 +428,7 @@ static char *rtllib_ccmp_print_stats(char *p, void *priv)
}

static struct lib80211_crypto_ops rtllib_crypt_ccmp = {
	.name			= "CCMP",
	.name			= "R-CCMP",
	.init			= rtllib_ccmp_init,
	.deinit			= rtllib_ccmp_deinit,
	.encrypt_mpdu		= rtllib_ccmp_encrypt,
@@ -446,13 +446,13 @@ static struct lib80211_crypto_ops rtllib_crypt_ccmp = {

int __init rtllib_crypto_ccmp_init(void)
{
	return rtllib_register_crypto_ops(&rtllib_crypt_ccmp);
	return lib80211_register_crypto_ops(&rtllib_crypt_ccmp);
}


void __exit rtllib_crypto_ccmp_exit(void)
{
	rtllib_unregister_crypto_ops(&rtllib_crypt_ccmp);
	lib80211_unregister_crypto_ops(&rtllib_crypt_ccmp);
}

module_init(rtllib_crypto_ccmp_init);
Loading