From: Christian Lamparter <chunkeey@web.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
"Luis R. Rodriguez" <lrodriguez@atheros.com>
Subject: Re: [PATCH 5/5] ar9170: update Makefile, Kconfig and MAINTAINERS
Date: Tue, 24 Mar 2009 01:26:12 +0100 [thread overview]
Message-ID: <200903240126.12692.chunkeey@web.de> (raw)
In-Reply-To: <1237818551.6147.15.camel@johannes.local>
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@sipsolutions.net>");
+#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 */
next prev parent reply other threads:[~2009-03-24 0:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-21 22:11 [PATCH 5/5] ar9170: update Makefile, Kconfig and MAINTAINERS Christian Lamparter
2009-03-23 14:29 ` Johannes Berg
2009-03-24 0:26 ` Christian Lamparter [this message]
2009-03-23 23:35 ` Luis R. Rodriguez
2009-03-24 7:41 ` Johannes Berg
2009-03-24 15:21 ` [PATCH] ar9170: single module build Christian Lamparter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200903240126.12692.chunkeey@web.de \
--to=chunkeey@web.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).