Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b87e2c48 authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville
Browse files

brcmfmac: code cleanup



Removing obsolete functions and prototypes. Moving (and renaming)
defines to place with similar definitions. Removing unnecessary
includes.

Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5a7a59d2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -491,7 +491,6 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,

	sdiodev->bus_if = bus_if;
	bus_if->bus_priv.sdio = sdiodev;
	bus_if->type = SDIO_BUS;
	bus_if->align = BRCMF_SDALIGN;
	dev_set_drvdata(&func->dev, bus_if);
	dev_set_drvdata(&sdiodev->func[1]->dev, bus_if);
+6 −14
Original line number Diff line number Diff line
@@ -40,8 +40,11 @@
#define BRCMF_C_GET_SSID			25
#define BRCMF_C_SET_SSID			26
#define BRCMF_C_GET_CHANNEL			29
#define BRCMF_C_SET_CHANNEL			30
#define BRCMF_C_GET_SRL				31
#define BRCMF_C_SET_SRL				32
#define BRCMF_C_GET_LRL				33
#define BRCMF_C_SET_LRL				34
#define BRCMF_C_GET_RADIO			37
#define BRCMF_C_SET_RADIO			38
#define BRCMF_C_GET_PHYTYPE			39
@@ -60,6 +63,7 @@
#define BRCMF_C_SET_COUNTRY			84
#define BRCMF_C_GET_PM				85
#define BRCMF_C_SET_PM				86
#define BRCMF_C_GET_CURR_RATESET		114
#define BRCMF_C_GET_AP				117
#define BRCMF_C_SET_AP				118
#define BRCMF_C_GET_RSSI			127
@@ -67,6 +71,7 @@
#define BRCMF_C_SET_WSEC			134
#define BRCMF_C_GET_PHY_NOISE			135
#define BRCMF_C_GET_BSS_INFO			136
#define BRCMF_C_GET_PHYLIST			180
#define BRCMF_C_SET_SCAN_CHANNEL_TIME		185
#define BRCMF_C_SET_SCAN_UNASSOC_TIME		187
#define BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON	201
@@ -102,16 +107,8 @@
#define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff
#define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16

/* Indicates this key is using soft encrypt */
#define WL_SOFT_KEY	(1 << 0)
/* primary (ie tx) key */
#define BRCMF_PRIMARY_KEY	(1 << 1)
/* Reserved for backward compat */
#define WL_KF_RES_4	(1 << 4)
/* Reserved for backward compat */
#define WL_KF_RES_5	(1 << 5)
/* Indicates a group key for a IBSS PEER */
#define WL_IBSS_PEER_GROUP_KEY	(1 << 6)

/* For supporting multiple interfaces */
#define BRCMF_MAX_IFS	16
@@ -286,7 +283,7 @@ struct brcm_rateset_le {
	/* # rates in this set */
	__le32 count;
	/* rates in 500kbps units w/hi bit set if basic */
	u8 rates[WL_NUMRATES];
	u8 rates[BRCMF_MAXRATES_IN_SET];
};

struct brcmf_ssid {
@@ -580,11 +577,6 @@ extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx,
extern int brcmf_proto_cdc_set_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd,
				    void *buf, uint len);

extern int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name);
extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx,
			      void *pktdata, struct brcmf_event_msg *,
			      void **data_ptr);

extern int brcmf_net_attach(struct brcmf_if *ifp);
extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx,
				     s32 bssidx, char *name, u8 *mac_addr);
+0 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ struct brcmf_bus_dcmd {

/* interface structure between common and bus layer */
struct brcmf_bus {
	u8 type;		/* bus type */
	union {
		struct brcmf_sdio_dev *sdio;
		struct brcmf_usbdev *usb;
+0 −2
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@

#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
#include <defs.h>

#include <brcmu_utils.h>
#include <brcmu_wifi.h>
+0 −24
Original line number Diff line number Diff line
@@ -18,10 +18,7 @@

#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/sched.h>
#include <linux/netdevice.h>
#include <asm/unaligned.h>
#include <defs.h>
#include <brcmu_wifi.h>
#include <brcmu_utils.h>
#include "dhd.h"
@@ -30,9 +27,6 @@
#include "dhd_dbg.h"
#include "fwil.h"

#define BRCM_OUI			"\x00\x10\x18"
#define DOT11_OUI_LEN			3
#define BCMILCP_BCM_SUBTYPE_EVENT	1
#define PKTFILTER_BUF_SIZE		128
#define BRCMF_ARPOL_MODE		0xb	/* agent|snoop|peer_autoreply */
#define BRCMF_DEFAULT_BCN_TIMEOUT	3
@@ -40,8 +34,6 @@
#define BRCMF_DEFAULT_SCAN_UNASSOC_TIME	40
#define BRCMF_DEFAULT_PACKET_FILTER	"100 0 0 0 0x01 0x00"

#define MSGTRACE_VERSION	1

#ifdef DEBUG
static const char brcmf_version[] =
	"Dongle Host Driver, version " BRCMF_VERSION_STR "\nCompiled on "
@@ -51,22 +43,6 @@ static const char brcmf_version[] =
	"Dongle Host Driver, version " BRCMF_VERSION_STR;
#endif

/* Message trace header */
struct msgtrace_hdr {
	u8 version;
	u8 spare;
	__be16 len;		/* Len of the trace */
	__be32 seqnum;		/* Sequence number of message. Useful
				 * if the messsage has been lost
				 * because of DMA error or a bus reset
				 * (ex: SDIO Func2)
				 */
	__be32 discarded_bytes;	/* Number of discarded bytes because of
				 trace overflow  */
	__be32 discarded_printf;	/* Number of discarded printf
				 because of trace overflow */
} __packed;


bool brcmf_c_prec_enq(struct device *dev, struct pktq *q,
		      struct sk_buff *pkt, int prec)
Loading