2013-06-22 04:56:28

by Oleksij Rempel

[permalink] [raw]
Subject: regression after, " ath9k_htc: Add support for mesh interfaces"

Hi Javier,

i warning after patch "ath9k_htc: Add support for mesh interfaces".
I get this warning only on pc with CONFIG_MAC80211_MESH not set.
Probably you missed config check some where.

commit 594e65b633e0b76db1d8e7359e4efb2d60fba20d
Author: Javier Cardona <[email protected]>
Date: Wed May 8 10:16:46 2013 -0700

ath9k_htc: Add support for mesh interfaces

More specifically, enable AP-style beaconing on mesh
ifaces and change the hw capabilities to reflect mesh
support.

Coexistence with a virtual STA interface was tested as
working fine.

Signed-off-by: Javier Cardona <[email protected]>
[rebase, add iface combinations]
Signed-off-by: Thomas Pedersen <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
--
Regards,
Oleksij


2013-06-26 18:59:46

by Thomas Pedersen

[permalink] [raw]
Subject: Re: regression after, " ath9k_htc: Add support for mesh interfaces"

On Wed, Jun 26, 2013 at 12:31 AM, Johannes Berg
<[email protected]> wrote:
> On Tue, 2013-06-25 at 13:05 -0700, Thomas Pedersen wrote:
>
>> That warning is triggered by wiphy_verify_combinations():
>>
>> if (WARN_ON((wiphy->interface_modes & types) != types))
>> return -EINVAL;
>>
>> But before that, the mesh iftype bit is cleared in ieee80211_register_hw():
>>
>> #ifndef CONFIG_MAC80211_MESH
>> /* mesh depends on Kconfig, but drivers should set it if they want */
>> local->hw.wiphy->interface_modes &= ~BIT(NL80211_IFTYPE_MESH_POINT);
>> #endif
>>
>> It seems the intention was to avoid an #ifdef CONFIG_MAC80211_MESH in
>> every driver, but then mac80211 also has to clear the MESH_POINT bit
>> for each ieee80211_iface_limit? I don't really see a cleaner way of
>> resolving this.
>
> The problem is that the data structures there are const, so we can't
> modify them. I think the other drivers just have an #ifdef on
> MAC80211_MESH or so in there.

Indeed, ath5k and rt2x00 at least already do this.

Thanks,

--
Thomas

2013-06-25 20:06:10

by Thomas Pedersen

[permalink] [raw]
Subject: Re: regression after, " ath9k_htc: Add support for mesh interfaces"

On Mon, Jun 24, 2013 at 11:14 PM, Oleksij Rempel <[email protected]> wrote:
> Am 25.06.2013 02:54, schrieb Thomas Pedersen:
>
>> On Fri, Jun 21, 2013 at 9:56 PM, Oleksij Rempel <[email protected]>
>> wrote:
>>>
>>> Hi Javier,
>>>
>>> i warning after patch "ath9k_htc: Add support for mesh interfaces".
>>> I get this warning only on pc with CONFIG_MAC80211_MESH not set. Probably
>>> you missed config check some where.
>>
>>
>> Where do you hit the warning?
>>
>
> on adapter init.
> see attachment.

That warning is triggered by wiphy_verify_combinations():

if (WARN_ON((wiphy->interface_modes & types) != types))
return -EINVAL;

But before that, the mesh iftype bit is cleared in ieee80211_register_hw():

#ifndef CONFIG_MAC80211_MESH
/* mesh depends on Kconfig, but drivers should set it if they want */
local->hw.wiphy->interface_modes &= ~BIT(NL80211_IFTYPE_MESH_POINT);
#endif

It seems the intention was to avoid an #ifdef CONFIG_MAC80211_MESH in
every driver, but then mac80211 also has to clear the MESH_POINT bit
for each ieee80211_iface_limit? I don't really see a cleaner way of
resolving this.

Johannes?

--
Thomas

2013-06-26 07:31:31

by Johannes Berg

[permalink] [raw]
Subject: Re: regression after, " ath9k_htc: Add support for mesh interfaces"

On Tue, 2013-06-25 at 13:05 -0700, Thomas Pedersen wrote:

> That warning is triggered by wiphy_verify_combinations():
>
> if (WARN_ON((wiphy->interface_modes & types) != types))
> return -EINVAL;
>
> But before that, the mesh iftype bit is cleared in ieee80211_register_hw():
>
> #ifndef CONFIG_MAC80211_MESH
> /* mesh depends on Kconfig, but drivers should set it if they want */
> local->hw.wiphy->interface_modes &= ~BIT(NL80211_IFTYPE_MESH_POINT);
> #endif
>
> It seems the intention was to avoid an #ifdef CONFIG_MAC80211_MESH in
> every driver, but then mac80211 also has to clear the MESH_POINT bit
> for each ieee80211_iface_limit? I don't really see a cleaner way of
> resolving this.

