[PATCH] split libertas driver into hardware independend / dependend parts
Holger Schurig
hs4233 at mail.mn-solutions.de
Tue Feb 13 08:28:43 EST 2007
That's the first part of splitting the libertas driver into a hardware
dependend and independend part.
Signed-off-by: Holger Schurig <hs4233 at mail.mn-solutions.de>
---
In future patches, we should move more stuff from main.c into libertas.c and
try to reduce the EXPORT_SYMBOL() count. I'm also o.k. to converting those
into GPL-only exports, if people wish.
--- libertas-2.6.orig/drivers/net/wireless/Kconfig
+++ libertas-2.6/drivers/net/wireless/Kconfig
@@ -280,16 +280,32 @@
If you are not sure, say N here.
+config LIBERTAS
+ tristate
+ depends on NET_RADIO && USB
+ select FW_LOADER
+ ---help---
+ Base driver for Libertas
+
config LIBERTAS_USB
- tristate "Marvell Libertas 8388 802.11a/b/g cards"
+ tristate "Marvell Libertas 8388 USB 802.11a/b/g cards"
depends on NET_RADIO && USB
+ select LIBERTAS
+ select FW_LOADER
+ ---help---
+ A driver for Marvell Libertas 8388 USB devices.
+
+config LIBERTAS_CF
+ tristate "Marvell Libertas 8385 CF 802.11b/g cards"
+ depends on NET_RADIO && PCMCIA && EXPERIMENTAL
+ select LIBERTAS
select FW_LOADER
---help---
A driver for Marvell Libertas 8388 USB devices.
-config LIBERTAS_USB_DEBUG
- bool "Enable full debugging output in the Libertas USB module."
- depends on LIBERTAS_USB
+config LIBERTAS_DEBUG
+ bool "Enable full debugging output in the Libertas module."
+ depends on NET_RADIO && (LIBERTAS_USB || LIBERTAS_CF)
---help---
Debugging support.
--- libertas-2.6.orig/drivers/net/wireless/Makefile
+++ libertas-2.6/drivers/net/wireless/Makefile
@@ -43,4 +43,4 @@
obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
obj-$(CONFIG_USB_ZD1201) += zd1201.o
-obj-$(CONFIG_LIBERTAS_USB) += libertas/
+obj-$(CONFIG_LIBERTAS) += libertas/
--- libertas-2.6.orig/drivers/net/wireless/libertas/Makefile
+++ libertas-2.6/drivers/net/wireless/libertas/Makefile
@@ -1,20 +1,20 @@
# EXTRA_CFLAGS += -Wpacked
-usb8xxx-objs := main.o fw.o wext.o \
- rx.o tx.o cmd.o \
- cmdresp.o scan.o \
- join.o 11d.o \
- ioctl.o debugfs.o \
+lib8xxx-objs := libertas.o wext.o \
+ rx.o tx.o cmd.o \
+ cmdresp.o scan.o \
+ join.o 11d.o \
+ ioctl.o debugfs.o \
ethtool.o assoc.o
-ifeq ($(CONFIG_LIBERTAS_USB_DEBUG), y)
+ifeq ($(CONFIG_LIBERTAS_DEBUG), y)
EXTRA_CFLAGS += -DDEBUG -DPROC_DEBUG
endif
-# This is needed to support the newer boot2 bootloader (v >= 3104)
-usb8xxx-objs += if_bootcmd.o
-usb8xxx-objs += if_usb.o
+usb8xxx-objs := if_usb.o if_bootcmd.o fw.o main.o
+#libertas_cf-objs := if_cf.o main_cf.o
+obj-$(CONFIG_LIBERTAS) += lib8xxx.o
obj-$(CONFIG_LIBERTAS_USB) += usb8xxx.o
-
+obj-$(CONFIG_LIBERTAS_CF) += libertas_cf.o
--- /dev/null
+++ libertas-2.6/drivers/net/wireless/libertas/libertas.c
@@ -0,0 +1,58 @@
+#include <linux/module.h>
+#include <linux/kernel.h>
+
+#include "assoc.h"
+#include "decl.h"
+#include "debugfs.h"
+#include "wext.h"
+
+EXPORT_SYMBOL(libertas_free_adapter);
+
+MODULE_AUTHOR("Holger Schurig <hs4233 at mail.mn-solutions.de>");
+MODULE_DESCRIPTION("Library for Marvel 8xxx drivers");
+MODULE_LICENSE("GPL");
+
+EXPORT_SYMBOL(libertas_adhoc_rates_b);
+EXPORT_SYMBOL(libertas_adhoc_rates_g);
+EXPORT_SYMBOL(libertas_allocate_cmd_buffer);
+EXPORT_SYMBOL(libertas_debug);
+EXPORT_SYMBOL(libertas_debugfs_init);
+EXPORT_SYMBOL(libertas_debugfs_init_one);
+EXPORT_SYMBOL(libertas_debugfs_remove);
+EXPORT_SYMBOL(libertas_debugfs_remove_one);
+EXPORT_SYMBOL(libertas_do_ioctl);
+EXPORT_SYMBOL(libertas_ethtool_ops);
+EXPORT_SYMBOL(libertas_execute_next_command);
+EXPORT_SYMBOL(libertas_free_cmd_buffer);
+EXPORT_SYMBOL(libertas_get_region_cfp_table);
+EXPORT_SYMBOL(libertas_handler_def);
+EXPORT_SYMBOL(libertas_init_11d);
+EXPORT_SYMBOL(libertas_prepare_and_send_command);
+EXPORT_SYMBOL(libertas_process_event);
+EXPORT_SYMBOL(libertas_process_rx_command);
+EXPORT_SYMBOL(libertas_process_rxed_packet);
+EXPORT_SYMBOL(libertas_process_tx);
+EXPORT_SYMBOL(libertas_ps_confirm_sleep);
+EXPORT_SYMBOL(libertas_ps_wakeup);
+EXPORT_SYMBOL(libertas_queue_cmd);
+EXPORT_SYMBOL(libertas_region_code_to_index);
+EXPORT_SYMBOL(libertas_send_tx_feedback);
+EXPORT_SYMBOL(libertas_set_mac_packet_filter);
+EXPORT_SYMBOL(libertas_tx_runqueue);
+EXPORT_SYMBOL(libertas_wlan_data_rates);
+EXPORT_SYMBOL(libertas_wlan_association_worker);
+
+
+static int __init init_libertas(void)
+{
+ return 0;
+}
+
+
+static void __exit exit_libertas(void)
+{
+}
+
+
+module_init(init_libertas);
+module_exit(exit_libertas);
More information about the libertas-dev
mailing list