diff options
author | gregor kowski <gregor.kowski@gmail.com> | 2009-12-09 23:25:05 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-22 13:31:14 -0500 |
commit | ca99861d5421c91f5a8fd3a77acb4b7be14f119d (patch) | |
tree | d11b0f99525f82515296c41fa643e518ddcbef11 /net/mac80211/key.h | |
parent | e54be4e7356c0612b48407d3b0647a29cb82e254 (diff) | |
download | kernel_goldelico_gta04-ca99861d5421c91f5a8fd3a77acb4b7be14f119d.zip kernel_goldelico_gta04-ca99861d5421c91f5a8fd3a77acb4b7be14f119d.tar.gz kernel_goldelico_gta04-ca99861d5421c91f5a8fd3a77acb4b7be14f119d.tar.bz2 |
mac80211 : fix a race with update_tkip_key
The mac80211 tkip code won't call update_tkip_key, if rx packets
are received without KEY_FLAG_UPLOADED_TO_HARDWARE. This can happen on
first packet because the hardware key stuff is called asynchronously with
todo workqueue.
This patch workaround that by tracking if we sent the key to the driver.
Signed-off-by: Gregor Kowski <gregor.kowski@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/key.h')
-rw-r--r-- | net/mac80211/key.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac80211/key.h b/net/mac80211/key.h index a49f93b..bdc2968 100644 --- a/net/mac80211/key.h +++ b/net/mac80211/key.h @@ -59,11 +59,17 @@ enum ieee80211_internal_key_flags { KEY_FLAG_TODO_DEFMGMTKEY = BIT(6), }; +enum ieee80211_internal_tkip_state { + TKIP_STATE_NOT_INIT, + TKIP_STATE_PHASE1_DONE, + TKIP_STATE_PHASE1_HW_UPLOADED, +}; + struct tkip_ctx { u32 iv32; u16 iv16; u16 p1k[5]; - int initialized; + enum ieee80211_internal_tkip_state state; }; struct ieee80211_key { |