aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-07-05 16:35:40 +0200
committerZiyan <jaraidaniel@gmail.com>2016-03-11 15:57:24 +0100
commitf6b3891d66aafc80fc7969aec61a8c5d045b9751 (patch)
tree189adf0414dfb697a4d5a52b1f7ae45c61cbaed3 /include/net
parent17f4cd7b1bf493bfc103c82be40100d35e40ce33 (diff)
downloadkernel_samsung_espresso10-f6b3891d66aafc80fc7969aec61a8c5d045b9751.zip
kernel_samsung_espresso10-f6b3891d66aafc80fc7969aec61a8c5d045b9751.tar.gz
kernel_samsung_espresso10-f6b3891d66aafc80fc7969aec61a8c5d045b9751.tar.bz2
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> Conflicts: include/linux/nl80211.h net/wireless/nl80211.c Change-Id: Icd3a157742b08c01a3be20d46d4112e5d4b93a58
Diffstat (limited to 'include/net')
-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 a2a97f3..66886ac 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1185,6 +1185,18 @@ struct cfg80211_wowlan {
};
/**
+ * struct cfg80211_gtk_rekey_data - rekey data
+ * @kek: key encryption key
+ * @kck: key confirmation key
+ * @replay_ctr: replay counter
+ */
+struct cfg80211_gtk_rekey_data {
+ u8 kek[NL80211_KEK_LEN];
+ u8 kck[NL80211_KCK_LEN];
+ u8 replay_ctr[NL80211_REPLAY_CTR_LEN];
+};
+
+/**
* struct cfg80211_ops - backend description for wireless configuration
*
* This struct is registered by fullmac card drivers and/or wireless stacks
@@ -1228,6 +1240,8 @@ struct cfg80211_wowlan {
*
* @set_default_mgmt_key: set the default management frame key on an interface
*
+ * @set_rekey_data: give the data necessary for GTK rekeying to the driver
+ *
* @add_beacon: Add a beacon with given parameters, @head, @interval
* and @dtim_period will be valid, @tail is optional.
* @set_beacon: Change the beacon parameters for an access point mode
@@ -1521,6 +1535,9 @@ struct cfg80211_ops {
struct net_device *dev,
struct cfg80211_sched_scan_request *request);
int (*sched_scan_stop)(struct wiphy *wiphy, struct net_device *dev);
+
+ int (*set_rekey_data)(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_gtk_rekey_data *data);
};
/*
@@ -3063,6 +3080,15 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev,
void cfg80211_cqm_pktloss_notify(struct net_device *dev,
const u8 *peer, u32 num_packets, gfp_t gfp);
+/**
+ * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying
+ * @dev: network device
+ * @bssid: BSSID of AP (to avoid races)
+ * @replay_ctr: new replay counter
+ */
+void cfg80211_gtk_rekey_notify(struct net_device *dev, const u8 *bssid,
+ const u8 *replay_ctr, gfp_t gfp);
+
/* Logging, debugging and troubleshooting/diagnostic helpers. */
/* wiphy_printk helpers, similar to dev_printk */