nl80211: fix PORT_AUTHORIZED wording to reflect behavior
authorJames Prestwood <prestwoj@gmail.com>
Mon, 13 Apr 2020 16:20:53 +0000 (09:20 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 27 Aug 2020 09:29:59 +0000 (11:29 +0200)
The CMD_PORT_AUTHORIZED event was described as an event which indicated
a successfully completed 4-way handshake. But the behavior was
not as advertized. The only driver which uses this is brcmfmac, and
this driver only sends the event after a successful 802.1X-FT roam.

This prevents userspace applications from knowing if the 4-way completed
on:

1. Normal 802.1X connects
2. Normal PSK connections
3. FT-PSK roams

wpa_supplicant handles this incorrect behavior by just completing
the connection after association, before the 4-way has completed.
If the 4-way ends up failing it disconnects at that point.

Since this behavior appears to be expected (wpa_s handles it this
way) I have changed the wording in the API description to reflect the
actual behavior.

Signed-off-by: James Prestwood <prestwoj@gmail.com>
Link: https://lore.kernel.org/r/20200413162053.3711-1-prestwoj@gmail.com
[fix spelling of 802.1X throughout ...]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/uapi/linux/nl80211.h

index 631f3a9..8cc2b82 100644 (file)
  *     authentication/association or not receiving a response from the AP.
  *     Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as
  *     well to remain backwards compatible.
- *     When establishing a security association, drivers that support 4 way
- *     handshake offload should send %NL80211_CMD_PORT_AUTHORIZED event when
- *     the 4 way handshake is completed successfully.
  * @NL80211_CMD_ROAM: Notification indicating the card/driver roamed by itself.
- *     When a security association was established with the new AP (e.g. if
- *     the FT protocol was used for roaming or the driver completed the 4 way
- *     handshake), this event should be followed by an
+ *     When a security association was established on an 802.1X network using
+ *     fast transition, this event should be followed by an
  *     %NL80211_CMD_PORT_AUTHORIZED event.
  * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
  *     userspace that a connection was dropped by the AP or due to other
  * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously
  *     configured PMK for the authenticator address identified by
  *     %NL80211_ATTR_MAC.
- * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way
- *     handshake was completed successfully by the driver. The BSSID is
- *     specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake
- *     offload should send this event after indicating 802.11 association with
- *     %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed
- *     %NL80211_CMD_DISCONNECT should be indicated instead.
- *
+ * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates an 802.1X FT roam was
+ *     completed successfully. Drivers that support 4 way handshake offload
+ *     should send this event after indicating 802.1X FT assocation with
+ *     %NL80211_CMD_ROAM. If the 4 way handshake failed %NL80211_CMD_DISCONNECT
+ *     should be indicated instead.
  * @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