linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	kvalo@qca.qualcomm.com, arend@broadcom.com, henry@logout.com,
	senthilb@qca.qualcomm.com
Subject: Re: [PATCH 4/4] cfg80211: add cellular base station regulatory hint support
Date: Wed, 04 Jul 2012 11:42:24 +0200	[thread overview]
Message-ID: <1341394944.4482.9.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1341357315-8053-5-git-send-email-rodrigue@qca.qualcomm.com>

Hi Luis,

Please split this series -- I won't apply the Atheros driver patches :-)


> + * @NL80211_ATTR_USER_REG_HINT_TYPE: type of regulatory hint passed from
> + *	userspace. If unset it is assumed the hint comes directly from
> + *	a user. If set code could specify exactly what type of source
> + *	was used to provide the hint. For the different types of
> + *	allowed user regulatory hints see nl80211_user_reg_hint_type.

Please mention what the data type is, but see below


> + * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested
> + *	to work properly to suppport receiving regulatory hints from
> + *	cellular base stations.

Typo "support", but I don't understand the reasoning behind this flag?
First you hide away behind the certification Kconfig thing ...? Maybe
you just need to explain better exactly what the cell-base-station
regulatory hint does.


> +	[NL80211_ATTR_USER_REG_HINT_TYPE] = { .type = NLA_U8 },

Not much point in using a u8, I think you should just use a u32.

> -	r = regulatory_hint_user(data);
> +	if (info->attrs[NL80211_ATTR_USER_REG_HINT_TYPE])
> +		user_reg_hint_type =
> +		  nla_get_u8(info->attrs[NL80211_ATTR_USER_REG_HINT_TYPE]);

Need to verify that it's a valid number, I think, otherwise you can pass
random junk like 0x42 into the regulatory framework.

> @@ -3869,6 +3877,11 @@ static int nl80211_get_reg(struct sk_buff *skb, struct genl_info *info)
>  			cfg80211_regdomain->dfs_region)))
>  		goto nla_put_failure;
>  
> +	if (reg_last_request_cell_base() &&

Is that really worthwhile as a function call like this rather than some
sort of _get_hint_type()?

> +#ifdef CONFIG_CFG80211_CERTIFICATION_ONUS

So I'm not really convinced about this. It seems this Kconfig should
better be a Kconfig that enables other Kconfig only, not enabling other
features. How else would anyone be able to do due diligence and check
what exactly this enables that they need to test?

johannes


  reply	other threads:[~2012-07-04  9:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03 23:15 [PATCH 0/4] wireless: certification onus and cell regulatory hint Luis R. Rodriguez
2012-07-03 23:15 ` [PATCH 1/4] cfg80211: add CONFIG_CFG80211_CERTIFICATION_ONUS Luis R. Rodriguez
2012-07-03 23:15 ` [PATCH 2/4] ath5k: replace modparam_all_channels with CONFIG_ATH5K_TEST_CHANNELS Luis R. Rodriguez
2012-07-03 23:15 ` [PATCH 3/4] ath9k: make CONFIG_ATH9K_DFS_CERTIFIED depend on CFG80211_CERTIFICATION_ONUS Luis R. Rodriguez
2012-07-03 23:15 ` [PATCH 4/4] cfg80211: add cellular base station regulatory hint support Luis R. Rodriguez
2012-07-04  9:42   ` Johannes Berg [this message]
2012-07-04 16:26     ` Luis R. Rodriguez
2012-07-05  7:45       ` Johannes Berg
2012-07-05 16:48         ` Luis R. Rodriguez
2012-07-06  6:39           ` Johannes Berg
2012-07-06 14:05             ` Luis R. Rodriguez
2012-07-06 14:11               ` Johannes Berg
2012-07-06 15:47                 ` Luis R. Rodriguez
2012-07-06 15:51                   ` Johannes Berg
2012-07-06 16:07                     ` Luis R. Rodriguez
2012-07-06 16:15                       ` Johannes Berg
2012-07-06 16:31                         ` Luis R. Rodriguez
2012-07-06 16:53                           ` Luis R. Rodriguez
2012-07-06 22:09                         ` Luis R. Rodriguez

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=1341394944.4482.9.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arend@broadcom.com \
    --cc=henry@logout.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rodrigue@qca.qualcomm.com \
    --cc=senthilb@qca.qualcomm.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 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).