From patchwork Fri Aug 28 10:28:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jussi Kivilinna X-Patchwork-Id: 44441 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7SASRrF023640 for ; Fri, 28 Aug 2009 10:28:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165AbZH1K2Y (ORCPT ); Fri, 28 Aug 2009 06:28:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752158AbZH1K2Y (ORCPT ); Fri, 28 Aug 2009 06:28:24 -0400 Received: from sypressi.dnainternet.net ([83.102.40.135]:44128 "EHLO sypressi.dnainternet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752033AbZH1K2X (ORCPT ); Fri, 28 Aug 2009 06:28:23 -0400 Received: from localhost (localhost [127.0.0.1]) by sypressi.dnainternet.net (Postfix) with ESMTP id F3C4D102224; Fri, 28 Aug 2009 13:24:13 +0300 (EEST) X-Virus-Scanned: DNA Postiturva at dnainternet.net X-Spam-Flag: NO X-Spam-Score: -0.484 X-Spam-Level: X-Spam-Status: No, score=-0.484 tagged_above=-9999 required=6 tests=[AWL=-0.484] Received: from sypressi.dnainternet.net ([83.102.40.135]) by localhost (sypressi.dnainternet.net [127.0.0.1]) (amavisd-new, port 10041) with ESMTP id R+tsbzHXiiKT; Fri, 28 Aug 2009 13:24:13 +0300 (EEST) Received: from oliivipuu.dnainternet.net (oliivipuu.dnainternet.net [83.102.40.215]) by sypressi.dnainternet.net (Postfix) with ESMTP id CD712E3033; Fri, 28 Aug 2009 13:24:13 +0300 (EEST) Received: from fate.lan (dyn2-85-23-163-149.psoas.suomi.net [85.23.163.149]) by oliivipuu.dnainternet.net (Postfix) with ESMTP id DD2FD2BAD9; Fri, 28 Aug 2009 13:28:24 +0300 (EEST) From: Jussi Kivilinna Subject: [RFC PATCH 08/10] rndis_wlan: convert mic failure wireless event to cfg80211 To: linux-wireless@vger.kernel.org Cc: "John W. Linville" , Johannes Berg Date: Fri, 28 Aug 2009 13:28:24 +0300 Message-ID: <20090828102824.15684.18948.stgit@fate.lan> In-Reply-To: <20090828102742.15684.10566.stgit@fate.lan> References: <20090828102742.15684.10566.stgit@fate.lan> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Jussi Kivilinna --- drivers/net/wireless/rndis_wlan.c | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 6919c54..01cd341 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);