Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, "Kanchanapally,
	Vidyullatha" <vkanchan@qti.qualcomm.com>
Subject: Re: [RFC] cfg80211: Add support for FILS shared key authentication offload
Date: Fri, 03 Mar 2017 13:28:01 +0100	[thread overview]
Message-ID: <1488544081.25750.5.camel@sipsolutions.net> (raw)
In-Reply-To: <1488542006-11776-1-git-send-email-jouni@qca.qualcomm.com>


>  struct cfg80211_pmksa {
>  	const u8 *bssid;
>  	const u8 *pmkid;
> +	const u8 *pmk;
> +	size_t pmk_len;
> +	const u8 *ssid;
> +	size_t ssid_len;
> +	u16 cache_id;
>  };

So how does that work - from a flow perspective?

> +void cfg80211_connect_done(struct net_device *dev, const u8 *bssid,
> +			   struct cfg80211_bss *bss, const u8
> *req_ie,
> +			   size_t req_ie_len, const u8 *resp_ie,
> +			   size_t resp_ie_len, const u8 *fils_kek,
> +			   size_t fils_kek_len, bool
> update_erp_seq_num,
> +			   u16 fils_erp_seq_num, const u8 *pmk,
> size_t pmk_len,
> +			   const u8 *pmkid, int status, gfp_t gfp,
> +			   enum nl80211_timeout_reason
> timeout_reason);

Ouch. Please declare most of those (perhaps other than dev) as a
structure and pass a pointer here.

Also, why require the BSSID when BSS is set? Seems you could say one or
the other.

Also, what do you need the PMK for? If you have all of this stuff
offloaded, why does the host need to know the PMK?

> @@ -227,6 +227,13 @@ struct cfg80211_event {
>  			size_t req_ie_len;
>  			size_t resp_ie_len;
>  			struct cfg80211_bss *bss;
> +			const u8 *kek;
> +			size_t kek_len;
> +			bool update_erp_seq_num;
> +			u16 fils_erp_seq_num;
> +			const u8 *pmk;
> +			size_t pmk_len;
> +			const u8 *pmkid;
>  			int status; /* -1 = failed; 0..65535 =
> status code */
>  			enum nl80211_timeout_reason timeout_reason;
>  		} cr;

Could probably use the new struct from cfg80211.h that I asked to add
here then.


Other than that, most of the patch seems mechanical - I think it'd be
good to have a DOC: section or so somewhere (nl80211.h?) that explains
how this is intended to be used? I've already migrated the
documentation to the new rst/sphinx format so we can generate it nicely
and that would be a good addition - I'll probably do some more
additions too.

johannes

  reply	other threads:[~2017-03-03 13:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 11:53 [RFC] cfg80211: Add support for FILS shared key authentication offload Jouni Malinen
2017-03-03 12:28 ` Johannes Berg [this message]
2017-03-05 19:20   ` 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=1488544081.25750.5.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=jouni@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.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