[PATCH2 11/11] staging: brcm80211: remove unused type definitions from driver

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

 



Quite some definitions are not referenced in the drivers sources and
clutter up the files so they are removed.

Reviewed-by: Brett Rudley <brudley@xxxxxxxxxxxx>
Reviewed-by: Henry Ptasinski <henryp@xxxxxxxxxxxx>
Reviewed-by: Roland Vossen <rvossen@xxxxxxxxxxxx>
Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
---
 drivers/staging/brcm80211/brcmfmac/dhd.h           |   11 +----
 drivers/staging/brcm80211/brcmfmac/hndrte_cons.h   |    5 ++
 drivers/staging/brcm80211/brcmfmac/wl_iw.h         |    6 ---
 drivers/staging/brcm80211/brcmsmac/wl_mac80211.c   |   30 ---------------
 drivers/staging/brcm80211/brcmsmac/wl_mac80211.h   |    9 ----
 drivers/staging/brcm80211/brcmsmac/wlc_bmac.h      |   40 --------------------
 drivers/staging/brcm80211/brcmsmac/wlc_key.h       |    3 -
 drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h  |    3 -
 drivers/staging/brcm80211/brcmsmac/wlc_pub.h       |    3 -
 drivers/staging/brcm80211/include/bcmnvram.h       |    6 ---
 drivers/staging/brcm80211/include/bcmutils.h       |   24 +-----------
 drivers/staging/brcm80211/include/proto/bcmevent.h |    8 ----
 12 files changed, 9 insertions(+), 139 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/dhd.h b/drivers/staging/brcm80211/brcmfmac/dhd.h
index 014a2de..a78b20a 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd.h
+++ b/drivers/staging/brcm80211/brcmfmac/dhd.h
@@ -49,13 +49,6 @@ enum dhd_bus_state {
 	DHD_BUS_DATA		/* Ready for frame transfers */
 };
 
-enum dhd_prealloc_index {
-	DHD_PREALLOC_PROT = 0,
-	DHD_PREALLOC_RXBUF,
-	DHD_PREALLOC_DATABUF,
-	DHD_PREALLOC_OSL_BUF
-};
-
 /* Common structure for module and instance linkage */
 typedef struct dhd_pub {
 	/* Linkage ponters */
@@ -332,12 +325,12 @@ extern int dhd_bus_devreset(dhd_pub_t *dhdp, u8 flag);
 extern uint dhd_bus_status(dhd_pub_t *dhdp);
 extern int dhd_bus_start(dhd_pub_t *dhdp);
 
-typedef enum cust_gpio_modes {
+enum cust_gpio_modes {
 	WLAN_RESET_ON,
 	WLAN_RESET_OFF,
 	WLAN_POWER_ON,
 	WLAN_POWER_OFF
-} cust_gpio_modes_t;
+};
 /*
  * Insmod parameters for debug/test
  */
diff --git a/drivers/staging/brcm80211/brcmfmac/hndrte_cons.h b/drivers/staging/brcm80211/brcmfmac/hndrte_cons.h
index 5caa53f..4df3eec 100644
--- a/drivers/staging/brcm80211/brcmfmac/hndrte_cons.h
+++ b/drivers/staging/brcm80211/brcmfmac/hndrte_cons.h
@@ -13,6 +13,8 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+#ifndef _hndrte_cons_h
+#define _hndrte_cons_h
 
 #define CBUF_LEN	(128)
 
@@ -55,3 +57,6 @@ typedef struct {
 	uint cbuf_idx;
 	char cbuf[CBUF_LEN];
 } hndrte_cons_t;
+
+#endif /* _hndrte_cons_h */
+
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.h b/drivers/staging/brcm80211/brcmfmac/wl_iw.h
index 08e11fb..fe06174 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_iw.h
+++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.h
@@ -139,10 +139,4 @@ extern int dhd_dev_get_pno_status(struct net_device *dev);
 #define PNO_TLV_TYPE_TIME		'T'
 #define  PNO_EVENT_UP			"PNO_EVENT"
 
-typedef struct cmd_tlv {
-	char prefix;
-	char version;
-	char subver;
-	char reserved;
-} cmd_tlv_t;
 #endif				/* _wl_iw_h_ */
diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
index e8b3505..c2663bd 100644
--- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
+++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
@@ -68,36 +68,6 @@ static int wl_linux_watchdog(void *ctx);
 
 static int wl_found;
 
-struct ieee80211_tkip_data {
-#define TKIP_KEY_LEN 32
-	u8 key[TKIP_KEY_LEN];
-	int key_set;
-
-	u32 tx_iv32;
-	u16 tx_iv16;
-	u16 tx_ttak[5];
-	int tx_phase1_done;
-
-	u32 rx_iv32;
-	u16 rx_iv16;
-	u16 rx_ttak[5];
-	int rx_phase1_done;
-	u32 rx_iv32_new;
-	u16 rx_iv16_new;
-
-	u32 dot11RSNAStatsTKIPReplays;
-	u32 dot11RSNAStatsTKIPICVErrors;
-	u32 dot11RSNAStatsTKIPLocalMICFailures;
-
-	int key_idx;
-
-	struct crypto_tfm *tfm_arc4;
-	struct crypto_tfm *tfm_michael;
-
-	/* scratch buffers for virt_to_page() (crypto API) */
-	u8 rx_hdr[16], tx_hdr[16];
-};
-
 #define WL_DEV_IF(dev)		((struct wl_if *)netdev_priv(dev))
 #define	WL_INFO(dev)		((struct wl_info *)(WL_DEV_IF(dev)->wl))
 static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev);
diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.h b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.h
index bb39b77..070fa94 100644
--- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.h
+++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.h
@@ -37,15 +37,6 @@ typedef struct wl_timer {
 #endif
 } wl_timer_t;
 
-/* contortion to call functions at safe time */
-/* In 2.6.20 kernels work functions get passed a pointer to the struct work, so things
- * will continue to work as long as the work structure is the first component of the task structure.
- */
-typedef struct wl_task {
-	struct work_struct work;
-	void *context;
-} wl_task_t;
-
 struct wl_if {
 	uint subunit;		/* WDS/BSS unit */
 	struct pci_dev *pci_dev;
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.h b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.h
index 49739e6..5eabb8e 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.h
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.h
@@ -25,38 +25,6 @@
  *  create wrappers in wlc.c if needed
  */
 
-/* Revision and other info required from BMAC driver for functioning of high ONLY driver */
-typedef struct wlc_bmac_revinfo {
-	uint vendorid;		/* PCI vendor id */
-	uint deviceid;		/* device id of chip */
-
-	uint boardrev;		/* version # of particular board */
-	uint corerev;		/* core revision */
-	uint sromrev;		/* srom revision */
-	uint chiprev;		/* chip revision */
-	uint chip;		/* chip number */
-	uint chippkg;		/* chip package */
-	uint boardtype;		/* board type */
-	uint boardvendor;	/* board vendor */
-	uint bustype;		/* SB_BUS, PCI_BUS  */
-	uint buscoretype;	/* PCI_CORE_ID, PCIE_CORE_ID, PCMCIA_CORE_ID */
-	uint buscorerev;	/* buscore rev */
-	u32 issim;		/* chip is in simulation or emulation */
-
-	uint nbands;
-
-	struct band_info {
-		uint bandunit;	/* To match on both sides */
-		uint bandtype;	/* To match on both sides */
-		uint radiorev;
-		uint phytype;
-		uint phyrev;
-		uint anarev;
-		uint radioid;
-		bool abgphy_encore;
-	} band[MAXBANDS];
-} wlc_bmac_revinfo_t;
-
 /* dup state between BMAC(struct wlc_hw_info) and HIGH(struct wlc_info)
    driver */
 typedef struct wlc_bmac_state {
@@ -123,14 +91,6 @@ typedef enum {
 	BMAC_DUMP_LAST
 } wlc_bmac_dump_id_t;
 
-typedef enum {
-	WLCHW_STATE_ATTACH,
-	WLCHW_STATE_CLK,
-	WLCHW_STATE_UP,
-	WLCHW_STATE_ASSOC,
-	WLCHW_STATE_LAST
-} wlc_bmac_state_id_t;
-
 extern int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device,
 			   uint unit, bool piomode, struct osl_info *osh,
 			   void *regsva, uint bustype, void *btparam);
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_key.h b/drivers/staging/brcm80211/brcmsmac/wlc_key.h
index 3e23d51..4991e99 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_key.h
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_key.h
@@ -106,9 +106,6 @@ typedef struct wsec_key {
 } wsec_key_t;
 
 #define broken_roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
-typedef struct {
-	u8 vec[broken_roundup(WSEC_MAX_KEYS, NBBY) / NBBY];	/* bitvec of wsec_key indexes */
-} wsec_key_vec_t;
 
 /* For use with wsec_key_t.flags */
 
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h
index f56b581..5817a49 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h
@@ -346,9 +346,6 @@ struct wlcband {
 	u16 bcntsfoff;	/* beacon tsf offset */
 };
 
-/* generic function callback takes just one arg */
-typedef void (*cb_fn_t) (void *);
-
 /* tx completion callback takes 3 args */
 typedef void (*pkcb_fn_t) (struct wlc_info *wlc, uint txstatus, void *arg);
 
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h
index 23e9968..e8b252a 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h
@@ -149,9 +149,6 @@ struct rsn_parms {
 	IEEE80211_HT_CAP_SUP_WIDTH_20_40 | IEEE80211_HT_CAP_GRN_FLD |\
 	HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_DSSSCCK40)
 
-/* WLC packet type is a void * */
-typedef void *wlc_pkt_t;
-
 /* Event data type */
 typedef struct wlc_event {
 	wl_event_msg_t event;	/* encapsulated event */
diff --git a/drivers/staging/brcm80211/include/bcmnvram.h b/drivers/staging/brcm80211/include/bcmnvram.h
index 63e31a4..e194131 100644
--- a/drivers/staging/brcm80211/include/bcmnvram.h
+++ b/drivers/staging/brcm80211/include/bcmnvram.h
@@ -29,12 +29,6 @@ struct nvram_header {
 	u32 config_ncdl;	/* ncdl values for memc */
 };
 
-struct nvram_tuple {
-	char *name;
-	char *value;
-	struct nvram_tuple *next;
-};
-
 /*
  * Get default value for an NVRAM variable
  */
diff --git a/drivers/staging/brcm80211/include/bcmutils.h b/drivers/staging/brcm80211/include/bcmutils.h
index a871acd..8e7f2ea 100644
--- a/drivers/staging/brcm80211/include/bcmutils.h
+++ b/drivers/staging/brcm80211/include/bcmutils.h
@@ -54,12 +54,12 @@
 #define PKTQ_MAX_PREC           16	/* Maximum precedence levels */
 #endif
 
-	typedef struct pktq_prec {
+	struct pktq_prec {
 		struct sk_buff *head;	/* first packet to dequeue */
 		struct sk_buff *tail;	/* last packet to dequeue */
 		u16 len;		/* number of queued packets */
 		u16 max;		/* maximum number of queued packets */
-	} pktq_prec_t;
+	};
 
 /* multi-priority pkt queue */
 	struct pktq {
@@ -71,16 +71,6 @@
 		struct pktq_prec q[PKTQ_MAX_PREC];
 	};
 
-/* simple, non-priority pkt queue */
-	struct spktq {
-		u16 num_prec;	/* number of precedences in use (always 1) */
-		u16 hi_prec;	/* rapid dequeue hint (>= highest non-empty prec) */
-		u16 max;	/* total max packets */
-		u16 len;	/* total number of packets */
-		/* q array must be last since # of elements can be either PKTQ_MAX_PREC or 1 */
-		struct pktq_prec q[1];
-	};
-
 #define PKTQ_PREC_ITER(pq, prec)        for (prec = (pq)->num_prec - 1; prec >= 0; prec--)
 
 /* fn(pkt, arg).  return true if pkt belongs to if */
@@ -491,19 +481,9 @@ extern struct sk_buff *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out);
 	extern u16 bcm_qdbm_to_mw(u8 qdbm);
 	extern u8 bcm_mw_to_qdbm(u16 mw);
 
-/* generic datastruct to help dump routines */
-	struct fielddesc {
-		const char *nameandfmt;
-		u32 offset;
-		u32 len;
-	};
-
 	extern void bcm_binit(struct bcmstrbuf *b, char *buf, uint size);
 	extern int bcm_bprintf(struct bcmstrbuf *b, const char *fmt, ...);
 
-	typedef u32(*bcmutl_rdreg_rtn) (void *arg0, uint arg1,
-					   u32 offset);
-
 	extern uint bcm_mkiovar(char *name, char *data, uint datalen, char *buf,
 				uint len);
 	extern uint bcm_bitcount(u8 *bitmap, uint bytelength);
diff --git a/drivers/staging/brcm80211/include/proto/bcmevent.h b/drivers/staging/brcm80211/include/proto/bcmevent.h
index f020e3f..1b60789 100644
--- a/drivers/staging/brcm80211/include/proto/bcmevent.h
+++ b/drivers/staging/brcm80211/include/proto/bcmevent.h
@@ -191,14 +191,6 @@ extern const int bcmevent_names_size;
 #define WLC_E_SUP_SEND_FAIL		13
 #define WLC_E_SUP_DEAUTH		14
 
-typedef struct wl_event_data_if {
-	u8 ifidx;
-	u8 opcode;
-	u8 reserved;
-	u8 bssidx;
-	u8 role;
-} wl_event_data_if_t;
-
 #define WLC_E_IF_ADD		1
 #define WLC_E_IF_DEL		2
 #define WLC_E_IF_CHANGE		3
-- 
1.7.1


_______________________________________________
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