From: Marcel Holtmann <marcel@holtmann.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Zhu Yi <yi.zhu@intel.com>, John Linville <linville@tuxdriver.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
"Luis R. Rodriguez" <mcgrof@gmail.com>
Subject: Re: [PATCH] wireless: add regulatory_struct_hint
Date: Fri, 24 Oct 2008 20:18:48 +0200 [thread overview]
Message-ID: <1224872328.7536.67.camel@californication> (raw)
In-Reply-To: <1224841176.6002.124.camel@johannes.berg>
Hi Johannes,
> However, there is another major problem with this, if I use a USB device
> that has no regulatory information on a laptop that has this virtual
> regdomain configured because of a built-in Intel device, my USB device
> will wrongly enable all channels.
>
> But inspired by your patch, here's a different idea:
>
> * remove the struct regdomain hint thing
> * introduce a "hardware has regulatory check" flag, which means that
> - hardware will enforce regulatory compliance to whatever it thinks
> the regulatory domain is
> - the driver will, of course, still also enforce the information in
> wiphy->bands as it does now
> * if a wiphy has the "hw regulatory" flag set and the
> cfg80211_regdomain is the world regdomain (whether hard-coded or
> gotten from CRDA), then (and only then!) don't apply the
> cfg80211_regdomain to it
we really only care about the case where we have no userspace capable of
setting the regulatory domain. So in only that case it makes sense to
fallback to the hardware regulatory support. So I would not make this
depend on world domain since that might not work good enough in the 5
GHz case. Can the mac80211 just track if userspace has set a regulatory
domain and then enforce it. Otherwise leave it to the hardware that
supports it or enforce the world domain to hardware that has no
regulatory support in hardware.
Can we also have a command that clears/resets the regulatory domain
setting so we get back to the initial state without rebooting. Would be
also good to have for testing.
> This would have the following consequences:
> + much less code since all the hint stuff goes away
> + still works for users who move around with a hw-regulatory based
> laptop if they set the regdomain to something other than world
> manually
> - secondary hardware cannot benefit of the, now no longer given, hint
> which regdomain the laptop is in and will be restricted to world
> - some degree of confusion possible when one device can use channel 13
> (say iwl-agn hardware configured for Europe) and another cannot (say
> a USB device without regulatory information, leading to the world
> regdomain being the used one)
This discussion started with having two adapters and disabling 5 GHz for
the second if the first one is BG only. This solution would make this
work when the second card sets the hardware regulatory flag. So it looks
good to me.
I don't see a big problem with restricting channels. Disabling a whole
band is an issue. However we could add printk's to tell the user when we
apply different regulatory domains to different devices, because one has
the hardware flag set.
Other than that, I think this idea makes a lot of sense. Having a much
more simpler logic is a good thing.
Regards
Marcel
next prev parent reply other threads:[~2008-10-24 18:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 10:31 [PATCH] wireless: add regulatory_struct_hint Johannes Berg
2008-10-22 12:21 ` Luis R. Rodriguez
2008-10-22 19:30 ` Johannes Berg
2008-10-23 19:40 ` Perez-Gonzalez, Inaky
2008-10-23 19:51 ` Luis R. Rodriguez
2008-10-23 19:53 ` Perez-Gonzalez, Inaky
2008-10-23 19:54 ` Marcel Holtmann
2008-10-23 21:21 ` Tomas Winkler
2008-10-22 12:27 ` Luis R. Rodriguez
2008-10-22 19:31 ` Johannes Berg
2008-10-24 2:43 ` Zhu Yi
2008-10-24 9:39 ` Johannes Berg
2008-10-24 10:15 ` Luis R. Rodriguez
2008-10-24 18:26 ` Johannes Berg
2008-10-24 18:33 ` Luis R. Rodriguez
2008-10-24 18:35 ` Johannes Berg
2008-10-24 18:18 ` Marcel Holtmann [this message]
2008-10-24 18:24 ` Luis R. Rodriguez
2008-10-27 3:08 ` Zhu Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1224872328.7536.67.camel@californication \
--to=marcel@holtmann.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@gmail.com \
--cc=yi.zhu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.