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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -183,18 +183,27 @@ · 182 unmodified lines | ||
| 183 | 183 | * |
| 184 | 184 | * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag drivers |
| 185 | 185 | * 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. | |
| 191 | 191 | * |
| 192 | 192 | * Similarly @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X flag can be |
| 193 | 193 | * 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. | |
| 198 | 207 | * |
| 199 | 208 | * For 802.1X the PMK or PMK-R0 are set by providing %NL80211_ATTR_PMK |
| 200 | 209 | * using %NL80211_CMD_SET_PMK. For offloaded FT support also |
| @@ -2362,10 +2371,11 @@ enum nl80211_commands { · 2161 unmodified lines | ||
| 2362 | 2371 | * |
| 2363 | 2372 | * @NL80211_ATTR_PMK: attribute for passing PMK key material. Used with |
| 2364 | 2373 | * %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. | |
| 2369 | 2379 | * |
| 2370 | 2380 | * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to |
| 2371 | 2381 | * indicate that it supports multiple active scheduled scan requests. |
| @@ -5807,6 +5817,10 @@ enum nl80211_feature_flags { · 3435 unmodified lines | ||
| 5807 | 5817 | * @NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION: Driver supports Operating |
| 5808 | 5818 | * Channel Validation (OCV) when using driver's SME for RSNA handshakes. |
| 5809 | 5819 | * |
| 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 | + * | |
| 5810 | 5824 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 5811 | 5825 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 5812 | 5826 | */ |
| @@ -5863,6 +5877,7 @@ enum nl80211_ext_feature_index { · 50 unmodified lines | ||
| 5863 | 5877 | NL80211_EXT_FEATURE_SCAN_FREQ_KHZ, |
| 5864 | 5878 | NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS, |
| 5865 | 5879 | NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION, |
| 5880 | + NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK, | |
| 5866 | 5881 | |
| 5867 | 5882 | /* add new features before the definition below */ |
| 5868 | 5883 | NUM_NL80211_EXT_FEATURES, |