aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2009-08-28 06:28:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 14:41:00 -0400
commita0f9ce2ac35a0c57413dafd90e316c4048d1b43e (patch)
treeac43a883409ae48de3ce7d8590fc7acb1e890902 /drivers/net
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>
Diffstat (limited to 'drivers/net')
-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 9425b3c2ef2e..c0c6d66f7d95 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,
2720{ 2720{
2721 u8 *buf; 2721 u8 *buf;
2722 const char *type; 2722 const char *type;
2723 int flags, buflen; 2723 int flags, buflen, key_id;
2724 bool pairwise_error, group_error; 2724 bool pairwise_error, group_error;
2725 struct ndis_80211_auth_request *auth_req; 2725 struct ndis_80211_auth_request *auth_req;
2726 enum nl80211_key_type key_type;
2726 2727
2727 /* must have at least one array entry */ 2728 /* must have at least one array entry */
2728 if (len < offsetof(struct ndis_80211_status_indication, u) + 2729 if (len < offsetof(struct ndis_80211_status_indication, u) +
@@ -2758,23 +2759,24 @@ static void rndis_wlan_auth_indication(struct usbnet *usbdev,
2758 devinfo(usbdev, "authentication indication: %s (0x%08x)", type, 2759 devinfo(usbdev, "authentication indication: %s (0x%08x)", type,
2759 le32_to_cpu(auth_req->flags)); 2760 le32_to_cpu(auth_req->flags));
2760 2761
2761 if (pairwise_error || group_error) { 2762 if (pairwise_error) {
2762 union iwreq_data wrqu; 2763 key_type = NL80211_KEYTYPE_PAIRWISE;
2763 struct iw_michaelmicfailure micfailure; 2764 key_id = -1;
2764 2765
2765 memset(&micfailure, 0, sizeof(micfailure)); 2766 cfg80211_michael_mic_failure(usbdev->net,
2766 if (pairwise_error) 2767 auth_req->bssid,
2767 micfailure.flags |= IW_MICFAILURE_PAIRWISE; 2768 key_type, key_id, NULL,
2768 if (group_error) 2769 GFP_KERNEL);
2769 micfailure.flags |= IW_MICFAILURE_GROUP; 2770 }
2770 2771
2771 memcpy(micfailure.src_addr.sa_data, auth_req->bssid, 2772 if (group_error) {
2772 ETH_ALEN); 2773 key_type = NL80211_KEYTYPE_GROUP;
2774 key_id = -1;
2773 2775
2774 memset(&wrqu, 0, sizeof(wrqu)); 2776 cfg80211_michael_mic_failure(usbdev->net,
2775 wrqu.data.length = sizeof(micfailure); 2777 auth_req->bssid,
2776 wireless_send_event(usbdev->net, IWEVMICHAELMICFAILURE, 2778 key_type, key_id, NULL,
2777 &wrqu, (u8 *)&micfailure); 2779 GFP_KERNEL);
2778 } 2780 }
2779 2781
2780 buflen -= le32_to_cpu(auth_req->length); 2782 buflen -= le32_to_cpu(auth_req->length);