2008-06-08 15:55:03

by Luis R. Rodriguez

[permalink] [raw]
Subject: Backported MQ requirement on 802.11n for older kernels

I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
requirement for 802.11n to older kernels by relying on the old
internal mac80211 hacked up MQ support. I've tested the build on
2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
particularly iwl4965 using 11n on 2.6.22.

Oh and if you're interested in helping with the compat-wireless work
please subscribe to this new list:

https://lists.madwifi.org/mailman/listinfo/compat-masters

I called it compat-masters as compat-maintainers sounded too boring.
You can also send compat-wireless patches there to not clutter
linux-wireless mailing list. I'll soon enable automatic compile tests
across each kernel we support in compat-wireless and only if it fails
will you get a nagging e-mail on that list. This means no new
compat-wireless package will be put on wireless.kernel.org unless we
know it compiles fine on all kernels supported. This should prevent
using from getting tarballs they can't compile.

Luis


2008-06-11 12:58:59

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Wed, Jun 11, 2008 at 02:12:41PM +0200, Johannes Berg wrote:
>
> > Johannes -- why do we have the requirement for NETDEVICES_MULTIQUEUE
> > on CONFIG_MAC80211_QOS? My current config doesn't have it it and
> > CONFIG_MAC80211_QOS still works right now enabled. Of course the
> > driver I'm testing doesn't have 11n though.
>
> because otherwise skb_get_queu_mapping always returns 0 and you use only
> one queue.
>
> > Shouldn't we just make MAC80211_QOS depend on NET_SCHED and figure out
> > we can't support 11n based on NETDEVICES_MULTIQUEUE?
>
> no, 11e also needs multiple queues.

Thanks, since MAC80211_QOS was there before the issue is some
kernels may have this enabled but they never got to MQ. This is why
certain compiles will complain about missing symbols.

So how about we disable it if we determine MQ and NET_SCHED are off?
Like this:

diff --git a/config.mk b/config.mk
index e8dc469..b72e37e 100644
--- a/config.mk
+++ b/config.mk
@@ -27,7 +27,16 @@ ifeq ($(shell test $(KERNEL_SUBLEVEL) -lt 23 && echo yes),yes)
CONFIG_MAC80211_QOS=y
else
ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
-$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
+ifeq ($(CONFIG_NET_SCHED),)
+$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE and CONFIG_NET_SCHED for 802.11[ne] support")
+else
+# Disable CONFIG_MAC80211_QOS if you had it enabled befofre in your old .config
+$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11[ne] support")
+CONFIG_MAC80211_QOS=n
+endif
+else
+# Disable CONFIG_MAC80211_QOS if you had it enabled befofre in your old .config
+CONFIG_MAC80211_QOS=n
endif
endif
endif

2008-06-09 10:25:02

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Backported MQ requirement on 802.11n for older kernels

On Mon, Jun 9, 2008 at 2:01 AM, Luis R. Rodriguez <[email protected]> wrote:
> On Mon, Jun 9, 2008 at 1:56 AM, Johannes Berg <[email protected]> wrote:
>> On Mon, 2008-06-09 at 10:53 +0300, Ron Rindjunsky wrote:
>>> >
>>> > I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
>>> > requirement for 802.11n to older kernels by relying on the old
>>> > internal mac80211 hacked up MQ support. I've tested the build on
>>> > 2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
>>> > particularly iwl4965 using 11n on 2.6.22.
>>> >
>>>
>>> in config.mk you put MAC80211_QOS=m, and i guess that the intention was to put
>>> CONFIG_MAC80211_QOS=m
>>> if this is the case then the compilation fails
>>
>> It should be "y"
>>
>> johannes
>>
>
> Danke

OK found some more issues. v4.2 pushed out and new tarball
regenerated. This has been tested by Intel on 802.11n on iwl4965.

Luis

2008-06-11 11:55:40

