aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-07-12 06:30:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-13 14:49:43 -0400
commit95acac61ba66c4abd40e038dae8c1ed2e176c7b1 (patch)
tree8a1737bc3a2ca8af0031e1c2cda07608965ad282 /include/net
parent2fcf282471f04f465d0368e46e973e01504292b3 (diff)
mac80211: allow driver to disconnect after resume
In WoWLAN, devices may use crypto keys for TX/RX and could also implement GTK rekeying. If the driver isn't able to retrieve replay counters and similar information from the device upon resume, or if the device isn't responsive due to platform issues, it isn't safe to keep the connection up as GTK rekey messages from during the sleep time could be replayed against it. The only protection against that is disconnecting from the AP. Modifying mac80211 to do that while it is resuming would be very complex and invasive in the case that the driver requires a reconfig, so do it after it has resumed completely. In that case, however, packets might be replayed since it can then only happen after TX/RX are up again, so mark keys for interfaces that need to disconnect as "tainted" and drop all packets that are sent or received with those keys. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 8ff3d8a1377c..ea2c8c36477c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3024,6 +3024,29 @@ void ieee80211_beacon_loss(struct ieee80211_vif *vif);
3024void ieee80211_connection_loss(struct ieee80211_vif *vif); 3024void ieee80211_connection_loss(struct ieee80211_vif *vif);
3025 3025
3026/** 3026/**
3027 * ieee80211_resume_disconnect - disconnect from AP after resume
3028 *
3029 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3030 *
3031 * Instructs mac80211 to disconnect from the AP after resume.
3032 * Drivers can use this after WoWLAN if they know that the
3033 * connection cannot be kept up, for example because keys were
3034 * used while the device was asleep but the replay counters or
3035 * similar cannot be retrieved from the device during resume.
3036 *
3037 * Note that due to implementation issues, if the driver uses
3038 * the reconfiguration functionality during resume the interface
3039 * will still be added as associated first during resume and then
3040 * disconnect normally later.
3041 *
3042 * This function can only be called from the resume callback and
3043 * the driver must not be holding any of its own locks while it
3044 * calls this function, or at least not any locks it needs in the
3045 * key configuration paths (if it supports HW crypto).
3046 */
3047void ieee80211_resume_disconnect(struct ieee80211_vif *vif);
3048
3049/**
3027 * ieee80211_disable_dyn_ps - force mac80211 to temporarily disable dynamic psm 3050 * ieee80211_disable_dyn_ps - force mac80211 to temporarily disable dynamic psm
3028 * 3051 *
3029 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3052 * @vif: &struct ieee80211_vif pointer from the add_interface callback.