Return-path: Received: from mout.gmx.net ([212.227.15.19]:58303 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751902Ab3FZTQZ (ORCPT ); Wed, 26 Jun 2013 15:16:25 -0400 Received: from mailout-de.gmx.net ([10.1.76.4]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0Lse5X-1U7cBa2AeX-012HSg for ; Wed, 26 Jun 2013 21:16:23 +0200 Message-ID: <51CB3E04.3000402@rempel-privat.de> (sfid-20130626_211628_212259_707C083B) Date: Wed, 26 Jun 2013 21:16:20 +0200 From: Oleksij Rempel MIME-Version: 1.0 To: Thomas Pedersen CC: Johannes Berg , "ath9k-devel@lists.ath9k.org" , "linux-wireless@vger.kernel.org" , Javier Cardona Subject: Re: regression after, " ath9k_htc: Add support for mesh interfaces" References: <51C52E79.30104@rempel-privat.de> <51C93538.4050304@rempel-privat.de> <1372231882.8157.0.camel@jlt4.sipsolutions.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: Am 26.06.2013 20:52, schrieb Thomas Pedersen: > On Wed, Jun 26, 2013 at 12:31 AM, Johannes Berg > 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