Re: [PATCH 2/3] Move rtl8192e from staging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Get the rtl8192e driver working from the net/wireless/rtllib directory.

Signed-off-by: Sean MacLennan <seanm@xxxxxxxx>
---
* Unmerged path drivers/net/wireless/rtllib/Kconfig
diff --git a/drivers/net/wireless/rtllib/Kconfig b/drivers/net/wireless/rtllib/Kconfig
index 750c347..af3c464 100644
--- a/drivers/net/wireless/rtllib/Kconfig
+++ b/drivers/net/wireless/rtllib/Kconfig
@@ -1,9 +1,51 @@
-config RTL8192E
-	tristate "RealTek RTL8192E Wireless LAN NIC driver"
-	depends on PCI && WLAN
-	depends on m
-	select WIRELESS_EXT
-	select WEXT_PRIV
-	select CRYPTO
-	default N
+config RTLLIB
+	tristate "Support for rtllib wireless devices"
+	depends on WLAN
+	default n
 	---help---
+	  If you have a wireless card that uses rtllib, say
+	  Y. Currently the only card is the rtl8192e.
+
+	  If unsure, say N.
+
+config RTLLIB_CRYPTO
+	tristate "Support for rtllib crypto support"
+	depends on RTLLIB
+	default y
+	---help---
+	  CCMP crypto driver for rtllib.
+
+	  If you enabled RTLLIB, you want this.
+
+config RTLLIB_CRYPTO_CCMP
+	tristate "Support for rtllib CCMP crypto"
+	depends on RTLLIB && RTLLIB_CRYPTO
+	default y
+	---help---
+	  CCMP crypto driver for rtllib.
+
+	  If you enabled RTLLIB, you want this.
+
+config RTLLIB_CRYPTO_TKIP
+	tristate "Support for rtllib TKIP crypto"
+	depends on RTLLIB && RTLLIB_CRYPTO
+	default y
+	---help---
+	  TKIP crypto driver for rtllib.
+
+	  If you enabled RTLLIB, you want this.
+
+config RTLLIB_CRYPTO_WEP
+	tristate "Support for rtllib WEP crypto"
+	depends on RTLLIB && RTLLIB_CRYPTO
+	default y
+	---help---
+	  TKIP crypto driver for rtllib.
+
+	  If you enabled RTLLIB, you want this.
+
+if RTLLIB
+
+source "drivers/net/wireless/rtllib/rtl8192e/Kconfig"
+
+endif
* Unmerged path drivers/net/wireless/rtllib/Makefile
diff --git a/drivers/net/wireless/rtllib/Makefile b/drivers/net/wireless/rtllib/Makefile
index a66a9ad..e464304 100644
--- a/drivers/net/wireless/rtllib/Makefile
+++ b/drivers/net/wireless/rtllib/Makefile
@@ -4,38 +4,25 @@ ccflags-y += -DCONFIG_PM
 ccflags-y += -DHAVE_NET_DEVICE_OPS
 ccflags-y += -DENABLE_DOT11D
 
-r8192e_pci-objs :=		\
-	rtl_core.o		\
-	rtl_eeprom.o		\
-	rtl_ps.o		\
-	rtl_wx.o		\
-	rtl_cam.o		\
-	rtl_dm.o		\
-	rtl_pm.o		\
-	rtl_pci.o		\
-	rtl_debug.o		\
-	rtl_ethtool.o		\
-	r8192E_dev.o		\
-	r8192E_phy.o		\
-	r8192E_firmware.o	\
-	r8192E_cmdpkt.o		\
-	r8192E_hwimg.o		\
-	r8190P_rtl8256.o	\
+rtllib-objs :=			\
+	dot11d.o		\
+	rtllib_module.o		\
 	rtllib_rx.o		\
-	rtllib_softmac.o	\
 	rtllib_tx.o		\
 	rtllib_wx.o		\
-	rtllib_module.o		\
+	rtllib_softmac.o	\
 	rtllib_softmac_wx.o	\
