diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-01 01:52:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-01 01:52:02 -0700 |
commit | 60c2ce2b4facf28f569115a55e1f479eb12bd0f1 (patch) | |
tree | 9771312021bbece80efea2fb0823563e4f68b611 /net/mac80211/wpa.c | |
parent | 0e90ed0e8b9b1c25040442f1d20c799751b1e727 (diff) | |
parent | 690b0cacb6dbbbcb06b76139ab65e1bf3f63e7f1 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/mac80211/wpa.c')
-rw-r--r-- | net/mac80211/wpa.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index 9dc3b5f26e8..d91c1a26630 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c @@ -154,7 +154,13 @@ update_iv: return RX_CONTINUE; mic_fail: - mac80211_ev_michael_mic_failure(rx->sdata, rx->key->conf.keyidx, + /* + * 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 + * the key is set. + */ + mac80211_ev_michael_mic_failure(rx->sdata, + rx->key ? rx->key->conf.keyidx : -1, (void *) skb->data, NULL, GFP_ATOMIC); return RX_DROP_UNUSABLE; } |