diff options
Diffstat (limited to 'net/mac80211/wpa.c')
-rw-r--r-- | net/mac80211/wpa.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index f5723ea15aae..742b5585d1b7 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c | |||
@@ -11,10 +11,8 @@ | |||
11 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
12 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
13 | #include <linux/compiler.h> | 13 | #include <linux/compiler.h> |
14 | #include <net/iw_handler.h> | ||
15 | |||
16 | #include <net/mac80211.h> | 14 | #include <net/mac80211.h> |
17 | #include "ieee80211_common.h" | 15 | |
18 | #include "ieee80211_i.h" | 16 | #include "ieee80211_i.h" |
19 | #include "michael.h" | 17 | #include "michael.h" |
20 | #include "tkip.h" | 18 | #include "tkip.h" |
@@ -181,33 +179,9 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_txrx_data *rx) | |||
181 | printk(KERN_DEBUG "%s: invalid Michael MIC in data frame from " | 179 | printk(KERN_DEBUG "%s: invalid Michael MIC in data frame from " |
182 | MAC_FMT "\n", rx->dev->name, MAC_ARG(sa)); | 180 | MAC_FMT "\n", rx->dev->name, MAC_ARG(sa)); |
183 | 181 | ||
184 | do { | 182 | mac80211_ev_michael_mic_failure(rx->dev, rx->key->keyidx, |
185 | struct ieee80211_hdr *hdr; | 183 | (void *) skb->data); |
186 | union iwreq_data wrqu; | 184 | return TXRX_DROP; |
187 | char *buf = kmalloc(128, GFP_ATOMIC); | ||
188 | if (!buf) | ||
189 | break; | ||
190 | |||
191 | /* TODO: needed parameters: count, key type, TSC */ | ||
192 | hdr = (struct ieee80211_hdr *) skb->data; | ||
193 | sprintf(buf, "MLME-MICHAELMICFAILURE.indication(" | ||
194 | "keyid=%d %scast addr=" MAC_FMT ")", | ||
195 | rx->key->keyidx, | ||
196 | hdr->addr1[0] & 0x01 ? "broad" : "uni", | ||
197 | MAC_ARG(hdr->addr2)); | ||
198 | memset(&wrqu, 0, sizeof(wrqu)); | ||
199 | wrqu.data.length = strlen(buf); | ||
200 | wireless_send_event(rx->dev, IWEVCUSTOM, &wrqu, buf); | ||
201 | kfree(buf); | ||
202 | } while (0); | ||
203 | |||
204 | if (!rx->local->apdev) | ||
205 | return TXRX_DROP; | ||
206 | |||
207 | ieee80211_rx_mgmt(rx->local, rx->skb, rx->u.rx.status, | ||
208 | ieee80211_msg_michael_mic_failure); | ||
209 | |||
210 | return TXRX_QUEUED; | ||
211 | } | 185 | } |
212 | 186 | ||
213 | remove_mic: | 187 | remove_mic: |