-	rtl819x_HTProc.o	\
-	rtl819x_TSProc.o	\
 	rtl819x_BAProc.o	\
-	dot11d.o		\
-	rtllib_crypt.o		\
-	rtllib_crypt_tkip.o	\
-	rtllib_crypt_ccmp.o	\
-	rtllib_crypt_wep.o
+	rtl819x_HTProc.o	\
+	rtl819x_TSProc.o
+
+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
 
-obj-$(CONFIG_RTL8192E) += r8192e_pci.o
+obj-$(CONFIG_RTL8192E) += rtl8192e/
 
 ccflags-y += -D__CHECK_ENDIAN__
* Unmerged path drivers/net/wireless/rtllib/rtl8192e/Kconfig
* Unmerged path drivers/net/wireless/rtllib/rtl8192e/Makefile
diff --git a/drivers/net/wireless/rtllib/rtl8192e/rtl_cam.c b/drivers/net/wireless/rtllib/rtl8192e/rtl_cam.c
index 8b5db08..6fd3d76 100644
--- a/drivers/net/wireless/rtllib/rtl8192e/rtl_cam.c
+++ b/drivers/net/wireless/rtllib/rtl8192e/rtl_cam.c
@@ -23,10 +23,6 @@
  * wlanfae <wlanfae@xxxxxxxxxxx>
 ******************************************************************************/
 #include "rtl_core.h"
-// SAM #include "r8192E_phy.h"
-// SAM #include "r8192E_phyreg.h"
-// SAM #include "r8190P_rtl8256.h" /* RTL8225 Radio frontend */
-// SAM #include "r8192E_cmdpkt.h"
 
 extern int hwwep;
 void CamResetAllEntry(struct net_device *dev)
diff --git a/drivers/net/wireless/rtllib/rtl8192e/rtl_core.c b/drivers/net/wireless/rtllib/rtl8192e/rtl_core.c
index 2f51bb8..8ce99de 100644
--- a/drivers/net/wireless/rtllib/rtl8192e/rtl_core.c
+++ b/drivers/net/wireless/rtllib/rtl8192e/rtl_core.c
@@ -3104,33 +3104,7 @@ bool NicIFDisableNIC(struct net_device *dev)
 static int __init rtl8192_pci_module_init(void)
 {
 	int error;
-#if 0 // SAM
-	int ret = rtllib_init();
-	if (ret) {
-		printk(KERN_ERR "rtllib_init() failed %d\n", ret);
-		return ret;
-	}
-	ret = rtllib_crypto_init();
-	if (ret) {
-		printk(KERN_ERR "rtllib_crypto_init() failed %d\n", ret);
-		return ret;
-	}
-	ret = rtllib_crypto_tkip_init();
-	if (ret) {
-		printk(KERN_ERR "rtllib_crypto_tkip_init() failed %d\n", ret);
-		return ret;
-	}
-	ret = rtllib_crypto_ccmp_init();
-	if (ret) {
-		printk(KERN_ERR "rtllib_crypto_ccmp_init() failed %d\n", ret);
-		return ret;
-	}
-	ret = rtllib_crypto_wep_init();
-	if (ret) {
-		printk(KERN_ERR "rtllib_crypto_wep_init() failed %d\n", ret);
-		return ret;
-	}
-#endif
+
 	printk(KERN_INFO "\nLinux kernel driver for RTL8192E WLAN cards\n");
 	printk(KERN_INFO "Copyright (c) 2007-2008, Realsil Wlan Driver\n");
 
@@ -3159,13 +3133,6 @@ static void __exit rtl8192_pci_module_exit(void)
 	RT_TRACE(COMP_DOWN, "Exiting");
 	rtl8192_proc_module_remove();
 	rtl_remove_debugfs_root();
-#if 0 // SAM
-	rtllib_crypto_tkip_exit();
-	rtllib_crypto_ccmp_exit();
-	rtllib_crypto_wep_exit();
-	rtllib_crypto_deinit();
-	rtllib_exit();
-#endif
 }
 
 void check_rfctrl_gpio_timer(unsigned long data)
