]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: brcm80211: removed usage of proto/wpa.h file
authorArend van Spriel <arend@broadcom.com>
Wed, 22 Dec 2010 08:30:13 +0000 (09:30 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 Jan 2011 23:17:41 +0000 (15:17 -0800)
Definitions used either had linux equivalent or were only used in
one source file. Changes were made accordingly and proto/wpa.h
has been removed from the driver sources.

Reviewed-by: Brett Rudley <brudley@broadcom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Dowan Kim <dowan@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
drivers/staging/brcm80211/brcmfmac/wl_iw.c
drivers/staging/brcm80211/include/proto/802.11.h
drivers/staging/brcm80211/include/proto/wpa.h [deleted file]
drivers/staging/brcm80211/include/wlioctl.h
drivers/staging/brcm80211/sys/wlc_mac80211.c

index f857d381f5c48a6c7830d537751f45276fd29bbb..e4670641b774e848a602f6f83e0286d21a63c3bd 100644 (file)
@@ -2004,8 +2004,8 @@ wl_update_pmklist(struct net_device *dev, struct wl_pmk_list *pmk_list,
        WL_DBG("No of elements %d\n", pmk_list->pmkids.npmkid);
        for (i = 0; i < pmk_list->pmkids.npmkid; i++) {
                WL_DBG("PMKID[%d]: %pM =\n", i,
-                      &pmk_list->pmkids.pmkid[i].BSSID);
-               for (j = 0; j < WPA2_PMKID_LEN; j++) {
+                       &pmk_list->pmkids.pmkid[i].BSSID);
+               for (j = 0; j < WLAN_PMKID_LEN; j++) {
                        WL_DBG("%02x\n", pmk_list->pmkids.pmkid[i].PMKID[j]);
                }
        }
@@ -2034,7 +2034,7 @@ wl_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *dev,
                memcpy(&wl->pmk_list->pmkids.pmkid[i].BSSID, pmksa->bssid,
                       ETH_ALEN);
                memcpy(&wl->pmk_list->pmkids.pmkid[i].PMKID, pmksa->pmkid,
-                      WPA2_PMKID_LEN);
+                      WLAN_PMKID_LEN);
                if (i == wl->pmk_list->pmkids.npmkid)
                        wl->pmk_list->pmkids.npmkid++;
        } else {
@@ -2042,7 +2042,7 @@ wl_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *dev,
        }
        WL_DBG("set_pmksa,IW_PMKSA_ADD - PMKID: %pM =\n",
               &wl->pmk_list->pmkids.pmkid[wl->pmk_list->pmkids.npmkid].BSSID);
-       for (i = 0; i < WPA2_PMKID_LEN; i++) {
+       for (i = 0; i < WLAN_PMKID_LEN; i++) {
                WL_DBG("%02x\n",
                       wl->pmk_list->pmkids.pmkid[wl->pmk_list->pmkids.npmkid].
                       PMKID[i]);
@@ -2064,11 +2064,11 @@ wl_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
 
        CHECK_SYS_UP();
        memcpy(&pmkid.pmkid[0].BSSID, pmksa->bssid, ETH_ALEN);
-       memcpy(&pmkid.pmkid[0].PMKID, pmksa->pmkid, WPA2_PMKID_LEN);
+       memcpy(&pmkid.pmkid[0].PMKID, pmksa->pmkid, WLAN_PMKID_LEN);
 
        WL_DBG("del_pmksa,IW_PMKSA_REMOVE - PMKID: %pM =\n",
               &pmkid.pmkid[0].BSSID);
-       for (i = 0; i < WPA2_PMKID_LEN; i++) {
+       for (i = 0; i < WLAN_PMKID_LEN; i++) {
                WL_DBG("%02x\n", pmkid.pmkid[0].PMKID[i]);
        }
 
@@ -2087,7 +2087,7 @@ wl_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
                               ETH_ALEN);
                        memcpy(&wl->pmk_list->pmkids.pmkid[i].PMKID,
                               &wl->pmk_list->pmkids.pmkid[i + 1].PMKID,
-                              WPA2_PMKID_LEN);
+                              WLAN_PMKID_LEN);
                }
                wl->pmk_list->pmkids.npmkid--;
        } else {
index 00700c69a054513892620b0a33a720e966a2c899..92727cbf0a7cc3ecb1c2b26947b58476da380a0d 100644 (file)
@@ -2652,11 +2652,11 @@ wl_iw_set_pmksa(struct net_device *dev,
                        bcopy(&iwpmksa->bssid.sa_data[0],
                              &pmkidptr->pmkid[0].BSSID, ETH_ALEN);
                        bcopy(&iwpmksa->pmkid[0], &pmkidptr->pmkid[0].PMKID,
-                             WPA2_PMKID_LEN);
+                             WLAN_PMKID_LEN);
 
-                       WL_WSEC("wl_iw_set_pmksa:IW_PMKSA_REMOVE:PMKID: %pM = ",
-                               &pmkidptr->pmkid[0].BSSID);
-                       for (j = 0; j < WPA2_PMKID_LEN; j++)
+                       WL_WSEC("wl_iw_set_pmksa:IW_PMKSA_REMOVE:PMKID: "
+                               "%pM = ", &pmkidptr->pmkid[0].BSSID);
+                       for (j = 0; j < WLAN_PMKID_LEN; j++)
                                WL_WSEC("%02x ", pmkidptr->pmkid[0].PMKID[j]);
                        WL_WSEC("\n");
                }
