linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: Ilan Peer <ilan.peer@intel.com>
Cc: linux-wireless@vger.kernel.org, wireless-regdb@lists.infradead.org
Subject: Re: [PATCH v3 4/6] cfg80211: Add an option to hint indoor operation
Date: Tue, 18 Feb 2014 16:07:56 -0800	[thread overview]
Message-ID: <20140219000753.GD14296@garbanzo.do-not-panic.com> (raw)
In-Reply-To: <1390818118-27261-5-git-send-email-ilan.peer@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]

On Mon, Jan 27, 2014 at 12:21:56PM +0200, Ilan Peer wrote:
> @@ -1450,6 +1465,11 @@ __reg_process_hint_user(struct regulatory_request *user_request)
>  {
>  	struct regulatory_request *lr = get_last_request();
>  
> +	if (reg_request_indoor(user_request)) {
> +		reg_is_indoor = true;
> +		return REG_REQ_ALREADY_SET;

Please use another return value here and document it. This would
enable other type of userspace hints and would not make this an
obscure thing.

> @@ -2014,6 +2047,8 @@ static void restore_regulatory_settings(bool reset_user)
>  
>  	ASSERT_RTNL();
>  
> +	reg_is_indoor = false;

:D

> +
>  	reset_regdomains(true, &world_regdom);
>  	restore_alpha2(alpha2, reset_user);
>  
> @@ -2515,6 +2550,19 @@ int cfg80211_get_unii(int freq)
>  	return -EINVAL;
>  }
>  
> +bool regulatory_ir_allowed(struct wiphy *wiphy, struct ieee80211_channel *chan)
> +{
> +	if (config_enabled(CONFIG_CFG80211_REG_RELAX_NO_IR) &&
> +	    !(wiphy->regulatory_flags & REGULATORY_DISABLE_RELAX_NO_IR) &&

Don't you want to make the flag REGULATORY_DISABLE_RELAX_NO_IR positive,
that is REGULATORY_ENABLE_RELAX_NO_IR as otherwise you'd require
everyone to disable it by default. I think we want to *disable* it by
default it and let drivers set it explicitly to declare support.


> +	    reg_is_indoor && (chan->flags & IEEE80211_CHAN_INDOOR_ONLY))
> +		return true;
> +
> +	if (chan->flags & IEEE80211_CHAN_NO_IR)
> +		return false;
> +	return true;
> +}
> +EXPORT_SYMBOL(regulatory_ir_allowed);

Please use EXPORT_SYMBOL_GPL() moving forward for regulatory core stuff.
Proprietary drivers can kiss my hairy ass.

  Luis

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-02-19  0:08 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-27 10:21 [PATCH v3 0/6] Enable additional channels for use Ilan Peer
2014-01-27 10:21 ` [PATCH v3 1/6] cfg80211: Add indoor only and GO concurrent channel attributes Ilan Peer
2014-02-18 22:49   ` Luis R. Rodriguez
2014-02-19 14:44     ` Peer, Ilan
2014-01-27 10:21 ` [PATCH v3 2/6] cfg80211: Add Kconfig option for cellular BS hints Ilan Peer
2014-02-18 22:59   ` Luis R. Rodriguez
2014-01-27 10:21 ` [PATCH v3 3/6] cfg80211: Enable GO operation on additional channels Ilan Peer
2014-01-31 14:11   ` Johannes Berg
2014-02-02 19:20     ` Peer, Ilan
2014-02-03 12:46       ` Johannes Berg
2014-02-03 13:24         ` Peer, Ilan
2014-02-18 23:38   ` Luis R. Rodriguez
2014-02-19 14:52     ` Peer, Ilan
2014-02-19 15:47       ` Luis R. Rodriguez
2014-02-20  7:31         ` Peer, Ilan
2014-01-27 10:21 ` [PATCH v3 4/6] cfg80211: Add an option to hint indoor operation Ilan Peer
2014-01-31 14:13   ` Johannes Berg
2014-02-03 11:14   ` Ilan Peer
2014-02-19  0:07   ` Luis R. Rodriguez [this message]
2014-02-19 15:18     ` Peer, Ilan
2014-01-27 10:21 ` [PATCH v3 5/6] cfg80211: Enable GO operation on indoor channels Ilan Peer
2014-02-19  0:10   ` Luis R. Rodriguez
2014-01-27 10:21 ` [PATCH v3 6/6] mac80211: Enable initiating radiation " Ilan Peer
2014-02-19  0:15   ` Luis R. Rodriguez
2014-02-19 15:28     ` Peer, Ilan
2014-02-19 16:03       ` Luis R. Rodriguez
2014-02-20  7:58         ` Peer, Ilan
2014-02-21 23:31           ` Luis R. Rodriguez
2014-02-22 18:55             ` Peer, Ilan
2014-02-22 20:22               ` Luis R. Rodriguez
2014-02-23  7:23                 ` Peer, Ilan
2014-02-23  9:43                   ` Luis R. Rodriguez
2014-01-27 10:24 ` [PATCH v3 0/6] Enable additional channels for use Peer, Ilan
2014-02-09 16:06 ` Peer, Ilan
2014-02-18 22:17   ` Luis R. Rodriguez
2014-02-18 22:18     ` Luis R. Rodriguez
  -- strict thread matches above, loose matches on Subject: below --
2013-12-03 19:16 [PATCH v2 4/6] cfg80211: Add an option to hint indoor operation Ilan Peer
2013-12-04  9:16 ` [PATCH v3 " Ilan Peer

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=20140219000753.GD14296@garbanzo.do-not-panic.com \
    --to=mcgrof@do-not-panic.com \
    --cc=ilan.peer@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wireless-regdb@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).