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>
This commit is contained in:
committed by
John W. Linville
parent
e54be4e735
commit
ca99861d54
@@ -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 {
|
||||
|
Reference in New Issue
Block a user