diff options
author | Saravana <saravanad@posedge.com> | 2012-12-04 19:47:42 +0530 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-12-05 09:44:41 +0100 |
commit | b98ea05861d76f458029096e8b2939fcb58e9530 (patch) | |
tree | a12b1993b0495a2c5f980f14ea94553ccae2b24e /net/mac80211/wpa.c | |
parent | a6662dbae0b3a7a91317ec88b5aa0cf8d716f183 (diff) |
mac80211: add debug file for mic failure
The mic failure count provides the number of mic failures that
have happened on a given key (without a countermeasure being
started, since that would remove the key).
Signed-off-by: Saravana <saravanad@posedge.com>
[fix NULL pointer issues]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/wpa.c')
-rw-r--r-- | net/mac80211/wpa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index 8bd2f5c6a56..c175ee866ff 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c @@ -104,7 +104,7 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx) */ if (status->flag & (RX_FLAG_MMIC_STRIPPED | RX_FLAG_IV_STRIPPED)) { if (status->flag & RX_FLAG_MMIC_ERROR) - goto mic_fail; + goto mic_fail_no_key; if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key && rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP) @@ -161,6 +161,9 @@ update_iv: return RX_CONTINUE; mic_fail: + rx->key->u.tkip.mic_failures++; + +mic_fail_no_key: /* * In some cases the key can be unset - e.g. a multicast packet, in * a driver that supports HW encryption. Send up the key idx only if |