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 | * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag drivers | 184 | * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag drivers |
| 185 | * can indicate they support offloading EAPOL handshakes for WPA/WPA2 | 185 | * can indicate they support offloading EAPOL handshakes for WPA/WPA2 |
| 186 | * preshared key authentication. In %NL80211_CMD_CONNECT the preshared | 186 | * preshared key authentication in station mode. In %NL80211_CMD_CONNECT |
| 187 | * key should be specified using %NL80211_ATTR_PMK. Drivers supporting | 187 | * the preshared key should be specified using %NL80211_ATTR_PMK. Drivers |
| 188 | * this offload may reject the %NL80211_CMD_CONNECT when no preshared | 188 | * supporting this offload may reject the %NL80211_CMD_CONNECT when no |
| 189 | * key material is provided, for example when that driver does not | 189 | * preshared key material is provided, for example when that driver does |
| 190 | * support setting the temporal keys through %CMD_NEW_KEY. | 190 | * not support setting the temporal keys through %NL80211_CMD_NEW_KEY. |
| 191 | * | 191 | * |
| 192 | * Similarly @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X flag can be | 192 | * Similarly @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X flag can be |
| 193 | * set by drivers indicating offload support of the PTK/GTK EAPOL | 193 | * set by drivers indicating offload support of the PTK/GTK EAPOL |
| 194 | * handshakes during 802.1X authentication. In order to use the offload | 194 | * handshakes during 802.1X authentication in station mode. In order to |
| 195 | * the %NL80211_CMD_CONNECT should have %NL80211_ATTR_WANT_1X_4WAY_HS | 195 | * use the offload the %NL80211_CMD_CONNECT should have |
| 196 | * attribute flag. Drivers supporting this offload may reject the | 196 | * %NL80211_ATTR_WANT_1X_4WAY_HS attribute flag. Drivers supporting this |
| 197 | * %NL80211_CMD_CONNECT when the attribute flag is not present. | 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 | * For 802.1X the PMK or PMK-R0 are set by providing %NL80211_ATTR_PMK | 208 | * For 802.1X the PMK or PMK-R0 are set by providing %NL80211_ATTR_PMK |
| 200 | * using %NL80211_CMD_SET_PMK. For offloaded FT support also | 209 | * using %NL80211_CMD_SET_PMK. For offloaded FT support also |
| @@ -2362,10 +2371,11 @@ enum nl80211_commands { · 2161 unmodified lines | |||
| 2362 | * | 2371 | * |
| 2363 | * @NL80211_ATTR_PMK: attribute for passing PMK key material. Used with | 2372 | * @NL80211_ATTR_PMK: attribute for passing PMK key material. Used with |
| 2364 | * %NL80211_CMD_SET_PMKSA for the PMKSA identified by %NL80211_ATTR_PMKID. | 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 | 2374 | * For %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP it is used to provide |
| 2366 | * handshake for WPA/WPA2-PSK networks. For 802.1X authentication it is | 2375 | * PSK for offloading 4-way handshake for WPA/WPA2-PSK networks. For 802.1X |
| 2367 | * used with %NL80211_CMD_SET_PMK. For offloaded FT support this attribute | 2376 | * authentication it is used with %NL80211_CMD_SET_PMK. For offloaded FT |
| 2368 | * specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME is included as well. | 2377 | * support this attribute specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME |
| 2378 | * is included as well. | ||
| 2369 | * | 2379 | * |
| 2370 | * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to | 2380 | * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to |
| 2371 | * indicate that it supports multiple active scheduled scan requests. | 2381 | * indicate that it supports multiple active scheduled scan requests. |
| @@ -5807,6 +5817,10 @@ enum nl80211_feature_flags { · 3435 unmodified lines | |||
| 5807 | * @NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION: Driver supports Operating | 5817 | * @NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION: Driver supports Operating |
| 5808 | * Channel Validation (OCV) when using driver's SME for RSNA handshakes. | 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 | * @NUM_NL80211_EXT_FEATURES: number of extended features. | 5824 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 5811 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. | 5825 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 5812 | */ | 5826 | */ |
| @@ -5863,6 +5877,7 @@ enum nl80211_ext_feature_index { · 50 unmodified lines | |||
| 5863 | NL80211_EXT_FEATURE_SCAN_FREQ_KHZ, | 5877 | NL80211_EXT_FEATURE_SCAN_FREQ_KHZ, |
| 5864 | NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS, | 5878 | NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS, |
| 5865 | NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION, | 5879 | NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION, |
| 5880 | NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK, | ||
| 5866 | 5881 | ||
| 5867 | /* add new features before the definition below */ | 5882 | /* add new features before the definition below */ |
| 5868 | NUM_NL80211_EXT_FEATURES, | 5883 | NUM_NL80211_EXT_FEATURES, |