aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2009-08-28 13:28:24 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 14:41:00 -0400
commita0f9ce2ac35a0c57413dafd90e316c4048d1b43e (patch)
treeac43a883409ae48de3ce7d8590fc7acb1e890902
parent3334943cefa03a5384060e321e3dd9e686097caf (diff)
rndis_wlan: convert mic failure wireless event to cfg80211
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rndis_wlan.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 9425b3c2ef2..c0c6d66f7d9 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2720,9 +2720,10 @@ static void rndis_wlan_auth_indication(struct usbnet *usbdev,
{
u8 *buf;
const char *type;
- int flags, buflen;
+ int flags, buflen, key_id;
bool pairwise_error, group_error;
struct ndis_80211_auth_request *auth_req;
+ enum nl80211_key_type key_type;
/* must have at least one array entry */
if (len < offsetof(struct ndis_80211_status_indication, u) +
@@ -2758,23 +2759,24 @@ static void rndis_wlan_auth_indication(struct usbnet *usbdev,
devinfo(usbdev, "authentication indication: %s (0x%08x)", type,
le32_to_cpu(auth_req->flags));
- if (pairwise_error || group_error) {
- union iwreq_data wrqu;
- struct iw_michaelmicfailure micfailure;
+ if (pairwise_error) {
+ key_type = NL80211_KEYTYPE_PAIRWISE;
+ key_id = -1;
- memset(&micfailure, 0, sizeof(micfailure));
- if (pairwise_error)
- micfailure.flags |= IW_MICFAILURE_PAIRWISE;
- if (group_error)
- micfailure.flags |= IW_MICFAILURE_GROUP;
+ cfg80211_michael_mic_failure(usbdev->net,
+ auth_req->bssid,
+ key_type, key_id, NULL,
+ GFP_KERNEL);
+ }
- memcpy(micfailure.src_addr.sa_data, auth_req->bssid,
- ETH_ALEN);
+ if (group_error) {
+ key_type = NL80211_KEYTYPE_GROUP;
+ key_id = -1;
- memset(&wrqu, 0, sizeof(wrqu));
- wrqu.data.length = sizeof(micfailure);
- wireless_send_event(usbdev->net, IWEVMICHAELMICFAILURE,
- &wrqu, (u8 *)&micfailure);
+ cfg80211_michael_mic_failure(usbdev->net,
+ auth_req->bssid,
+ key_type, key_id, NULL,
+ GFP_KERNEL);
}
buflen -= le32_to_cpu(auth_req->length);