On Fri, Dec 12, 2014 at 2:37 PM, Johannes Berg
<[email protected]> wrote:
> On Wed, 2014-12-03 at 18:08 +0200, Arik Nemtsov wrote:
>
>> * @NL80211_CMD_GET_REG: ask the wireless core to send us its currently set
>> - * regulatory domain.
>> + * regulatory domain. If %NL80211_ATTR_WIPHY is specified and the device
>> + * has a private regulatory domain, it will be returned. Otherwise, the
>> + * global regdomain will be returned.
>> + * A device will have a private regulatory domain if it uses the
>> + * regulatory_hint() API. Even when a private regdomain is used the
>> channel
>> + * information will still be mended according to further hints from
>> + * the regulatory core to help with compliance.
>
> I think you need to document the new availability of the dump version of
> this now.
Sure.
>
>> + if (!regdom && !cfg80211_regdomain) {
>
> I'm not sure why sparse doesn't warn here, but I think that should
> probably use rcu_access_pointer(cfg80211_regdomain).
>
> More realistically, the regdomain can never be NULL I think, so is that
> even needed? OTOH, if it can be NULL, then you must make this check
> after the rcu_dereference, which would make this code easier to follow.
You're right. I'll remove the check. I don't see a way where it can be
set to NULL at any point.
Arik
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html