Return-path: Received: from senator.holtmann.net ([87.106.208.187]:33896 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbYJTQm2 (ORCPT ); Mon, 20 Oct 2008 12:42:28 -0400 Subject: Re: New Regulatory Domain Api. From: Marcel Holtmann To: Zhu Yi Cc: "Luis R. Rodriguez" , Johannes Berg , Luis Rodriguez , Tomas Winkler , "John W. Linville" , "Kolekar, Abhijeet" , "linux-wireless@vger.kernel.org" In-Reply-To: <1224487340.24677.192.camel@debian.sh.intel.com> References: <20081015112517.GF6509@tesla> <1224126030.24677.78.camel@debian.sh.intel.com> <20081016113848.GB5899@tesla> <1224471102.24677.124.camel@debian.sh.intel.com> <43e72e890810192040w567fa4f6j1bf40e80084a857e@mail.gmail.com> <1224479933.24677.148.camel@debian.sh.intel.com> <43e72e890810192333r7b3f6a0m56d499d0aed9240e@mail.gmail.com> <1224484685.18024.5.camel@johannes.berg> <43e72e890810192346q5e0eadbcm26febe45392a2172@mail.gmail.com> <1224485431.18024.12.camel@johannes.berg> <43e72e890810192359g2bc75316v49377ddc9eded934@mail.gmail.com> <1224487340.24677.192.camel@debian.sh.intel.com> Content-Type: text/plain Date: Mon, 20 Oct 2008 18:43:19 +0200 Message-Id: <1224520999.9386.72.camel@californication> (sfid-20081020_184233_864448_25CE57D2) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi Yi, > > > Ack on both points, which is why I said "If we're going to [...]". I > > > don't think I've seen a convincing use case for this other than test > > > environments, in which you can very well just use crda. > > > > Ah, ok :) > > OK, my point is here: > http://marc.info/?l=linux-wireless&m=122403515521098&w=2 > > Maybe Marcel has more to say when he wakes up... I do wanna keep it as simple as possible, but on the other hand we should do a pretty decent job with picking a regulatory domain when no userspace is present (old or CRDA missing). So my current thinking is that the regulatory hint for a card is limited to the frequencies the card actually registers with mac80211. If the internal card is 2.4 GHz, then we limit the hint to this. So the 5 GHz band is still a virgin. If a 5 GHz card comes along and it is the first in its band, then we take its regulatory hint for that band, but for the 2.4 GHz band it has to follow the first cards hint. As I mentioned before, first card wins is a perfect solution from my point of view, but we should not punish a second card in a different band if the first card is not touching this band at all. And I can see these user scenarios happening and in some cases they might be done on purpose to serve every band with a different piece of hardware. And for the cases where new bands might be used in the future. In that case we do have to do this right since userspace might be outdated. Lets face it, we should always support a new kernel with an old userspace. That is how the Linux kernel is suppose to work. That is probably the only reason why wireless extensions are still around ;) The idea of having a 2.4 GHz only card provide a hint for 5 GHz is just plain wrong. If the hardware is designed for 2.4 GHz it should not mess with other frequencies. So my solution would be first regulatory hint in each band wins. Also we should have printk that shows up in dmesg in cases where neither crda or iw modified the regulatory domain and we have clash with the hints provided by two or more cards. Regards Marcel