linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Malinen, Jouni" <jouni@qca.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Kushwaha, Purushottam" <pkushwah@qti.qualcomm.com>
Subject: Re: [PATCH 3/3] cfg80211: Specify the reason for connect timeout
Date: Thu, 12 Jan 2017 14:29:28 +0000	[thread overview]
Message-ID: <20170112142926.GA19489@jouni.qca.qualcomm.com> (raw)
In-Reply-To: <1484229979.5391.5.camel@sipsolutions.net>

On Thu, Jan 12, 2017 at 03:06:19PM +0100, Johannes Berg wrote:
> On Thu, 2017-01-12 at 13:58 +0000, Malinen, Jouni wrote:
> >=20
> > > I think this description is misleading - one could easily
> > > understand
> > > "for other cases" to indicate for the cases that the AP did
> > > explicitly
> > > reject it, but that's obviously not true.
> >=20
> > Well, the expectation here really was that the reason for the timeout
> > would be known if there was a timeout and the unspecified value would
> > be used in all other cases, i.e., in cases where the AP did indeed
> > explicitly reject the connection.
>=20
> Hmm. It doesn't really make sense to include the attribute in that case
> at all though, does it?

We don't.. This discussion here is about the C API where we cannot
remove the argument from the call without adding yet another inline
wrapper, but the actual function that generates the netlink message does
not add the timeout reason attribute for success or explicit rejection
cases.

> > Sure, I can say that NL80211_TIMEOUT_UNSPECIFIED is used when the
> > reason for the timeout is not known or there was an explicit
> > rejection instead of a timeout.
>=20
> See above - why even think about this attribute in the successful case?

See above.. C API. Or do you want yet another wrapper for
cfg80211_connect_bss() to be added while trying to hide
cfg80211_connect_bss() from drivers somehow?

> Fair enough. I still think we should not include the
> ATTR_TIMEOUT_REASON for the successful or explicit rejection case at
> all though. We can really even distinguish that in the low-level
> function, I think?

nl80211_send_connect_result() already does this:

        (status < 0 &&
         (nla_put_flag(msg, NL80211_ATTR_TIMED_OUT) ||
          nla_put_u32(msg, NL80211_ATTR_TIMEOUT_REASON, timeout_reason))) |=
|

That status =3D=3D -1 special case used to be internal special value within
cfg80211, but it gets exposed to drivers since we use
cfg80211_connect_bss() both internally and from drivers instead of
having separate wrappers for drivers for cases where the bss entry is
explicitly specified.

--=20
Jouni Malinen                                            PGP id EFC895FA=

  reply	other threads:[~2017-01-12 14:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 17:53 [PATCH v3 1/3] cfg80211: Add support to sched scan to report better BSSs Jouni Malinen
2017-01-09 17:53 ` [PATCH v2 2/3] cfg80211: Add support to randomize TA of Public Action frames Jouni Malinen
2017-01-11 13:25   ` Johannes Berg
2017-01-09 17:53 ` [PATCH 3/3] cfg80211: Specify the reason for connect timeout Jouni Malinen
2017-01-09 20:24   ` Arend Van Spriel
2017-01-11 13:13     ` Malinen, Jouni
2017-01-11 13:26       ` Johannes Berg
2017-01-12 14:01         ` Malinen, Jouni
2017-01-11 13:31   ` Johannes Berg
2017-01-12 13:58     ` Malinen, Jouni
2017-01-12 14:06       ` Johannes Berg
2017-01-12 14:29         ` Malinen, Jouni [this message]
2017-01-12 14:32           ` Johannes Berg
2017-01-12 15:03             ` Malinen, Jouni
2017-01-09 20:07 ` [PATCH v3 1/3] cfg80211: Add support to sched scan to report better BSSs Arend Van Spriel
2017-01-11  7:48   ` Vamsi, Krishna
2017-01-11 13:22     ` Johannes Berg
2017-01-12 13:50       ` Vamsi, Krishna

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=20170112142926.GA19489@jouni.qca.qualcomm.com \
    --to=jouni@qca.qualcomm.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkushwah@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).