@@ -2676,7 +2676,7 @@ wl_iw_set_pmksa(struct net_device *dev,
                                      ETH_ALEN);
                                bcopy(&pmkid_list.pmkids.pmkid[i + 1].PMKID,
                                      &pmkid_list.pmkids.pmkid[i].PMKID,
-                                     WPA2_PMKID_LEN);
+                                     WLAN_PMKID_LEN);
                        }
                        pmkid_list.pmkids.npmkid--;
                } else
@@ -2695,7 +2695,7 @@ wl_iw_set_pmksa(struct net_device *dev,
                              ETH_ALEN);
                        bcopy(&iwpmksa->pmkid[0],
                              &pmkid_list.pmkids.pmkid[i].PMKID,
-                             WPA2_PMKID_LEN);
+                             WLAN_PMKID_LEN);
                        if (i == pmkid_list.pmkids.npmkid)
                                pmkid_list.pmkids.npmkid++;
                } else
@@ -2706,7 +2706,7 @@ wl_iw_set_pmksa(struct net_device *dev,
                        k = pmkid_list.pmkids.npmkid;
                        WL_WSEC("wl_iw_set_pmksa,IW_PMKSA_ADD - PMKID: %pM = ",
                                &pmkid_list.pmkids.pmkid[k].BSSID);
-                       for (j = 0; j < WPA2_PMKID_LEN; j++)
+                       for (j = 0; j < WLAN_PMKID_LEN; j++)
                                WL_WSEC("%02x ",
                                        pmkid_list.pmkids.pmkid[k].PMKID[j]);
                        WL_WSEC("\n");
@@ -2718,7 +2718,7 @@ wl_iw_set_pmksa(struct net_device *dev,
                uint j;
                WL_WSEC("PMKID[%d]: %pM = ",
                        i, &pmkid_list.pmkids.pmkid[i].BSSID);
-               for (j = 0; j < WPA2_PMKID_LEN; j++)
+               for (j = 0; j < WLAN_PMKID_LEN; j++)
                        WL_WSEC("%02x ", pmkid_list.pmkids.pmkid[i].PMKID[j]);
                WL_WSEC("\n");
        }
index ffde19c5ac5c312665fc4e3f293d54ce057babfd..d1ee416c1176808e2e419f87f75526896a9fcc30 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _802_11_H_
 #define _802_11_H_
 
-#include <proto/wpa.h>
+#include <proto/ethernet.h>
 #include <packed_section_start.h>
 
 #define DOT11_A3_HDR_LEN               24
diff --git a/drivers/staging/brcm80211/include/proto/wpa.h b/drivers/staging/brcm80211/include/proto/wpa.h
deleted file mode 100644 (file)
index 10c2fb6..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2010 Broadcom Corporation
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _proto_wpa_h_
-#define _proto_wpa_h_
-
-#include <proto/ethernet.h>
-
-#define WPA2_PMKID_LEN 16
-#define RSN_CAP_1_REPLAY_CNTR          0
-#define RSN_CAP_2_REPLAY_CNTRS         1
-#define RSN_CAP_4_REPLAY_CNTRS         2
-#define RSN_CAP_16_REPLAY_CNTRS                3
-
-#define WPA_CAP_4_REPLAY_CNTRS         RSN_CAP_4_REPLAY_CNTRS
-#define WPA_CAP_16_REPLAY_CNTRS                RSN_CAP_16_REPLAY_CNTRS
-#define WPA_CAP_REPLAY_CNTR_SHIFT      RSN_CAP_PTK_REPLAY_CNTR_SHIFT
-#define WPA_CAP_REPLAY_CNTR_MASK       RSN_CAP_PTK_REPLAY_CNTR_MASK
-
-#endif                         /* _proto_wpa_h_ */
index 9be793c5f10c33320c8bc93a864725b20783cb14..f909c12b8ac08e828379ce25755dcc58149f4356 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef _wlioctl_h_
 #define        _wlioctl_h_
 
+#include <linux/ieee80211.h>
 #include <proto/ethernet.h>
 #ifdef BRCM_FULLMAC
 #include <proto/bcmeth.h>
@@ -535,7 +536,7 @@ typedef struct {
 
 typedef struct _pmkid {
        struct ether_addr BSSID;
-       u8 PMKID[WPA2_PMKID_LEN];
+       u8 PMKID[WLAN_PMKID_LEN];
 } pmkid_t;
 
 typedef struct _pmkid_list {
index 9c57573ceaa5b97a55ca8555a72112410307ac38..43ee132e09dc44ce20276c897b045fe12754672d 100644 (file)
@@ -24,7 +24,6 @@
 #include <bcmwifi.h>
 #include <siutils.h>
 #include <bcmendian.h>
-#include <proto/wpa.h>
 #include <pcicfg.h>
 #include <bcmsrom.h>
 #include <wlioctl.h>
 #include <wl_dbg.h>
 
 
+/*
+ * WPA(2) definitions
+ */
+#define RSN_CAP_4_REPLAY_CNTRS         2
+#define RSN_CAP_16_REPLAY_CNTRS                3
+
+#define WPA_CAP_4_REPLAY_CNTRS         RSN_CAP_4_REPLAY_CNTRS
+#define WPA_CAP_16_REPLAY_CNTRS                RSN_CAP_16_REPLAY_CNTRS
+
 /*
  * buffer length needed for wlc_format_ssid
  * 32 SSID chars, max of 4 chars for each SSID char "\xFF", plus NULL.