by Tomas Winkler

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Wed, Jun 11, 2008 at 2:03 PM, Luis R. Rodriguez <[email protected]> wrote:
> On Tue, Jun 10, 2008 at 9:36 PM, Luis R. Rodriguez <[email protected]> wrote:
>> On Tue, Jun 10, 2008 at 9:32 PM, Luis R. Rodriguez <[email protected]> wrote:
>>> On Tue, Jun 10, 2008 at 4:57 PM, Tomas Winkler <[email protected]> wrote:
>>>> On Mon, Jun 9, 2008 at 1:25 PM, Luis R. Rodriguez <[email protected]> wrote:
>>>>> On Mon, Jun 9, 2008 at 2:01 AM, Luis R. Rodriguez <[email protected]> wrote:
>>>>>> On Mon, Jun 9, 2008 at 1:56 AM, Johannes Berg <[email protected]> wrote:
>>>>>>> On Mon, 2008-06-09 at 10:53 +0300, Ron Rindjunsky wrote:
>>>>>>>> >
>>>>>>>> > I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
>>>>>>>> > requirement for 802.11n to older kernels by relying on the old
>>>>>>>> > internal mac80211 hacked up MQ support. I've tested the build on
>>>>>>>> > 2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
>>>>>>>> > particularly iwl4965 using 11n on 2.6.22.
>>>>>>>> >
>>>>>>>>
>>>>>>>> in config.mk you put MAC80211_QOS=m, and i guess that the intention was to put
>>>>>>>> CONFIG_MAC80211_QOS=m
>>>>>>>> if this is the case then the compilation fails
>>>>>>>
>>>>>>> It should be "y"
>>>>>>>
>>>>>>> johannes
>>>>>>>
>>>>>>
>>>>>> Danke
>>>>>
>>>>> OK found some more issues. v4.2 pushed out and new tarball
>>>>> regenerated. This has been tested by Intel on 802.11n on iwl4965.
>>>>
>>>> I couldn't make wme.c compiled for kernels > 22 unless I've added the
>>>> else statement bellow into confg.mk
>>>> You've reported that it worked for you so what did I wrong?
>>>>
>>>> ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
>>>> $(warning "WARNING: You are running a kernel >= 2.6.23, you should
>>>> enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
>>>> else
>>>> CONFIG_MAC80211_QOS=y
>>>
>>> Well this is forcing this option on kernels where it probably was
>>> available. I don't recall where we added this but I was relying on
>>> your .config. We forced this for older kernels as we are providing the
>>> infrastructure within the code but for newer kernels you need MQ
>>> support and NET_SCHED. If we force enable it and if those options are
>>> not enabled it'll fail. This is why we have this big fat warning if MQ
>>> is detected as disabled for >= 2.6.23.
>>>
>>> Let me know what you think.
>>
>> OK I guess we should just enable it if MQ is enabled, point taken.
>> Committed and pushed, thanks.
>
> Actually no, take that back. CONFIG_MAC80211_QOS should probably just
> be enabled if NET_SCHED is present.
>
> Johannes -- why do we have the requirement for NETDEVICES_MULTIQUEUE
> on CONFIG_MAC80211_QOS? My current config doesn't have it it and
> CONFIG_MAC80211_QOS still works right now enabled. Of course the
> driver I'm testing doesn't have 11n though.
>
> Shouldn't we just make MAC80211_QOS depend on NET_SCHED and figure out
> we can't support 11n based on NETDEVICES_MULTIQUEUE?
>
> Luis
>

We need both to be enabled NET_SCHED and MULTIQUEUE for both WME and
HT. Both features requires multiple queues and scheduling.
Tomas;

2008-06-11 13:27:47

by Tomas Winkler

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Wed, Jun 11, 2008 at 3:58 PM, Luis R. Rodriguez <[email protected]> wrote:
> On Wed, Jun 11, 2008 at 02:12:41PM +0200, Johannes Berg wrote:
>>
>> > Johannes -- why do we have the requirement for NETDEVICES_MULTIQUEUE
>> > on CONFIG_MAC80211_QOS? My current config doesn't have it it and
>> > CONFIG_MAC80211_QOS still works right now enabled. Of course the
>> > driver I'm testing doesn't have 11n though.
>>
>> because otherwise skb_get_queu_mapping always returns 0 and you use only
>> one queue.
>>
>> > Shouldn't we just make MAC80211_QOS depend on NET_SCHED and figure out
>> > we can't support 11n based on NETDEVICES_MULTIQUEUE?
>>
>> no, 11e also needs multiple queues.
>
> Thanks, since MAC80211_QOS was there before the issue is some
> kernels may have this enabled but they never got to MQ. This is why
> certain compiles will complain about missing symbols.
>
> So how about we disable it if we determine MQ and NET_SCHED are off?
> Like this:
>
> diff --git a/config.mk b/config.mk
> index e8dc469..b72e37e 100644
> --- a/config.mk
> +++ b/config.mk
> @@ -27,7 +27,16 @@ ifeq ($(shell test $(KERNEL_SUBLEVEL) -lt 23 && echo yes),yes)
> CONFIG_MAC80211_QOS=y
> else
> ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
> -$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
> +ifeq ($(CONFIG_NET_SCHED),)
> +$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE and CONFIG_NET_SCHED for 802.11[ne] support")
> +else
> +# Disable CONFIG_MAC80211_QOS if you had it enabled befofre in your old .config
> +$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11[ne] support")
> +CONFIG_MAC80211_QOS=n
> +endif
> +else
> +# Disable CONFIG_MAC80211_QOS if you had it enabled befofre in your old .config
> +CONFIG_MAC80211_QOS=n
> endif
> endif
> endif
>
One thing it's not clear for me. What do you mean by old .config
CONFIG_MAC80211_QOS flags is available only in wireless-testing?
The makefile is feed by compat.mk and DOTconfig from the target kernel
(KLIB) (in my case 2.6.25)
>From what I see the flags from wireless-testing need to be always
reflected in compat.mk.

Thanks
Tomas

2008-06-11 04:32:40

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Tue, Jun 10, 2008 at 4:57 PM, Tomas Winkler <[email protected]> wrote:
> On Mon, Jun 9, 2008 at 1:25 PM, Luis R. Rodriguez <[email protected]> wrote:
>> On Mon, Jun 9, 2008 at 2:01 AM, Luis R. Rodriguez <[email protected]> wrote:
>>> On Mon, Jun 9, 2008 at 1:56 AM, Johannes Berg <[email protected]> wrote:
>>>> On Mon, 2008-06-09 at 10:53 +0300, Ron Rindjunsky wrote:
>>>>> >
>>>>> > I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
>>>>> > requirement for 802.11n to older kernels by relying on the old
>>>>> > internal mac80211 hacked up MQ support. I've tested the build on
>>>>> > 2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
>>>>> > particularly iwl4965 using 11n on 2.6.22.
>>>>> >
>>>>>
>>>>> in config.mk you put MAC80211_QOS=m, and i guess that the intention was to put
>>>>> CONFIG_MAC80211_QOS=m
>>>>> if this is the case then the compilation fails
>>>>
>>>> It should be "y"
>>>>
>>>> johannes
>>>>
>>>
>>> Danke
>>
>> OK found some more issues. v4.2 pushed out and new tarball
>> regenerated. This has been tested by Intel on 802.11n on iwl4965.
>
> I couldn't make wme.c compiled for kernels > 22 unless I've added the
> else statement bellow into confg.mk
> You've reported that it worked for you so what did I wrong?
>
> ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
> $(warning "WARNING: You are running a kernel >= 2.6.23, you should
> enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
> else
> CONFIG_MAC80211_QOS=y

Well this is forcing this option on kernels where it probably was
available. I don't recall where we added this but I was relying on
your .config. We forced this for older kernels as we are providing the
infrastructure within the code but for newer kernels you need MQ
support and NET_SCHED. If we force enable it and if those options are
not enabled it'll fail. This is why we have this big fat warning if MQ
is detected as disabled for >= 2.6.23.

Let me know what you think.

Luis

2008-06-11 12:12:46

by Johannes Berg

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels


> Johannes -- why do we have the requirement for NETDEVICES_MULTIQUEUE
> on CONFIG_MAC80211_QOS? My current config doesn't have it it and
> CONFIG_MAC80211_QOS still works right now enabled. Of course the
> driver I'm testing doesn't have 11n though.

because otherwise skb_get_queu_mapping always returns 0 and you use only
one queue.

> Shouldn't we just make MAC80211_QOS depend on NET_SCHED and figure out
> we can't support 11n based on NETDEVICES_MULTIQUEUE?

no, 11e also needs multiple queues.

johannes

2008-06-09 09:02:00

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: Backported MQ requirement on 802.11n for older kernels

On Mon, Jun 9, 2008 at 1:56 AM, Johannes Berg <[email protected]> wrote:
> On Mon, 2008-06-09 at 10:53 +0300, Ron Rindjunsky wrote:
>> >
>> > I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
>> > requirement for 802.11n to older kernels by relying on the old
>> > internal mac80211 hacked up MQ support. I've tested the build on
>> > 2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
>> > particularly iwl4965 using 11n on 2.6.22.
>> >
>>
>> in config.mk you put MAC80211_QOS=m, and i guess that the intention was to put
>> CONFIG_MAC80211_QOS=m
>> if this is the case then the compilation fails
>
> It should be "y"
>
> johannes
>

Danke

Luis

2008-06-11 13:46:26

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Wed, Jun 11, 2008 at 6:27 AM, Tomas Winkler <[email protected]> wrote:
> On Wed, Jun 11, 2008 at 3:58 PM, Luis R. Rodriguez <[email protected]> wrote:
>> On Wed, Jun 11, 2008 at 02:12:41PM +0200, Johannes Berg wrote:
>>>
>>> > Johannes -- why do we have the requirement for NETDEVICES_MULTIQUEUE
>>> > on CONFIG_MAC80211_QOS? My current config doesn't have it it and
>>> > CONFIG_MAC80211_QOS still works right now enabled. Of course the
>>> > driver I'm testing doesn't have 11n though.
>>>
>>> because otherwise skb_get_queu_mapping always returns 0 and you use only
>>> one queue.
>>>
>>> > Shouldn't we just make MAC80211_QOS depend on NET_SCHED and figure out
>>> > we can't support 11n based on NETDEVICES_MULTIQUEUE?
>>>
>>> no, 11e also needs multiple queues.
>>
>> Thanks, since MAC80211_QOS was there before the issue is some
>> kernels may have this enabled but they never got to MQ. This is why
>> certain compiles will complain about missing symbols.
>>
>> So how about we disable it if we determine MQ and NET_SCHED are off?
>> Like this:
>>
>> diff --git a/config.mk b/config.mk
>> index e8dc469..b72e37e 100644
>> --- a/config.mk
>> +++ b/config.mk
>> @@ -27,7 +27,16 @@ ifeq ($(shell test $(KERNEL_SUBLEVEL) -lt 23 && echo yes),yes)
>> CONFIG_MAC80211_QOS=y
>> else
>> ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
>> -$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
>> +ifeq ($(CONFIG_NET_SCHED),)
>> +$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE and CONFIG_NET_SCHED for 802.11[ne] support")
>> +else
>> +# Disable CONFIG_MAC80211_QOS if you had it enabled befofre in your old .config
>> +$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11[ne] support")
>> +CONFIG_MAC80211_QOS=n
>> +endif
>> +else
>> +# Disable CONFIG_MAC80211_QOS if you had it enabled befofre in your old .config
>> +CONFIG_MAC80211_QOS=n
>> endif
>> endif
>> endif
>>
> One thing it's not clear for me. What do you mean by old .config
> CONFIG_MAC80211_QOS flags is available only in wireless-testing?
> The makefile is feed by compat.mk and DOTconfig from the target kernel
> (KLIB) (in my case 2.6.25)
> From what I see the flags from wireless-testing need to be always
> reflected in compat.mk.

Bleh, you're right, it should be in only as of 2.6.27... something
else is causing some unresolved symbols if CONFIG_MAC80211_QOS is left
disabled on 2.6.24.

Luis

2008-06-09 08:59:43

by Johannes Berg

[permalink] [raw]
Subject: Re: Backported MQ requirement on 802.11n for older kernels

On Mon, 2008-06-09 at 10:53 +0300, Ron Rindjunsky wrote:
> >
> > I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
> > requirement for 802.11n to older kernels by relying on the old
> > internal mac80211 hacked up MQ support. I've tested the build on
> > 2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
> > particularly iwl4965 using 11n on 2.6.22.
> >
>
> in config.mk you put MAC80211_QOS=m, and i guess that the intention was to put
> CONFIG_MAC80211_QOS=m
> if this is the case then the compilation fails

It should be "y"

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part

2008-06-11 12:56:17

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Wed, Jun 11, 2008 at 02:55:38PM +0300, Tomas Winkler wrote:
> We need both to be enabled NET_SCHED and MULTIQUEUE for both WME and
> HT. Both features requires multiple queues and scheduling.
> Tomas;

Ah, I missed WME. OK, so its a compatibility issue then it seems.
Patch is next.

Luis

2008-06-11 04:36:56

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Tue, Jun 10, 2008 at 9:32 PM, Luis R. Rodriguez <[email protected]> wrote:
> On Tue, Jun 10, 2008 at 4:57 PM, Tomas Winkler <[email protected]> wrote:
>> On Mon, Jun 9, 2008 at 1:25 PM, Luis R. Rodriguez <[email protected]> wrote:
>>> On Mon, Jun 9, 2008 at 2:01 AM, Luis R. Rodriguez <[email protected]> wrote:
>>>> On Mon, Jun 9, 2008 at 1:56 AM, Johannes Berg <[email protected]> wrote:
>>>>> On Mon, 2008-06-09 at 10:53 +0300, Ron Rindjunsky wrote:
>>>>>> >
>>>>>> > I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
>>>>>> > requirement for 802.11n to older kernels by relying on the old
>>>>>> > internal mac80211 hacked up MQ support. I've tested the build on
>>>>>> > 2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
>>>>>> > particularly iwl4965 using 11n on 2.6.22.
>>>>>> >
>>>>>>
>>>>>> in config.mk you put MAC80211_QOS=m, and i guess that the intention was to put
>>>>>> CONFIG_MAC80211_QOS=m
>>>>>> if this is the case then the compilation fails
>>>>>
>>>>> It should be "y"
>>>>>
>>>>> johannes
>>>>>
>>>>
>>>> Danke
>>>
>>> OK found some more issues. v4.2 pushed out and new tarball
>>> regenerated. This has been tested by Intel on 802.11n on iwl4965.
>>
>> I couldn't make wme.c compiled for kernels > 22 unless I've added the
>> else statement bellow into confg.mk
>> You've reported that it worked for you so what did I wrong?
>>
>> ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
>> $(warning "WARNING: You are running a kernel >= 2.6.23, you should
>> enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
>> else
>> CONFIG_MAC80211_QOS=y
>
> Well this is forcing this option on kernels where it probably was
> available. I don't recall where we added this but I was relying on
> your .config. We forced this for older kernels as we are providing the
> infrastructure within the code but for newer kernels you need MQ
> support and NET_SCHED. If we force enable it and if those options are
> not enabled it'll fail. This is why we have this big fat warning if MQ
> is detected as disabled for >= 2.6.23.
>
> Let me know what you think.

OK I guess we should just enable it if MQ is enabled, point taken.
Committed and pushed, thanks.

Luis

2008-06-11 14:49:17

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Wed, Jun 11, 2008 at 6:46 AM, Luis R. Rodriguez <[email protected]> wrote:
> On Wed, Jun 11, 2008 at 6:27 AM, Tomas Winkler <[email protected]> wrote:
>> On Wed, Jun 11, 2008 at 3:58 PM, Luis R. Rodriguez <[email protected]> wrote:
>>> On Wed, Jun 11, 2008 at 02:12:41PM +0200, Johannes Berg wrote:
>>>>
>>>> > Johannes -- why do we have the requirement for NETDEVICES_MULTIQUEUE
>>>> > on CONFIG_MAC80211_QOS? My current config doesn't have it it and
>>>> > CONFIG_MAC80211_QOS still works right now enabled. Of course the
>>>> > driver I'm testing doesn't have 11n though.
>>>>
>>>> because otherwise skb_get_queu_mapping always returns 0 and you use only
>>>> one queue.
>>>>
>>>> > Shouldn't we just make MAC80211_QOS depend on NET_SCHED and figure out
>>>> > we can't support 11n based on NETDEVICES_MULTIQUEUE?
>>>>
>>>> no, 11e also needs multiple queues.
>>>
>>> Thanks, since MAC80211_QOS was there before the issue is some
>>> kernels may have this enabled but they never got to MQ. This is why
>>> certain compiles will complain about missing symbols.
>>>
>>> So how about we disable it if we determine MQ and NET_SCHED are off?
>>> Like this:
>>>
>>> diff --git a/config.mk b/config.mk
>>> index e8dc469..b72e37e 100644
>>> --- a/config.mk
>>> +++ b/config.mk
>>> @@ -27,7 +27,16 @@ ifeq ($(shell test $(KERNEL_SUBLEVEL) -lt 23 && echo yes),yes)
>>> CONFIG_MAC80211_QOS=y
>>> else
>>> ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
>>> -$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
>>> +ifeq ($(CONFIG_NET_SCHED),)
>>> +$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE and CONFIG_NET_SCHED for 802.11[ne] support")
>>> +else
>>> +# Disable CONFIG_MAC80211_QOS if you had it enabled befofre in your old .config
>>> +$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11[ne] support")
>>> +CONFIG_MAC80211_QOS=n
>>> +endif
>>> +else
>>> +# Disable CONFIG_MAC80211_QOS if you had it enabled befofre in your old .config
>>> +CONFIG_MAC80211_QOS=n
>>> endif
>>> endif
>>> endif
>>>
>> One thing it's not clear for me. What do you mean by old .config
>> CONFIG_MAC80211_QOS flags is available only in wireless-testing?
>> The makefile is feed by compat.mk and DOTconfig from the target kernel
>> (KLIB) (in my case 2.6.25)
>> From what I see the flags from wireless-testing need to be always
>> reflected in compat.mk.
>
> Bleh, you're right, it should be in only as of 2.6.27... something
> else is causing some unresolved symbols if CONFIG_MAC80211_QOS is left
> disabled on 2.6.24.

OK the issue is very likely that the compat_autoconf.h is leaving
CONFIG_MAC80211_QOS enabled as the script used to generate it detects
all ^CONFIG_FOO options. I'm working on this, should have a patch soon
for you to review.

Luis

2008-06-11 11:03:11

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Tue, Jun 10, 2008 at 9:36 PM, Luis R. Rodriguez <[email protected]> wrote:
> On Tue, Jun 10, 2008 at 9:32 PM, Luis R. Rodriguez <[email protected]> wrote:
>> On Tue, Jun 10, 2008 at 4:57 PM, Tomas Winkler <[email protected]> wrote:
>>> On Mon, Jun 9, 2008 at 1:25 PM, Luis R. Rodriguez <[email protected]> wrote:
>>>> On Mon, Jun 9, 2008 at 2:01 AM, Luis R. Rodriguez <[email protected]> wrote:
>>>>> On Mon, Jun 9, 2008 at 1:56 AM, Johannes Berg <[email protected]> wrote:
>>>>>> On Mon, 2008-06-09 at 10:53 +0300, Ron Rindjunsky wrote:
>>>>>>> >
>>>>>>> > I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
>>>>>>> > requirement for 802.11n to older kernels by relying on the old
>>>>>>> > internal mac80211 hacked up MQ support. I've tested the build on
>>>>>>> > 2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
>>>>>>> > particularly iwl4965 using 11n on 2.6.22.
>>>>>>> >
>>>>>>>
>>>>>>> in config.mk you put MAC80211_QOS=m, and i guess that the intention was to put
>>>>>>> CONFIG_MAC80211_QOS=m
>>>>>>> if this is the case then the compilation fails
>>>>>>
>>>>>> It should be "y"
>>>>>>
>>>>>> johannes
>>>>>>
>>>>>
>>>>> Danke
>>>>
>>>> OK found some more issues. v4.2 pushed out and new tarball
>>>> regenerated. This has been tested by Intel on 802.11n on iwl4965.
>>>
>>> I couldn't make wme.c compiled for kernels > 22 unless I've added the
>>> else statement bellow into confg.mk
>>> You've reported that it worked for you so what did I wrong?
>>>
>>> ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
>>> $(warning "WARNING: You are running a kernel >= 2.6.23, you should
>>> enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
>>> else
>>> CONFIG_MAC80211_QOS=y
>>
>> Well this is forcing this option on kernels where it probably was
>> available. I don't recall where we added this but I was relying on
>> your .config. We forced this for older kernels as we are providing the
>> infrastructure within the code but for newer kernels you need MQ
>> support and NET_SCHED. If we force enable it and if those options are
>> not enabled it'll fail. This is why we have this big fat warning if MQ
>> is detected as disabled for >= 2.6.23.
>>
>> Let me know what you think.
>
> OK I guess we should just enable it if MQ is enabled, point taken.
> Committed and pushed, thanks.

Actually no, take that back. CONFIG_MAC80211_QOS should probably just
be enabled if NET_SCHED is present.

Johannes -- why do we have the requirement for NETDEVICES_MULTIQUEUE
on CONFIG_MAC80211_QOS? My current config doesn't have it it and
CONFIG_MAC80211_QOS still works right now enabled. Of course the
driver I'm testing doesn't have 11n though.

Shouldn't we just make MAC80211_QOS depend on NET_SCHED and figure out
we can't support 11n based on NETDEVICES_MULTIQUEUE?

Luis

2008-06-11 20:50:05

by Gábor Stefanik

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Wed, Jun 11, 2008 at 3:27 PM, Tomas Winkler <[email protected]> wrote:
> The makefile is feed by compat.mk and DOTconfig from the target kernel
> (KLIB) (in my case 2.6.25)
> From what I see the flags from wireless-testing need to be always
> reflected in compat.mk.

Did you mean config.mk? Compat.mk doesn't exist.

--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

2008-06-09 07:53:17

by Ron Rindjunsky

[permalink] [raw]
Subject: Re: Backported MQ requirement on 802.11n for older kernels

>
> I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
> requirement for 802.11n to older kernels by relying on the old
> internal mac80211 hacked up MQ support. I've tested the build on
> 2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
> particularly iwl4965 using 11n on 2.6.22.
>

in config.mk you put MAC80211_QOS=m, and i guess that the intention was to put
CONFIG_MAC80211_QOS=m
if this is the case then the compilation fails

Ron

2008-06-11 20:59:57

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

T24gV2VkLCBKdW4gMTEsIDIwMDggYXQgMTo1MCBQTSwgU3RlZmFuaWsgR8OhYm9yIDxuZXRyb2xs
bGVyLjNkQGdtYWlsLmNvbT4gd3JvdGU6Cj4gT24gV2VkLCBKdW4gMTEsIDIwMDggYXQgMzoyNyBQ
TSwgVG9tYXMgV2lua2xlciA8dG9tYXN3QGdtYWlsLmNvbT4gd3JvdGU6Cj4+IFRoZSBtYWtlZmls
ZSBpcyBmZWVkIGJ5IGNvbXBhdC5tayBhbmQgRE9UY29uZmlnIGZyb20gdGhlIHRhcmdldCBrZXJu
ZWwKPj4gKEtMSUIpIChpbiBteSBjYXNlIDIuNi4yNSkKPj4gRnJvbSB3aGF0IEkgc2VlIHRoZSBm
bGFncyBmcm9tIHdpcmVsZXNzLXRlc3RpbmcgIG5lZWQgdG8gYmUgYWx3YXlzCj4+IHJlZmxlY3Rl
ZCBpbiBjb21wYXQubWsuCj4KPiBEaWQgeW91IG1lYW4gY29uZmlnLm1rPyBDb21wYXQubWsgZG9l
c24ndCBleGlzdC4KClllYQo=

2008-06-10 23:57:05

by Tomas Winkler

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Mon, Jun 9, 2008 at 1:25 PM, Luis R. Rodriguez <[email protected]> wrote:
> On Mon, Jun 9, 2008 at 2:01 AM, Luis R. Rodriguez <[email protected]> wrote:
>> On Mon, Jun 9, 2008 at 1:56 AM, Johannes Berg <[email protected]> wrote:
>>> On Mon, 2008-06-09 at 10:53 +0300, Ron Rindjunsky wrote:
>>>> >
>>>> > I just finished trying to backport CONFIG_NETDEVICES_MULTIQUEUE
>>>> > requirement for 802.11n to older kernels by relying on the old
>>>> > internal mac80211 hacked up MQ support. I've tested the build on
>>>> > 2.6.22, 2.6.23, and 2.6.24. Let me know if you get to test this,
>>>> > particularly iwl4965 using 11n on 2.6.22.
>>>> >
>>>>
>>>> in config.mk you put MAC80211_QOS=m, and i guess that the intention was to put
>>>> CONFIG_MAC80211_QOS=m
>>>> if this is the case then the compilation fails
>>>
>>> It should be "y"
>>>
>>> johannes
>>>
>>
>> Danke
>
> OK found some more issues. v4.2 pushed out and new tarball
> regenerated. This has been tested by Intel on 802.11n on iwl4965.

I couldn't make wme.c compiled for kernels > 22 unless I've added the
else statement bellow into confg.mk
You've reported that it worked for you so what did I wrong?

ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
$(warning "WARNING: You are running a kernel >= 2.6.23, you should
enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
else
CONFIG_MAC80211_QOS=y
endif

Thanks
Tomas

2008-06-11 20:02:37

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [compat-masters] Backported MQ requirement on 802.11n for older kernels

On Wed, Jun 11, 2008 at 07:49:15AM -0700, Luis R. Rodriguez wrote:
>
> OK the issue is very likely that the compat_autoconf.h is leaving
> CONFIG_MAC80211_QOS enabled as the script used to generate it detects
> all ^CONFIG_FOO options. I'm working on this, should have a patch soon
> for you to review.

Issue fixed and pushed out. compat-wireless is on 4.5 now.

CONFIG_MAC80211_QOS is required for 802.11e (WME) and 802.11n (HT).
Also CONFIG_MAC80211_QOS won't be in kernels until 2.6.27, but
it does have its requirements. It requires *both* CONFIG_NETDEVICES_MULTIQUEUE
and CONFIG_NET_SCHED. Lets deal with these requirements and also
handle them specially in the compat_autoconf.h

This should fix some issues with unresolved symbols when CONFIG_MAC80211_QOS
is disabled. The problem was compat_autoconf wasn't disabling it.

Signed-off-by: Luis R. Rodriguez <[email protected]>
---
Makefile | 2 +-
config.mk | 33 ++++++++++++++++++++++------
scripts/gen-compat-autoconf.sh | 46 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 74 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index e905402..c14e45d 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ KMODPATH_ARG:= "INSTALL_MOD_PATH=$(KLIB)"
else
KLIB:= /lib/modules/$(shell uname -r)
endif
-KLIB_BUILD ?= $(KLIB)/build
+export KLIB_BUILD ?= $(KLIB)/build
# Sometimes not available in the path
MODPROBE := /sbin/modprobe
MADWIFI=$(shell $(MODPROBE) -l ath_pci)
diff --git a/config.mk b/config.mk
index 66a1244..905313d 100644
--- a/config.mk
+++ b/config.mk
@@ -17,23 +17,42 @@ endif
CONFIG_MAC80211=y

# Enable QOS for 2.6.22, we'll do some hacks here to enable it.
-# You will need this for HT support (802.11n).
+# You will need this for HT support (802.11n) and WME (802.11e).
# If you are >= 2.6.23 we'll only warn when you don't have MQ support
-# enabled, but maybe we should just exit, as I suspect everyone using
-# this package may want it enabled... hmm
+# or NET_SCHED enabled.
+#
+# We could consider just quiting if MQ and NET_SCHED is disabled
+# as I suspect all users of this package want 802.11e (WME) and
+# 802.11n (HT) support.
ifeq ($(shell test -e $(KLIB_BUILD)/Makefile && echo yes),yes)
KERNEL_SUBLEVEL = $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
ifeq ($(shell test $(KERNEL_SUBLEVEL) -lt 23 && echo yes),yes)
CONFIG_MAC80211_QOS=y
else
-ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),)
-$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable CONFIG_NETDEVICES_MULTIQUEUE for 802.11n support")
-else
-CONFIG_MAC80211_QOS=y
+
+# we're in a kernel >= 2.6.23
+
+ifneq ($(KERNELRELEASE),) # This prevents a warning
+
+ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),) # checks MQ first
+ QOS_REQS_MISSING+=CONFIG_NETDEVICES_MULTIQUEUE
endif
+
+ifeq ($(CONFIG_NET_SCHED),)
+ QOS_REQS_MISSING+=CONFIG_NET_SCHED
endif
+
+ifeq ($(QOS_REQS_MISSING),) # if our dependencies match for MAC80211_QOS
+CONFIG_MAC80211_QOS=y
+else # Complain about our missing dependencies
+$(warning "WARNING: You are running a kernel >= 2.6.23, you should enable in it $(QOS_REQS_MISSING) for 802.11[ne] support")
endif

+endif # In build module mode
+
+endif # kernel release check
+endif # kernel Makefile check
+
CONFIG_MAC80211_RC_DEFAULT=pid
CONFIG_MAC80211_RC_PID=y

diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
index 173431f..57065a8 100755
--- a/scripts/gen-compat-autoconf.sh
+++ b/scripts/gen-compat-autoconf.sh
@@ -14,6 +14,7 @@
OLDEST_KERNEL_SUPPORTED="2.6.21"
COMPAT_RELEASE="compat-release"
KERNEL_RELEASE="git-describe"
+MULT_DEP_FILE=".compat_pivot_dep"

if [ $# -ne 1 ]; then
echo "Usage $0 config-file"
@@ -93,6 +94,28 @@ function define_config_dep {
echo "#endif /* $WARN_VAR */"
}

+# This handles options which have *multiple* dependencies from the kernel
+function define_config_multiple_deps {
+ VAR=$1
+ VALUE=$2
+ DEP_ARRAY=$3
+
+ # First, put all ifdefs
+ for i in $(cat $MULT_DEP_FILE); do
+ echo "#ifdef $i"
+ done
+
+ # Now put our option in the middle
+ define_config $VAR $VALUE
+
+ # Now close all ifdefs
+ # First, put all ifdefs
+ for i in $(cat $MULT_DEP_FILE); do
+ echo "#endif"
+ done
+
+}
+
function kernel_version_req {
VERSION=$(echo $1 | sed -e 's/\./,/g')
echo "#if (LINUX_VERSION_CODE < KERNEL_VERSION($VERSION))"
@@ -140,9 +163,32 @@ for i in $(grep '^CONFIG_' $COMPAT_CONFIG); do
CONFIG_USB_NET_RNDIS_HOST)
define_config_dep $VAR $VALUE CONFIG_USB_NET_CDCETHER
continue
+ ;;
+ # ignore this, we have a special hanlder for this at the botttom
+ # instead. We still need to keep this in config.mk to let Makefiles
+ # know its enabled so just ignore it here.
+ CONFIG_MAC80211_QOS)
+ continue
+ ;;
esac
# Any other module which can *definitely* be built as a module goes here
define_config $VAR $VALUE
done

+# Deal with special cases. CONFIG_MAC80211_QOS is such a case.
+# We handle this specially for different kernels we support.
+if [ -f $KLIB_BUILD/Makefile ]; then
+ SUBLEVEL=$(make -C $KLIB_BUILD kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
+ if [ $SUBLEVEL -le 22 ]; then
+ define_config CONFIG_MAC80211_QOS y
+ else # kernel >= 2.6.23
+ # CONFIG_MAC80211_QOS on these kernels requires
+ # CONFIG_NET_SCHED and CONFIG_NETDEVICES_MULTIQUEUE
+ rm -f $MULT_DEP_FILE
+ echo CONFIG_NET_SCHED >> $MULT_DEP_FILE
+ echo CONFIG_NETDEVICES_MULTIQUEUE >> $MULT_DEP_FILE
+ define_config_multiple_deps CONFIG_MAC80211_QOS y $ALL_DEPS
+ rm -f $MULT_DEP_FILE
+ fi
+fi
echo "#endif /* COMPAT_AUTOCONF_INCLUDED */"
--
1.5.4.3