* [PATCH] cfg80211: fix initialisation if built-in
@ 2007-09-10 11:44 Johannes Berg
[not found] ` <1189424685.4506.63.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2007-09-10 11:44 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, netdev, Rob Hussey, stable
When cfg80211 is built into the kernel it needs to init earlier
so that device registrations are run after it has initialised.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/wireless/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- wireless-dev.orig/net/wireless/core.c 2007-09-10 13:00:18.567257487 +0200
+++ wireless-dev/net/wireless/core.c 2007-09-10 13:00:59.837219347 +0200
@@ -363,7 +363,7 @@ out_fail_notifier:
out_fail_sysfs:
return err;
}
-module_init(cfg80211_init);
+subsys_initcall(cfg80211_init);
static void cfg80211_exit(void)
{
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cfg80211: fix initialisation if built-in
[not found] ` <1189424685.4506.63.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
@ 2007-09-11 1:04 ` Magnus Damm
2007-09-11 1:18 ` Rob Hussey
2007-09-11 10:24 ` Johannes Berg
2007-09-21 22:02 ` [stable] " Greg KH
1 sibling, 2 replies; 6+ messages in thread
From: Magnus Damm @ 2007-09-11 1:04 UTC (permalink / raw)
To: Johannes Berg
Cc: John W. Linville, linux-wireless, netdev, Rob Hussey,
stable-DgEjT+Ai2ygdnm+yROfE0A
On 9/10/07, Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote:
> When cfg80211 is built into the kernel it needs to init earlier
> so that device registrations are run after it has initialised.
>
> Signed-off-by: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Yep, I need this fix as well. Without it the ath5k driver built in
bombs out during module_init(). Something with kref and a struct
device pointing to an uninitialized ieee80211_class.
I need a similar fix for net/mac80211/rc80211_simple.c as well to get
ath5k working though, not sure why at the moment. There may be some
bug with request_module() not being called properly.
ieee80211_register_hw() calls ieee80211_init_rate_ctrl_alg() with NULL
as name which calls rate_control_alloc() with NULL which always seems
to fail when built in.
This hack works around that problem, not sure what the real fix is.
--- 0002/net/mac80211/rc80211_simple.c
+++ work/net/mac80211/rc80211_simple.c 2007-09-09 18:11:48.000000000 +0900
@@ -431,7 +431,8 @@ static void __exit rate_control_simple_e
}
-module_init(rate_control_simple_init);
+//module_init(rate_control_simple_init);
+postcore_initcall(rate_control_simple_init);
module_exit(rate_control_simple_exit);
MODULE_DESCRIPTION("Simple rate control algorithm for ieee80211");
Thanks,
/ magnus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cfg80211: fix initialisation if built-in
2007-09-11 1:04 ` Magnus Damm
@ 2007-09-11 1:18 ` Rob Hussey
2007-09-11 10:24 ` Johannes Berg
1 sibling, 0 replies; 6+ messages in thread
From: Rob Hussey @ 2007-09-11 1:18 UTC (permalink / raw)
To: Magnus Damm
Cc: Johannes Berg, John W. Linville, linux-wireless, netdev, stable
On 9/10/07, Magnus Damm <magnus.damm@gmail.com> wrote:
> -module_init(rate_control_simple_init);
> +//module_init(rate_control_simple_init);
> +postcore_initcall(rate_control_simple_init);
> module_exit(rate_control_simple_exit);
>
> MODULE_DESCRIPTION("Simple rate control algorithm for ieee80211");
Same problem here, except with the rt2x00 driver. I changed it to
subsys_initcall(rate_control_simple_init), which also worked. I also
found that without this change, it was failing at this point in
ieee80211_rate.c:
ieee80211_try_rate_control_ops_get(const char *name)
{
struct rate_control_alg *alg;
struct rate_control_ops *ops = NULL;
mutex_lock(&rate_ctrl_mutex);
list_for_each_entry(alg, &rate_ctrl_algs, list) { <===== Here
if (!name || !strcmp(alg->ops->name, name))
if (try_module_get(alg->ops->module)) {
ops = alg->ops;
break;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] cfg80211: fix initialisation if built-in
2007-09-11 1:04 ` Magnus Damm
2007-09-11 1:18 ` Rob Hussey
@ 2007-09-11 10:24 ` Johannes Berg
1 sibling, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2007-09-11 10:24 UTC (permalink / raw)
To: Magnus Damm; +Cc: John W. Linville, linux-wireless, netdev, Rob Hussey, stable
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
On Tue, 2007-09-11 at 10:04 +0900, Magnus Damm wrote:
> On 9/10/07, Johannes Berg <johannes@sipsolutions.net> wrote:
> > When cfg80211 is built into the kernel it needs to init earlier
> > so that device registrations are run after it has initialised.
> >
> > Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
>
> Yep, I need this fix as well. Without it the ath5k driver built in
> bombs out during module_init(). Something with kref and a struct
> device pointing to an uninitialized ieee80211_class.
>
> I need a similar fix for net/mac80211/rc80211_simple.c as well to get
> ath5k working though, not sure why at the moment. There may be some
> bug with request_module() not being called properly.
Nah, it's just all too late and the rate control algorithm is built-in
too iirc. Rob tested a patch that changes those to subsys_initcall() as
well, so I'll be posting that.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [stable] [PATCH] cfg80211: fix initialisation if built-in
[not found] ` <1189424685.4506.63.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2007-09-11 1:04 ` Magnus Damm
@ 2007-09-21 22:02 ` Greg KH
2007-09-21 22:06 ` Johannes Berg
1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2007-09-21 22:02 UTC (permalink / raw)
To: Johannes Berg
Cc: John W. Linville, netdev, linux-wireless,
stable-DgEjT+Ai2ygdnm+yROfE0A, Rob Hussey
On Mon, Sep 10, 2007 at 01:44:45PM +0200, Johannes Berg wrote:
> When cfg80211 is built into the kernel it needs to init earlier
> so that device registrations are run after it has initialised.
>
> Signed-off-by: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
When this goes into Linus's tree, please resend it to the
stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org address so we can add it to our queue.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [stable] [PATCH] cfg80211: fix initialisation if built-in
2007-09-21 22:02 ` [stable] " Greg KH
@ 2007-09-21 22:06 ` Johannes Berg
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2007-09-21 22:06 UTC (permalink / raw)
To: Greg KH; +Cc: John W. Linville, netdev, linux-wireless, stable, Rob Hussey
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
On Fri, 2007-09-21 at 15:02 -0700, Greg KH wrote:
> When this goes into Linus's tree, please resend it to the
> stable@kernel.org address so we can add it to our queue.
It's on the way, sitting in net-2.6.24 right now but I don't know
whether it's scheduled for .23. I'm no longer sure if it really matters
for -stable since we have no drivers there so typically drivers build as
out-of-tree modules and the issue doesn't matter.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-09-21 22:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-10 11:44 [PATCH] cfg80211: fix initialisation if built-in Johannes Berg
[not found] ` <1189424685.4506.63.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2007-09-11 1:04 ` Magnus Damm
2007-09-11 1:18 ` Rob Hussey
2007-09-11 10:24 ` Johannes Berg
2007-09-21 22:02 ` [stable] " Greg KH
2007-09-21 22:06 ` Johannes Berg
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).