All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org, Jouni Malinen <j@w1.fi>
Subject: Re: [PATCH 3/6] nl80211: Add CMD_CONTROL_PORT_FRAME API
Date: Wed, 31 Jan 2018 16:01:18 -0600	[thread overview]
Message-ID: <b59b9107-36bb-5fec-e8f0-364431095ad8@gmail.com> (raw)
In-Reply-To: <1517435126.2189.62.camel@sipsolutions.net>

Hi Johannes,

>> + * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request
>> + *	and RX notification.  This command is used both as a request to transmit
>> + *	a control port frame and as a notification that a control port frame
>> + *	has been received. %NL80211_ATTR_FRAME is used to specify the
>> + *	frame contents.  The frame is the raw EAPoL data, without ethernet or
>> + *	802.11 headers.
> 
> Never mind, so it's without Ethernet header. Is that really desirable
> though? I mean, it could be that the Ethernet address even matters (not
> sure) and it'd probably be easier to handle in (existing) userspace
> where Ethernet frames are expected now?

I also include the from address inside the NL80211 message as ATTR_MAC. 
The protocol as well.  I wrote the docs first and never updated the 
little details afterwards.  Will fix.

> 
>> + nla_put_failure:
>> +	genlmsg_cancel(msg, hdr);
> 
> nit: there's no point in cancelling if you free it (immediately).

Just following some existing code, but will fix.

> 
>> +bool cfg80211_rx_control_port(struct net_device *dev,
>> +			      const u8 *buf, size_t len,
>> +			      const u8 *addr, u16 proto, bool unencrypted)
>> +{
>> +	bool ret;
>> +
>> +	trace_cfg80211_rx_control_port(dev, buf, len, addr, proto, unencrypted);
>> +	ret = __nl80211_rx_control_port(dev, buf, len, addr, proto,
>> +					unencrypted, GFP_ATOMIC);
>> +	trace_cfg80211_return_bool(ret);
> 
> this seems wrong - you return -ERROR from __nl80211_rx_control_port()
> so you need either to pass that on as an integer to the caller, or put
> an == 0 here or something?
> 
> "Return: %true if the frame was passed to userspace"
> 

Yep, will fix.

Regards,
-Denis

  reply	other threads:[~2018-01-31 22:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 21:33 [RFC v3 0/6] EAPoL over NL80211 Denis Kenzior
2018-01-31 21:33 ` [PATCH 1/6] uapi: Add 802.11 Preauthentication to if_ether Denis Kenzior
2018-01-31 21:33 ` [PATCH 2/6] nl80211: Add CONTROL_PORT_OVER_NL80211 attribute Denis Kenzior
2018-01-31 21:33 ` [PATCH 3/6] nl80211: Add CMD_CONTROL_PORT_FRAME API Denis Kenzior
2018-01-31 21:45   ` Johannes Berg
2018-01-31 22:01     ` Denis Kenzior [this message]
2018-01-31 22:03       ` Johannes Berg
2018-01-31 21:33 ` [PATCH 4/6] mac80211: Send control port frames over nl80211 Denis Kenzior
2018-01-31 21:50   ` Johannes Berg
2018-01-31 21:33 ` [PATCH 5/6] nl80211: Implement TX of control port frames Denis Kenzior
2018-01-31 21:52   ` Johannes Berg
2018-01-31 21:53   ` Johannes Berg
2018-01-31 21:58     ` Denis Kenzior
2018-01-31 22:00       ` Johannes Berg
2018-01-31 21:33 ` [PATCH 6/6] mac80211: Add support for tx_control_port Denis Kenzior
2018-01-31 22:00 ` [RFC v3 0/6] EAPoL over NL80211 Johannes Berg
2018-02-01  1:09   ` Denis Kenzior
2018-02-01  8:54     ` Johannes Berg

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=b59b9107-36bb-5fec-e8f0-364431095ad8@gmail.com \
    --to=denkenz@gmail.com \
    --cc=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.