linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Vidyullatha Kanchanapally <vidyullatha@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, jouni@qca.qualcomm.com,
	vkanchan@qti.qualcomm.com, amarnath@qti.qualcomm.com,
	usdutt@qti.qualcomm.com, vamsin@qti.qualcomm.com
Subject: Re: [PATCH] nl80211: Update ERP info using NL80211_CMD_UPDATE_CONNECT_PARAMS
Date: Mon, 11 Dec 2017 12:12:59 +0100	[thread overview]
Message-ID: <1512990779.26976.69.camel@sipsolutions.net> (raw)
In-Reply-To: <1508923248-18848-1-git-send-email-vidyullatha@codeaurora.org>

On Wed, 2017-10-25 at 14:50 +0530, Vidyullatha Kanchanapally wrote:

> + * @UPDATE_FILS_ERP_INFO: Indicates that FILS connection parameters (realm,
> + *	username, erp sequence number and rrk) are updated
> + * @UPDATE_AUTH_TYPE: Indicates that Authentication type is updated

These are new here, but you don't know if they were actually supported:

> +	if (wiphy_ext_feature_isset(&rdev->wiphy,
> +				    NL80211_EXT_FEATURE_FILS_SK_OFFLOAD) &&

here.

> +	    info->attrs[NL80211_ATTR_FILS_ERP_USERNAME] &&
> +	    info->attrs[NL80211_ATTR_FILS_ERP_REALM] &&
> +	    info->attrs[NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM] &&
> +	    info->attrs[NL80211_ATTR_FILS_ERP_RRK]) {
[...]
> +	} else if (info->attrs[NL80211_ATTR_FILS_ERP_USERNAME] ||
> +		   info->attrs[NL80211_ATTR_FILS_ERP_REALM] ||
> +		   info->attrs[NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM] ||
> +		   info->attrs[NL80211_ATTR_FILS_ERP_RRK]) {
> +		return -EINVAL;
> +	}

This logic is also really odd, why not

if (attrs) {
	if (not flag)
		return -EINVAL;
	/* use attrs etc. */
}

> +
> +	if (info->attrs[NL80211_ATTR_AUTH_TYPE]) {
> +		u32 auth_type =
> +			nla_get_u32(info->attrs[NL80211_ATTR_AUTH_TYPE]);
> +		if (!nl80211_valid_auth_type(rdev, auth_type,
> +					     NL80211_CMD_CONNECT))
> +			return -EINVAL;
> +		connect.auth_type = auth_type;
> +		changed |= UPDATE_AUTH_TYPE;
> +	}

Again, how do you know the driver will actually look at
UPDATE_AUTH_TYPE?

johannes

  reply	other threads:[~2017-12-11 11:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25  9:20 [PATCH] nl80211: Update ERP info using NL80211_CMD_UPDATE_CONNECT_PARAMS Vidyullatha Kanchanapally
2017-12-11 11:12 ` Johannes Berg [this message]
2018-03-29 11:12   ` Arend van Spriel
2018-03-29 11:16     ` Johannes Berg
2018-03-29 11:31       ` Arend van Spriel
2018-04-04  9:21         ` Arend van Spriel
2018-04-04 10:36           ` Johannes Berg
2018-04-04 13:19             ` Arend van Spriel

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=1512990779.26976.69.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=amarnath@qti.qualcomm.com \
    --cc=jouni@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=usdutt@qti.qualcomm.com \
    --cc=vamsin@qti.qualcomm.com \
    --cc=vidyullatha@codeaurora.org \
    --cc=vkanchan@qti.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).