diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-06-28 13:53:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-28 13:56:21 -0400 |
commit | 3be3fdb58ad22f67c5fd12548c88cefe3f726588 (patch) | |
tree | 0c5c4e509c37098671df55a20b7e9aadb3d74db8 /net | |
parent | 77b7023afe93b5e3bdcf2c0faaa5e5caafb6ef44 (diff) | |
parent | 5ee0a58d8ca443e80ed8712c86c9938360b79cac (diff) | |
download | linux-3.10-3be3fdb58ad22f67c5fd12548c88cefe3f726588.tar.gz linux-3.10-3be3fdb58ad22f67c5fd12548c88cefe3f726588.tar.bz2 linux-3.10-3be3fdb58ad22f67c5fd12548c88cefe3f726588.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-tx.c
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/wpa.c | 8 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 3 |
2 files changed, 9 insertions, 2 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; } diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index aed6d2ad4c9..50ff82aa489 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -6566,7 +6566,8 @@ void nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev, if (addr) NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr); NLA_PUT_U32(msg, NL80211_ATTR_KEY_TYPE, key_type); - NLA_PUT_U8(msg, NL80211_ATTR_KEY_IDX, key_id); + if (key_id != -1) + NLA_PUT_U8(msg, NL80211_ATTR_KEY_IDX, key_id); if (tsc) NLA_PUT(msg, NL80211_ATTR_KEY_SEQ, 6, tsc); |