[PATCH] staging: brcm80211: Purge unused bcmwpa.[ch]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move two macros into wlc_mac80211.h and purge the rest.

Signed-off-by: Brett Rudley <brudley@xxxxxxxxxxxx>
---
 drivers/staging/brcm80211/Makefile           |    1 -
 drivers/staging/brcm80211/include/bcmwpa.h   |   86 --------------------------
 drivers/staging/brcm80211/sys/wlc_mac80211.c |    1 -
 drivers/staging/brcm80211/sys/wlc_mac80211.h |    4 +
 drivers/staging/brcm80211/sys/wlc_stf.c      |    1 -
 drivers/staging/brcm80211/util/bcmwpa.c      |   56 -----------------
 6 files changed, 4 insertions(+), 145 deletions(-)
 delete mode 100644 drivers/staging/brcm80211/include/bcmwpa.h
 delete mode 100644 drivers/staging/brcm80211/util/bcmwpa.c

diff --git a/drivers/staging/brcm80211/Makefile b/drivers/staging/brcm80211/Makefile
index f65df84..1953ebe 100644
--- a/drivers/staging/brcm80211/Makefile
+++ b/drivers/staging/brcm80211/Makefile
@@ -38,7 +38,6 @@ BRCM80211_OFILES := \
 	util/bcmsrom.o \
 	util/bcmutils.o \
 	util/bcmwifi.o \
-	util/bcmwpa.o \
 	util/hndpmu.o \
 	util/linux_osl.o \
 	sys/wlc_alloc.o \
diff --git a/drivers/staging/brcm80211/include/bcmwpa.h b/drivers/staging/brcm80211/include/bcmwpa.h
deleted file mode 100644
index 52b9b5f..0000000
--- a/drivers/staging/brcm80211/include/bcmwpa.h
+++ /dev/null
@@ -1,86 +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 _BCMWPA_H_
-#define _BCMWPA_H_
-
-#include <proto/wpa.h>
-#include <proto/802.11.h>
-#include <wlioctl.h>
-
-/* Field sizes for WPA key hierarchy */
-#define WPA_MIC_KEY_LEN		16
-#define WPA_ENCR_KEY_LEN	16
-#define WPA_TEMP_ENCR_KEY_LEN	16
-#define WPA_TEMP_TX_KEY_LEN	8
-#define WPA_TEMP_RX_KEY_LEN	8
-
-#define PMK_LEN			32
-#define TKIP_PTK_LEN		64
-#define TKIP_TK_LEN		32
-#define AES_PTK_LEN		48
-#define AES_TK_LEN		16
-
-/* limits for pre-shared key lengths */
-#define WPA_MIN_PSK_LEN		8
-#define WPA_MAX_PSK_LEN		64
-
-#define WLC_SW_KEYS(wlc, bsscfg) ((((wlc)->wsec_swkeys) || \
-	((bsscfg)->wsec & WSEC_SWFLAG)))
-
-#define WSEC_WEP_ENABLED(wsec)	((wsec) & WEP_ENABLED)
-#define WSEC_TKIP_ENABLED(wsec)	((wsec) & TKIP_ENABLED)
-#define WSEC_AES_ENABLED(wsec)	((wsec) & AES_ENABLED)
-#define WSEC_ENABLED(wsec)	((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
-#define WSEC_SES_OW_ENABLED(wsec)	((wsec) & SES_OW_ENABLED)
-#define IS_WPA_AUTH(auth)	((auth) == WPA_AUTH_NONE || \
-				 (auth) == WPA_AUTH_UNSPECIFIED || \
-				 (auth) == WPA_AUTH_PSK)
-#define INCLUDES_WPA_AUTH(auth)	\
-			((auth) & (WPA_AUTH_NONE | WPA_AUTH_UNSPECIFIED | WPA_AUTH_PSK))
-
-#define IS_WPA2_AUTH(auth)	((auth) == WPA2_AUTH_UNSPECIFIED || \
-				 (auth) == WPA2_AUTH_PSK)(
-#define INCLUDES_WPA2_AUTH(auth) \
-			((auth) & (WPA2_AUTH_UNSPECIFIED | \
-				   WPA2_AUTH_PSK))
-
-#define IS_WPA_AKM(akm)	((akm) == RSN_AKM_NONE || \
-				 (akm) == RSN_AKM_UNSPECIFIED || \
-				 (akm) == RSN_AKM_PSK)
-#define IS_WPA2_AKM(akm)	((akm) == RSN_AKM_UNSPECIFIED || \
-				 (akm) == RSN_AKM_PSK)
-
-#define MAX_ARRAY 1
-#define MIN_ARRAY 0
-
-/* convert wsec to WPA mcast cipher. algo is needed only when WEP is enabled. */
-#define WPA_MCAST_CIPHER(wsec, algo)	(WSEC_WEP_ENABLED(wsec) ? \
-		((algo) == CRYPTO_ALGO_WEP128 ? WPA_CIPHER_WEP_104 : WPA_CIPHER_WEP_40) : \
-			WSEC_TKIP_ENABLED(wsec) ? WPA_CIPHER_TKIP : \
-			WSEC_AES_ENABLED(wsec) ? WPA_CIPHER_AES_CCM : \
-			WPA_CIPHER_NONE)
-
-/* Look for a WPA IE; return it's address if found, NULL otherwise */
-extern wpa_ie_fixed_t *BCMROMFN(bcm_find_wpaie) (u8 *parse, uint len);
-
-/* Check whether the given IE looks like WFA IE with the specific type. */
-extern bool bcm_is_wfa_ie(u8 *ie, u8 **tlvs, uint *tlvs_len,
-			  u8 type);
-/* Check whether pointed-to IE looks like WPA. */
-#define bcm_is_wpa_ie(ie, tlvs, len)	bcm_is_wfa_ie(ie, tlvs, len, WFA_OUI_TYPE_WPA)
-
-#endif				/* _BCMWPA_H_ */
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c
index 68c5800..7f2655e 100644
--- a/drivers/staging/brcm80211/sys/wlc_mac80211.c
+++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c
@@ -30,7 +30,6 @@
 #include <bcmsrom.h>
 #include <wlioctl.h>
 #include <epivers.h>