diff --git a/drivers/net/wireless/rtllib/rtl8192e/rtl_pm.c b/drivers/net/wireless/rtllib/rtl8192e/rtl_pm.c
index e61e938..c971521 100644
--- a/drivers/net/wireless/rtllib/rtl8192e/rtl_pm.c
+++ b/drivers/net/wireless/rtllib/rtl8192e/rtl_pm.c
@@ -19,8 +19,6 @@
 
 #ifdef CONFIG_PM_RTL
 #include "rtl_core.h"
-// SAM #include "r8192E_hw.h"
-// SAM #include "r8190P_rtl8256.h"
 #include "rtl_pm.h"
 
 int rtl8192E_save_state(struct pci_dev *dev, pm_message_t state)
diff --git a/drivers/net/wireless/rtllib/rtl8192e/rtl_ps.c b/drivers/net/wireless/rtllib/rtl8192e/rtl_ps.c
index 2ddc7aa..4f391d5 100644
--- a/drivers/net/wireless/rtllib/rtl8192e/rtl_ps.c
+++ b/drivers/net/wireless/rtllib/rtl8192e/rtl_ps.c
@@ -24,10 +24,6 @@
  *****************************************************************************/
 #include "rtl_ps.h"
 #include "rtl_core.h"
-// SAM #include "r8192E_phy.h"
-// SAM #include "r8192E_phyreg.h"
-// SAM #include "r8190P_rtl8256.h" /* RTL8225 Radio frontend */
-// SAM #include "r8192E_cmdpkt.h"
 
 static void rtl8192_hw_sleep_down(struct net_device *dev)
 {
diff --git a/drivers/net/wireless/rtllib/rtl819x_BAProc.c b/drivers/net/wireless/rtllib/rtl819x_BAProc.c
index 83cd52b..46ae64b 100644
--- a/drivers/net/wireless/rtllib/rtl819x_BAProc.c
+++ b/drivers/net/wireless/rtllib/rtl819x_BAProc.c
@@ -18,9 +18,8 @@
 ******************************************************************************/
 #include "rtllib.h"
 #include "rtl819x_BA.h"
-// SAM #include "rtl_core.h"
 
-/* SAM FIXME - rlt_core is needed for this debug macro */
+// FIXME - Defined in rtl_debug.h
 #define RT_TRACE(a, b, ...)
 
 static void ActivateBAEntry(struct rtllib_device *ieee, struct ba_record *pBA,
diff --git a/drivers/net/wireless/rtllib/rtllib.h b/drivers/net/wireless/rtllib/rtllib.h
index c41d008..a7bf904 100644
--- a/drivers/net/wireless/rtllib/rtllib.h
+++ b/drivers/net/wireless/rtllib/rtllib.h
@@ -65,6 +65,10 @@
 #define IW_CUSTOM_MAX	256	/* In bytes */
 #endif
 
+
+#define RTLLIB_DRV_NAME "rtllib"
+
+
 #define skb_tail_pointer_rsl(skb) skb_tail_pointer(skb)
 
 #define EXPORT_SYMBOL_RSL(x) EXPORT_SYMBOL(x)
@@ -3127,4 +3131,5 @@ static inline void dump_buf(u8 *buf, u32 len)
 		printk("%2.2x-", *(buf+i));
 	printk("\n");
 }
+
 #endif /* RTLLIB_H */
diff --git a/drivers/net/wireless/rtllib/rtllib_module.c b/drivers/net/wireless/rtllib/rtllib_module.c
index 94dff6e..f74fb4b 100644
--- a/drivers/net/wireless/rtllib/rtllib_module.c
+++ b/drivers/net/wireless/rtllib/rtllib_module.c
@@ -54,8 +54,6 @@
 #include "rtllib.h"
 
 
-#define DRV_NAME "rtllib_92e"
-
 void _setup_timer(struct timer_list *ptimer, void *fun, unsigned long data)
 {
 	ptimer->function = fun;
@@ -256,7 +254,7 @@ static int store_debug_level(struct file *file, const char __user *buffer,
 	} else
 		val = simple_strtoul(p, &p, 10);
 	if (p == buf)
-		printk(KERN_INFO DRV_NAME
+		printk(KERN_INFO RTLLIB_DRV_NAME
 		       ": %s is not in hex or decimal form.\n", buf);
 	else
 		rtllib_debug_level = val;
@@ -269,16 +267,16 @@ int __init rtllib_init(void)
 	struct proc_dir_entry *e;
 
 	rtllib_debug_level = debug;
-	rtllib_proc = create_proc_entry(DRV_NAME, S_IFDIR, init_net.proc_net);
+	rtllib_proc = create_proc_entry(RTLLIB_DRV_NAME, S_IFDIR, init_net.proc_net);
 	if (rtllib_proc == NULL) {
-		RTLLIB_ERROR("Unable to create " DRV_NAME
+		RTLLIB_ERROR("Unable to create " RTLLIB_DRV_NAME
 				" proc directory\n");
 		return -EIO;
 	}
 	e = create_proc_entry("debug_level", S_IFREG | S_IRUGO | S_IWUSR,
 			      rtllib_proc);
 	if (!e) {
-		remove_proc_entry(DRV_NAME, init_net.proc_net);
+		remove_proc_entry(RTLLIB_DRV_NAME, init_net.proc_net);
 		rtllib_proc = NULL;
 		return -EIO;
 	}
@@ -293,7 +291,7 @@ void __exit rtllib_exit(void)
 {
 	if (rtllib_proc) {
 		remove_proc_entry("debug_level", rtllib_proc);
-		remove_proc_entry(DRV_NAME, init_net.proc_net);
+		remove_proc_entry(RTLLIB_DRV_NAME, init_net.proc_net);
 		rtllib_proc = NULL;
 	}
 }
diff --git a/drivers/net/wireless/rtllib/rtllib_softmac.c b/drivers/net/wireless/rtllib/rtllib_softmac.c
index fab58a8..ef2036e 100644
--- a/drivers/net/wireless/rtllib/rtllib_softmac.c
+++ b/drivers/net/wireless/rtllib/rtllib_softmac.c
@@ -15,13 +15,10 @@
 
 
 #include "rtllib.h"
-// SAM #include "rtl_core.h"
 
-// SAM FIXME - rtl_core.h needed for RT_TRACE debug
+// FIXME - Defined in rtl_debug.h
 #define RT_TRACE(a, b, ...)
 
-#define DRV_NAME "rtllib" /* SAM ??? */
-
 #include <linux/random.h>
 #include <linux/delay.h>
 #include <linux/version.h>
@@ -3133,7 +3130,7 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
 		    (unsigned long) ieee);
 
 
-	ieee->wq = create_workqueue(DRV_NAME);
+	ieee->wq = create_workqueue(RTLLIB_DRV_NAME);
 
 	INIT_DELAYED_WORK_RSL(&ieee->link_change_wq,
 			      (void *)rtllib_link_change_wq, ieee);
diff --git a/drivers/net/wireless/rtllib/rtllib_softmac_wx.c b/drivers/net/wireless/rtllib/rtllib_softmac_wx.c
index 7778390..0f7ac35 100644
--- a/drivers/net/wireless/rtllib/rtllib_softmac_wx.c
+++ b/drivers/net/wireless/rtllib/rtllib_softmac_wx.c
@@ -15,11 +15,10 @@
 
 
 #include "rtllib.h"
-// SAM #include "rtl_core.h"
 #include "dot11d.h"
 /* FIXME: add A freqs */
 
-/* SAM FIXME */
+// FIXME - Defined in rtl_debug.h
 #define RT_TRACE(a, b, ...)
 
 const long rtllib_wlan_frequencies[] = {
* Unmerged path drivers/staging/rtl8192e/Makefile
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux