diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-07-05 10:35:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-06 15:05:42 -0400 |
commit | e5497d766adb92bcbd1fa4a147e188f84f34b20a (patch) | |
tree | f5d41f4272b78b8c61a80c22389f6d4b24e65b34 /include/linux/nl80211.h | |
parent | 830af02f24fbc087999b757b8eca51829c67fa6f (diff) |
cfg80211/nl80211: support GTK rekey offload
In certain circumstances, like WoWLAN scenarios,
devices may implement (partial) GTK rekeying on
the device to avoid waking up the host for it.
In order to successfully go through GTK rekeying,
the KEK, KCK and the replay counter are required.
Add API to let the supplicant hand the parameters
to the driver which may store it for future GTK
rekey operations.
Note that, of course, if GTK rekeying is done by
the device, the EAP frame must not be passed up
to userspace, instead a rekey event needs to be
sent to let userspace update its replay counter.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r-- | include/linux/nl80211.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index c7ccaae15af6..3ec2f949bf7a 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -483,6 +483,14 @@ | |||
483 | * more background information, see | 483 | * more background information, see |
484 | * http://wireless.kernel.org/en/users/Documentation/WoWLAN. | 484 | * http://wireless.kernel.org/en/users/Documentation/WoWLAN. |
485 | * | 485 | * |
486 | * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver | ||
487 | * the necessary information for supporting GTK rekey offload. This | ||
488 | * feature is typically used during WoWLAN. The configuration data | ||
489 | * is contained in %NL80211_ATTR_REKEY_DATA (which is nested and | ||
490 | * contains the data in sub-attributes). After rekeying happened, | ||
491 | * this command may also be sent by the driver as an MLME event to | ||
492 | * inform userspace of the new replay counter. | ||
493 | * | ||
486 | * @NL80211_CMD_MAX: highest used command number | 494 | * @NL80211_CMD_MAX: highest used command number |
487 | * @__NL80211_CMD_AFTER_LAST: internal use | 495 | * @__NL80211_CMD_AFTER_LAST: internal use |
488 | */ | 496 | */ |
@@ -605,6 +613,8 @@ enum nl80211_commands { | |||
605 | NL80211_CMD_SCHED_SCAN_RESULTS, | 613 | NL80211_CMD_SCHED_SCAN_RESULTS, |
606 | NL80211_CMD_SCHED_SCAN_STOPPED, | 614 | NL80211_CMD_SCHED_SCAN_STOPPED, |
607 | 615 | ||
616 | NL80211_CMD_SET_REKEY_OFFLOAD, | ||
617 | |||
608 | /* add new commands above here */ | 618 | /* add new commands above here */ |
609 | 619 | ||
610 | /* used to define NL80211_CMD_MAX below */ | 620 | /* used to define NL80211_CMD_MAX below */ |
@@ -996,6 +1006,9 @@ enum nl80211_commands { | |||
996 | * are managed in software: interfaces of these types aren't subject to | 1006 | * are managed in software: interfaces of these types aren't subject to |
997 | * any restrictions in their number or combinations. | 1007 | * any restrictions in their number or combinations. |
998 | * | 1008 | * |
1009 | * @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information | ||
1010 | * necessary for GTK rekeying in the device, see &enum nl80211_rekey_data. | ||
1011 | * | ||
999 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1012 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
1000 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1013 | * @__NL80211_ATTR_AFTER_LAST: internal use |
1001 | */ | 1014 | */ |
@@ -1194,6 +1207,8 @@ enum nl80211_attrs { | |||
1194 | NL80211_ATTR_INTERFACE_COMBINATIONS, | 1207 | NL80211_ATTR_INTERFACE_COMBINATIONS, |
1195 | NL80211_ATTR_SOFTWARE_IFTYPES, | 1208 | NL80211_ATTR_SOFTWARE_IFTYPES, |
1196 | 1209 | ||
1210 | NL80211_ATTR_REKEY_DATA, | ||
1211 | |||
1197 | /* add attributes here, update the policy in nl80211.c */ | 1212 | /* add attributes here, update the policy in nl80211.c */ |
1198 | 1213 | ||
1199 | __NL80211_ATTR_AFTER_LAST, | 1214 | __NL80211_ATTR_AFTER_LAST, |
@@ -2361,4 +2376,28 @@ enum nl80211_plink_state { | |||
2361 | MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1 | 2376 | MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1 |
2362 | }; | 2377 | }; |
2363 | 2378 | ||
2379 | #define NL80211_KCK_LEN 16 | ||
2380 | #define NL80211_KEK_LEN 16 | ||
2381 | #define NL80211_REPLAY_CTR_LEN 8 | ||
2382 | |||
2383 | /** | ||
2384 | * enum nl80211_rekey_data - attributes for GTK rekey offload | ||
2385 | * @__NL80211_REKEY_DATA_INVALID: invalid number for nested attributes | ||
2386 | * @NL80211_REKEY_DATA_KEK: key encryption key (binary) | ||
2387 | * @NL80211_REKEY_DATA_KCK: key confirmation key (binary) | ||
2388 | * @NL80211_REKEY_DATA_REPLAY_CTR: replay counter (binary) | ||
2389 | * @NUM_NL80211_REKEY_DATA: number of rekey attributes (internal) | ||
2390 | * @MAX_NL80211_REKEY_DATA: highest rekey attribute (internal) | ||
2391 | */ | ||
2392 | enum nl80211_rekey_data { | ||
2393 | __NL80211_REKEY_DATA_INVALID, | ||
2394 | NL80211_REKEY_DATA_KEK, | ||
2395 | NL80211_REKEY_DATA_KCK, | ||
2396 | NL80211_REKEY_DATA_REPLAY_CTR, | ||
2397 | |||
2398 | /* keep last */ | ||
2399 | NUM_NL80211_REKEY_DATA, | ||
2400 | MAX_NL80211_REKEY_DATA = NUM_NL80211_REKEY_DATA - 1 | ||
2401 | }; | ||
2402 | |||
2364 | #endif /* __LINUX_NL80211_H */ | 2403 | #endif /* __LINUX_NL80211_H */ |