The problem is that the data structures there are const, so we can't
modify them. I think the other drivers just have an #ifdef on
MAC80211_MESH or so in there.

johannes


2013-06-26 19:16:25

by Oleksij Rempel

[permalink] [raw]
Subject: Re: regression after, " ath9k_htc: Add support for mesh interfaces"

Am 26.06.2013 20:52, schrieb Thomas Pedersen:
> On Wed, Jun 26, 2013 at 12:31 AM, Johannes Berg
> <[email protected]> wrote:
>> On Tue, 2013-06-25 at 13:05 -0700, Thomas Pedersen wrote:
>>
>>> That warning is triggered by wiphy_verify_combinations():
>>>
>>> if (WARN_ON((wiphy->interface_modes & types) != types))
>>> return -EINVAL;
>>>
>>> But before that, the mesh iftype bit is cleared in ieee80211_register_hw():
>>>
>>> #ifndef CONFIG_MAC80211_MESH
>>> /* mesh depends on Kconfig, but drivers should set it if they want */
>>> local->hw.wiphy->interface_modes &= ~BIT(NL80211_IFTYPE_MESH_POINT);
>>> #endif
>>>
>>> It seems the intention was to avoid an #ifdef CONFIG_MAC80211_MESH in
>>> every driver, but then mac80211 also has to clear the MESH_POINT bit
>>> for each ieee80211_iface_limit? I don't really see a cleaner way of
>>> resolving this.
>>
>> The problem is that the data structures there are const, so we can't
>> modify them. I think the other drivers just have an #ifdef on
>> MAC80211_MESH or so in there.
>
> Indeed, ath5k and rt2x00 at least already do this.
>
> Thanks,

I just discovered one more issue with mesh on ath9k* devices.
if i try to do "ifconfig mesh0 down" this task will freeze and after
some time kernel will oops.

Steps to reproduce:
iw dev wlan2 interface add mesh0 type mp mesh_id mesh
iwconfig mesh0 channel 1
ifconfig mesh0 10.0.0.1 netmask 255.255.255.0 up
sleep 30
ifconfig mesh0 down

--
Regards,
Oleksij

2013-06-26 21:45:56

by Thomas Pedersen

[permalink] [raw]
Subject: Re: regression after, " ath9k_htc: Add support for mesh interfaces"

On Wed, Jun 26, 2013 at 12:16 PM, Oleksij Rempel <[email protected]> wrote:
> Am 26.06.2013 20:52, schrieb Thomas Pedersen:
> I just discovered one more issue with mesh on ath9k* devices.
> if i try to do "ifconfig mesh0 down" this task will freeze and after some
> time kernel will oops.
>
> Steps to reproduce:
> iw dev wlan2 interface add mesh0 type mp mesh_id mesh
> iwconfig mesh0 channel 1
> ifconfig mesh0 10.0.0.1 netmask 255.255.255.0 up
> sleep 30
> ifconfig mesh0 down

are you running wireless-testing master HEAD? There is a fix for that
deadlock in mac80211-next ("mac80211: update mesh beacon on
workqueue") still waiting to get into wireless-testing.

--
Thomas

2013-06-25 00:55:17

by Thomas Pedersen

[permalink] [raw]
Subject: Re: regression after, " ath9k_htc: Add support for mesh interfaces"

On Fri, Jun 21, 2013 at 9:56 PM, Oleksij Rempel <[email protected]> wrote:
> Hi Javier,
>
> i warning after patch "ath9k_htc: Add support for mesh interfaces".
> I get this warning only on pc with CONFIG_MAC80211_MESH not set. Probably
> you missed config check some where.

Where do you hit the warning?

--
Thomas

2013-06-25 06:14:19

by Oleksij Rempel

[permalink] [raw]
Subject: Re: regression after, " ath9k_htc: Add support for mesh interfaces"

Am 25.06.2013 02:54, schrieb Thomas Pedersen:
> On Fri, Jun 21, 2013 at 9:56 PM, Oleksij Rempel <[email protected]> wrote:
>> Hi Javier,
>>
>> i warning after patch "ath9k_htc: Add support for mesh interfaces".
>> I get this warning only on pc with CONFIG_MAC80211_MESH not set. Probably
>> you missed config check some where.
>
> Where do you hit the warning?
>

on adapter init.
see attachment.
--
Regards,
Oleksij


Attachments:
log (3.40 kB)