Search Linux Wireless

Re: [PATCH 5/5] ar9170: update Makefile, Kconfig and MAINTAINERS

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

 



On Monday 23 March 2009 15:29:11 Johannes Berg wrote:
>
> I think it would make sense to link them into the same module as long as
> we don't have a second user of the common code. I actually doubt we will
> see a second user of the common code at all, even if it is in theory
> possible with the hardware design.
Shh, there's a secret plan, see ar9170/main.c

/*
 * BIG FAT TODO:
 *
 * By the looks of things: these devices share a lot of things like
 * EEPROM layout/design and PHY code with other Atheros WIFI products.
 * So this driver/library will eventually become ath9k code... or vice versa ;-)
 */

And the ath5k<->ath9k merge could provide some "helper" function for this
driver as well... (wishful thinking, but anyway...)

Meanwhile, what about a config option that can be enabled to
integrate everything into the front-end module (ar9170usb)?
( However, I don't think this config solution will stand a chance ;-) 
  and we all come to the same "all-in-one works best" conclusion.  )
---
diff --git a/drivers/net/wireless/ar9170/Kconfig b/drivers/net/wireless/ar9170/Kconfig
index f661187..5272940 100644
--- a/drivers/net/wireless/ar9170/Kconfig
+++ b/drivers/net/wireless/ar9170/Kconfig
@@ -22,6 +22,16 @@ config AR9170_USB
 
 	  If you choose to build a module, it'll be called ar9170usb.
 
+config AR9170_INTEGRATE_COMMON
+	bool "Integrate common code into front-end modules"
+	depends on AR9170_COMMON
+	help
+	  If this option is set, the common code will be
+	  integrated into the front-end modules instead
+	  of being linked into a seperate module.
+
+	  If unsure, say N.
+
 config AR9170_LEDS
 	bool
 	depends on AR9170_COMMON && MAC80211_LEDS && (LEDS_CLASS = y || LEDS_CLASS = AR9170_COMMON)
diff --git a/drivers/net/wireless/ar9170/Makefile b/drivers/net/wireless/ar9170/Makefile
index 59b174d..868a520 100644
--- a/drivers/net/wireless/ar9170/Makefile
+++ b/drivers/net/wireless/ar9170/Makefile
@@ -1,5 +1,15 @@
+ifdef CONFIG_AR9170_INTEGRATE_COMMON
+
+ar9170usb-objs += usb.o main.o cmd.o mac.o phy.o led.o
+
+obj-$(CONFIG_AR9170_USB) += ar9170usb.o
+
+else
+
 ar9170common-objs += main.o cmd.o mac.o phy.o led.o
 ar9170usb-objs += usb.o
 
 obj-$(CONFIG_AR9170_COMMON) += ar9170common.o
 obj-$(CONFIG_AR9170_USB) += ar9170usb.o
+
+endif
diff --git a/drivers/net/wireless/ar9170/main.c b/drivers/net/wireless/ar9170/main.c
index f8c2357..ec03df6 100644
--- a/drivers/net/wireless/ar9170/main.c
+++ b/drivers/net/wireless/ar9170/main.c
@@ -57,8 +57,10 @@ static int modparam_nohwcrypt;
 module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
 MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
 MODULE_AUTHOR("Johannes Berg <johannes@xxxxxxxxxxxxxxxx>");
+#ifndef CONFIG_AR9170_INTEGRATE_COMMON
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Atheros shared code for AR9170 wireless devices");
+#endif /* CONFIG_AR9170_INTEGRATE_COMMON */
 
 #define RATE(_bitrate, _hw_rate, _txpidx, _flags) {	\
 	.bitrate	= (_bitrate),			\
@@ -1693,6 +1695,7 @@ void ar9170_unregister(struct ar9170 *ar)
 }
 EXPORT_SYMBOL_GPL(ar9170_unregister);
 
+#ifndef CONFIG_AR9170_INTEGRATE_COMMON
 static int __init ar9170_init(void)
 {
 	if (modparam_nohwcrypt)
@@ -1709,3 +1712,4 @@ static void __exit ar9170_exit(void)
 
 module_init(ar9170_init);
 module_exit(ar9170_exit);
+#endif /* CONFIG_AR9170_INTEGRATE_COMMON */
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux