aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-07-05 10:35:40 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-06 15:05:42 -0400
commite5497d766adb92bcbd1fa4a147e188f84f34b20a (patch)
treef5d41f4272b78b8c61a80c22389f6d4b24e65b34 /include/net/cfg80211.h
parent830af02f24fbc087999b757b8eca51829c67fa6f (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/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 7202bce7bfeb..4bf101bada4e 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1154,6 +1154,18 @@ struct cfg80211_wowlan {
1154}; 1154};
1155 1155
1156/** 1156/**
1157 * struct cfg80211_gtk_rekey_data - rekey data
1158 * @kek: key encryption key
1159 * @kck: key confirmation key
1160 * @replay_ctr: replay counter
1161 */
1162struct cfg80211_gtk_rekey_data {
1163 u8 kek[NL80211_KEK_LEN];
1164 u8 kck[NL80211_KCK_LEN];
1165 u8 replay_ctr[NL80211_REPLAY_CTR_LEN];
1166};
1167
1168/**
1157 * struct cfg80211_ops - backend description for wireless configuration 1169 * struct cfg80211_ops - backend description for wireless configuration
1158 * 1170 *
1159 * This struct is registered by fullmac card drivers and/or wireless stacks 1171 * This struct is registered by fullmac card drivers and/or wireless stacks
@@ -1197,6 +1209,8 @@ struct cfg80211_wowlan {
1197 * 1209 *
1198 * @set_default_mgmt_key: set the default management frame key on an interface 1210 * @set_default_mgmt_key: set the default management frame key on an interface
1199 * 1211 *
1212 * @set_rekey_data: give the data necessary for GTK rekeying to the driver
1213 *
1200 * @add_beacon: Add a beacon with given parameters, @head, @interval 1214 * @add_beacon: Add a beacon with given parameters, @head, @interval
1201 * and @dtim_period will be valid, @tail is optional. 1215 * and @dtim_period will be valid, @tail is optional.
1202 * @set_beacon: Change the beacon parameters for an access point mode 1216 * @set_beacon: Change the beacon parameters for an access point mode
@@ -1499,6 +1513,9 @@ struct cfg80211_ops {
1499 struct net_device *dev, 1513 struct net_device *dev,
1500 struct cfg80211_sched_scan_request *request); 1514 struct cfg80211_sched_scan_request *request);
1501 int (*sched_scan_stop)(struct wiphy *wiphy, struct net_device *dev); 1515 int (*sched_scan_stop)(struct wiphy *wiphy, struct net_device *dev);
1516
1517 int (*set_rekey_data)(struct wiphy *wiphy, struct net_device *dev,
1518 struct cfg80211_gtk_rekey_data *data);
1502}; 1519};
1503 1520
1504/* 1521/*
@@ -3033,6 +3050,15 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev,
3033void cfg80211_cqm_pktloss_notify(struct net_device *dev, 3050void cfg80211_cqm_pktloss_notify(struct net_device *dev,
3034 const u8 *peer, u32 num_packets, gfp_t gfp); 3051 const u8 *peer, u32 num_packets, gfp_t gfp);
3035 3052
3053/**
3054 * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying
3055 * @dev: network device
3056 * @bssid: BSSID of AP (to avoid races)
3057 * @replay_ctr: new replay counter
3058 */
3059void cfg80211_gtk_rekey_notify(struct net_device *dev, const u8 *bssid,
3060 const u8 *replay_ctr, gfp_t gfp);
3061
3036/* Logging, debugging and troubleshooting/diagnostic helpers. */ 3062/* Logging, debugging and troubleshooting/diagnostic helpers. */
3037 3063
3038/* wiphy_printk helpers, similar to dev_printk */ 3064/* wiphy_printk helpers, similar to dev_printk */