History

nl80211: support 4-way handshake offloading for WPA/WPA2-PSK in AP mode

Let drivers advertise support for AP-mode WPA/WPA2-PSK 4-way handshake offloading with a new NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK flag. Extend use of NL80211_ATTR_PMK attribute indicating it might be passed as part of NL80211_CMD_START_AP command, and contain the PSK (which is the PMK, hence the name). The driver is assumed to handle the 4-way handshake by itself in this case, instead of relying on userspace.

Chung-Hsien Hsu committed 6 years ago

Commit f9662271 parent 75e6b592 files · +31 −14Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+28−13
@@ -183,18 +183,27 @@ · 182 unmodified lines
183183 *
184184 * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag drivers
185185 * can indicate they support offloading EAPOL handshakes for WPA/WPA2
186− * preshared key authentication. In %NL80211_CMD_CONNECT the preshared
187− * key should be specified using %NL80211_ATTR_PMK. Drivers supporting
188− * this offload may reject the %NL80211_CMD_CONNECT when no preshared
189− * key material is provided, for example when that driver does not
190− * support setting the temporal keys through %CMD_NEW_KEY.
186+ * preshared key authentication in station mode. In %NL80211_CMD_CONNECT
187+ * the preshared key should be specified using %NL80211_ATTR_PMK. Drivers
188+ * supporting this offload may reject the %NL80211_CMD_CONNECT when no
189+ * preshared key material is provided, for example when that driver does
190+ * not support setting the temporal keys through %NL80211_CMD_NEW_KEY.
191191 *
192192 * Similarly @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X flag can be
193193 * set by drivers indicating offload support of the PTK/GTK EAPOL
194− * handshakes during 802.1X authentication. In order to use the offload
195− * the %NL80211_CMD_CONNECT should have %NL80211_ATTR_WANT_1X_4WAY_HS
196− * attribute flag. Drivers supporting this offload may reject the
197− * %NL80211_CMD_CONNECT when the attribute flag is not present.
194+ * handshakes during 802.1X authentication in station mode. In order to
195+ * use the offload the %NL80211_CMD_CONNECT should have
196+ * %NL80211_ATTR_WANT_1X_4WAY_HS attribute flag. Drivers supporting this
197+ * offload may reject the %NL80211_CMD_CONNECT when the attribute flag is
198+ * not present.
199+ *
200+ * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK flag drivers
201+ * can indicate they support offloading EAPOL handshakes for WPA/WPA2
202+ * preshared key authentication in AP mode. In %NL80211_CMD_START_AP
203+ * the preshared key should be specified using %NL80211_ATTR_PMK. Drivers
204+ * supporting this offload may reject the %NL80211_CMD_START_AP when no
205+ * preshared key material is provided, for example when that driver does
206+ * not support setting the temporal keys through %NL80211_CMD_NEW_KEY.
198207 *
199208 * For 802.1X the PMK or PMK-R0 are set by providing %NL80211_ATTR_PMK
200209 * using %NL80211_CMD_SET_PMK. For offloaded FT support also
@@ -2362,10 +2371,11 @@ enum nl80211_commands { · 2161 unmodified lines
23622371 *
23632372 * @NL80211_ATTR_PMK: attribute for passing PMK key material. Used with
23642373 * %NL80211_CMD_SET_PMKSA for the PMKSA identified by %NL80211_ATTR_PMKID.
2365− * For %NL80211_CMD_CONNECT it is used to provide PSK for offloading 4-way
2366− * handshake for WPA/WPA2-PSK networks. For 802.1X authentication it is
2367− * used with %NL80211_CMD_SET_PMK. For offloaded FT support this attribute
2368− * specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME is included as well.
2374+ * For %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP it is used to provide
2375+ * PSK for offloading 4-way handshake for WPA/WPA2-PSK networks. For 802.1X
2376+ * authentication it is used with %NL80211_CMD_SET_PMK. For offloaded FT
2377+ * support this attribute specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME
2378+ * is included as well.
23692379 *
23702380 * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to
23712381 * indicate that it supports multiple active scheduled scan requests.
@@ -5807,6 +5817,10 @@ enum nl80211_feature_flags { · 3435 unmodified lines
58075817 * @NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION: Driver supports Operating
58085818 * Channel Validation (OCV) when using driver's SME for RSNA handshakes.
58095819 *
5820+ * @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK: Device wants to do 4-way
5821+ * handshake with PSK in AP mode (PSK is passed as part of the start AP
5822+ * command).
5823+ *
58105824 * @NUM_NL80211_EXT_FEATURES: number of extended features.
58115825 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
58125826 */
@@ -5863,6 +5877,7 @@ enum nl80211_ext_feature_index { · 50 unmodified lines
58635877 NL80211_EXT_FEATURE_SCAN_FREQ_KHZ,
58645878 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,
58655879 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION,
5880+ NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK,
58665881
58675882 /* add new features before the definition below */
58685883 NUM_NL80211_EXT_FEATURES,