-#include <bcmwpa.h>
 #include <sbhnddma.h>
 #include <hnddma.h>
 #include <hndpmu.h>
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.h b/drivers/staging/brcm80211/sys/wlc_mac80211.h
index 1fb055e..2b25410 100644
--- a/drivers/staging/brcm80211/sys/wlc_mac80211.h
+++ b/drivers/staging/brcm80211/sys/wlc_mac80211.h
@@ -117,6 +117,10 @@ typedef struct wlc_bss_list {
 
 /* if wpa is in use then portopen is true when the group key is plumbed otherwise it is always true
  */
+#define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
+#define WLC_SW_KEYS(wlc, bsscfg) ((((wlc)->wsec_swkeys) || \
+	((bsscfg)->wsec & WSEC_SWFLAG)))
+
 #define WLC_PORTOPEN(cfg) \
 	(((cfg)->WPA_auth != WPA_AUTH_DISABLED && WSEC_ENABLED((cfg)->wsec)) ? \
 	(cfg)->wsec_portopen : TRUE)
diff --git a/drivers/staging/brcm80211/sys/wlc_stf.c b/drivers/staging/brcm80211/sys/wlc_stf.c
index 1ac0aaf..6c9b259 100644
--- a/drivers/staging/brcm80211/sys/wlc_stf.c
+++ b/drivers/staging/brcm80211/sys/wlc_stf.c
@@ -25,7 +25,6 @@
 #include <bcmendian.h>
 #include <proto/802.11.h>
 #include <wlioctl.h>
-#include <bcmwpa.h>
 #include <bcmwifi.h>
 #include <d11.h>
 #include <wlc_rate.h>
diff --git a/drivers/staging/brcm80211/util/bcmwpa.c b/drivers/staging/brcm80211/util/bcmwpa.c
deleted file mode 100644
index 76359a2..0000000
--- a/drivers/staging/brcm80211/util/bcmwpa.c
+++ /dev/null
@@ -1,56 +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.
- */
-
-#include <typedefs.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linuxver.h>
-#include <bcmutils.h>
-#include <bcmwpa.h>
-
-/* Is this body of this tlvs entry a WFA entry? If
- * not update the tlvs buffer pointer/length.
- */
-bool bcm_is_wfa_ie(u8 *ie, u8 **tlvs, uint *tlvs_len, u8 type)
-{
-	/* If the contents match the WFA_OUI and type */
-	if ((ie[TLV_LEN_OFF] > (WFA_OUI_LEN + 1)) &&
-	    !bcmp(&ie[TLV_BODY_OFF], WFA_OUI, WFA_OUI_LEN) &&
-	    type == ie[TLV_BODY_OFF + WFA_OUI_LEN]) {
-		return TRUE;
-	}
-
-	/* point to the next ie */
-	ie += ie[TLV_LEN_OFF] + TLV_HDR_LEN;
-	/* calculate the length of the rest of the buffer */
-	*tlvs_len -= (int)(ie - *tlvs);
-	/* update the pointer to the start of the buffer */
-	*tlvs = ie;
-
-	return FALSE;
-}
-
-wpa_ie_fixed_t *BCMROMFN(bcm_find_wpaie) (u8 * parse, uint len)
-{
-	bcm_tlv_t *ie;
-
-	while ((ie = bcm_parse_tlvs(parse, len, DOT11_MNG_VS_ID))) {
-		if (bcm_is_wpa_ie((u8 *) ie, &parse, &len)) {
-			return (wpa_ie_fixed_t *) ie;
-		}
-	}
-	return NULL;
-}
-- 
1.6.3.3


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux