]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/rndis_wlan.c
rndis_wlan: disable IWEVPMKIDCAND wireless event
[~andy/linux] / drivers / net / wireless / rndis_wlan.c
index 61a7693baf92f9ada6314cec43dcb4cd4433de33..9d9750dbec84e2ec91cc9717e6463abaacd10b85 100644 (file)
@@ -2179,13 +2179,6 @@ static int rndis_dump_station(struct wiphy *wiphy, struct net_device *dev,
  * wireless extension handlers
  */
 
-static int rndis_iw_commit(struct net_device *dev,
-    struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
-{
-       /* dummy op */
-       return 0;
-}
-
 #if 0
 /* Commented code out instead of removing to have more sane patch for review.
  * Will be removed later in the set.
@@ -2558,7 +2551,6 @@ static struct iw_statistics *rndis_get_wireless_stats(struct net_device *dev)
 #define IW_IOCTL(x) [(x) - SIOCSIWCOMMIT]
 static const iw_handler rndis_iw_handler[] =
 {
-       IW_IOCTL(SIOCSIWCOMMIT)    = rndis_iw_commit,
        IW_IOCTL(SIOCGIWNAME)      = (iw_handler) cfg80211_wext_giwname,
        IW_IOCTL(SIOCSIWFREQ)      = (iw_handler) cfg80211_wext_siwfreq,
        IW_IOCTL(SIOCGIWFREQ)      = (iw_handler) cfg80211_wext_giwfreq,
@@ -2728,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) +
@@ -2766,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);
@@ -2827,14 +2821,16 @@ static void rndis_wlan_pmkid_cand_list_indication(struct usbnet *usbdev,
                return;
 
        for (i = 0; i < le32_to_cpu(cand_list->num_candidates); i++) {
-               struct iw_pmkid_cand pcand;
-               union iwreq_data wrqu;
                struct ndis_80211_pmkid_candidate *cand =
                                                &cand_list->candidate_list[i];
 
                devdbg(usbdev, "cand[%i]: flags: 0x%08x, bssid: %pM",
                                i, le32_to_cpu(cand->flags), cand->bssid);
 
+#if 0
+               struct iw_pmkid_cand pcand;
+               union iwreq_data wrqu;
+
                memset(&pcand, 0, sizeof(pcand));
                if (le32_to_cpu(cand->flags) & 0x01)
                        pcand.flags |= IW_PMKID_CAND_PREAUTH;
@@ -2845,6 +2841,7 @@ static void rndis_wlan_pmkid_cand_list_indication(struct usbnet *usbdev,
                wrqu.data.length = sizeof(pcand);
                wireless_send_event(usbdev->net, IWEVPMKIDCAND, &wrqu,
                                                                (u8 *)&pcand);
+#endif
        }
 }