Skip to contentSkip to conversation

staging: brcm80211: code cleanup and fullmac bugfix

PATCH In review Roland Vossen 8 participants 36 messages Jun 9, 2011 – Jun 28, 2011 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: brcm80211: code cleanup and fullmac bugfix

Arend van Spriel (9):
staging: brcm80211: remove 'used' keyword from function ai_ispcie()
staging: brcm80211: remove regs variable from brcms_ioctl function
staging: brcm80211: remove d11regs_t parameter from wlc_tbtt function
staging: brcm80211: remove device id parameter from ai_attach()
staging: brcm80211: remove unused fields from struct si_info
staging: brcm80211: use __BIG_ENDIAN macro in dma.c
staging: brcm80211: remove checkpatch errors found in fullmac
staging: brcm80211: fix checkpatch errors from main.c
staging: brcm80211: fix checkpatch errors in brcmsmac driver

Franky Lin (1):
staging: brcm80211: Remove flags from wl_is_nonetwork

Roland Vossen (10):
staging: brcm80211: moved typedefs to decrease header file
dependencies
staging: brcm80211: cleaned brcmu_utils.h
staging: brcm80211: #include reduction
staging: brcm80211: fixed double #include problem
staging: brcm80211: replaced bmac acronym by brcms_b_
staging: brcm80211: replaced wlc_ by brcms_c_
staging: brcm80211: removed superfluous forward struct declarations
staging: brcm80211: further replaced wlc_ by brcmsmac_c_
staging: brcm80211: replaced wlc_ by brcms_c_, part 2
staging: brcm80211: change wl_cfg80211_suspend corresponding to

    cfg80211

Sukesh Srikakula (1):
staging: brcm80211: Fix for suspend issue in brcmfmac driver

 drivers/staging/brcm80211/brcmfmac/bcmsdh.c        |    7 +-
 drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c  |   20 +-
 .../brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c        |   19 +-
 drivers/staging/brcm80211/brcmfmac/dhd_cdc.c       |   10 +-
 drivers/staging/brcm80211/brcmfmac/dhd_common.c    |   14 +-
 .../staging/brcm80211/brcmfmac/dhd_custom_gpio.c   |    4 +-
 drivers/staging/brcm80211/brcmfmac/dhd_linux.c     |   24 +-
 drivers/staging/brcm80211/brcmfmac/dhd_sdio.c      |   15 +-
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c   |   76 +-
 drivers/staging/brcm80211/brcmfmac/wl_iw.c         |   22 +-
 drivers/staging/brcm80211/brcmsmac/aiutils.c       |   45 +-
 drivers/staging/brcm80211/brcmsmac/aiutils.h       |   18 +-
 drivers/staging/brcm80211/brcmsmac/alloc.c         |   94 +-
 drivers/staging/brcm80211/brcmsmac/alloc.h         |    5 +-
 drivers/staging/brcm80211/brcmsmac/ampdu.c         |  199 ++--
 drivers/staging/brcm80211/brcmsmac/ampdu.h         |   15 +-
 drivers/staging/brcm80211/brcmsmac/antsel.c        |   77 +-
 drivers/staging/brcm80211/brcmsmac/antsel.h        |   10 +-
 drivers/staging/brcm80211/brcmsmac/bmac.c          |  846 ++++++------
 drivers/staging/brcm80211/brcmsmac/bmac.h          |  127 +-
 drivers/staging/brcm80211/brcmsmac/channel.c       |  254 ++--
 drivers/staging/brcm80211/brcmsmac/channel.h       |   26 +-
 drivers/staging/brcm80211/brcmsmac/d11.h           |   55 +-
 drivers/staging/brcm80211/brcmsmac/dma.c           |   28 +-
 drivers/staging/brcm80211/brcmsmac/dma.h           |   21 +-
 drivers/staging/brcm80211/brcmsmac/mac80211_if.c   |  118 +-
 drivers/staging/brcm80211/brcmsmac/mac80211_if.h   |    7 +-
 drivers/staging/brcm80211/brcmsmac/main.c          | 1384 ++++++++++----------
 drivers/staging/brcm80211/brcmsmac/main.h          |  321 +++---
 drivers/staging/brcm80211/brcmsmac/nicpci.c        |   13 +-
 drivers/staging/brcm80211/brcmsmac/nicpci.h        |    4 +-
 drivers/staging/brcm80211/brcmsmac/otp.c           |   14 +-
 drivers/staging/brcm80211/brcmsmac/otp.h           |    2 +
 drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c   |   23 +-
 drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h   |   33 +-
 drivers/staging/brcm80211/brcmsmac/phy/phy_int.h   |   98 +-
 drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c   |   21 +-
 drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.h   |    2 +
 drivers/staging/brcm80211/brcmsmac/phy/phy_n.c     |   24 +-
 drivers/staging/brcm80211/brcmsmac/phy/phy_qmath.c |    2 -
 drivers/staging/brcm80211/brcmsmac/phy/phy_qmath.h |    2 +
 .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.c    |    6 +-
 .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.h    |    7 +-
 drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.c  |    7 +-
 drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.h  |    3 +-
 drivers/staging/brcm80211/brcmsmac/phy_shim.c      |   73 +-
 drivers/staging/brcm80211/brcmsmac/phy_shim.h      |    9 +-
 drivers/staging/brcm80211/brcmsmac/pmu.c           |    6 +-
 drivers/staging/brcm80211/brcmsmac/pmu.h           |    5 +-
 drivers/staging/brcm80211/brcmsmac/pub.h           |  155 ++--
 drivers/staging/brcm80211/brcmsmac/rate.c          |   46 +-
 drivers/staging/brcm80211/brcmsmac/rate.h          |   38 +-
 drivers/staging/brcm80211/brcmsmac/scb.h           |   12 +-
 drivers/staging/brcm80211/brcmsmac/srom.c          |   21 +-
 drivers/staging/brcm80211/brcmsmac/srom.h          |    2 +
 drivers/staging/brcm80211/brcmsmac/stf.c           |  108 +-
 drivers/staging/brcm80211/brcmsmac/stf.h           |   30 +-
 drivers/staging/brcm80211/brcmsmac/types.h         |  105 ++-
 drivers/staging/brcm80211/brcmsmac/ucode_loader.c  |    2 +-
 drivers/staging/brcm80211/brcmutil/utils.c         |   10 -
 drivers/staging/brcm80211/brcmutil/wifi.c          |    5 -
 drivers/staging/brcm80211/include/brcmu_utils.h    |  114 +--
 drivers/staging/brcm80211/include/defs.h           |    2 +
 63 files changed, 2384 insertions(+), 2481 deletions(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/21 staging: brcm80211: moved typedefs to decrease header file dependencies

Code cleanup. Moved the typedefs to brcmsmac/types.h for source files that only require opaque pointer definitions. Next patches will decrease the number of #includes for each file.

---
 drivers/staging/brcm80211/brcmsmac/aiutils.h       |   10 ++-
 drivers/staging/brcm80211/brcmsmac/bmac.h          |    4 +-
 drivers/staging/brcm80211/brcmsmac/channel.h       |   12 +--
 drivers/staging/brcm80211/brcmsmac/d11.h           |   51 +++++-------
 drivers/staging/brcm80211/brcmsmac/dma.h           |   16 ++--
 drivers/staging/brcm80211/brcmsmac/main.h          |   11 +--
 drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h   |   23 ++---
 drivers/staging/brcm80211/brcmsmac/phy/phy_int.h   |   88 +++++++++-----------
 .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.h    |    6 +-
 drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.h  |    2 -
 drivers/staging/brcm80211/brcmsmac/phy_shim.h      |    1 -
 drivers/staging/brcm80211/brcmsmac/pub.h           |   20 ++--
 drivers/staging/brcm80211/brcmsmac/rate.h          |    6 +-
 drivers/staging/brcm80211/brcmsmac/scb.h           |    8 +-
 drivers/staging/brcm80211/brcmsmac/types.h         |   79 ++++++++++++++++++
 15 files changed, 193 insertions(+), 144 deletions(-)
drivers/staging/brcm80211/brcmsmac/aiutils.h +6 -4
index b007fac..85c39af 100644
@@ -17,6 +17,8 @@
 #ifndef	_BRCM_AIUTILS_H_
 #define	_BRCM_AIUTILS_H_
 
+#include "types.h"
+
 /*
  * SOC Interconnect Address Map.
  * All regions may not exist on all chips.
@@ -448,16 +450,16 @@ typedef u32(*si_intrsoff_t) (void *intr_arg);
 typedef void (*si_intrsrestore_t) (void *intr_arg, u32 arg);
 typedef bool(*si_intrsenabled_t) (void *intr_arg);
 
-typedef struct gpioh_item {
+struct gpioh_item {
 	void *arg;
 	bool level;
 	gpio_handler_t handler;
 	u32 event;
 	struct gpioh_item *next;
-} gpioh_item_t;
+};
 
 /* misc si info needed by some of the routines */
-typedef struct si_info {
+struct si_info {
 	struct si_pub pub;	/* back plane public state (must be first) */
 	void *pbus;		/* handle to bus (pci/sdio/..) */
 	uint dev_coreid;	/* the core provides driver functions */
@@ -494,7 +496,7 @@ typedef struct si_info {
 	u32 cia[SI_MAXCORES];	/* erom cia entry for each core */
 	u32 cib[SI_MAXCORES];	/* erom cia entry for each core */
 	u32 oob_router;	/* oob router registers for axi */
-} si_info_t;
+};
 
 /* AMBA Interconnect exported externs */
 extern void ai_scan(struct si_pub *sih, void *regs, uint devid);
drivers/staging/brcm80211/brcmsmac/bmac.h +2 -2
index af8af69..de8b809 100644
@@ -18,10 +18,10 @@
 
 /* dup state between BMAC(struct wlc_hw_info) and HIGH(struct wlc_info)
    driver */
-typedef struct wlc_bmac_state {
+struct wlc_bmac_state {
 	u32 machwcap;	/* mac hw capibility */
 	u32 preamble_ovr;	/* preamble override */
-} wlc_bmac_state_t;
+};
 
 enum {
 	IOV_BMAC_DIAG,
drivers/staging/brcm80211/brcmsmac/channel.h +4 -8
index 3017839..dd0149a 100644
@@ -58,7 +58,7 @@ struct wlc_info;
 #define IS_SINGLEBAND_5G(device)	0
 
 /* locale channel and power info. */
-typedef struct {
+struct locale_info {
 	u32 valid_channels;
 	u8 radar_channels;	/* List of radar sensitive channels */
 	u8 restricted_channels;	/* List of channels used only if APs are detected */
@@ -67,7 +67,7 @@ typedef struct {
 						 * per sub-band
 						 */
 	u8 flags;
-} locale_info_t;
+};
 
 /* bits for locale_info flags */
 #define WLC_PEAK_CONDUCTED	0x00	/* Peak for locals */
@@ -86,11 +86,11 @@ typedef struct {
  * maxpwr arrays are index by channel for 2.4 GHz limits, and
  * by sub-band for 5 GHz limits using CHANNEL_POWER_IDX_5G(channel)
  */
-typedef struct {
+struct locale_mimo_info {
 	s8 maxpwr20[WLC_MAXPWR_MIMO_TBL_SIZE];	/* tx 20 MHz power limits, qdBm units */
 	s8 maxpwr40[WLC_MAXPWR_MIMO_TBL_SIZE];	/* tx 40 MHz power limits, qdBm units */
 	u8 flags;
-} locale_mimo_info_t;
+};
 
 extern const chanvec_t chanvec_all_2G;
 extern const chanvec_t chanvec_all_5G;
@@ -105,10 +105,6 @@ struct country_info {
 	const u8 locale_mimo_5G;	/* 5G mimo info */
 };
 
-typedef struct country_info country_info_t;
-
-typedef struct wlc_cm_info wlc_cm_info_t;
-
 extern wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc);
 extern void wlc_channel_mgr_detach(wlc_cm_info_t *wlc_cm);
 
drivers/staging/brcm80211/brcmsmac/d11.h +22 -29

182 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/dma.h +8 -8
index 70c9ad6..20991f0 100644
@@ -32,24 +32,24 @@ struct dma_pub;
 
 /* 32 bits addressing */
 
-typedef volatile struct {	/* diag access */
+struct dma32diag {	/* diag access */
 	u32 fifoaddr;	/* diag address */
 	u32 fifodatalow;	/* low 32bits of data */
 	u32 fifodatahigh;	/* high 32bits of data */
 	u32 pad;		/* reserved */
-} dma32diag_t;
+};
 
 /* 64 bits addressing */
 
 /* dma registers per channel(xmt or rcv) */
-typedef volatile struct {
+struct dma64regs {
 	u32 control;		/* enable, et al */
 	u32 ptr;		/* last descriptor posted to chip */
 	u32 addrlow;		/* descriptor ring base address low 32-bits (8K aligned) */
 	u32 addrhigh;	/* descriptor ring base address bits 63:32 (8K aligned) */
 	u32 status0;		/* current descriptor, xmt state */
 	u32 status1;		/* active descriptor, xmt error */
-} dma64regs_t;
+};
 
 /* map/unmap direction */
 #define	DMA_TX	1		/* TX direction for DMA */
@@ -57,11 +57,11 @@ typedef volatile struct {
 #define BUS_SWAP32(v)		(v)
 
 /* range param for dma_getnexttxp() and dma_txreclaim */
-typedef enum txd_range {
+enum txd_range {
 	DMA_RANGE_ALL = 1,
 	DMA_RANGE_TRANSMITTED,
 	DMA_RANGE_TRANSFERED
-} txd_range_t;
+};
 
 /* dma function type */
 typedef void (*di_detach_t) (struct dma_pub *dmah);
@@ -114,7 +114,7 @@ typedef uint(*di_txpending_t) (struct dma_pub *dmah);
 typedef uint(*di_txcommitted_t) (struct dma_pub *dmah);
 
 /* dma opsvec */
-typedef struct di_fcn_s {
+struct di_fcn_s {
 	di_detach_t detach;
 	di_txinit_t txinit;
 	di_txreset_t txreset;
@@ -159,7 +159,7 @@ typedef struct di_fcn_s {
 	di_txpending_t txpending;
 	di_txcommitted_t txcommitted;
 	uint endnum;
-} di_fcn_t;
+};
 
 /*
  * Exported data structure (read-only)
drivers/staging/brcm80211/brcmsmac/main.h +4 -7
index c41205a..0065a40 100644
@@ -314,14 +314,14 @@ struct wlc_stf {
 /* number of 802.11 default (non-paired, group keys) */
 #define WSEC_MAX_DEFAULT_KEYS	4	/* # of default keys */
 
-typedef struct wsec_iv {
+struct wsec_iv {
 	u32 hi;		/* upper 32 bits of IV */
 	u16 lo;		/* lower 16 bits of IV */
-} wsec_iv_t;
+};
 
 #define WLC_NUMRXIVS	16	/* # rx IVs (one per 802.11e TID) */
 
-typedef struct wsec_key {
+struct wsec_key {
 	u8 ea[ETH_ALEN];	/* per station */
 	u8 idx;		/* key index in wsec_keys array */
 	u8 id;		/* key ID [0-3] */
@@ -337,8 +337,7 @@ typedef struct wsec_key {
 	u8 data[WLAN_MAX_KEY_LEN];	/* key data */
 	wsec_iv_t rxiv[WLC_NUMRXIVS];	/* Rx IV (one per TID) */
 	wsec_iv_t txiv;		/* Tx IV */
-
-} wsec_key_t;
+};
 
 /*
  * core state (mac)
@@ -424,7 +423,6 @@ struct edcf_acparam {
 	u8 ECW;
 	u16 TXOP;
 } __attribute__((packed));
-typedef struct edcf_acparam edcf_acparam_t;
 
 struct wme_param_ie {
 	u8 oui[3];
@@ -435,7 +433,6 @@ struct wme_param_ie {
 	u8 rsvd;
 	edcf_acparam_t acparam[AC_COUNT];
 } __attribute__((packed));
-typedef struct wme_param_ie wme_param_ie_t;
 
 /* virtual interface */
 struct wlc_if {
drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h +10 -13
index 8bd0d13..587a545 100644
@@ -105,7 +105,7 @@
 
 #define	WLC_RSSI_INVALID	 0	/* invalid RSSI value */
 
-typedef struct txpwr_limits {
+struct txpwr_limits {
 	u8 cck[WLC_NUM_RATES_CCK];
 	u8 ofdm[WLC_NUM_RATES_OFDM];
 
@@ -124,9 +124,9 @@ typedef struct txpwr_limits {
 	u8 mcs_40_stbc[WLC_NUM_RATES_MCS_1_STREAM];
 	u8 mcs_40_mimo[WLC_NUM_RATES_MCS_2_STREAM];
 	u8 mcs32;
-} txpwr_limits_t;
+};
 
-typedef struct {
+struct tx_power {
 	u32 flags;
 	chanspec_t chanspec;	/* txpwr report for this channel */
 	chanspec_t local_chanspec;	/* channel on which we are associated */
@@ -145,25 +145,22 @@ typedef struct {
 	u8 reg_limit[WL_TX_POWER_RATES];	/* Regulatory power limit */
 	u8 board_limit[WL_TX_POWER_RATES];	/* Max power board can support (SROM) */
 	u8 target[WL_TX_POWER_RATES];	/* Latest target power */
-} tx_power_t;
+};
 
-typedef struct tx_inst_power {
+struct tx_inst_power {
 	u8 txpwr_est_Pout[2];	/* Latest estimate for 2.4 and 5 Ghz */
 	u8 txpwr_est_Pout_gofdm;	/* Pwr estimate for 2.4 OFDM */
-} tx_inst_power_t;
+};
 
-typedef struct {
+struct chanvec {
 	u8 vec[MAXCHANNEL / NBBY];
-} chanvec_t;
+};
 
 struct rpc_info;
-typedef struct shared_phy shared_phy_t;
 
 struct phy_pub;
 
-typedef struct phy_pub wlc_phy_t;
-
-typedef struct shared_phy_params {
+struct shared_phy_params {
 	struct si_pub *sih;
 	void *physhim;
 	uint unit;
@@ -182,7 +179,7 @@ typedef struct shared_phy_params {
 	uint boardvendor;
 	u32 boardflags;
 	u32 boardflags2;
-} shared_phy_params_t;
+};
 
 
 extern shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp);
drivers/staging/brcm80211/brcmsmac/phy/phy_int.h +40 -48

243 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.h +2 -4
index 5a64a98..97cab33 100644
@@ -14,8 +14,6 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-typedef phytbl_info_t dot11lcnphytbl_info_t;
-
 extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev0[];
 extern const u32 dot11lcnphytbl_rx_gain_info_sz_rev0;
 extern const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313;
@@ -35,13 +33,13 @@ extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[];
 
 extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_5G_rev2[];
 
-typedef struct {
+struct _lcnphy_tx_gain_tbl_entry {
 	unsigned char gm;
 	unsigned char pga;
 	unsigned char pad;
 	unsigned char dac;
 	unsigned char bb_mult;
-} lcnphy_tx_gain_tbl_entry;
+};
 
 extern const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[];
 extern const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_extPA_gaintable_rev0[];
drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.h +0 -2
index 396122f..5033c9f 100644
@@ -16,8 +16,6 @@
 
 #define ANT_SWCTRL_TBL_REV3_IDX (0)
 
-typedef phytbl_info_t mimophytbl_info_t;
-
 extern const mimophytbl_info_t mimophytbl_info_rev0[],
     mimophytbl_info_rev0_volatile[];
 extern const u32 mimophytbl_info_sz_rev0, mimophytbl_info_sz_rev0_volatile;
drivers/staging/brcm80211/brcmsmac/phy_shim.h +0 -1
index 1677df2..dddae81 100644
@@ -108,7 +108,6 @@
 
 /* Forward declarations */
 struct wlc_hw_info;
-typedef struct wlc_phy_shim_info wlc_phy_shim_info_t;
 
 extern wlc_phy_shim_info_t *wlc_phy_shim_attach(struct wlc_hw_info *wlc_hw,
 						void *wl, void *wlc);
drivers/staging/brcm80211/brcmsmac/pub.h +10 -10
index e5f24b0..3c10a02 100644
@@ -107,7 +107,7 @@
 
 struct ieee80211_tx_queue_params;
 
-typedef struct wlc_tunables {
+struct wlc_tunables {
 	int ntxd;		/* size of tx descriptor table */
 	int nrxd;		/* size of rx descriptor table */
 	int rxbufsz;		/* size of rx buffers to post */
@@ -123,14 +123,14 @@ typedef struct wlc_tunables {
 	int rxbnd;		/* max # of rx bufs to process before deferring to dpc */
 	int txsbnd;		/* max # tx status to process in wlc_txstatus() */
 	int memreserved;	/* memory reserved for BMAC's USB dma rx */
-} wlc_tunables_t;
+};
 
-typedef struct wlc_rateset {
+struct wlc_rateset {
 	uint count;		/* number of rates in rates[] */
 	u8 rates[WLC_NUMRATES];	/* rates in 500kbps units w/hi bit set if basic */
 	u8 htphy_membership;	/* HT PHY Membership */
 	u8 mcs[MCSSET_LEN];	/* supported mcs index bit map */
-} wlc_rateset_t;
+};
 
 struct rsn_parms {
 	u8 flags;		/* misc booleans (e.g., supported) */
@@ -161,7 +161,7 @@ struct rsn_parms {
 	IEEE80211_HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_DSSSCCK40)
 
 /* wlc internal bss_info */
-typedef struct wlc_bss_info {
+struct wlc_bss_info {
 	u8 BSSID[ETH_ALEN];	/* network BSSID */
 	u16 flags;		/* flags for internal attributes */
 	u8 SSID_len;		/* the length of SSID */
@@ -184,7 +184,7 @@ typedef struct wlc_bss_info {
 	u8 qbss_load_chan_free;	/* indicates how free the channel is */
 	u8 mcipher;		/* multicast cipher */
 	u8 wpacfg;		/* wpa config index */
-} wlc_bss_info_t;
+};
 
 /* forward declarations */
 struct wlc_if;
@@ -326,7 +326,7 @@ struct wlc_pub {
 };
 
 /* wl_monitor rx status per packet */
-typedef struct wl_rxsts {
+struct wl_rxsts {
 	uint pkterror;		/* error flags per pkt */
 	uint phytype;		/* 802.11 A/B/G ... */
 	uint channel;		/* channel */
@@ -341,7 +341,7 @@ typedef struct wl_rxsts {
 	uint encoding;		/* Unknown, CCK, PBCC, OFDM */
 	uint nfrmtype;		/* special 802.11n frames(AMPDU, AMSDU) */
 	struct brcms_if *wlif;	/* wl interface */
-} wl_rxsts_t;
+};
 
 /* status per error RX pkt */
 #define WL_RXS_CRC_ERROR		0x00000001	/* CRC Error in packet */
@@ -582,10 +582,10 @@ extern const u8 wme_fifo2ac[];
 
 #define HIGHEST_SINGLE_STREAM_MCS	7	/* MCS values greater than this enable multiple streams */
 
-typedef struct {
+struct wlc_antselcfg {
 	u8 ant_config[ANT_SELCFG_MAX];	/* antenna configuration */
 	u8 num_antcfg;	/* number of available antenna configurations */
-} wlc_antselcfg_t;
+};
 
 /* common functions for every port */
 extern void *wlc_attach(struct brcms_info *wl, u16 vendor, u16 device,
drivers/staging/brcm80211/brcmsmac/rate.h +2 -4
index 5575e83..421f04d 100644
@@ -27,14 +27,14 @@ extern const struct wlc_rateset gphy_legacy_rates;
 extern const struct wlc_rateset wlc_lrs_rates;
 extern const struct wlc_rateset rate_limit_1_2;
 
-typedef struct mcs_info {
+struct mcs_info {
 	u32 phy_rate_20;	/* phy rate in kbps [20Mhz] */
 	u32 phy_rate_40;	/* phy rate in kbps [40Mhz] */
 	u32 phy_rate_20_sgi;	/* phy rate in kbps [20Mhz] with SGI */
 	u32 phy_rate_40_sgi;	/* phy rate in kbps [40Mhz] with SGI */
 	u8 tx_phy_ctl3;	/* phy ctl byte 3, code rate, modulation type, # of streams */
 	u8 leg_ofdm;		/* matching legacy ofdm rate in 500bkps */
-} mcs_info_t;
+};
 
 #define WLC_MAXMCS	32	/* max valid mcs index */
 #define MCS_TABLE_SIZE	33	/* Number of mcs entries in the table */
@@ -62,7 +62,6 @@ extern const mcs_info_t mcs_table[];
 /* rate spec : holds rate and mode specific information required to generate a tx frame. */
 /* Legacy CCK and OFDM information is held in the same manner as was done in the past    */
 /* (in the lower byte) the upper 3 bytes primarily hold MIMO specific information        */
-typedef u32 ratespec_t;
 
 /* rate spec bit fields */
 #define RSPEC_RATE_MASK		0x0000007F	/* Either 500Kbps units or MIMO MCS idx */
@@ -137,7 +136,6 @@ extern const u8 ofdm_rate_lookup[];
 #define WLC_RATES_CCK		1
 #define WLC_RATES_OFDM		2
 
-/* use the stuct form instead of typedef to fix dependency problems */
 struct wlc_rateset;
 
 /* sanitize, and sort a rateset with the basic bit(s) preserved, validate rateset */
drivers/staging/brcm80211/brcmsmac/scb.h +4 -4
index edd471b..2e3b5f4 100644
@@ -22,17 +22,17 @@
 
 #define AMPDU_TX_BA_MAX_WSIZE	64	/* max Tx ba window size (in pdu) */
 /* structure to store per-tid state for the ampdu initiator */
-typedef struct scb_ampdu_tid_ini {
+struct scb_ampdu_tid_ini {
 	u32 magic;
 	u8 tx_in_transit;	/* number of pending mpdus in transit in driver */
 	u8 tid;		/* initiator tid for easy lookup */
 	u8 txretry[AMPDU_TX_BA_MAX_WSIZE];	/* tx retry count; indexed by seq modulo */
 	struct scb *scb;	/* backptr for easy lookup */
-} scb_ampdu_tid_ini_t;
+};
 
 #define AMPDU_MAX_SCB_TID	NUMPRIO
 
-typedef struct scb_ampdu {
+struct scb_ampdu {
 	struct scb *scb;	/* back pointer for easy reference */
 	u8 mpdu_density;	/* mpdu density */
 	u8 max_pdu;		/* max pdus allowed in ampdu */
@@ -46,7 +46,7 @@ typedef struct scb_ampdu {
 	 * static.
 	 */
 	scb_ampdu_tid_ini_t ini[AMPDU_MAX_SCB_TID];	/* initiator info - per tid (NUMPRIO) */
-} scb_ampdu_t;
+};
 
 #define SCB_MAGIC 	0xbeefcafe
 #define INI_MAGIC 	0xabcd1234
drivers/staging/brcm80211/brcmsmac/types.h +79 -0

85 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 2/21 staging: brcm80211: cleaned brcmu_utils.h

In reply to Roland Vossen

Code cleanup. Moved softmac specific definitions into brcmsmac/types.h Removed unused definitions.

---
 drivers/staging/brcm80211/brcmsmac/types.h      |    6 ++
 drivers/staging/brcm80211/include/brcmu_utils.h |  110 +++++------------------
 2 files changed, 29 insertions(+), 87 deletions(-)
drivers/staging/brcm80211/brcmsmac/types.h +6 -0
index 0de99d5..dd0bcf9 100644
@@ -343,6 +343,12 @@ do {						\
 #define SET_REG(r, mask, val) \
 		W_REG((r), ((R_REG(r) & ~(mask)) | (val)))
 
+/* multi-bool data type: set of bools, mbool is true if any is set */
+typedef u32 mbool;
+#define mboolset(mb, bit)		((mb) |= (bit))	/* set one bool */
+#define mboolclr(mb, bit)		((mb) &= ~(bit))	/* clear one bool */
+#define mboolisset(mb, bit)		(((mb) & (bit)) != 0)	/* true if one bool is set */
+#define	mboolmaskset(mb, mask, val)	((mb) = (((mb) & ~(mask)) | (val)))
 
 /* forward declarations */
 struct sk_buff;
drivers/staging/brcm80211/include/brcmu_utils.h +23 -87

142 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#3 lore raw

PATCH 3/21 staging: brcm80211: #include reduction

In reply to Roland Vossen

Code cleanup. Number of includes has been reduced by only including what is necessary.

---
 drivers/staging/brcm80211/brcmsmac/aiutils.c       |   23 ++++++------------
 drivers/staging/brcm80211/brcmsmac/alloc.c         |   13 +---------
 drivers/staging/brcm80211/brcmsmac/ampdu.c         |   10 --------
 drivers/staging/brcm80211/brcmsmac/antsel.c        |   19 +++------------
 drivers/staging/brcm80211/brcmsmac/bmac.c          |   25 ++-----------------
 drivers/staging/brcm80211/brcmsmac/bmac.h          |    3 ++
 drivers/staging/brcm80211/brcmsmac/channel.c       |   14 +---------
 drivers/staging/brcm80211/brcmsmac/d11.h           |    4 +++
 drivers/staging/brcm80211/brcmsmac/dma.c           |   12 +++------
 drivers/staging/brcm80211/brcmsmac/dma.h           |    5 ----
 drivers/staging/brcm80211/brcmsmac/mac80211_if.c   |   11 +--------
 drivers/staging/brcm80211/brcmsmac/mac80211_if.h   |    3 ++
 drivers/staging/brcm80211/brcmsmac/main.c          |   17 +------------
 drivers/staging/brcm80211/brcmsmac/main.h          |    6 ++++
 drivers/staging/brcm80211/brcmsmac/nicpci.c        |   13 ++++------
 drivers/staging/brcm80211/brcmsmac/nicpci.h        |    2 +
 drivers/staging/brcm80211/brcmsmac/otp.c           |   14 ++--------
 drivers/staging/brcm80211/brcmsmac/otp.h           |    2 +
 drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c   |   23 +++++++-----------
 drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h   |    6 +---
 drivers/staging/brcm80211/brcmsmac/phy/phy_int.h   |    6 +---
 drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c   |   21 ++++------------
 drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.h   |    2 +
 drivers/staging/brcm80211/brcmsmac/phy/phy_n.c     |   22 +++++++----------
 drivers/staging/brcm80211/brcmsmac/phy/phy_qmath.c |    2 -
 drivers/staging/brcm80211/brcmsmac/phy/phy_qmath.h |    2 +
 .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.c    |    6 +---
 .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.h    |    3 ++
 drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.c  |    7 +----
 drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.h  |    3 ++
 drivers/staging/brcm80211/brcmsmac/phy_shim.c      |   24 ++----------------
 drivers/staging/brcm80211/brcmsmac/phy_shim.h      |    2 +
 drivers/staging/brcm80211/brcmsmac/pmu.c           |    6 +---
 drivers/staging/brcm80211/brcmsmac/pmu.h           |    5 +---
 drivers/staging/brcm80211/brcmsmac/pub.h           |    5 ++-
 drivers/staging/brcm80211/brcmsmac/rate.c          |    8 +-----
 drivers/staging/brcm80211/brcmsmac/rate.h          |    2 +
 drivers/staging/brcm80211/brcmsmac/scb.h           |    4 ++-
 drivers/staging/brcm80211/brcmsmac/srom.c          |   17 +++++--------
 drivers/staging/brcm80211/brcmsmac/srom.h          |    2 +
 drivers/staging/brcm80211/brcmsmac/stf.c           |   12 +--------
 drivers/staging/brcm80211/brcmsmac/stf.h           |    2 +
 drivers/staging/brcm80211/brcmsmac/types.h         |    6 ++++
 drivers/staging/brcm80211/brcmsmac/ucode_loader.c  |    2 +-
 drivers/staging/brcm80211/brcmutil/utils.c         |   10 --------
 drivers/staging/brcm80211/brcmutil/wifi.c          |    5 ----
 drivers/staging/brcm80211/include/brcmu_utils.h    |    2 +
 drivers/staging/brcm80211/include/defs.h           |    2 +
 48 files changed, 136 insertions(+), 279 deletions(-)
drivers/staging/brcm80211/brcmsmac/aiutils.c +8 -15
index fee8966..4b908f7 100644
@@ -13,26 +13,19 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-
 #include <linux/delay.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <defs.h>
-#include "types.h"
-#include <linux/module.h>
 #include <linux/pci.h>
-#include <brcmu_utils.h>
-#include <aiutils.h>
-#include <soc.h>
+
+#include <defs.h>
 #include <chipcommon.h>
+#include <brcmu_utils.h>
 #include <brcm_hw_ids.h>
-
-/* ********** from siutils.c *********** */
-#include <nicpci.h>
+#include "types.h"
+#include "pub.h"
+#include "pmu.h"
 #include "srom.h"
-#include <pmu.h>
-#include <scb.h>
-#include <pub.h>
+#include "nicpci.h"
+#include "aiutils.h"
 
 /* slow_clk_ctl */
 #define SCC_SS_MASK		0x00000007	/* slow clock source mask */
drivers/staging/brcm80211/brcmsmac/alloc.c +1 -12
index a884ae4..486cd49 100644
@@ -13,23 +13,12 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-#include <linux/kernel.h>
-#include <linux/types.h>
 
-#include <defs.h>
 #include <brcmu_utils.h>
-#include <aiutils.h>
-#include "dma.h"
-
-#include "d11.h"
 #include "types.h"
-#include "scb.h"
 #include "pub.h"
-#include "alloc.h"
-#include "rate.h"
-#include "phy/phy_hal.h"
-#include "channel.h"
 #include "main.h"
+#include "alloc.h"
 
 static struct wlc_bsscfg *wlc_bsscfg_malloc(uint unit);
 static void wlc_bsscfg_mfree(struct wlc_bsscfg *cfg);
drivers/staging/brcm80211/brcmsmac/ampdu.c +0 -10
index 7cf0018..17552f2 100644
@@ -13,22 +13,12 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-#include <linux/kernel.h>
 #include <net/mac80211.h>
 
-#include <defs.h>
-#include <brcmu_utils.h>
-#include <aiutils.h>
-#include "dma.h"
-#include <d11.h>
-
-#include "types.h"
 #include "rate.h"
 #include "scb.h"
-#include "pub.h"
 #include "phy/phy_hal.h"
 #include "antsel.h"
-#include "channel.h"
 #include "main.h"
 #include "ampdu.h"
 
drivers/staging/brcm80211/brcmsmac/antsel.c +5 -16
index f967c59..5356e2a 100644
@@ -14,24 +14,13 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-
-#include <defs.h>
-#include <brcmu_utils.h>
-#include <aiutils.h>
-#include <brcm_hw_ids.h>
-#include "dma.h"
-
-#include "d11.h"
-#include "rate.h"
-#include "scb.h"
-#include "pub.h"
-#include "phy/phy_hal.h"
+#include <linux/slab.h>
+#include <net/mac80211.h>
+
+#include "types.h"
 #include "bmac.h"
-#include "channel.h"
 #include "main.h"
+#include "phy_shim.h"
 #include "antsel.h"
 
 #define ANT_SELCFG_AUTO		0x80	/* bit indicates antenna sel AUTO */
drivers/staging/brcm80211/brcmsmac/bmac.c +3 -22
index 417cf54..e501e06 100644
@@ -13,39 +13,20 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-
-
-#include <linux/kernel.h>
-#include <linux/module.h>
 #include <linux/pci.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
+#include <net/mac80211.h>
 
-#include <defs.h>
+#include "types.h"
 #include <brcm_hw_ids.h>
-#include <brcmu_wifi.h>
 #include <aiutils.h>
-#include "srom.h"
-#include "otp.h"
-#include <brcmu_utils.h>
 #include <chipcommon.h>
-#include <nicpci.h>
-#include "dma.h"
-
-#include "types.h"
-#include "pmu.h"
-#include "d11.h"
 #include "rate.h"
-#include "scb.h"
-#include "pub.h"
 #include "phy/phy_hal.h"
 #include "channel.h"
 #include "main.h"
 #include "ucode_loader.h"
-#include "antsel.h"
-#include "alloc.h"
-#include "bmac.h"
 #include "mac80211_if.h"
+#include "bmac.h"
 
 #define	TIMER_INTERVAL_WATCHDOG_BMAC	1000	/* watchdog timer, in unit of ms */
 
drivers/staging/brcm80211/brcmsmac/bmac.h +3 -0
index de8b809..58d9830 100644
@@ -16,6 +16,9 @@
 #ifndef _BRCM_BOTTOM_MAC_H_
 #define _BRCM_BOTTOM_MAC_H_
 
+#include <brcmu_wifi.h>
+#include "types.h"
+
 /* dup state between BMAC(struct wlc_hw_info) and HIGH(struct wlc_info)
    driver */
 struct wlc_bmac_state {
drivers/staging/brcm80211/brcmsmac/channel.c +2 -12
index 9583140..011c490 100644
@@ -14,26 +14,16 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/kernel.h>
 #include <linux/types.h>
-#include <linux/module.h>
-#include <linux/pci.h>
+#include <net/mac80211.h>
 
 #include <defs.h>
-#include <brcmu_utils.h>
-#include <aiutils.h>
-#include "dma.h"
-
-#include "types.h"
-#include "d11.h"
-#include "scb.h"
 #include "pub.h"
 #include "phy/phy_hal.h"
 #include "bmac.h"
-#include "rate.h"
-#include "channel.h"
 #include "main.h"
 #include "stf.h"
+#include "channel.h"
 
 #define	VALID_CHANNEL20_DB(wlc, val) wlc_valid_channel20_db((wlc)->cmi, val)
 #define	VALID_CHANNEL20_IN_BAND(wlc, bandunit, val) \
drivers/staging/brcm80211/brcmsmac/d11.h +4 -0
index 1b03039..44f4bc0 100644
@@ -19,6 +19,10 @@
 
 #include <linux/ieee80211.h>
 
+#include <defs.h>
+#include "pub.h"
+#include "dma.h"
+
 #define	BCN_TMPL_LEN		512	/* length of the BCN template area */
 
 /* RX FIFO numbers */
drivers/staging/brcm80211/brcmsmac/dma.c +4 -8
index ce02324..642c9921 100644
@@ -13,17 +13,13 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/netdevice.h>
+#include <linux/slab.h>
+#include <linux/skbuff.h>
+#include <linux/delay.h>
 #include <linux/pci.h>
-#include <defs.h>
-#include <brcm_hw_ids.h>
-#include <soc.h>
+
 #include <brcmu_utils.h>
 #include <aiutils.h>
-
 #include "types.h"
 #include "dma.h"
 
drivers/staging/brcm80211/brcmsmac/dma.h +0 -5
index 20991f0..ae411a5 100644
@@ -19,11 +19,6 @@
 
 #include "types.h"		/* forward structure declarations */
 
-#ifndef _dma_pub_
-#define _dma_pub_
-struct dma_pub;
-#endif				/* _dma_pub_ */
-
 /* DMA structure:
  *  support two DMA engines: 32 bits address or 64 bit addressing
  *  basic DMA register set is per channel(transmit or receive)
drivers/staging/brcm80211/brcmsmac/mac80211_if.c +1 -10
index 78f8348..ecad659 100644
@@ -16,24 +16,15 @@
 
 #define __UNDEF_NO_VERSION__
 
-#include <linux/kernel.h>
 #include <linux/etherdevice.h>
-#include <linux/types.h>
-#include <linux/pci_ids.h>
-#include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/sched.h>
 #include <linux/firmware.h>
 #include <net/mac80211.h>
 #include <defs.h>
-#include <brcmu_wifi.h>
-#include <brcmu_utils.h>
-#include <nicpci.h>
-#include "dma.h"
-
+#include "nicpci.h"
 #include "phy/phy_int.h"
 #include "d11.h"
-#include "types.h"
 #include "channel.h"
 #include "scb.h"
 #include "pub.h"
drivers/staging/brcm80211/brcmsmac/mac80211_if.h +3 -0
index c56707a..6227455 100644
@@ -17,6 +17,9 @@
 #ifndef _BRCM_MAC80211_IF_H_
 #define _BRCM_MAC80211_IF_H_
 
+#include <linux/timer.h>
+#include <linux/interrupt.h>
+
 /* softmac ioctl definitions */
 #define WLC_SET_SHORTSLOT_OVERRIDE		146
 
drivers/staging/brcm80211/brcmsmac/main.c +2 -15
index 3613900..c8d6679 100644
@@ -13,36 +13,23 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-#include <linux/kernel.h>
-#include <linux/ctype.h>
-#include <linux/etherdevice.h>
+
 #include <linux/pci_ids.h>
 #include <net/mac80211.h>
 
-#include <defs.h>
 #include <brcm_hw_ids.h>
-#include <brcmu_utils.h>
-#include <brcmu_wifi.h>
 #include <aiutils.h>
-#include "srom.h"
-#include "dma.h"
-
-#include "pmu.h"
-#include "d11.h"
-#include "types.h"
 #include "rate.h"
 #include "scb.h"
-#include "pub.h"
 #include "phy/phy_hal.h"
 #include "channel.h"
-#include "main.h"
 #include "bmac.h"
-#include "phy_hal.h"
 #include "antsel.h"
 #include "stf.h"
 #include "ampdu.h"
 #include "alloc.h"
 #include "mac80211_if.h"
+#include "main.h"
 
 /*
  * WPA(2) definitions
drivers/staging/brcm80211/brcmsmac/main.h +6 -0
index 0065a40..1d28b76 100644
@@ -17,6 +17,12 @@
 #ifndef _BRCM_MAIN_H_
 #define _BRCM_MAIN_H_
 
+#include <linux/etherdevice.h>
+
+#include <brcmu_utils.h>
+#include "types.h"
+#include "d11.h"
+
 #define MA_WINDOW_SZ		8	/* moving average window size */
 #define	WL_HWRXOFF		38	/* chip rx buffer offset */
 #define	INVCHANNEL		255	/* invalid channel */
drivers/staging/brcm80211/brcmsmac/nicpci.c +5 -8
index ca781c4..5a19182 100644
@@ -14,19 +14,16 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include <linux/slab.h>
 #include <linux/delay.h>
-#include <linux/string.h>
 #include <linux/pci.h>
+
 #include <defs.h>
-#include "types.h"
-#include <brcmu_utils.h>
-#include <aiutils.h>
 #include <soc.h>
-#include <brcm_hw_ids.h>
 #include <chipcommon.h>
-#include <scb.h>
-#include <pub.h>
-#include <nicpci.h>
+#include "aiutils.h"
+#include "pub.h"
+#include "nicpci.h"
 
 /* SPROM offsets */
 #define SRSH_ASPM_OFFSET		4	/* word 4 */
drivers/staging/brcm80211/brcmsmac/nicpci.h +2 -0
index c44b705..826c162 100644
@@ -17,6 +17,8 @@
 #ifndef	_BRCM_NICPCI_H_
 #define	_BRCM_NICPCI_H_
 
+#include "types.h"
+
 /* PCI configuration address space size */
 #define PCI_SZPCR		256
 
drivers/staging/brcm80211/brcmsmac/otp.c +4 -12
index d21d6ca..d09f913 100644
@@ -14,19 +14,11 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/delay.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <linux/crc-ccitt.h>
-
-#include <defs.h>
+#include <linux/io.h>
+#include <linux/errno.h>
+
 #include <brcm_hw_ids.h>
-#include "types.h"
-#include <brcmu_utils.h>
-#include <aiutils.h>
-#include <soc.h>
+#include "aiutils.h"
 #include <chipcommon.h>
 #include "otp.h"
 
drivers/staging/brcm80211/brcmsmac/otp.h +2 -0
index c1eb347..f6d3a56 100644
@@ -17,6 +17,8 @@
 #ifndef	_BRCM_OTP_H_
 #define	_BRCM_OTP_H_
 
+#include "types.h"
+
 /* OTP regions */
 #define OTP_HW_RGN	1
 #define OTP_SW_RGN	2
drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +9 -14
index 0185788..79008a9 100644
@@ -14,23 +14,18 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/bitops.h>
 #include <linux/delay.h>
-#include <linux/module.h>
-#include <linux/pci.h>
 
-#include <defs.h>
-#include <chipcommon.h>
 #include <brcm_hw_ids.h>
-#include <dma.h>
-
-#include <types.h>
-#include <phy_int.h>
-#include <phyreg_n.h>
-#include <phy_radio.h>
-#include <phy_lcn.h>
+#include <chipcommon.h>
+#include <aiutils.h>
+#include <d11.h>
+#include <phy_shim.h>
+#include "phy_hal.h"
+#include "phy_int.h"
+#include "phy_radio.h"
+#include "phy_lcn.h"
+#include "phyreg_n.h"
 
 u32 phyhal_msg_level = PHYHAL_ERROR;
 
drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h +2 -4
index 587a545..db99440 100644
@@ -21,11 +21,9 @@
 #ifndef _BRCM_PHY_HAL_H_
 #define _BRCM_PHY_HAL_H_
 
-#include <aiutils.h>
-#include <d11.h>
+#include <brcmu_utils.h>
+#include <brcmu_wifi.h>
 #include <phy_shim.h>
-#include <net/mac80211.h>	/* struct wiphy */
-#include "brcmu_wifi.h"		/* chanspec_t */
 
 #define	IDCODE_VER_MASK		0x0000000f
 #define	IDCODE_VER_SHIFT	0
drivers/staging/brcm80211/brcmsmac/phy/phy_int.h +2 -4
index 48149a7..1e6885c 100644
@@ -17,11 +17,9 @@
 #ifndef _BRCM_PHY_INT_H_
 #define _BRCM_PHY_INT_H_
 
-#include <linux/kernel.h>
-#include <defs.h>
+#include <types.h>
 #include <brcmu_utils.h>
-
-#include <phy_hal.h>
+#include <brcmu_wifi.h>
 
 #define	PHY_VERSION			{ 1, 82, 8, 0 }
 
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +6 -15
index 84d50c2..efa985c 100644
@@ -14,25 +14,16 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/bitops.h>
 #include <linux/delay.h>
-#include <linux/pci.h>
-#include <brcmu_utils.h>
-#include <aiutils.h>
-#include <pmu.h>
-#include <scb.h>
-#include <pub.h>
-
-#include <brcm_hw_ids.h>
-#include <dma.h>
 
-#include "phy_radio.h"
-#include "phy_int.h"
+#include <pmu.h>
+#include <d11.h>
+#include <phy_shim.h>
 #include "phy_qmath.h"
-#include "phy_lcn.h"
+#include "phy_hal.h"
+#include "phy_radio.h"
 #include "phytbl_lcn.h"
+#include "phy_lcn.h"
 
 #define PLL_2064_NDIV		90
 #define PLL_2064_LOW_END_VCO 	3000
drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.h +2 -0
index efa8c90..d360714 100644
@@ -17,6 +17,8 @@
 #ifndef _BRCM_PHY_LCN_H_
 #define _BRCM_PHY_LCN_H_
 
+#include <types.h>
+
 struct phy_info_lcnphy {
 	int lcnphy_txrf_sp_9_override;
 	u8 lcnphy_full_cal_channel;
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +9 -13
index e10f98d..bc5da60 100644
@@ -14,23 +14,19 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <defs.h>
 #include <linux/delay.h>
-#include <linux/pci.h>
+
+#include <brcm_hw_ids.h>
 #include <aiutils.h>
 #include <chipcommon.h>
 #include <pmu.h>
-
-#include <brcm_hw_ids.h>
-#include <dma.h>
-
-#include <types.h>
-#include <phy_radio.h>
-#include <phy_int.h>
-#include <phyreg_n.h>
-#include <phytbl_n.h>
+#include <d11.h>
+#include <phy_shim.h>
+#include "phy_int.h"
+#include "phy_hal.h"
+#include "phy_radio.h"
+#include "phyreg_n.h"
+#include "phytbl_n.h"
 
 #define	READ_RADIO_REG2(pi, radio_type, jspace, core, reg_name) \
 	read_radio_reg(pi, radio_type##_##jspace##_##reg_name | \
drivers/staging/brcm80211/brcmsmac/phy/phy_qmath.c +0 -2
index 801c7c0..01ff0c8 100644
@@ -14,8 +14,6 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/types.h>
-
 #include "phy_qmath.h"
 
 /*
drivers/staging/brcm80211/brcmsmac/phy/phy_qmath.h +2 -0
index 49f57f4..20e3783 100644
@@ -17,6 +17,8 @@
 #ifndef _BRCM_QMATH_H_
 #define _BRCM_QMATH_H_
 
+#include <types.h>
+
 u16 qm_mulu16(u16 op1, u16 op2);
 
 s16 qm_muls16(s16 op1, s16 op2);
drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c +2 -4
index 4dcc691..6439d81 100644
@@ -14,10 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/types.h>
-#include <dma.h>
-#include <phy_int.h>
-#include <phytbl_lcn.h>
+#include <types.h>
+#include "phytbl_lcn.h"
 
 const u32 dot11lcn_gain_tbl_rev0[] = {
 	0x00000000,
drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.h +3 -0
index 97cab33..96f5a68 100644
@@ -14,6 +14,9 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include <types.h>
+#include "phy_int.h"
+
 extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev0[];
 extern const u32 dot11lcnphytbl_rx_gain_info_sz_rev0;
 extern const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313;
drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.c +2 -5
index 1dd613a..84b4f69 100644
@@ -14,11 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/kernel.h>
-
-#include <dma.h>
-#include <phy_int.h>
-#include <phytbl_n.h>
+#include <types.h>
+#include "phytbl_n.h"
 
 const u32 frame_struct_rev0[] = {
 	0x08004a04,
drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.h +3 -0
index 5033c9f..a02b73c 100644
@@ -16,6 +16,9 @@
 
 #define ANT_SWCTRL_TBL_REV3_IDX (0)
 
+#include <types.h>
+#include "phy_int.h"
+
 extern const mimophytbl_info_t mimophytbl_info_rev0[],
     mimophytbl_info_rev0_volatile[];
 extern const u32 mimophytbl_info_sz_rev0, mimophytbl_info_sz_rev0_volatile;
drivers/staging/brcm80211/brcmsmac/phy_shim.c +3 -21
index d497573..3fa2cfb 100644
@@ -20,31 +20,13 @@
  *   On the PHY->WL driver direction, all calls go through this layer since PHY doesn't have the
  *   access to wlc_hw pointer.
  */
+#include <linux/slab.h>
+#include <net/mac80211.h>
 
-#include <linux/kernel.h>
-#include <linux/module.h>
-
-#include <defs.h>
-#include <brcmu_utils.h>
-#include <brcmu_wifi.h>
-#include <aiutils.h>
-#include <chipcommon.h>
-#include "dma.h"
-#include <pmu.h>
-
-#include "types.h"
-#include "d11.h"
-#include "rate.h"
-#include "scb.h"
-#include "pub.h"
-#include "phy/phy_hal.h"
-#include "channel.h"
-#include "srom.h"
 #include "bmac.h"
-#include "phy_hal.h"
 #include "main.h"
-#include "phy_shim.h"
 #include "mac80211_if.h"
+#include "phy_shim.h"
 
 /* PHY SHIM module specific state */
 struct wlc_phy_shim_info {
drivers/staging/brcm80211/brcmsmac/phy_shim.h +2 -0
index dddae81..4e1a51d 100644
@@ -21,6 +21,8 @@
 #ifndef _BRCM_PHY_SHIM_H_
 #define _BRCM_PHY_SHIM_H_
 
+#include "types.h"
+
 #define RADAR_TYPE_NONE		0	/* Radar type None */
 #define RADAR_TYPE_ETSI_1	1	/* ETSI 1 Radar type */
 #define RADAR_TYPE_ETSI_2	2	/* ETSI 2 Radar type */
drivers/staging/brcm80211/brcmsmac/pmu.c +2 -4
index b822d40..0b7ab82 100644
@@ -13,17 +13,15 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-#include <linux/kernel.h>
-#include <linux/types.h>
+
 #include <linux/delay.h>
 #include <linux/io.h>
 
 #include <brcm_hw_ids.h>
-#include "types.h"
 #include <chipcommon.h>
 #include <brcmu_utils.h>
-#include "scb.h"
 #include "pub.h"
+#include "aiutils.h"
 #include "pmu.h"
 
 /*
drivers/staging/brcm80211/brcmsmac/pmu.h +1 -4
index eff8d5b..9a98890 100644
@@ -18,10 +18,7 @@
 #ifndef _BRCM_PMU_H_
 #define _BRCM_PMU_H_
 
-#include <linux/types.h>
-
-#include <aiutils.h>
-
+#include "types.h"
 /*
  * LDO selections used in si_pmu_set_ldo_voltage
  */
drivers/staging/brcm80211/brcmsmac/pub.h +3 -2
index 3c10a02..cdb4cc6 100644
@@ -17,8 +17,9 @@
 #ifndef _BRCM_PUB_H_
 #define _BRCM_PUB_H_
 
-#include "types.h"		/* forward structure declarations */
-#include "brcmu_wifi.h"		/* for chanspec_t */
+#include <brcmu_wifi.h>
+#include "types.h"
+#include "defs.h"
 
 #define	WLC_NUMRATES	16	/* max # of rates in a rateset */
 #define	MAXMULTILIST	32	/* max # multicast addresses */
drivers/staging/brcm80211/brcmsmac/rate.c +1 -7
index 5162ec2..f19b512 100644
@@ -13,17 +13,11 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-#include <linux/kernel.h>
-#include <linux/module.h>
 
-#include <defs.h>
+#include <brcmu_wifi.h>
 #include <brcmu_utils.h>
-#include <aiutils.h>
-#include "dma.h"
 
-#include "types.h"
 #include "d11.h"
-#include "scb.h"
 #include "pub.h"
 #include "rate.h"
 
drivers/staging/brcm80211/brcmsmac/rate.h +2 -0
index 421f04d..36cb91b 100644
@@ -17,6 +17,8 @@
 #ifndef _WLC_RATE_H_
 #define _WLC_RATE_H_
 
+#include "types.h"
+
 extern const u8 rate_info[];
 extern const struct wlc_rateset cck_ofdm_mimo_rates;
 extern const struct wlc_rateset ofdm_mimo_rates;
drivers/staging/brcm80211/brcmsmac/scb.h +3 -1
index 2e3b5f4..fa5c0b3 100644
@@ -17,8 +17,10 @@
 #ifndef _BRCM_SCB_H_
 #define _BRCM_SCB_H_
 
-#include <linux/if_ether.h>	/* for ETH_ALEN */
+#include <linux/if_ether.h>
+#include <brcmu_utils.h>
 #include <defs.h>
+#include "types.h"
 
 #define AMPDU_TX_BA_MAX_WSIZE	64	/* max Tx ba window size (in pdu) */
 /* structure to store per-tid state for the ampdu initiator */
drivers/staging/brcm80211/brcmsmac/srom.c +7 -10
index 17e0f2a..8aa6d01 100644
@@ -13,22 +13,19 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/io.h>
 #include <linux/etherdevice.h>
-#include <defs.h>
-#include <linux/module.h>
-#include <linux/pci.h>
 #include <stdarg.h>
-#include "types.h"
-#include <brcmu_utils.h>
-#include <soc.h>
+
 #include <chipcommon.h>
-#include <brcm_hw_ids.h>
-#include <nicpci.h>
-#include <aiutils.h>
-#include "srom.h"
+#include <brcmu_utils.h>
+#include "nicpci.h"
+#include "aiutils.h"
 #include "otp.h"
+#include "srom.h"
 
 #define SROM_OFFSET(sih) ((sih->ccrev > 31) ? \
 	(((sih->cccaps & CC_CAP_SROM) == 0) ? NULL : \
drivers/staging/brcm80211/brcmsmac/srom.h +2 -0
index ee4f880..efc4d1e 100644
@@ -17,6 +17,8 @@
 #ifndef	_BRCM_SROM_H_
 #define	_BRCM_SROM_H_
 
+#include "types.h"
+
 /* Prototypes */
 extern int srom_var_init(struct si_pub *sih, uint bus, void *curmap,
 			 char **vars, uint *count);
drivers/staging/brcm80211/brcmsmac/stf.c +2 -10
index 5f98804..625252a 100644
@@ -14,20 +14,12 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/kernel.h>
-#include <linux/module.h>
-
-#include <defs.h>
-#include <brcmu_utils.h>
-#include <aiutils.h>
-#include <brcmu_wifi.h>
-#include "dma.h"
+#include <net/mac80211.h>
 
 #include "types.h"
+
 #include "d11.h"
 #include "rate.h"
-#include "scb.h"
-#include "pub.h"
 #include "phy/phy_hal.h"
 #include "channel.h"
 #include "main.h"
drivers/staging/brcm80211/brcmsmac/stf.h +2 -0
index 75e8205..0b48f4d 100644
@@ -17,6 +17,8 @@
 #ifndef _BRCM_STF_H_
 #define _BRCM_STF_H_
 
+#include "types.h"
+
 extern int wlc_stf_attach(struct wlc_info *wlc);
 extern void wlc_stf_detach(struct wlc_info *wlc);
 
drivers/staging/brcm80211/brcmsmac/types.h +6 -0
index dd0bcf9..1619e6a 100644
@@ -17,6 +17,8 @@
 #ifndef _BRCM_TYPES_H_
 #define _BRCM_TYPES_H_
 
+#include <linux/types.h>
+
 /* Bus types */
 #define	SI_BUS			0	/* SOC Interconnect */
 #define	PCI_BUS			1	/* PCI target */
@@ -365,6 +367,10 @@ struct dma_pub;
 struct wlc_bsscfg;
 struct brcmu_strbuf;
 struct si_pub;
+struct wiphy;
+struct brcmu_iovar;
+struct wlc_txq_info;
+struct wlcband;
 
 typedef struct gpioh_item gpioh_item_t;
 typedef struct si_info si_info_t;
drivers/staging/brcm80211/brcmsmac/ucode_loader.c +1 -1
index 32d5196..bf733fb 100644
@@ -14,8 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/types.h>
 #include <defs.h>
+#include "types.h"
 #include <ucode_loader.h>
 
 enum {
drivers/staging/brcm80211/brcmutil/utils.c +0 -10
index ab11c4b..2819c1d 100644
@@ -14,18 +14,8 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <linux/ctype.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/module.h>
-#include <linux/pci.h>
 #include <linux/netdevice.h>
-#include <linux/sched.h>
-#include <linux/printk.h>
-#include <defs.h>
-#include <stdarg.h>
 #include <brcmu_utils.h>
-#include <brcm_hw_ids.h>
 
 MODULE_AUTHOR("Broadcom Corporation");
 MODULE_DESCRIPTION("Broadcom 802.11n wireless LAN driver utilities.");
drivers/staging/brcm80211/brcmutil/wifi.c +0 -5
index bacf345..af88dcb 100644
@@ -13,11 +13,6 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-#include <linux/ctype.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <defs.h>
-#include <brcmu_utils.h>
 #include <brcmu_wifi.h>
 
 /*
drivers/staging/brcm80211/include/brcmu_utils.h +2 -0
index e3308e8..863b3c7 100644
@@ -17,6 +17,8 @@
 #ifndef	_BRCMU_UTILS_H_
 #define	_BRCMU_UTILS_H_
 
+#include <linux/skbuff.h>
+
 /* Buffer structure for collecting string-formatted data
 * using brcmu_bprintf() API.
 * Use brcmu_binit() to initialize before use
drivers/staging/brcm80211/include/defs.h +2 -0
index 768df8d..20e1407 100644
@@ -17,6 +17,8 @@
 #ifndef	_BRCM_DEFS_H_
 #define	_BRCM_DEFS_H_
 
+#include <linux/types.h>
+
 #define	SI_BUS			0
 #define	PCI_BUS			1
 #define	PCMCIA_BUS		2
Signature · 1 line
1.7.4.1
#4 lore raw

PATCH 4/21 staging: brcm80211: Remove flags from wl_is_nonetwork

In reply to Roland Vossen

From: Franky Lin <[email protected]>

Remove this debug only variable in fullmace driver to avoid compile warning when BCMDBG is off

---
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +2 -2
index 0a7a9b2..457f5b1 100644
@@ -2588,11 +2588,11 @@ static bool wl_is_nonetwork(struct wl_priv *wl, const wl_event_msg_t *e)
 {
 	u32 event = be32_to_cpu(e->event_type);
 	u32 status = be32_to_cpu(e->status);
-	u16 flags = be16_to_cpu(e->flags);
 
 	if (event == WLC_E_LINK && status == WLC_E_STATUS_NO_NETWORKS) {
 		WL_CONN("Processing Link %s & no network found\n",
-				flags & WLC_EVENT_MSG_LINK ? "up" : "down");
+				be16_to_cpu(e->flags) & WLC_EVENT_MSG_LINK ?
+				"up" : "down");
 		return true;
 	}
 
Signature · 1 line
1.7.4.1
#5 lore raw

PATCH 5/21 staging: brcm80211: remove 'used' keyword from function ai_ispcie()

In reply to Roland Vossen

From: Arend van Spriel <[email protected]>

The function ai_ispcie() is a static function that is currently being called from the c sources in the driver. Side-effect of the keyword is that warning will suppressed when this function is no longer used. As there is no assembly code using this function, the keyword is removed.

---
 drivers/staging/brcm80211/brcmsmac/aiutils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/brcm80211/brcmsmac/aiutils.c +1 -1
index 4b908f7..7907b15 100644
@@ -2028,7 +2028,7 @@ static char *ai_devpathvar(struct si_pub *sih, char *var, int len,
 }
 
 /* return true if PCIE capability exists in the pci config space */
-static __used bool ai_ispcie(si_info_t *sii)
+static bool ai_ispcie(si_info_t *sii)
 {
 	u8 cap_ptr;
 
Signature · 1 line
1.7.4.1
#6 lore raw

PATCH 6/21 staging: brcm80211: remove regs variable from brcms_ioctl function

In reply to Roland Vossen

From: Arend van Spriel <[email protected]>

This variable was declared and initialized but never used so it has been removed.

---
 drivers/staging/brcm80211/brcmsmac/main.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/staging/brcm80211/brcmsmac/main.c +0 -2
index c8d6679..28ae741 100644
@@ -2515,7 +2515,6 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
 	int val, *pval;
 	bool bool_val;
 	int bcmerror;
-	d11regs_t *regs;
 	struct scb *nextscb;
 	bool ta_ok;
 	uint band;
@@ -2551,7 +2550,6 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
 	/* bool conversion to avoid duplication below */
 	bool_val = val != 0;
 	bcmerror = 0;
-	regs = wlc->regs;
 
 	if ((arg == NULL) || (len <= 0)) {
 		wiphy_err(wlc->wiphy, "wl%d: %s: Command %d needs arguments\n",
Signature · 1 line
1.7.4.1
#7 lore raw

PATCH 7/21 staging: brcm80211: remove d11regs_t parameter from wlc_tbtt function

In reply to Roland Vossen

From: Arend van Spriel <[email protected]>

The function wlc_tbtt() has variable regs as parameter, but it is not used. Parameter has been removed from the function.

---
 drivers/staging/brcm80211/brcmsmac/bmac.c |    2 +-
 drivers/staging/brcm80211/brcmsmac/main.c |    2 +-
 drivers/staging/brcm80211/brcmsmac/main.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/brcm80211/brcmsmac/bmac.c +1 -1
index e501e06..68bf242 100644
@@ -327,7 +327,7 @@ bool wlc_dpc(struct wlc_info *wlc, bool bounded)
 	}
 
 	if (macintstatus & (MI_TBTT | MI_DTIM_TBTT))
-		wlc_tbtt(wlc, regs);
+		wlc_tbtt(wlc);
 
 	/* ATIM window end */
 	if (macintstatus & MI_ATIMWINEND) {
drivers/staging/brcm80211/brcmsmac/main.c +1 -1
index 28ae741..3244751 100644
@@ -4243,7 +4243,7 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
 	return 0;
 }
 
-void wlc_tbtt(struct wlc_info *wlc, d11regs_t *regs)
+void wlc_tbtt(struct wlc_info *wlc)
 {
 	struct wlc_bsscfg *cfg = wlc->cfg;
 
drivers/staging/brcm80211/brcmsmac/main.h +1 -1
index 1d28b76..cc0772e 100644
@@ -932,7 +932,7 @@ extern u16 wlc_compute_rtscts_dur(struct wlc_info *wlc, bool cts_only,
 				     u8 frame_preamble_type, uint frame_len,
 				     bool ba);
 
-extern void wlc_tbtt(struct wlc_info *wlc, d11regs_t *regs);
+extern void wlc_tbtt(struct wlc_info *wlc);
 extern void wlc_inval_dma_pkts(struct wlc_hw_info *hw,
 			       struct ieee80211_sta *sta,
 			       void (*dma_callback_fn));
Signature · 1 line
1.7.4.1
#8 lore raw

PATCH 8/21 staging: brcm80211: remove device id parameter from ai_attach()

In reply to Roland Vossen

From: Arend van Spriel <[email protected]>

The device id is passed to ai_attach() and subsequent functions without actually being used. It can be removed.

---
 drivers/staging/brcm80211/brcmsmac/aiutils.c |   20 +++++++++-----------
 drivers/staging/brcm80211/brcmsmac/aiutils.h |    4 ++--
 drivers/staging/brcm80211/brcmsmac/bmac.c    |    2 +-
 3 files changed, 12 insertions(+), 14 deletions(-)
drivers/staging/brcm80211/brcmsmac/aiutils.c +9 -11
index 7907b15..82809cb 100644
@@ -434,7 +434,7 @@ static void ai_hwfixup(si_info_t *sii)
 }
 
 /* parse the enumeration rom to identify all cores */
-void ai_scan(struct si_pub *sih, void *regs, uint devid)
+void ai_scan(struct si_pub *sih, void *regs)
 {
 	si_info_t *sii = SI_INFO(sih);
 	chipcregs_t *cc = (chipcregs_t *) regs;
@@ -850,11 +850,10 @@ u32 ai_core_sflags(struct si_pub *sih, u32 mask, u32 val)
 
 /* *************** from siutils.c ************** */
 /* local prototypes */
-static si_info_t *ai_doattach(si_info_t *sii, uint devid, void *regs,
+static si_info_t *ai_doattach(si_info_t *sii, void *regs,
 			      uint bustype, void *sdh, char **vars,
 			      uint *varsz);
-static bool ai_buscore_prep(si_info_t *sii, uint bustype, uint devid,
-			    void *sdh);
+static bool ai_buscore_prep(si_info_t *sii, uint bustype);
 static bool ai_buscore_setup(si_info_t *sii, chipcregs_t *cc, uint bustype,
 			     u32 savewin, uint *origidx, void *regs);
 static void ai_nvram_process(si_info_t *sii, char *pvars);
@@ -877,7 +876,7 @@ static u32 ai_gpioreservation;
  * vars - pointer to a pointer area for "environment" variables
  * varsz - pointer to int to return the size of the vars
  */
-struct si_pub *ai_attach(uint devid, void *regs, uint bustype,
+struct si_pub *ai_attach(void *regs, uint bustype,
 		void *sdh, char **vars, uint *varsz)
 {
 	si_info_t *sii;
@@ -889,7 +888,7 @@ struct si_pub *ai_attach(uint devid, void *regs, uint bustype,
 		return NULL;
 	}
 
-	if (ai_doattach(sii, devid, regs, bustype, sdh, vars, varsz) ==
+	if (ai_doattach(sii, regs, bustype, sdh, vars, varsz) ==
 	    NULL) {
 		kfree(sii);
 		return NULL;
@@ -903,8 +902,7 @@ struct si_pub *ai_attach(uint devid, void *regs, uint bustype,
 /* global kernel resource */
 static si_info_t ksii;
 
-static bool ai_buscore_prep(si_info_t *sii, uint bustype, uint devid,
-			    void *sdh)
+static bool ai_buscore_prep(si_info_t *sii, uint bustype)
 {
 	/* kludge to enable the clock on the 4306 which lacks a slowclock */
 	if (bustype == PCI_BUS && !ai_ispcie(sii))
@@ -1070,7 +1068,7 @@ static __used void ai_nvram_process(si_info_t *sii, char *pvars)
 	sii->pub.boardflags = getintvar(pvars, "boardflags");
 }
 
-static si_info_t *ai_doattach(si_info_t *sii, uint devid,
+static si_info_t *ai_doattach(si_info_t *sii,
 			      void *regs, uint bustype, void *pbus,
 			      char **vars, uint *varsz)
 {
@@ -1116,7 +1114,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid,
 	sih->bustype = bustype;
 
 	/* bus/core/clk setup for register access */
-	if (!ai_buscore_prep(sii, bustype, devid, pbus)) {
+	if (!ai_buscore_prep(sii, bustype)) {
 		SI_ERROR(("si_doattach: si_core_clk_prep failed %d\n",
 			  bustype));
 		return NULL;
@@ -1142,7 +1140,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid,
 	if (socitype == SOCI_AI) {
 		SI_MSG(("Found chip type AI (0x%08x)\n", w));
 		/* pass chipc address instead of original core base */
-		ai_scan(&sii->pub, (void *)cc, devid);
+		ai_scan(&sii->pub, (void *)cc);
 	} else {
 		SI_ERROR(("Found chip of unknown type (0x%08x)\n", w));
 		return NULL;
drivers/staging/brcm80211/brcmsmac/aiutils.h +2 -2
index 85c39af..2b124c1 100644
@@ -499,7 +499,7 @@ struct si_info {
 };
 
 /* AMBA Interconnect exported externs */
-extern void ai_scan(struct si_pub *sih, void *regs, uint devid);
+extern void ai_scan(struct si_pub *sih, void *regs);
 
 extern uint ai_flag(struct si_pub *sih);
 extern void ai_setint(struct si_pub *sih, int siflag);
@@ -521,7 +521,7 @@ extern u32 ai_addrspacesize(struct si_pub *sih, uint asidx);
 extern void ai_write_wrap_reg(struct si_pub *sih, u32 offset, u32 val);
 
 /* === exported functions === */
-extern struct si_pub *ai_attach(uint pcidev, void *regs, uint bustype,
+extern struct si_pub *ai_attach(void *regs, uint bustype,
 		       void *sdh, char **vars, uint *varsz);
 
 extern void ai_detach(struct si_pub *sih);
drivers/staging/brcm80211/brcmsmac/bmac.c +1 -1
index 68bf242..448a562 100644
@@ -610,7 +610,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
 	 * Also initialize software state that depends on the particular hardware
 	 * we are running.
 	 */
-	wlc_hw->sih = ai_attach((uint) device, regsva, bustype, btparam,
+	wlc_hw->sih = ai_attach(regsva, bustype, btparam,
 				&wlc_hw->vars, &wlc_hw->vars_size);
 	if (wlc_hw->sih == NULL) {
 		wiphy_err(wiphy, "wl%d: wlc_bmac_attach: si_attach failed\n",
Signature · 1 line
1.7.4.1
#9 lore raw

PATCH 9/21 staging: brcm80211: remove unused fields from struct si_info

In reply to Roland Vossen

From: Arend van Spriel <[email protected]>

Two fields were not used in the driver code so they have been removed from struct si_info definition.

---
 drivers/staging/brcm80211/brcmsmac/aiutils.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/staging/brcm80211/brcmsmac/aiutils.h +0 -4
index 2b124c1..66d9471 100644
@@ -470,10 +470,6 @@ struct si_info {
 
 	void *pch;		/* PCI/E core handle */
 
-	gpioh_item_t *gpioh_head;	/* GPIO event handlers list */
-
-	bool memseg;		/* flag to toggle MEM_SEG register */
-
 	char *vars;
 	uint varsz;
 
Signature · 1 line
1.7.4.1
#10 lore raw

PATCH 10/21 staging: brcm80211: fixed double #include problem

In reply to Roland Vossen

Code cleanup. Removed one redundant include and reshuffled #include order as to include Linux header files first.

---
 drivers/staging/brcm80211/brcmfmac/bcmsdh.c        |    7 ++---
 drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c  |   20 +++++++---------
 .../brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c        |   19 +++++++--------
 drivers/staging/brcm80211/brcmfmac/dhd_cdc.c       |   10 ++++----
 drivers/staging/brcm80211/brcmfmac/dhd_common.c    |   14 +++++-----
 .../staging/brcm80211/brcmfmac/dhd_custom_gpio.c   |    4 +-
 drivers/staging/brcm80211/brcmfmac/dhd_linux.c     |   13 +++++-----
 drivers/staging/brcm80211/brcmfmac/dhd_sdio.c      |   15 +++++------
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c   |   24 ++++++++-----------
 drivers/staging/brcm80211/brcmfmac/wl_iw.c         |   18 +++++----------
 drivers/staging/brcm80211/brcmsmac/bmac.c          |    2 +-
 drivers/staging/brcm80211/brcmsmac/dma.c           |    8 +++---
 drivers/staging/brcm80211/brcmsmac/otp.c           |    2 +-
 drivers/staging/brcm80211/brcmsmac/stf.c           |    1 -
 14 files changed, 70 insertions(+), 87 deletions(-)
drivers/staging/brcm80211/brcmfmac/bcmsdh.c +3 -4
index b3bdd48..3d0c8e7 100644
@@ -19,15 +19,14 @@
 #include <linux/netdevice.h>
 #include <linux/pci_ids.h>
 #include <linux/sched.h>
+
 #include <defs.h>
 #include <brcm_hw_ids.h>
 #include <brcmu_utils.h>
 #include <brcmu_wifi.h>
 #include <soc.h>
-
-#include <bcmsdbus.h>		/* common SDIO/controller interface */
-#include <sbsdio.h>		/* BRCM sdio device core */
-
+#include "bcmsdbus.h"		/* common SDIO/controller interface */
+#include "sbsdio.h"		/* BRCM sdio device core */
 #include "dngl_stats.h"
 #include "dhd.h"
 
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +9 -11
index 66e204b..b90d7d0 100644
@@ -16,22 +16,20 @@
 #include <linux/types.h>
 #include <linux/netdevice.h>
 #include <linux/mmc/sdio.h>
-#include <defs.h>
-#include <brcm_hw_ids.h>
-#include <brcmu_utils.h>
-#include <brcmu_wifi.h>
-#include "sdio_host.h"
-#include <bcmsdbus.h>		/* bcmsdh to/from specific controller APIs */
-#include <sdiovar.h>		/* ioctl/iovars */
-
 #include <linux/mmc/core.h>
 #include <linux/mmc/sdio_func.h>
 #include <linux/mmc/sdio_ids.h>
 #include <linux/suspend.h>
 
-#include <dngl_stats.h>
-#include <dhd.h>
-
+#include <defs.h>
+#include <brcm_hw_ids.h>
+#include <brcmu_utils.h>
+#include <brcmu_wifi.h>
+#include "sdio_host.h"
+#include "bcmsdbus.h"		/* bcmsdh to/from specific controller APIs */
+#include "sdiovar.h"		/* ioctl/iovars */
+#include "dngl_stats.h"
+#include "dhd.h"
 #include "bcmsdh_sdmmc.h"
 
 extern int sdio_function_init(void);
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c +9 -10
index 9fc491d..5f17b8f 100644
@@ -16,19 +16,18 @@
 #include <linux/types.h>
 #include <linux/sched.h>	/* request_irq() */
 #include <linux/netdevice.h>
-#include <net/cfg80211.h>
-#include <defs.h>
-#include <brcmu_utils.h>
-#include <brcmu_wifi.h>
-#include "sdio_host.h"
-#include <bcmsdbus.h>		/* bcmsdh to/from specific controller APIs */
-#include <sdiovar.h>		/* to get msglevel bit values */
-
 #include <linux/mmc/core.h>
 #include <linux/mmc/card.h>
 #include <linux/mmc/sdio_func.h>
 #include <linux/mmc/sdio_ids.h>
+#include <net/cfg80211.h>
 
+#include <defs.h>
+#include <brcmu_utils.h>
+#include <brcmu_wifi.h>
+#include "sdio_host.h"
+#include "bcmsdbus.h"		/* bcmsdh to/from specific controller APIs */
+#include "sdiovar.h"		/* to get msglevel bit values */
 #include "dngl_stats.h"
 #include "dhd.h"
 
@@ -53,8 +52,8 @@
 
 #include <bcmsdh_sdmmc.h>
 
-#include <dhd_dbg.h>
-#include <wl_cfg80211.h>
+#include "dhd_dbg.h"
+#include "wl_cfg80211.h"
 
 extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd);
 extern void sdioh_sdmmc_devintr_on(sdioh_info_t *sd);
drivers/staging/brcm80211/brcmfmac/dhd_cdc.c +5 -5
index 2220941..bf3fe99 100644
@@ -22,11 +22,11 @@
 #include <brcmu_utils.h>
 #include <brcmu_wifi.h>
 
-#include <dngl_stats.h>
-#include <dhd.h>
-#include <dhd_proto.h>
-#include <dhd_bus.h>
-#include <dhd_dbg.h>
+#include "dngl_stats.h"
+#include "dhd.h"
+#include "dhd_proto.h"
+#include "dhd_bus.h"
+#include "dhd_dbg.h"
 
 struct cdc_ioctl {
 	u32 cmd;	/* ioctl command value */
drivers/staging/brcm80211/brcmfmac/dhd_common.c +7 -7
index 73d8b02..0a5a1a4 100644
@@ -16,16 +16,16 @@
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/sched.h>
-#include <defs.h>
-#include <brcmu_wifi.h>
 #include <linux/netdevice.h>
 #include <asm/unaligned.h>
+#include <defs.h>
+#include <brcmu_wifi.h>
 #include <brcmu_utils.h>
-#include <dngl_stats.h>
-#include <dhd.h>
-#include <dhd_bus.h>
-#include <dhd_proto.h>
-#include <dhd_dbg.h>
+#include "dngl_stats.h"
+#include "dhd.h"
+#include "dhd_bus.h"
+#include "dhd_proto.h"
+#include "dhd_dbg.h"
 
 #define BRCM_OUI		"\x00\x10\x18"
 #define DOT11_OUI_LEN			3
drivers/staging/brcm80211/brcmfmac/dhd_custom_gpio.c +2 -2
index 6008888..defc009 100644
@@ -20,8 +20,8 @@
 #include <defs.h>
 #include <brcmu_wifi.h>
 
-#include <dngl_stats.h>
-#include <dhd.h>
+#include "dngl_stats.h"
+#include "dhd.h"
 
 #define WL_ERROR(fmt, args...) printk(fmt, ##args)
 #define WL_TRACE(fmt, args...) no_printk(fmt, ##args)
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +6 -7
index b48447c..be6ac30 100644
@@ -36,13 +36,12 @@
 #include <brcmu_utils.h>
 #include <brcmu_wifi.h>
 
-#include <dngl_stats.h>
-#include <dhd.h>
-#include <dhd_bus.h>
-#include <dhd_proto.h>
-#include <dhd_dbg.h>
-
-#include <wl_cfg80211.h>
+#include "dngl_stats.h"
+#include "dhd.h"
+#include "dhd_bus.h"
+#include "dhd_proto.h"
+#include "dhd_dbg.h"
+#include "wl_cfg80211.h"
 
 #define EPI_VERSION_STR		"4.218.248.5"
 #define ETH_P_BRCM			0x886c
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +7 -8
index 330703b..a803848 100644
@@ -23,12 +23,11 @@
 #include <linux/mmc/sdio.h>
 #include <asm/unaligned.h>
 #include <defs.h>
-#include "sdio_host.h"
 #include <brcmu_wifi.h>
 #include <brcmu_utils.h>
 #include <brcm_hw_ids.h>
-
 #include <soc.h>
+#include "sdio_host.h"
 
 /* register access macros */
 #ifndef __BIG_ENDIAN
@@ -162,13 +161,13 @@ typedef struct {
 #endif				/* DHD_DEBUG */
 #include <chipcommon.h>
 
-#include <sbsdio.h>
+#include "sbsdio.h"
 
-#include <dngl_stats.h>
-#include <dhd.h>
-#include <dhd_bus.h>
-#include <dhd_proto.h>
-#include <dhd_dbg.h>
+#include "dngl_stats.h"
+#include "dhd.h"
+#include "dhd_bus.h"
+#include "dhd_proto.h"
+#include "dhd_dbg.h"
 #include <sdiovar.h>
 #include <bcmchip.h>
 
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +10 -14
index 457f5b1..e9d19c5 100644
@@ -17,28 +17,24 @@
 #include <linux/kernel.h>
 #include <linux/if_arp.h>
 #include <linux/sched.h>
-
-#include <brcmu_utils.h>
-#include <defs.h>
-#include <brcmu_wifi.h>
-
-#include <asm/uaccess.h>
-
-#include <dngl_stats.h>
-#include <dhd.h>
-
 #include <linux/kthread.h>
 #include <linux/netdevice.h>
 #include <linux/sched.h>
 #include <linux/etherdevice.h>
 #include <linux/wireless.h>
 #include <linux/ieee80211.h>
-#include <net/cfg80211.h>
-
-#include <net/rtnetlink.h>
 #include <linux/mmc/sdio_func.h>
 #include <linux/firmware.h>
-#include <wl_cfg80211.h>
+#include <linux/uaccess.h>
+#include <net/cfg80211.h>
+#include <net/rtnetlink.h>
+
+#include <brcmu_utils.h>
+#include <defs.h>
+#include <brcmu_wifi.h>
+#include "dngl_stats.h"
+#include "dhd.h"
+#include "wl_cfg80211.h"
 
 void sdioh_sdio_set_host_pm_flags(int flag);
 
drivers/staging/brcm80211/brcmfmac/wl_iw.c +6 -12
index c65affc..14b2e1b 100644
@@ -13,29 +13,23 @@
  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-
 #include <linux/kthread.h>
 #include <linux/semaphore.h>
-#include <defs.h>
+#include <linux/ieee80211.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/wireless.h>
+#include <linux/if_arp.h>
+#include <linux/uaccess.h>
 
 #include <brcmu_utils.h>
 #include <brcmu_wifi.h>
-
-#include <linux/if_arp.h>
-#include <asm/uaccess.h>
-
-#include <dngl_stats.h>
-#include <dhd.h>
-#include <linux/ieee80211.h>
+#include <defs.h>
+#include "dngl_stats.h"
+#include "dhd.h"
 
 struct si_pub;
 
-#include <dngl_stats.h>
-#include <dhd.h>
-
 #define WPA_OUI			"\x00\x50\xF2"
 #define DOT11_MNG_RSN_ID			48
 #define DOT11_MNG_WPA_ID			221
drivers/staging/brcm80211/brcmsmac/bmac.c +1 -1
index 448a562..9d6ee5d 100644
@@ -16,10 +16,10 @@
 #include <linux/pci.h>
 #include <net/mac80211.h>
 
-#include "types.h"
 #include <brcm_hw_ids.h>
 #include <aiutils.h>
 #include <chipcommon.h>
+#include "types.h"
 #include "rate.h"
 #include "phy/phy_hal.h"
 #include "channel.h"
drivers/staging/brcm80211/brcmsmac/dma.c +4 -4
index 642c9921..adf364c 100644
@@ -18,15 +18,15 @@
 #include <linux/delay.h>
 #include <linux/pci.h>
 
+#if defined(__mips__)
+#include <asm/addrspace.h>
+#endif
+
 #include <brcmu_utils.h>
 #include <aiutils.h>
 #include "types.h"
 #include "dma.h"
 
-#if defined(__mips__)
-#include <asm/addrspace.h>
-#endif
-
 /*
  * Each descriptor ring must be 8kB aligned, and fit within a contiguous 8kB physical address.
  */
drivers/staging/brcm80211/brcmsmac/otp.c +1 -1
index d09f913..2cda60f 100644
@@ -18,8 +18,8 @@
 #include <linux/errno.h>
 
 #include <brcm_hw_ids.h>
-#include "aiutils.h"
 #include <chipcommon.h>
+#include "aiutils.h"
 #include "otp.h"
 
 #define OTPS_GUP_MASK		0x00000f00
drivers/staging/brcm80211/brcmsmac/stf.c +0 -1
index 625252a..3a264ec 100644
@@ -17,7 +17,6 @@
 #include <net/mac80211.h>
 
 #include "types.h"
-
 #include "d11.h"
 #include "rate.h"
 #include "phy/phy_hal.h"
Signature · 1 line
1.7.4.1
#11 lore raw

PATCH 11/21 staging: brcm80211: Fix for suspend issue in brcmfmac driver

In reply to Roland Vossen

From: Sukesh Srikakula <[email protected]>

Issue with disconnect at the time of suspend is fixed by properly setting connection status bits maintained by brcmfmac driver.

---
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c |   32 ++++++++++++++++-----
 1 files changed, 24 insertions(+), 8 deletions(-)
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +24 -8
index e9d19c5..399d7a8 100644
@@ -2110,8 +2110,9 @@ static s32 wl_cfg80211_suspend(struct wiphy *wiphy)
 	 * While going to suspend if associated with AP disassociate
 	 * from AP to save power while system is in suspended state
 	 */
-	if (test_bit(WL_STATUS_CONNECTED, &wl->status) &&
-		test_bit(WL_STATUS_READY, &wl->status)) {
+	if ((test_bit(WL_STATUS_CONNECTED, &wl->status) ||
+	     test_bit(WL_STATUS_CONNECTING, &wl->status)) &&
+	     test_bit(WL_STATUS_READY, &wl->status)) {
 		WL_INFO("Disassociating from AP"
 			" while entering suspend state\n");
 		wl_link_down(wl);
@@ -2138,8 +2139,6 @@ static s32 wl_cfg80211_suspend(struct wiphy *wiphy)
 	}
 	clear_bit(WL_STATUS_SCANNING, &wl->status);
 	clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status);
-	clear_bit(WL_STATUS_CONNECTING, &wl->status);
-	clear_bit(WL_STATUS_CONNECTED, &wl->status);
 
 	/* Inform SDIO stack not to switch off power to the chip */
 	sdioh_sdio_set_host_pm_flags(MMC_PM_KEEP_POWER);
@@ -2620,10 +2619,12 @@ wl_notify_connect_status(struct wl_priv *wl, struct net_device *ndev,
 	} else if (wl_is_linkdown(wl, e)) {
 		WL_CONN("Linkdown\n");
 		if (wl_is_ibssmode(wl)) {
+			clear_bit(WL_STATUS_CONNECTING, &wl->status);
 			if (test_and_clear_bit(WL_STATUS_CONNECTED,
 				&wl->status))
 				wl_link_down(wl);
 		} else {
+			wl_bss_connect_done(wl, ndev, e, data, false);
 			if (test_and_clear_bit(WL_STATUS_CONNECTED,
 				&wl->status)) {
 				cfg80211_disconnected(ndev, 0, NULL, 0,
@@ -4099,6 +4100,25 @@ static s32 __wl_cfg80211_up(struct wl_priv *wl)
 
 static s32 __wl_cfg80211_down(struct wl_priv *wl)
 {
+	/*
+	 * While going down, if associated with AP disassociate
+	 * from AP to save power
+	 */
+	if ((test_bit(WL_STATUS_CONNECTED, &wl->status) ||
+	     test_bit(WL_STATUS_CONNECTING, &wl->status)) &&
+	     test_bit(WL_STATUS_READY, &wl->status)) {
+		WL_INFO("Disassociating from AP");
+		wl_link_down(wl);
+
+		/* Make sure WPA_Supplicant receives all the event
+		   generated due to DISASSOC call to the fw to keep
+		   the state fw and WPA_Supplicant state consistent
+		 */
+		rtnl_unlock();
+		wl_delay(500);
+		rtnl_lock();
+	}
+
 	set_bit(WL_STATUS_SCAN_ABORTING, &wl->status);
 	wl_term_iscan(wl);
 	if (wl->scan_request) {
@@ -4110,8 +4130,6 @@ static s32 __wl_cfg80211_down(struct wl_priv *wl)
 	clear_bit(WL_STATUS_READY, &wl->status);
 	clear_bit(WL_STATUS_SCANNING, &wl->status);
 	clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status);
-	clear_bit(WL_STATUS_CONNECTING, &wl->status);
-	clear_bit(WL_STATUS_CONNECTED, &wl->status);
 
 	wl_debugfs_remove_netdev(wl);
 
@@ -4230,14 +4248,12 @@ static __used s32 wl_add_ie(struct wl_priv *wl, u8 t, u8 l, u8 *v)
 	return err;
 }
 
-
 static void wl_link_down(struct wl_priv *wl)
 {
 	struct net_device *dev = NULL;
 	s32 err = 0;
 
 	WL_TRACE("Enter\n");
-	clear_bit(WL_STATUS_CONNECTED, &wl->status);
 
 	if (wl->link_up) {
 		dev = wl_to_ndev(wl);
Signature · 1 line
1.7.4.1
#12 lore raw

PATCH 12/21 staging: brcm80211: use __BIG_ENDIAN macro in dma.c

In reply to Roland Vossen

From: Arend van Spriel <[email protected]>

The source file dma.c used a macro definition that indicated a big endian platform. The linux tree has its own macro determined by architecture and/or kernel configuration. This byteorder macro is __BIG_ENDIAN. This is now used in dma.c.

---
 drivers/staging/brcm80211/brcmsmac/dma.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/brcm80211/brcmsmac/dma.c +4 -4
index adf364c..9a9f0e7 100644
@@ -507,9 +507,9 @@ struct dma_pub *dma_attach(char *name, struct si_pub *sih,
 		di->dataoffsetlow = di->ddoffsetlow;
 		di->dataoffsethigh = di->ddoffsethigh;
 	}
-#if defined(__mips__) && defined(IL_BIGENDIAN)
+#if defined(__mips__) && defined(__BIG_ENDIAN)
 	di->dataoffsetlow = di->dataoffsetlow + SI_SDRAM_SWAPPED;
-#endif				/* defined(__mips__) && defined(IL_BIGENDIAN) */
+#endif				/* defined(__mips__) && defined(__BIG_ENDIAN) */
 	/* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */
 	if ((ai_coreid(sih) == SDIOD_CORE_ID)
 	    && ((ai_corerev(sih) > 0) && (ai_corerev(sih) <= 2)))
@@ -624,12 +624,12 @@ dma64_dd_upd(dma_info_t *di, dma64dd_t *ddring, dmaaddr_t pa, uint outidx,
 	u32 ctrl2 = bufcount & D64_CTRL2_BC_MASK;
 
 	/* PCI bus with big(>1G) physical address, use address extension */
-#if defined(__mips__) && defined(IL_BIGENDIAN)
+#if defined(__mips__) && defined(__BIG_ENDIAN)
 	if ((di->dataoffsetlow == SI_SDRAM_SWAPPED)
 	    || !(PHYSADDRLO(pa) & PCI32ADDR_HIGH)) {
 #else
 	if ((di->dataoffsetlow == 0) || !(PHYSADDRLO(pa) & PCI32ADDR_HIGH)) {
-#endif				/* defined(__mips__) && defined(IL_BIGENDIAN) */
+#endif				/* defined(__mips__) && defined(__BIG_ENDIAN) */
 
 		W_SM(&ddring[outidx].addrlow,
 		     BUS_SWAP32(PHYSADDRLO(pa) + di->dataoffsetlow));
Signature · 1 line
1.7.4.1
#13 lore raw

Re: [PATCH 12/21] staging: brcm80211: use __BIG_ENDIAN macro in dma.c

Quoted 6 lines · Roland Vossen

From: Arend van Spriel <[email protected]>

The source file dma.c used a macro definition that indicated a big endian platform. The linux tree has its own macro determined by architecture and/or kernel configuration. This byteorder macro is __BIG_ENDIAN. This is now used in dma.c.

While this replacement is technically correct, the check itself is wrong and should be fixed instead. Currently it assumes that __mips__ means Broadcom MIPS; but if it isn't, then there's likely no SI_SDRAM_SWAPPED and any access there will in best case do nothing (but more like hang the system).

Use either CONFIG_BCM47XX or CONFIG_BCM63XX to check for the BMIPS platforms this is probably intended for (I'm not 100% sure if BCM63XX has the swapped memory space - better check with your xDSL people ;-).

Jonas

#14 lore raw

Re: [PATCH 12/21] staging: brcm80211: use __BIG_ENDIAN macro in dma.c

Quoted 13 lines · Jonas Gorski
Quoted 6 lines · Roland Vossen

From: Arend van Spriel<[email protected]>

The source file dma.c used a macro definition that indicated a big endian platform. The linux tree has its own macro determined by architecture and/or kernel configuration. This byteorder macro is __BIG_ENDIAN. This is now used in dma.c.

While this replacement is technically correct, the check itself is wrong and should be fixed instead. Currently it assumes that __mips__ means Broadcom MIPS; but if it isn't, then there's likely no SI_SDRAM_SWAPPED and any access there will in best case do nothing (but more like hang the system).

Quoted 3 lines

Use either CONFIG_BCM47XX or CONFIG_BCM63XX to check for the BMIPS platforms this is probably intended for (I'm not 100% sure if BCM63XX has the swapped memory space - better check with your xDSL people ;-).

Hi Jonas,

You are right as with previous mips related patches. Consider this a first step which does not change functionality but aims to use the proper linux provided macros instead of our own incarnations. You can be assured that your feedback is on our work list.

Gr. AvS

Signature · 2 lines
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --
#15 lore raw

Re: [PATCH 12/21] staging: brcm80211: use __BIG_ENDIAN macro in dma.c

Hi Arend,

Quoted 5 lines · Arend van Spriel

Hi Jonas,

You are right as with previous mips related patches. Consider this a first step which does not change functionality but aims to use the proper linux provided macros instead of our own incarnations.

Actually as far as I can tell this changes (non-)functionality: With the broken big endiness check the driver probably just doesn't work properly on MIPS BE systems, because some endianess conversion is missing*. With the endianess check fixed, the special handling for the Broadcom MIPS get's enabled, potentially crashing the system (or changing random registers), thus making it *more* broken for non BMIPS systems. Therefore I'd rather consider this a regression. Especially since (AFAIK) the BMIPS systems that can take advantage of this aren't supported in Linux (yet).

If it were just making things less efficient, I wouldn't be complaining (at least not that much ;-). If you can say that this is a code path that isn't taken anyway, then my point is moot (for now). I don't know the driver enough to tell that.

Jonas

*assuming brcm80211 depends on this on BE systems and it isn't just an optimization

#16 lore raw

Re: [PATCH 12/21] staging: brcm80211: use __BIG_ENDIAN macro in dma.c

Quoted 24 lines · Jonas Gorski

Hi Arend,

Quoted 5 lines · Arend van Spriel

Hi Jonas,

You are right as with previous mips related patches. Consider this a first step which does not change functionality but aims to use the proper linux provided macros instead of our own incarnations.

Actually as far as I can tell this changes (non-)functionality: With the broken big endiness check the driver probably just doesn't work properly on MIPS BE systems, because some endianess conversion is missing*. With the endianess check fixed, the special handling for the Broadcom MIPS get's enabled, potentially crashing the system (or changing random registers), thus making it *more* broken for non BMIPS systems. Therefore I'd rather consider this a regression. Especially since (AFAIK) the BMIPS systems that can take advantage of this aren't supported in Linux (yet).

If it were just making things less efficient, I wouldn't be complaining (at least not that much ;-). If you can say that this is a code path that isn't taken anyway, then my point is moot (for now). I don't know the driver enough to tell that.

Quoted 4 lines

Jonas

*assuming brcm80211 depends on this on BE systems and it isn't just an optimization

Greg,

Can you drop this patch and take the rest in the series? The other patches don't depend on this one.

Thanks,

- Henry

#17 lore raw

Re: [PATCH 12/21] staging: brcm80211: use __BIG_ENDIAN macro in dma.c

Quoted 27 lines · Henry Ptasinski
Quoted 26 lines · Jonas Gorski

Hi Arend,

Quoted 5 lines · Arend van Spriel

Hi Jonas,

You are right as with previous mips related patches. Consider this a first step which does not change functionality but aims to use the proper linux provided macros instead of our own incarnations.

Actually as far as I can tell this changes (non-)functionality: With the broken big endiness check the driver probably just doesn't work properly on MIPS BE systems, because some endianess conversion is missing*. With the endianess check fixed, the special handling for the Broadcom MIPS get's enabled, potentially crashing the system (or changing random registers), thus making it *more* broken for non BMIPS systems. Therefore I'd rather consider this a regression. Especially since (AFAIK) the BMIPS systems that can take advantage of this aren't supported in Linux (yet).

If it were just making things less efficient, I wouldn't be complaining (at least not that much ;-). If you can say that this is a code path that isn't taken anyway, then my point is moot (for now). I don't know the driver enough to tell that.

Jonas

Quoted 8 lines
Quoted 2 lines

*assuming brcm80211 depends on this on BE systems and it isn't just an optimization

Greg,

Can you drop this patch and take the rest in the series? The other patches don't depend on this one.

Will do.

#18 lore raw

PATCH 13/21 staging: brcm80211: replaced bmac acronym by brcms_b_

In reply to Roland Vossen

Code cleanup.

---
 drivers/staging/brcm80211/brcmsmac/antsel.c   |    2 +-
 drivers/staging/brcm80211/brcmsmac/bmac.c     |  471 ++++++++++++-------------
 drivers/staging/brcm80211/brcmsmac/bmac.h     |  110 +++---
 drivers/staging/brcm80211/brcmsmac/channel.c  |    2 +-
 drivers/staging/brcm80211/brcmsmac/main.c     |   95 +++---
 drivers/staging/brcm80211/brcmsmac/phy_shim.c |   34 +-
 drivers/staging/brcm80211/brcmsmac/stf.c      |    6 +-
 drivers/staging/brcm80211/brcmsmac/types.h    |    2 +-
 8 files changed, 360 insertions(+), 362 deletions(-)
drivers/staging/brcm80211/brcmsmac/antsel.c +1 -1
index 5356e2a..b18c85b 100644
@@ -136,7 +136,7 @@ struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc)
 	}
 
 	/* Set the antenna selection type for the low driver */
-	wlc_bmac_antsel_type_set(wlc->hw, asi->antsel_type);
+	brcms_b_antsel_type_set(wlc->hw, asi->antsel_type);
 
 	/* Init (auto/manual) antenna selection */
 	wlc_antsel_init_cfg(asi, &asi->antcfg_11n, true);
drivers/staging/brcm80211/brcmsmac/bmac.c +233 -238

1,468 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/bmac.h +55 -55

162 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/channel.c +1 -1
index 011c490..9ed7a87 100644
@@ -1122,7 +1122,7 @@ wlc_channel_set_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
 	wlc_channel_min_txpower_limits_with_local_constraint(wlc_cm, &txpwr,
 							     local_constraint_qdbm);
 
-	wlc_bmac_set_chanspec(wlc->hw, chanspec,
+	brcms_b_set_chanspec(wlc->hw, chanspec,
 			      (wlc_quiet_chanspec(wlc_cm, chanspec) != 0),
 			      &txpwr);
 }
drivers/staging/brcm80211/brcmsmac/main.c +49 -46

323 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/phy_shim.c +17 -17
index 3fa2cfb..972898b 100644
@@ -100,24 +100,24 @@ void wlapi_intrsrestore(wlc_phy_shim_info_t *physhim, u32 macintmask)
 
 void wlapi_bmac_write_shm(wlc_phy_shim_info_t *physhim, uint offset, u16 v)
 {
-	wlc_bmac_write_shm(physhim->wlc_hw, offset, v);
+	brcms_b_write_shm(physhim->wlc_hw, offset, v);
 }
 
 u16 wlapi_bmac_read_shm(wlc_phy_shim_info_t *physhim, uint offset)
 {
-	return wlc_bmac_read_shm(physhim->wlc_hw, offset);
+	return brcms_b_read_shm(physhim->wlc_hw, offset);
 }
 
 void
 wlapi_bmac_mhf(wlc_phy_shim_info_t *physhim, u8 idx, u16 mask,
 	       u16 val, int bands)
 {
-	wlc_bmac_mhf(physhim->wlc_hw, idx, mask, val, bands);
+	brcms_b_mhf(physhim->wlc_hw, idx, mask, val, bands);
 }
 
 void wlapi_bmac_corereset(wlc_phy_shim_info_t *physhim, u32 flags)
 {
-	wlc_bmac_corereset(physhim->wlc_hw, flags);
+	brcms_b_corereset(physhim->wlc_hw, flags);
 }
 
 void wlapi_suspend_mac_and_wait(wlc_phy_shim_info_t *physhim)
@@ -127,7 +127,7 @@ void wlapi_suspend_mac_and_wait(wlc_phy_shim_info_t *physhim)
 
 void wlapi_switch_macfreq(wlc_phy_shim_info_t *physhim, u8 spurmode)
 {
-	wlc_bmac_switch_macfreq(physhim->wlc_hw, spurmode);
+	brcms_b_switch_macfreq(physhim->wlc_hw, spurmode);
 }
 
 void wlapi_enable_mac(wlc_phy_shim_info_t *physhim)
@@ -137,42 +137,42 @@ void wlapi_enable_mac(wlc_phy_shim_info_t *physhim)
 
 void wlapi_bmac_mctrl(wlc_phy_shim_info_t *physhim, u32 mask, u32 val)
 {
-	wlc_bmac_mctrl(physhim->wlc_hw, mask, val);
+	brcms_b_mctrl(physhim->wlc_hw, mask, val);
 }
 
 void wlapi_bmac_phy_reset(wlc_phy_shim_info_t *physhim)
 {
-	wlc_bmac_phy_reset(physhim->wlc_hw);
+	brcms_b_phy_reset(physhim->wlc_hw);
 }
 
 void wlapi_bmac_bw_set(wlc_phy_shim_info_t *physhim, u16 bw)
 {
-	wlc_bmac_bw_set(physhim->wlc_hw, bw);
+	brcms_b_bw_set(physhim->wlc_hw, bw);
 }
 
 u16 wlapi_bmac_get_txant(wlc_phy_shim_info_t *physhim)
 {
-	return wlc_bmac_get_txant(physhim->wlc_hw);
+	return brcms_b_get_txant(physhim->wlc_hw);
 }
 
 void wlapi_bmac_phyclk_fgc(wlc_phy_shim_info_t *physhim, bool clk)
 {
-	wlc_bmac_phyclk_fgc(physhim->wlc_hw, clk);
+	brcms_b_phyclk_fgc(physhim->wlc_hw, clk);
 }
 
 void wlapi_bmac_macphyclk_set(wlc_phy_shim_info_t *physhim, bool clk)
 {
-	wlc_bmac_macphyclk_set(physhim->wlc_hw, clk);
+	brcms_b_macphyclk_set(physhim->wlc_hw, clk);
 }
 
 void wlapi_bmac_core_phypll_ctl(wlc_phy_shim_info_t *physhim, bool on)
 {
-	wlc_bmac_core_phypll_ctl(physhim->wlc_hw, on);
+	brcms_b_core_phypll_ctl(physhim->wlc_hw, on);
 }
 
 void wlapi_bmac_core_phypll_reset(wlc_phy_shim_info_t *physhim)
 {
-	wlc_bmac_core_phypll_reset(physhim->wlc_hw);
+	brcms_b_core_phypll_reset(physhim->wlc_hw);
 }
 
 void wlapi_bmac_ucode_wake_override_phyreg_set(wlc_phy_shim_info_t *physhim)
@@ -190,12 +190,12 @@ void
 wlapi_bmac_write_template_ram(wlc_phy_shim_info_t *physhim, int offset,
 			      int len, void *buf)
 {
-	wlc_bmac_write_template_ram(physhim->wlc_hw, offset, len, buf);
+	brcms_b_write_template_ram(physhim->wlc_hw, offset, len, buf);
 }
 
 u16 wlapi_bmac_rate_shm_offset(wlc_phy_shim_info_t *physhim, u8 rate)
 {
-	return wlc_bmac_rate_shm_offset(physhim->wlc_hw, rate);
+	return brcms_b_rate_shm_offset(physhim->wlc_hw, rate);
 }
 
 void wlapi_ucode_sample_init(wlc_phy_shim_info_t *physhim)
@@ -206,12 +206,12 @@ void
 wlapi_copyfrom_objmem(wlc_phy_shim_info_t *physhim, uint offset, void *buf,
 		      int len, u32 sel)
 {
-	wlc_bmac_copyfrom_objmem(physhim->wlc_hw, offset, buf, len, sel);
+	brcms_b_copyfrom_objmem(physhim->wlc_hw, offset, buf, len, sel);
 }
 
 void
 wlapi_copyto_objmem(wlc_phy_shim_info_t *physhim, uint offset, const void *buf,
 		    int l, u32 sel)
 {
-	wlc_bmac_copyto_objmem(physhim->wlc_hw, offset, buf, l, sel);
+	brcms_b_copyto_objmem(physhim->wlc_hw, offset, buf, l, sel);
 }
drivers/staging/brcm80211/brcmsmac/stf.c +3 -3
index 3a264ec..41dd168 100644
@@ -194,7 +194,7 @@ static int wlc_stf_txcore_set(struct wlc_info *wlc, u8 Nsts, u8 core_mask)
 		 * frames when 1 stream core map changed
 		 */
 		wlc->stf->phytxant = core_mask << PHY_TXC_ANT_SHIFT;
-		wlc_bmac_txant_set(wlc->hw, wlc->stf->phytxant);
+		brcms_b_txant_set(wlc->hw, wlc->stf->phytxant);
 		if (wlc->clk) {
 			wlc_suspend_mac_and_wait(wlc);
 			wlc_beacon_phytxctl_txant_upd(wlc, wlc->bcn_rspec);
@@ -314,7 +314,7 @@ int wlc_stf_ss_update(struct wlc_info *wlc, struct wlcband *band)
 	}
 	if (prev_stf_ss != upd_stf_ss) {
 		wlc->stf->ss_opmode = upd_stf_ss;
-		wlc_bmac_band_stf_ss_set(wlc->hw, upd_stf_ss);
+		brcms_b_band_stf_ss_set(wlc->hw, upd_stf_ss);
 	}
 
 	return ret_code;
@@ -396,7 +396,7 @@ static void _wlc_stf_phy_txant_upd(struct wlc_info *wlc)
 			wlc->stf->phytxant = PHY_TXC_OLD_ANT_LAST;
 	}
 
-	wlc_bmac_txant_set(wlc->hw, wlc->stf->phytxant);
+	brcms_b_txant_set(wlc->hw, wlc->stf->phytxant);
 }
 
 void wlc_stf_phy_txant_upd(struct wlc_info *wlc)
drivers/staging/brcm80211/brcmsmac/types.h +1 -1
index 1619e6a..c4f7d9d 100644
@@ -374,7 +374,7 @@ struct wlcband;
 
 typedef struct gpioh_item gpioh_item_t;
 typedef struct si_info si_info_t;
-typedef struct wlc_bmac_state wlc_bmac_state_t;
+typedef struct brcms_b_state brcms_b_state_t;
 typedef struct locale_info locale_info_t;
 typedef struct locale_mimo_info locale_mimo_info_t;
 typedef struct country_info country_info_t;
Signature · 1 line
1.7.4.1
#19 lore raw

PATCH 14/21 staging: brcm80211: replaced wlc_ by brcms_c_

In reply to Roland Vossen

Code cleanup.

---
 drivers/staging/brcm80211/brcmsmac/alloc.c       |   51 +-
 drivers/staging/brcm80211/brcmsmac/alloc.h       |    4 +-
 drivers/staging/brcm80211/brcmsmac/ampdu.c       |   88 ++--
 drivers/staging/brcm80211/brcmsmac/ampdu.h       |    6 +-
 drivers/staging/brcm80211/brcmsmac/antsel.c      |    8 +-
 drivers/staging/brcm80211/brcmsmac/antsel.h      |    2 +-
 drivers/staging/brcm80211/brcmsmac/bmac.c        |  448 ++++++------
 drivers/staging/brcm80211/brcmsmac/bmac.h        |  106 ++--
 drivers/staging/brcm80211/brcmsmac/channel.c     |   46 +-
 drivers/staging/brcm80211/brcmsmac/channel.h     |    4 +-
 drivers/staging/brcm80211/brcmsmac/mac80211_if.c |  101 ++--
 drivers/staging/brcm80211/brcmsmac/mac80211_if.h |    2 +-
 drivers/staging/brcm80211/brcmsmac/main.c        |  874 +++++++++++-----------
 drivers/staging/brcm80211/brcmsmac/main.h        |  304 ++++----
 drivers/staging/brcm80211/brcmsmac/phy/phy_int.h |    2 +-
 drivers/staging/brcm80211/brcmsmac/phy_shim.c    |    8 +-
 drivers/staging/brcm80211/brcmsmac/phy_shim.h    |    4 +-
 drivers/staging/brcm80211/brcmsmac/pub.h         |  124 ++--
 drivers/staging/brcm80211/brcmsmac/stf.c         |   56 +-
 drivers/staging/brcm80211/brcmsmac/stf.h         |   27 +-
 drivers/staging/brcm80211/brcmsmac/types.h       |   16 +-
 21 files changed, 1172 insertions(+), 1109 deletions(-)
drivers/staging/brcm80211/brcmsmac/alloc.c +26 -25
index 486cd49..b66418e 100644
@@ -20,8 +20,8 @@
 #include "main.h"
 #include "alloc.h"
 
-static struct wlc_bsscfg *wlc_bsscfg_malloc(uint unit);
-static void wlc_bsscfg_mfree(struct wlc_bsscfg *cfg);
+static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit);
+static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg);
 static struct wlc_pub *wlc_pub_malloc(uint unit,
 				      uint *err, uint devid);
 static void wlc_pub_mfree(struct wlc_pub *pub);
@@ -87,11 +87,11 @@ static void wlc_pub_mfree(struct wlc_pub *pub)
 	kfree(pub);
 }
 
-static struct wlc_bsscfg *wlc_bsscfg_malloc(uint unit)
+static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit)
 {
-	struct wlc_bsscfg *cfg;
+	struct brcms_c_bsscfg *cfg;
 
-	cfg = kzalloc(sizeof(struct wlc_bsscfg), GFP_ATOMIC);
+	cfg = kzalloc(sizeof(struct brcms_c_bsscfg), GFP_ATOMIC);
 	if (cfg == NULL)
 		goto fail;
 
@@ -106,7 +106,7 @@ static struct wlc_bsscfg *wlc_bsscfg_malloc(uint unit)
 	return NULL;
 }
 
-static void wlc_bsscfg_mfree(struct wlc_bsscfg *cfg)
+static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
 {
 	if (cfg == NULL)
 		return;
@@ -116,8 +116,8 @@ static void wlc_bsscfg_mfree(struct wlc_bsscfg *cfg)
 	kfree(cfg);
 }
 
-static void wlc_bsscfg_ID_assign(struct wlc_info *wlc,
-				 struct wlc_bsscfg *bsscfg)
+static void wlc_bsscfg_ID_assign(struct brcms_c_info *wlc,
+				 struct brcms_c_bsscfg *bsscfg)
 {
 	bsscfg->ID = wlc->next_bsscfg_ID;
 	wlc->next_bsscfg_ID++;
@@ -126,17 +126,17 @@ static void wlc_bsscfg_ID_assign(struct wlc_info *wlc,
 /*
  * The common driver entry routine. Error codes should be unique
  */
-struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
+struct brcms_c_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
 {
-	struct wlc_info *wlc;
+	struct brcms_c_info *wlc;
 
-	wlc = kzalloc(sizeof(struct wlc_info), GFP_ATOMIC);
+	wlc = kzalloc(sizeof(struct brcms_c_info), GFP_ATOMIC);
 	if (wlc == NULL) {
 		*err = 1002;
 		goto fail;
 	}
 
-	/* allocate struct wlc_pub state structure */
+	/* allocate struct brcms_c_pub state structure */
 	wlc->pub = wlc_pub_malloc(unit, err, devid);
 	if (wlc->pub == NULL) {
 		*err = 1003;
@@ -144,9 +144,9 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
 	}
 	wlc->pub->wlc = wlc;
 
-	/* allocate struct wlc_hw_info state structure */
+	/* allocate struct brcms_c_hw_info state structure */
 
-	wlc->hw = kzalloc(sizeof(struct wlc_hw_info), GFP_ATOMIC);
+	wlc->hw = kzalloc(sizeof(struct brcms_c_hw_info), GFP_ATOMIC);
 	if (wlc->hw == NULL) {
 		*err = 1005;
 		goto fail;
@@ -154,7 +154,7 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
 	wlc->hw->wlc = wlc;
 
 	wlc->hw->bandstate[0] =
-		kzalloc(sizeof(struct wlc_hwband) * MAXBANDS, GFP_ATOMIC);
+		kzalloc(sizeof(struct brcms_c_hwband) * MAXBANDS, GFP_ATOMIC);
 	if (wlc->hw->bandstate[0] == NULL) {
 		*err = 1006;
 		goto fail;
@@ -162,9 +162,9 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
 		int i;
 
 		for (i = 1; i < MAXBANDS; i++) {
-			wlc->hw->bandstate[i] = (struct wlc_hwband *)
+			wlc->hw->bandstate[i] = (struct brcms_c_hwband *)
 			    ((unsigned long)wlc->hw->bandstate[0] +
-			     (sizeof(struct wlc_hwband) * i));
+			     (sizeof(struct brcms_c_hwband) * i));
 		}
 	}
 
@@ -202,20 +202,21 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
 		}
 	}
 
-	wlc->protection = kzalloc(sizeof(struct wlc_protection), GFP_ATOMIC);
+	wlc->protection = kzalloc(sizeof(struct brcms_c_protection),
+				  GFP_ATOMIC);
 	if (wlc->protection == NULL) {
 		*err = 1016;
 		goto fail;
 	}
 
-	wlc->stf = kzalloc(sizeof(struct wlc_stf), GFP_ATOMIC);
+	wlc->stf = kzalloc(sizeof(struct brcms_c_stf), GFP_ATOMIC);
 	if (wlc->stf == NULL) {
 		*err = 1017;
 		goto fail;
 	}
 
 	wlc->bandstate[0] =
-		kzalloc(sizeof(struct wlcband)*MAXBANDS, GFP_ATOMIC);
+		kzalloc(sizeof(struct brcms_c_band)*MAXBANDS, GFP_ATOMIC);
 	if (wlc->bandstate[0] == NULL) {
 		*err = 1025;
 		goto fail;
@@ -223,13 +224,13 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
 		int i;
 
 		for (i = 1; i < MAXBANDS; i++) {
-			wlc->bandstate[i] =
-			    (struct wlcband *) ((unsigned long)wlc->bandstate[0]
-			    + (sizeof(struct wlcband)*i));
+			wlc->bandstate[i] = (struct brcms_c_band *)
+				((unsigned long)wlc->bandstate[0]
+				+ (sizeof(struct brcms_c_band)*i));
 		}
 	}
 
-	wlc->corestate = kzalloc(sizeof(struct wlccore), GFP_ATOMIC);
+	wlc->corestate = kzalloc(sizeof(struct brcms_c_core), GFP_ATOMIC);
 	if (wlc->corestate == NULL) {
 		*err = 1026;
 		goto fail;
@@ -249,7 +250,7 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
 	return NULL;
 }
 
-void wlc_detach_mfree(struct wlc_info *wlc)
+void wlc_detach_mfree(struct brcms_c_info *wlc)
 {
 	if (wlc == NULL)
 		return;
drivers/staging/brcm80211/brcmsmac/alloc.h +2 -2
index 95f951e..b8dc287 100644
@@ -14,5 +14,5 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-extern struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid);
-extern void wlc_detach_mfree(struct wlc_info *wlc);
+extern struct brcms_c_info *wlc_attach_malloc(uint unit, uint *err, uint devid);
+extern void wlc_detach_mfree(struct brcms_c_info *wlc);
drivers/staging/brcm80211/brcmsmac/ampdu.c +45 -43

268 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/ampdu.h +3 -3
index df7d7d9..6f9aa9c 100644
@@ -17,13 +17,13 @@
 #ifndef _BRCM_AMPDU_H_
 #define _BRCM_AMPDU_H_
 
-extern struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc);
+extern struct ampdu_info *wlc_ampdu_attach(struct brcms_c_info *wlc);
 extern void wlc_ampdu_detach(struct ampdu_info *ampdu);
-extern int wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
+extern int wlc_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
 			 struct sk_buff **aggp, int prec);
 extern void wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
 				 struct sk_buff *p, tx_status_t *txs);
-extern void wlc_ampdu_macaddr_upd(struct wlc_info *wlc);
+extern void wlc_ampdu_macaddr_upd(struct brcms_c_info *wlc);
 extern void wlc_ampdu_shm_upd(struct ampdu_info *ampdu);
 
 #endif				/* _BRCM_AMPDU_H_ */
drivers/staging/brcm80211/brcmsmac/antsel.c +4 -4
index b18c85b..7e12f60 100644
@@ -81,7 +81,7 @@ const u8 mimo_2x3_div_antselid_tbl[16] = {
 	0, 0, 0, 0, 0, 0, 0, 0	/* pat to antselid */
 };
 
-struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc)
+struct antsel_info *wlc_antsel_attach(struct brcms_c_info *wlc)
 {
 	struct antsel_info *asi;
 
@@ -282,7 +282,7 @@ static u16 wlc_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg)
 /* boardlevel antenna selection: ucode interface control */
 static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel)
 {
-	struct wlc_info *wlc = asi->wlc;
+	struct brcms_c_info *wlc = asi->wlc;
 	u8 ant_cfg;
 	u16 mimo_antsel;
 
@@ -291,7 +291,7 @@ static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel)
 	 */
 	ant_cfg = antsel->ant_config[ANT_SELCFG_TX_DEF];
 	mimo_antsel = wlc_antsel_antcfg2antsel(asi, ant_cfg);
-	wlc_write_shm(wlc, M_MIMO_ANTSEL_TXDFLT, mimo_antsel);
+	brcms_c_write_shm(wlc, M_MIMO_ANTSEL_TXDFLT, mimo_antsel);
 	/* Update driver stats for currently selected default tx/rx antenna config */
 	asi->antcfg_cur.ant_config[ANT_SELCFG_TX_DEF] = ant_cfg;
 
@@ -300,7 +300,7 @@ static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel)
 	 */
 	ant_cfg = antsel->ant_config[ANT_SELCFG_RX_DEF];
 	mimo_antsel = wlc_antsel_antcfg2antsel(asi, ant_cfg);
-	wlc_write_shm(wlc, M_MIMO_ANTSEL_RXDFLT, mimo_antsel);
+	brcms_c_write_shm(wlc, M_MIMO_ANTSEL_RXDFLT, mimo_antsel);
 	/* Update driver stats for currently selected default tx/rx antenna config */
 	asi->antcfg_cur.ant_config[ANT_SELCFG_RX_DEF] = ant_cfg;
 
drivers/staging/brcm80211/brcmsmac/antsel.h +1 -1
index c1b9cef..a2c98e9 100644
@@ -17,7 +17,7 @@
 #ifndef _BRCM_ANTSEL_H_
 #define _BRCM_ANTSEL_H_
 
-extern struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc);
+extern struct antsel_info *wlc_antsel_attach(struct brcms_c_info *wlc);
 extern void wlc_antsel_detach(struct antsel_info *asi);
 extern void wlc_antsel_init(struct antsel_info *asi);
 extern void wlc_antsel_antcfg_get(struct antsel_info *asi, bool usedef,
drivers/staging/brcm80211/brcmsmac/bmac.c +232 -216

1,296 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/bmac.h +55 -51

162 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/channel.c +23 -23

165 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/channel.h +2 -2
index dd0149a..e743392 100644
@@ -20,7 +20,7 @@
 #define WLC_TXPWR_DB_FACTOR 4	/* conversion for phy txpwr cacluations that use .25 dB units */
 
 
-struct wlc_info;
+struct brcms_c_info;
 
 /* maxpwr mapping to 5GHz band channels:
  * maxpwr[0] - channels [34-48]
@@ -105,7 +105,7 @@ struct country_info {
 	const u8 locale_mimo_5G;	/* 5G mimo info */
 };
 
-extern wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc);
+extern wlc_cm_info_t *wlc_channel_mgr_attach(struct brcms_c_info *wlc);
 extern void wlc_channel_mgr_detach(wlc_cm_info_t *wlc_cm);
 
 extern u8 wlc_channel_locale_flags_in_band(wlc_cm_info_t *wlc_cm,
drivers/staging/brcm80211/brcmsmac/mac80211_if.c +50 -51

353 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/mac80211_if.h +1 -1
index 6227455..71526b2 100644
@@ -85,7 +85,7 @@ struct brcms_info {
 /* misc callbacks */
 struct brcms_info;
 struct brcms_if;
-struct wlc_if;
+struct brcms_c_if;
 extern void brcms_init(struct brcms_info *wl);
 extern uint brcms_reset(struct brcms_info *wl);
 extern void brcms_intrson(struct brcms_info *wl);
drivers/staging/brcm80211/brcmsmac/main.c +449 -425

527 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/main.h +155 -149

304 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/phy/phy_int.h +1 -1
index 1e6885c..fa0ff3f 100644

Lines of this file are not shown. View the raw message.

drivers/staging/brcm80211/brcmsmac/phy_shim.c +4 -4
index 972898b..728b9e2 100644

Lines of this file are not shown. View the raw message.

drivers/staging/brcm80211/brcmsmac/phy_shim.h +2 -2
index 4e1a51d..4b45b2c 100644

Lines of this file are not shown. View the raw message.

drivers/staging/brcm80211/brcmsmac/pub.h +66 -58

124 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/stf.c +28 -28

56 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/stf.h +15 -12
index 0b48f4d..a68c819 100644

Lines of this file are not shown. View the raw message.

drivers/staging/brcm80211/brcmsmac/types.h +8 -8
index c4f7d9d..3f53e8c 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.4.1

Part of the diff is not shown here. View the raw message.

#20 lore raw

PATCH 15/21 staging: brcm80211: removed superfluous forward struct declarations

In reply to Roland Vossen

Code cleanup.

---
 drivers/staging/brcm80211/brcmfmac/wl_iw.c       |    2 --
 drivers/staging/brcm80211/brcmsmac/channel.h     |    2 --
 drivers/staging/brcm80211/brcmsmac/mac80211_if.h |    4 ----
 drivers/staging/brcm80211/brcmsmac/nicpci.h      |    2 --
 drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h |    4 ----
 drivers/staging/brcm80211/brcmsmac/phy/phy_int.h |    4 ----
 drivers/staging/brcm80211/brcmsmac/phy_shim.h    |    4 ----
 drivers/staging/brcm80211/brcmsmac/pub.h         |   14 --------------
 drivers/staging/brcm80211/brcmsmac/rate.h        |    2 --
 drivers/staging/brcm80211/brcmsmac/types.h       |    2 ++
 drivers/staging/brcm80211/include/brcmu_utils.h  |    2 +-
 11 files changed, 3 insertions(+), 39 deletions(-)
drivers/staging/brcm80211/brcmfmac/wl_iw.c +0 -2
index 14b2e1b..cb8d614 100644
@@ -28,8 +28,6 @@
 #include "dngl_stats.h"
 #include "dhd.h"
 
-struct si_pub;
-
 #define WPA_OUI			"\x00\x50\xF2"
 #define DOT11_MNG_RSN_ID			48
 #define DOT11_MNG_WPA_ID			221
drivers/staging/brcm80211/brcmsmac/channel.h +0 -2
index e743392..5ab1032 100644
@@ -20,8 +20,6 @@
 #define WLC_TXPWR_DB_FACTOR 4	/* conversion for phy txpwr cacluations that use .25 dB units */
 
 
-struct brcms_c_info;
-
 /* maxpwr mapping to 5GHz band channels:
  * maxpwr[0] - channels [34-48]
  * maxpwr[1] - channels [52-60]
drivers/staging/brcm80211/brcmsmac/mac80211_if.h +0 -4
index 71526b2..26a0a30 100644
@@ -83,9 +83,6 @@ struct brcms_info {
 };
 
 /* misc callbacks */
-struct brcms_info;
-struct brcms_if;
-struct brcms_c_if;
 extern void brcms_init(struct brcms_info *wl);
 extern uint brcms_reset(struct brcms_info *wl);
 extern void brcms_intrson(struct brcms_info *wl);
@@ -99,7 +96,6 @@ extern bool wl_alloc_dma_resources(struct brcms_info *wl, uint dmaddrwidth);
 extern bool brcms_rfkill_set_hw_state(struct brcms_info *wl);
 
 /* timer functions */
-struct brcms_timer;
 extern struct brcms_timer *brcms_init_timer(struct brcms_info *wl,
 				      void (*fn) (void *arg), void *arg,
 				      const char *name);
drivers/staging/brcm80211/brcmsmac/nicpci.h +0 -2
index 826c162..f71f842 100644
@@ -70,8 +70,6 @@
 #define SRSH_PI_MASK	0xf000	/* bit 15:12 */
 #define SRSH_PI_SHIFT	12	/* bit 15:12 */
 
-struct si_pub;
-
 extern void *pcicore_init(struct si_pub *sih, void *pdev, void *regs);
 extern void pcicore_deinit(void *pch);
 extern void pcicore_attach(void *pch, char *pvars, int state);
drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h +0 -4
index db99440..756ad71 100644
@@ -154,10 +154,6 @@ struct chanvec {
 	u8 vec[MAXCHANNEL / NBBY];
 };
 
-struct rpc_info;
-
-struct phy_pub;
-
 struct shared_phy_params {
 	struct si_pub *sih;
 	void *physhim;
drivers/staging/brcm80211/brcmsmac/phy/phy_int.h +0 -4
index fa0ff3f..9506da5 100644
@@ -49,7 +49,6 @@ struct wlc_phy_srom_fem {
 	u8 antswctrllut;	/* antswctrl lookup table configuration: 32 possible choices */
 };
 
-struct brcms_c_hw_info;
 typedef void (*initfn_t) (phy_info_t *);
 typedef void (*chansetfn_t) (phy_info_t *, chanspec_t);
 typedef int (*longtrnfn_t) (phy_info_t *, int);
@@ -579,9 +578,6 @@ struct phy_pub {
 	bool abgphy_encore;
 };
 
-struct phy_info_nphy;
-struct phy_info_lcnphy;
-
 struct phy_func_ptr {
 	initfn_t init;
 	initfn_t calinit;
drivers/staging/brcm80211/brcmsmac/phy_shim.h +0 -4
index 4b45b2c..413d5db 100644
@@ -108,15 +108,11 @@
 #define WLC_N_TXRX_CHAIN0		0
 #define WLC_N_TXRX_CHAIN1		1
 
-/* Forward declarations */
-struct brcms_c_hw_info;
-
 extern wlc_phy_shim_info_t *wlc_phy_shim_attach(struct brcms_c_hw_info *wlc_hw,
 						void *wl, void *wlc);
 extern void wlc_phy_shim_detach(wlc_phy_shim_info_t *physhim);
 
 /* PHY to WL utility functions */
-struct wlapi_timer;
 extern struct wlapi_timer *wlapi_init_timer(wlc_phy_shim_info_t *physhim,
 					    void (*fn) (void *arg), void *arg,
 					    const char *name);
drivers/staging/brcm80211/brcmsmac/pub.h +0 -14
index 25c65e8..2ec3ba9 100644
@@ -106,8 +106,6 @@
 #define	WL_SPURAVOID_ON1	1
 #define	WL_SPURAVOID_ON2	2
 
-struct ieee80211_tx_queue_params;
-
 struct wlc_tunables {
 	int ntxd;		/* size of tx descriptor table */
 	int nrxd;		/* size of rx descriptor table */
@@ -187,9 +185,6 @@ struct wlc_bss_info {
 	u8 wpacfg;		/* wpa config index */
 };
 
-/* forward declarations */
-struct brcms_c_if;
-
 /* brcms_c_ioctl error codes */
 #define WLC_ENOIOCTL	1	/* No such Ioctl */
 #define WLC_EINVAL	2	/* Invalid value */
@@ -384,14 +379,6 @@ enum wlc_par_id {
 	IOV_BCN_LI_BCN		/* Beacon listen interval in # of beacons */
 };
 
-/* forward declare and use the struct notation so we don't have to
- * have it defined if not necessary.
- */
-struct brcms_c_info;
-struct brcms_c_hw_info;
-struct brcms_c_bsscfg;
-struct brcms_c_if;
-
 /***********************************************
  * Feature-related macros to optimize out code *
  * *********************************************
@@ -637,7 +624,6 @@ extern void wlc_rate_lookup_init(struct brcms_c_info *wlc,
 				 wlc_rateset_t *rateset);
 extern void brcms_default_rateset(struct brcms_c_info *wlc, wlc_rateset_t *rs);
 
-struct ieee80211_sta;
 extern void wlc_ampdu_flush(struct brcms_c_info *wlc,
 			    struct ieee80211_sta *sta, u16 tid);
 extern int brcms_c_set_par(struct brcms_c_info *wlc, enum wlc_par_id par_id,
drivers/staging/brcm80211/brcmsmac/rate.h +0 -2
index 36cb91b..28ba4d6 100644
@@ -138,8 +138,6 @@ extern const u8 ofdm_rate_lookup[];
 #define WLC_RATES_CCK		1
 #define WLC_RATES_OFDM		2
 
-struct wlc_rateset;
-
 /* sanitize, and sort a rateset with the basic bit(s) preserved, validate rateset */
 extern bool wlc_rate_hwrs_filter_sort_validate(struct wlc_rateset *rs,
 					       const struct wlc_rateset *hw_rs,
drivers/staging/brcm80211/brcmsmac/types.h +2 -0
index 3f53e8c..163973d 100644
@@ -371,6 +371,8 @@ struct wiphy;
 struct brcmu_iovar;
 struct brcms_c_txq_info;
 struct brcms_c_band;
+struct ieee80211_tx_queue_params;
+struct ieee80211_sta;
 
 typedef struct gpioh_item gpioh_item_t;
 typedef struct si_info si_info_t;
drivers/staging/brcm80211/include/brcmu_utils.h +1 -1
index 863b3c7..78c84e2 100644
@@ -139,7 +139,7 @@ extern uint brcmu_pkttotlen(struct sk_buff *p);
 extern int brcmu_ether_atoe(char *p, u8 *ea);
 
 /* ip address */
-	struct ipv4_addr;
+struct ipv4_addr;
 
 #ifdef BCMDBG
 extern void brcmu_prpkt(const char *msg, struct sk_buff *p0);
Signature · 1 line
1.7.4.1
#21 lore raw

PATCH 16/21 staging: brcm80211: further replaced wlc_ by brcmsmac_c_

In reply to Roland Vossen

Code cleanup. Renamed functions.

---
 drivers/staging/brcm80211/brcmsmac/alloc.c       |    6 +-
 drivers/staging/brcm80211/brcmsmac/alloc.h       |    5 +-
 drivers/staging/brcm80211/brcmsmac/ampdu.c       |  111 ++++++------
 drivers/staging/brcm80211/brcmsmac/ampdu.h       |   15 +-
 drivers/staging/brcm80211/brcmsmac/antsel.c      |   48 +++---
 drivers/staging/brcm80211/brcmsmac/antsel.h      |   10 +-
 drivers/staging/brcm80211/brcmsmac/channel.c     |  202 +++++++++++-----------
 drivers/staging/brcm80211/brcmsmac/channel.h     |   12 +-
 drivers/staging/brcm80211/brcmsmac/mac80211_if.c |    2 +-
 drivers/staging/brcm80211/brcmsmac/main.c        |  129 +++++++-------
 drivers/staging/brcm80211/brcmsmac/pub.h         |    6 +-
 drivers/staging/brcm80211/brcmsmac/rate.c        |   38 ++--
 drivers/staging/brcm80211/brcmsmac/rate.h        |   28 ++--
 drivers/staging/brcm80211/brcmsmac/stf.c         |   81 +++++----
 drivers/staging/brcm80211/brcmsmac/stf.h         |   25 ++--
 15 files changed, 366 insertions(+), 352 deletions(-)
drivers/staging/brcm80211/brcmsmac/alloc.c +3 -3
index b66418e..dbf64d7 100644
@@ -126,7 +126,7 @@ static void wlc_bsscfg_ID_assign(struct brcms_c_info *wlc,
 /*
  * The common driver entry routine. Error codes should be unique
  */
-struct brcms_c_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
+struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
 {
 	struct brcms_c_info *wlc;
 
@@ -246,11 +246,11 @@ struct brcms_c_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
 	return wlc;
 
  fail:
-	wlc_detach_mfree(wlc);
+	brcms_c_detach_mfree(wlc);
 	return NULL;
 }
 
-void wlc_detach_mfree(struct brcms_c_info *wlc)
+void brcms_c_detach_mfree(struct brcms_c_info *wlc)
 {
 	if (wlc == NULL)
 		return;
drivers/staging/brcm80211/brcmsmac/alloc.h +3 -2
index b8dc287..f465d30 100644
@@ -14,5 +14,6 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-extern struct brcms_c_info *wlc_attach_malloc(uint unit, uint *err, uint devid);
-extern void wlc_detach_mfree(struct brcms_c_info *wlc);
+extern struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err,
+						  uint devid);
+extern void brcms_c_detach_mfree(struct brcms_c_info *wlc);
drivers/staging/brcm80211/brcmsmac/ampdu.c +58 -53

313 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/ampdu.h +8 -7
index 6f9aa9c..5fba4ae 100644
@@ -17,13 +17,14 @@
 #ifndef _BRCM_AMPDU_H_
 #define _BRCM_AMPDU_H_
 
-extern struct ampdu_info *wlc_ampdu_attach(struct brcms_c_info *wlc);
-extern void wlc_ampdu_detach(struct ampdu_info *ampdu);
-extern int wlc_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
-			 struct sk_buff **aggp, int prec);
-extern void wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
+extern struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc);
+extern void brcms_c_ampdu_detach(struct ampdu_info *ampdu);
+extern int brcms_c_sendampdu(struct ampdu_info *ampdu,
+			     struct brcms_c_txq_info *qi,
+			     struct sk_buff **aggp, int prec);
+extern void brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
 				 struct sk_buff *p, tx_status_t *txs);
-extern void wlc_ampdu_macaddr_upd(struct brcms_c_info *wlc);
-extern void wlc_ampdu_shm_upd(struct ampdu_info *ampdu);
+extern void brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc);
+extern void brcms_c_ampdu_shm_upd(struct ampdu_info *ampdu);
 
 #endif				/* _BRCM_AMPDU_H_ */
drivers/staging/brcm80211/brcmsmac/antsel.c +25 -23

140 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/antsel.h +5 -5
index a2c98e9..97ea388 100644
@@ -17,13 +17,13 @@
 #ifndef _BRCM_ANTSEL_H_
 #define _BRCM_ANTSEL_H_
 
-extern struct antsel_info *wlc_antsel_attach(struct brcms_c_info *wlc);
-extern void wlc_antsel_detach(struct antsel_info *asi);
-extern void wlc_antsel_init(struct antsel_info *asi);
-extern void wlc_antsel_antcfg_get(struct antsel_info *asi, bool usedef,
+extern struct antsel_info *brcms_c_antsel_attach(struct brcms_c_info *wlc);
+extern void brcms_c_antsel_detach(struct antsel_info *asi);
+extern void brcms_c_antsel_init(struct antsel_info *asi);
+extern void brcms_c_antsel_antcfg_get(struct antsel_info *asi, bool usedef,
 				  bool sel,
 				  u8 id, u8 fbid, u8 *antcfg,
 				  u8 *fbantcfg);
-extern u8 wlc_antsel_antsel2id(struct antsel_info *asi, u16 antsel);
+extern u8 brcms_c_antsel_antsel2id(struct antsel_info *asi, u16 antsel);
 
 #endif /* _BRCM_ANTSEL_H_ */
drivers/staging/brcm80211/brcmsmac/channel.c +100 -102

525 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/channel.h +6 -6
index 5ab1032..6fe8050 100644
@@ -103,18 +103,18 @@ struct country_info {
 	const u8 locale_mimo_5G;	/* 5G mimo info */
 };
 
-extern wlc_cm_info_t *wlc_channel_mgr_attach(struct brcms_c_info *wlc);
-extern void wlc_channel_mgr_detach(wlc_cm_info_t *wlc_cm);
+extern wlc_cm_info_t *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc);
+extern void brcms_c_channel_mgr_detach(wlc_cm_info_t *wlc_cm);
 
-extern u8 wlc_channel_locale_flags_in_band(wlc_cm_info_t *wlc_cm,
+extern u8 brcms_c_channel_locale_flags_in_band(wlc_cm_info_t *wlc_cm,
 					   uint bandunit);
 
-extern bool wlc_valid_chanspec_db(wlc_cm_info_t *wlc_cm, chanspec_t chspec);
+extern bool brcms_c_valid_chanspec_db(wlc_cm_info_t *wlc_cm, chanspec_t chspec);
 
-extern void wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm,
+extern void brcms_c_channel_reg_limits(wlc_cm_info_t *wlc_cm,
 				   chanspec_t chanspec,
 				   struct txpwr_limits *txpwr);
-extern void wlc_channel_set_chanspec(wlc_cm_info_t *wlc_cm,
+extern void brcms_c_channel_set_chanspec(wlc_cm_info_t *wlc_cm,
 				     chanspec_t chanspec,
 				     u8 local_constraint_qdbm);
 
drivers/staging/brcm80211/brcmsmac/mac80211_if.c +1 -1
index 8001bee..0dd01d0 100644
@@ -651,7 +651,7 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw,
 
 	case IEEE80211_AMPDU_TX_STOP:
 		LOCK(wl);
-		wlc_ampdu_flush(wl->wlc, sta, tid);
+		brcms_c_ampdu_flush(wl->wlc, sta, tid);
 		UNLOCK(wl);
 		ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
 		break;
drivers/staging/brcm80211/brcmsmac/main.c +66 -63

419 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/pub.h +3 -3
index 2ec3ba9..8ceab43 100644
@@ -620,11 +620,11 @@ extern struct wlc_pub *brcms_c_pub(void *wlc);
 /* common functions for every port */
 extern void brcms_c_mhf(struct brcms_c_info *wlc, u8 idx, u16 mask, u16 val,
 		    int bands);
-extern void wlc_rate_lookup_init(struct brcms_c_info *wlc,
-				 wlc_rateset_t *rateset);
+extern void brcms_c_rate_lookup_init(struct brcms_c_info *wlc,
+				     wlc_rateset_t *rateset);
 extern void brcms_default_rateset(struct brcms_c_info *wlc, wlc_rateset_t *rs);
 
-extern void wlc_ampdu_flush(struct brcms_c_info *wlc,
+extern void brcms_c_ampdu_flush(struct brcms_c_info *wlc,
 			    struct ieee80211_sta *sta, u16 tid);
 extern int brcms_c_set_par(struct brcms_c_info *wlc, enum wlc_par_id par_id,
 			   int val);
drivers/staging/brcm80211/brcmsmac/rate.c +18 -20
index f19b512..dec508d 100644
@@ -246,12 +246,10 @@ const wlc_rateset_t cck_rates = {
 	 0x00, 0x00, 0x00, 0x00}
 };
 
-static bool wlc_rateset_valid(wlc_rateset_t *rs, bool check_brate);
-
 /* check if rateset is valid.
  * if check_brate is true, rateset without a basic rate is considered NOT valid.
  */
-static bool wlc_rateset_valid(wlc_rateset_t *rs, bool check_brate)
+static bool brcms_c_rateset_valid(wlc_rateset_t *rs, bool check_brate)
 {
 	uint idx;
 
@@ -269,7 +267,7 @@ static bool wlc_rateset_valid(wlc_rateset_t *rs, bool check_brate)
 	return false;
 }
 
-void wlc_rateset_mcs_upd(wlc_rateset_t *rs, u8 txstreams)
+void brcms_c_rateset_mcs_upd(wlc_rateset_t *rs, u8 txstreams)
 {
 	int i;
 	for (i = txstreams; i < MAX_STREAMS_SUPPORTED; i++)
@@ -280,7 +278,7 @@ void wlc_rateset_mcs_upd(wlc_rateset_t *rs, u8 txstreams)
  * and check if resulting rateset is valid.
 */
 bool
-wlc_rate_hwrs_filter_sort_validate(wlc_rateset_t *rs,
+brcms_c_rate_hwrs_filter_sort_validate(wlc_rateset_t *rs,
 				   const wlc_rateset_t *hw_rs,
 				   bool check_brate, u8 txstreams)
 {
@@ -315,14 +313,14 @@ wlc_rate_hwrs_filter_sort_validate(wlc_rateset_t *rs,
 	for (i = 0; i < MCSSET_LEN; i++)
 		rs->mcs[i] = (rs->mcs[i] & hw_rs->mcs[i]);
 
-	if (wlc_rateset_valid(rs, check_brate))
+	if (brcms_c_rateset_valid(rs, check_brate))
 		return true;
 	else
 		return false;
 }
 
 /* calculate the rate of a rx'd frame and return it as a ratespec */
-ratespec_t wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp)
+ratespec_t brcms_c_compute_rspec(d11rxhdr_t *rxh, u8 *plcp)
 {
 	int phy_type;
 	ratespec_t rspec = PHY_TXC1_BW_20MHZ << RSPEC_BW_SHIFT;
@@ -368,7 +366,7 @@ ratespec_t wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp)
 }
 
 /* copy rateset src to dst as-is (no masking or sorting) */
-void wlc_rateset_copy(const wlc_rateset_t *src, wlc_rateset_t *dst)
+void brcms_c_rateset_copy(const wlc_rateset_t *src, wlc_rateset_t *dst)
 {
 	memcpy(dst, src, sizeof(wlc_rateset_t));
 }
@@ -383,7 +381,7 @@ void wlc_rateset_copy(const wlc_rateset_t *src, wlc_rateset_t *dst)
  * 'xmask' is the copy mask (typically 0x7f or 0xff).
  */
 void
-wlc_rateset_filter(wlc_rateset_t *src, wlc_rateset_t *dst, bool basic_only,
+brcms_c_rateset_filter(wlc_rateset_t *src, wlc_rateset_t *dst, bool basic_only,
 		   u8 rates, uint xmask, bool mcsallow)
 {
 	uint i;
@@ -407,14 +405,14 @@ wlc_rateset_filter(wlc_rateset_t *src, wlc_rateset_t *dst, bool basic_only,
 	if (mcsallow && rates != WLC_RATES_CCK)
 		memcpy(&dst->mcs[0], &src->mcs[0], MCSSET_LEN);
 	else
-		wlc_rateset_mcs_clear(dst);
+		brcms_c_rateset_mcs_clear(dst);
 }
 
 /* select rateset for a given phy_type and bandtype and filter it, sort it
  * and fill rs_tgt with result
  */
 void
-wlc_rateset_default(wlc_rateset_t *rs_tgt, const wlc_rateset_t *rs_hw,
+brcms_c_rateset_default(wlc_rateset_t *rs_tgt, const wlc_rateset_t *rs_hw,
 		    uint phy_type, int bandtype, bool cck_only, uint rate_mask,
 		    bool mcsallow, u8 bw, u8 txstreams)
 {
@@ -447,16 +445,16 @@ wlc_rateset_default(wlc_rateset_t *rs_tgt, const wlc_rateset_t *rs_hw,
 	if (!rs_hw)
 		rs_hw = rs_dflt;
 
-	wlc_rateset_copy(rs_dflt, &rs_sel);
-	wlc_rateset_mcs_upd(&rs_sel, txstreams);
-	wlc_rateset_filter(&rs_sel, rs_tgt, false,
+	brcms_c_rateset_copy(rs_dflt, &rs_sel);
+	brcms_c_rateset_mcs_upd(&rs_sel, txstreams);
+	brcms_c_rateset_filter(&rs_sel, rs_tgt, false,
 			   cck_only ? WLC_RATES_CCK : WLC_RATES_CCK_OFDM,
 			   rate_mask, mcsallow);
-	wlc_rate_hwrs_filter_sort_validate(rs_tgt, rs_hw, false,
+	brcms_c_rate_hwrs_filter_sort_validate(rs_tgt, rs_hw, false,
 					   mcsallow ? txstreams : 1);
 }
 
-s16 wlc_rate_legacy_phyctl(uint rate)
+s16 brcms_c_rate_legacy_phyctl(uint rate)
 {
 	uint i;
 	for (i = 0; i < LEGACY_PHYCFG_TABLE_SIZE; i++)
@@ -466,21 +464,21 @@ s16 wlc_rate_legacy_phyctl(uint rate)
 	return -1;
 }
 
-void wlc_rateset_mcs_clear(wlc_rateset_t *rateset)
+void brcms_c_rateset_mcs_clear(wlc_rateset_t *rateset)
 {
 	uint i;
 	for (i = 0; i < MCSSET_LEN; i++)
 		rateset->mcs[i] = 0;
 }
 
-void wlc_rateset_mcs_build(wlc_rateset_t *rateset, u8 txstreams)
+void brcms_c_rateset_mcs_build(wlc_rateset_t *rateset, u8 txstreams)
 {
 	memcpy(&rateset->mcs[0], &cck_ofdm_mimo_rates.mcs[0], MCSSET_LEN);
-	wlc_rateset_mcs_upd(rateset, txstreams);
+	brcms_c_rateset_mcs_upd(rateset, txstreams);
 }
 
 /* Based on bandwidth passed, allow/disallow MCS 32 in the rateset */
-void wlc_rateset_bw_mcs_filter(wlc_rateset_t *rateset, u8 bw)
+void brcms_c_rateset_bw_mcs_filter(wlc_rateset_t *rateset, u8 bw)
 {
 	if (bw == WLC_40_MHZ)
 		setbit(rateset->mcs, 32);
drivers/staging/brcm80211/brcmsmac/rate.h +15 -13
index 28ba4d6..8b4de8b 100644
@@ -133,35 +133,37 @@ extern const u8 ofdm_rate_lookup[];
 #define OFDM_PHY2MAC_RATE(rlpt)		(ofdm_rate_lookup[rlpt & 0x7])
 #define CCK_PHY2MAC_RATE(signal)	(signal/5)
 
-/* Rates specified in wlc_rateset_filter() */
+/* Rates specified in brcms_c_rateset_filter() */
 #define WLC_RATES_CCK_OFDM	0
 #define WLC_RATES_CCK		1
 #define WLC_RATES_OFDM		2
 
 /* sanitize, and sort a rateset with the basic bit(s) preserved, validate rateset */
-extern bool wlc_rate_hwrs_filter_sort_validate(struct wlc_rateset *rs,
+extern bool brcms_c_rate_hwrs_filter_sort_validate(struct wlc_rateset *rs,
 					       const struct wlc_rateset *hw_rs,
 					       bool check_brate,
 					       u8 txstreams);
 /* copy rateset src to dst as-is (no masking or sorting) */
-extern void wlc_rateset_copy(const struct wlc_rateset *src,
+extern void brcms_c_rateset_copy(const struct wlc_rateset *src,
 			     struct wlc_rateset *dst);
 
 /* would be nice to have these documented ... */
-extern ratespec_t wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp);
+extern ratespec_t brcms_c_compute_rspec(d11rxhdr_t *rxh, u8 *plcp);
 
-extern void wlc_rateset_filter(struct wlc_rateset *src, struct wlc_rateset *dst,
-			       bool basic_only, u8 rates, uint xmask,
-			       bool mcsallow);
-extern void wlc_rateset_default(struct wlc_rateset *rs_tgt,
+extern void brcms_c_rateset_filter(struct wlc_rateset *src,
+	struct wlc_rateset *dst, bool basic_only, u8 rates, uint xmask,
+	bool mcsallow);
+
+extern void brcms_c_rateset_default(struct wlc_rateset *rs_tgt,
 				const struct wlc_rateset *rs_hw, uint phy_type,
 				int bandtype, bool cck_only, uint rate_mask,
 				bool mcsallow, u8 bw, u8 txstreams);
-extern s16 wlc_rate_legacy_phyctl(uint rate);
+extern s16 brcms_c_rate_legacy_phyctl(uint rate);
 
-extern void wlc_rateset_mcs_upd(struct wlc_rateset *rs, u8 txstreams);
-extern void wlc_rateset_mcs_clear(struct wlc_rateset *rateset);
-extern void wlc_rateset_mcs_build(struct wlc_rateset *rateset, u8 txstreams);
-extern void wlc_rateset_bw_mcs_filter(struct wlc_rateset *rateset, u8 bw);
+extern void brcms_c_rateset_mcs_upd(struct wlc_rateset *rs, u8 txstreams);
+extern void brcms_c_rateset_mcs_clear(struct wlc_rateset *rateset);
+extern void brcms_c_rateset_mcs_build(struct wlc_rateset *rateset,
+				      u8 txstreams);
+extern void brcms_c_rateset_bw_mcs_filter(struct wlc_rateset *rateset, u8 bw);
 
 #endif				/* _WLC_RATE_H_ */
drivers/staging/brcm80211/brcmsmac/stf.c +42 -39

227 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/stf.h +13 -12
index a68c819..2033938 100644
@@ -19,23 +19,24 @@
 
 #include "types.h"
 
-extern int wlc_stf_attach(struct brcms_c_info *wlc);
-extern void wlc_stf_detach(struct brcms_c_info *wlc);
+extern int brcms_c_stf_attach(struct brcms_c_info *wlc);
+extern void brcms_c_stf_detach(struct brcms_c_info *wlc);
 
-extern void wlc_tempsense_upd(struct brcms_c_info *wlc);
-extern void wlc_stf_ss_algo_channel_get(struct brcms_c_info *wlc,
+extern void brcms_c_tempsense_upd(struct brcms_c_info *wlc);
+extern void brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc,
 					u16 *ss_algo_channel,
 					chanspec_t chanspec);
-extern int wlc_stf_ss_update(struct brcms_c_info *wlc,
+extern int brcms_c_stf_ss_update(struct brcms_c_info *wlc,
 			     struct brcms_c_band *band);
-extern void wlc_stf_phy_txant_upd(struct brcms_c_info *wlc);
-extern int wlc_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val,
+extern void brcms_c_stf_phy_txant_upd(struct brcms_c_info *wlc);
+extern int brcms_c_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val,
 			       bool force);
-extern bool wlc_stf_stbc_rx_set(struct brcms_c_info *wlc, s32 int_val);
-extern void wlc_stf_phy_txant_upd(struct brcms_c_info *wlc);
-extern void wlc_stf_phy_chain_calc(struct brcms_c_info *wlc);
-extern u16 wlc_stf_phytxchain_sel(struct brcms_c_info *wlc, ratespec_t rspec);
-extern u16 wlc_stf_d11hdrs_phyctl_txant(struct brcms_c_info *wlc,
+extern bool brcms_c_stf_stbc_rx_set(struct brcms_c_info *wlc, s32 int_val);
+extern void brcms_c_stf_phy_txant_upd(struct brcms_c_info *wlc);
+extern void brcms_c_stf_phy_chain_calc(struct brcms_c_info *wlc);
+extern u16 brcms_c_stf_phytxchain_sel(struct brcms_c_info *wlc,
+				      ratespec_t rspec);
+extern u16 brcms_c_stf_d11hdrs_phyctl_txant(struct brcms_c_info *wlc,
 					ratespec_t rspec);
 
 #endif				/* _BRCM_STF_H_ */
Signature · 1 line
1.7.4.1
#22 lore raw

PATCH 17/21 staging: brcm80211: replaced wlc_ by brcms_c_, part 2

In reply to Roland Vossen

Code cleanup. Function renaming. Triggered by feedback comment from John Linville, just like the other function renames that preceded this patch.

---
 drivers/staging/brcm80211/brcmsmac/alloc.c       |   38 +-
 drivers/staging/brcm80211/brcmsmac/ampdu.c       |    4 +-
 drivers/staging/brcm80211/brcmsmac/bmac.c        |  182 +++++----
 drivers/staging/brcm80211/brcmsmac/bmac.h        |    4 +-
 drivers/staging/brcm80211/brcmsmac/mac80211_if.c |    4 +-
 drivers/staging/brcm80211/brcmsmac/main.c        |  469 +++++++++++-----------
 drivers/staging/brcm80211/brcmsmac/phy_shim.c    |    7 +-
 drivers/staging/brcm80211/brcmsmac/pub.h         |    2 +-
 8 files changed, 364 insertions(+), 346 deletions(-)
drivers/staging/brcm80211/brcmsmac/alloc.c +19 -19
index dbf64d7..34eafbe 100644
@@ -20,14 +20,14 @@
 #include "main.h"
 #include "alloc.h"
 
-static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit);
-static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg);
-static struct wlc_pub *wlc_pub_malloc(uint unit,
+static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit);
+static void brcms_c_bsscfg_mfree(struct brcms_c_bsscfg *cfg);
+static struct wlc_pub *brcms_c_pub_malloc(uint unit,
 				      uint *err, uint devid);
-static void wlc_pub_mfree(struct wlc_pub *pub);
-static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid);
+static void brcms_c_pub_mfree(struct wlc_pub *pub);
+static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid);
 
-static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
+static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid)
 {
 	tunables->ntxd = NTXD;
 	tunables->nrxd = NRXD;
@@ -45,7 +45,7 @@ static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
 	tunables->txsbnd = TXSBND;
 }
 
-static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid)
+static struct wlc_pub *brcms_c_pub_malloc(uint unit, uint *err, uint devid)
 {
 	struct wlc_pub *pub;
 
@@ -62,7 +62,7 @@ static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid)
 	}
 
 	/* need to init the tunables now */
-	wlc_tunables_init(pub->tunables, devid);
+	brcms_c_tunables_init(pub->tunables, devid);
 
 	pub->multicast = kzalloc(ETH_ALEN * MAXMULTILIST, GFP_ATOMIC);
 	if (pub->multicast == NULL) {
@@ -73,11 +73,11 @@ static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid)
 	return pub;
 
  fail:
-	wlc_pub_mfree(pub);
+	brcms_c_pub_mfree(pub);
 	return NULL;
 }
 
-static void wlc_pub_mfree(struct wlc_pub *pub)
+static void brcms_c_pub_mfree(struct wlc_pub *pub)
 {
 	if (pub == NULL)
 		return;
@@ -87,7 +87,7 @@ static void wlc_pub_mfree(struct wlc_pub *pub)
 	kfree(pub);
 }
 
-static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit)
+static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit)
 {
 	struct brcms_c_bsscfg *cfg;
 
@@ -102,11 +102,11 @@ static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit)
 	return cfg;
 
  fail:
-	wlc_bsscfg_mfree(cfg);
+	brcms_c_bsscfg_mfree(cfg);
 	return NULL;
 }
 
-static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
+static void brcms_c_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
 {
 	if (cfg == NULL)
 		return;
@@ -116,7 +116,7 @@ static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
 	kfree(cfg);
 }
 
-static void wlc_bsscfg_ID_assign(struct brcms_c_info *wlc,
+static void brcms_c_bsscfg_ID_assign(struct brcms_c_info *wlc,
 				 struct brcms_c_bsscfg *bsscfg)
 {
 	bsscfg->ID = wlc->next_bsscfg_ID;
@@ -137,7 +137,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
 	}
 
 	/* allocate struct brcms_c_pub state structure */
-	wlc->pub = wlc_pub_malloc(unit, err, devid);
+	wlc->pub = brcms_c_pub_malloc(unit, err, devid);
 	if (wlc->pub == NULL) {
 		*err = 1003;
 		goto fail;
@@ -181,12 +181,12 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
 		goto fail;
 	}
 
-	wlc->cfg = wlc_bsscfg_malloc(unit);
+	wlc->cfg = brcms_c_bsscfg_malloc(unit);
 	if (wlc->cfg == NULL) {
 		*err = 1011;
 		goto fail;
 	}
-	wlc_bsscfg_ID_assign(wlc, wlc->cfg);
+	brcms_c_bsscfg_ID_assign(wlc, wlc->cfg);
 
 	wlc->wsec_def_keys[0] =
 		kzalloc(sizeof(wsec_key_t) * WLC_DEFAULT_KEYS, GFP_ATOMIC);
@@ -255,8 +255,8 @@ void brcms_c_detach_mfree(struct brcms_c_info *wlc)
 	if (wlc == NULL)
 		return;
 
-	wlc_bsscfg_mfree(wlc->cfg);
-	wlc_pub_mfree(wlc->pub);
+	brcms_c_bsscfg_mfree(wlc->cfg);
+	brcms_c_pub_mfree(wlc->pub);
 	kfree(wlc->modulecb);
 	kfree(wlc->default_bss);
 	kfree(wlc->wsec_def_keys[0]);
drivers/staging/brcm80211/brcmsmac/ampdu.c +2 -2
index b8c6002..74c4055 100644
@@ -505,7 +505,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
 
 		if (err) {
 			if (err == -EBUSY) {
-				wiphy_err(wiphy, "wl%d: wlc_sendampdu: "
+				wiphy_err(wiphy, "wl%d: sendampdu: "
 					  "prep_xdu retry; seq 0x%x\n",
 					  wlc->pub->unit, seq);
 				*pdu = p;
@@ -513,7 +513,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
 			}
 
 			/* error in the packet; reject it */
-			wiphy_err(wiphy, "wl%d: wlc_sendampdu: prep_xdu "
+			wiphy_err(wiphy, "wl%d: sendampdu: prep_xdu "
 				  "rejected; seq 0x%x\n", wlc->pub->unit, seq);
 			*pdu = NULL;
 			break;
drivers/staging/brcm80211/brcmsmac/bmac.c +93 -89

557 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/bmac.h +2 -2
index 693d342..3a1ee78 100644
@@ -139,9 +139,9 @@ extern void brcms_b_band_stf_ss_set(struct brcms_c_hw_info *wlc_hw,
 
 extern void brcms_b_wait_for_wake(struct brcms_c_hw_info *wlc_hw);
 
-extern void wlc_ucode_wake_override_set(struct brcms_c_hw_info *wlc_hw,
+extern void brcms_c_ucode_wake_override_set(struct brcms_c_hw_info *wlc_hw,
 					u32 override_bit);
-extern void wlc_ucode_wake_override_clear(struct brcms_c_hw_info *wlc_hw,
+extern void brcms_c_ucode_wake_override_clear(struct brcms_c_hw_info *wlc_hw,
 					  u32 override_bit);
 
 extern void brcms_b_set_addrmatch(struct brcms_c_hw_info *wlc_hw,
drivers/staging/brcm80211/brcmsmac/mac80211_if.c +2 -2
index 0dd01d0..73e60df 100644
@@ -801,7 +801,7 @@ static struct brcms_info *brcms_attach(u16 vendor, u16 device,
 			     wl->regsva, wl->bcm_bustype, btparam, &err);
 	brcms_release_fw(wl);
 	if (!wl->wlc) {
-		wiphy_err(wl->wiphy, "%s: wlc_attach() failed with code %d\n",
+		wiphy_err(wl->wiphy, "%s: attach() failed with code %d\n",
 			  KBUILD_MODNAME, err);
 		goto fail;
 	}
@@ -1241,7 +1241,7 @@ static void brcms_remove(struct pci_dev *pdev)
 	status = brcms_c_chipmatch(pdev->vendor, pdev->device);
 	UNLOCK(wl);
 	if (!status) {
-		wiphy_err(wl->wiphy, "wl: brcms_remove: wlc_chipmatch "
+		wiphy_err(wl->wiphy, "wl: brcms_remove: chipmatch "
 				     "failed\n");
 		return;
 	}
drivers/staging/brcm80211/brcmsmac/main.c +241 -228

1,387 lines not on this page · raw message

drivers/staging/brcm80211/brcmsmac/phy_shim.c +4 -3
index 728b9e2..915efdf 100644
@@ -177,13 +177,14 @@ void wlapi_bmac_core_phypll_reset(wlc_phy_shim_info_t *physhim)
 
 void wlapi_bmac_ucode_wake_override_phyreg_set(wlc_phy_shim_info_t *physhim)
 {
-	wlc_ucode_wake_override_set(physhim->wlc_hw, WLC_WAKE_OVERRIDE_PHYREG);
+	brcms_c_ucode_wake_override_set(physhim->wlc_hw,
+					WLC_WAKE_OVERRIDE_PHYREG);
 }
 
 void wlapi_bmac_ucode_wake_override_phyreg_clear(wlc_phy_shim_info_t *physhim)
 {
-	wlc_ucode_wake_override_clear(physhim->wlc_hw,
-				      WLC_WAKE_OVERRIDE_PHYREG);
+	brcms_c_ucode_wake_override_clear(physhim->wlc_hw,
+					  WLC_WAKE_OVERRIDE_PHYREG);
 }
 
 void
drivers/staging/brcm80211/brcmsmac/pub.h +1 -1
index 8ceab43..2345a31 100644
@@ -653,7 +653,7 @@ extern void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc,
 
 /* helper functions */
 extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc);
-extern bool wlc_radio_monitor_stop(struct brcms_c_info *wlc);
+extern bool brcms_c_radio_monitor_stop(struct brcms_c_info *wlc);
 
 #define	MAXBANDS		2	/* Maximum #of bands */
 /* bandstate array indices */
Signature · 1 line
1.7.4.1
#23 lore raw

PATCH 18/21 staging: brcm80211: remove checkpatch errors found in fullmac

In reply to Roland Vossen

From: Arend van Spriel <[email protected]>

A checkpatch run was done over the complete source files to determine how much coding style issues there are in the driver. This patch fixes the checkpatch errors in fullmac driver brcmfmac listed below.

ERROR: do not initialise globals to 0 or NULL
+uint dhd_poll = false;
--
ERROR: do not use assignment in if condition
+ if (!ifp && !(ifp = kmalloc(sizeof(dhd_if_t), GFP_ATOMIC))) {
--
ERROR: do not use assignment in if condition
+ if (unlikely(!(wl_cfg80211_dev && \
--
ERROR: do not initialise statics to 0 or NULL
+ static bool iscan_pass_abort = false;
--

---
 drivers/staging/brcm80211/brcmfmac/dhd_linux.c   |   11 +++++++----
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c |   11 +++++++----
 drivers/staging/brcm80211/brcmfmac/wl_iw.c       |    2 +-
 3 files changed, 15 insertions(+), 9 deletions(-)
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +7 -4
index be6ac30..9c9b8ba 100644
@@ -339,7 +339,7 @@ int dhd_idletime = DHD_IDLETIME_TICKS;
 module_param(dhd_idletime, int, 0);
 
 /* Use polling */
-uint dhd_poll = false;
+uint dhd_poll;
 module_param(dhd_poll, uint, 0);
 
 /* Use cfg80211 */
@@ -1817,9 +1817,12 @@ dhd_add_if(dhd_info_t *dhd, int ifidx, void *handle, char *name,
 	ASSERT(dhd && (ifidx < DHD_MAX_IFS));
 
 	ifp = dhd->iflist[ifidx];
-	if (!ifp && !(ifp = kmalloc(sizeof(dhd_if_t), GFP_ATOMIC))) {
-		DHD_ERROR(("%s: OOM - dhd_if_t\n", __func__));
-		return -ENOMEM;
+	if (!ifp) {
+		ifp = kmalloc(sizeof(dhd_if_t), GFP_ATOMIC);
+		if (!ifp) {
+			DHD_ERROR(("%s: OOM - dhd_if_t\n", __func__));
+			return -ENOMEM;
+		}
 	}
 
 	memset(ifp, 0, sizeof(dhd_if_t));
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +7 -4
index 399d7a8..235cc59 100644
@@ -323,9 +323,8 @@ static void wl_debugfs_remove_netdev(struct wl_priv *wl);
 
 #define WL_PRIV_GET() 							\
 	({								\
-	struct wl_iface *ci;						\
-	if (unlikely(!(wl_cfg80211_dev && 				\
-		(ci = wl_get_drvdata(wl_cfg80211_dev))))) {		\
+	struct wl_iface *ci = wl_get_drvdata(wl_cfg80211_dev);		\
+	if (unlikely(!ci)) {						\
 		WL_ERR("wl_cfg80211_dev is unavailable\n");		\
 		BUG();							\
 	} 								\
@@ -4298,7 +4297,11 @@ static void wl_set_drvdata(struct wl_dev *dev, void *data)
 
 static void *wl_get_drvdata(struct wl_dev *dev)
 {
-	return dev->driver_data;
+	void *data = NULL;
+
+	if (dev)
+		data = dev->driver_data;
+	return data;
 }
 
 s32 wl_cfg80211_read_fw(s8 *buf, u32 size)
drivers/staging/brcm80211/brcmfmac/wl_iw.c +1 -1
index cb8d614..df32d38 100644
@@ -1172,7 +1172,7 @@ static int _iscan_sysioc_thread(void *data)
 {
 	u32 status;
 	iscan_info_t *iscan = (iscan_info_t *) data;
-	static bool iscan_pass_abort = false;
+	static bool iscan_pass_abort;
 
 	allow_signal(SIGTERM);
 	status = WL_SCAN_RESULTS_PARTIAL;
Signature · 1 line
1.7.4.1
#24 lore raw

PATCH 19/21 staging: brcm80211: fix checkpatch errors from main.c

In reply to Roland Vossen

From: Arend van Spriel <[email protected]>

The softmac source file main.c was passed through checkpatch to see what issues against coding style are still present. This patch removes the checkpatch errors listed below.

ERROR: trailing whitespace +^Imemcpy(wlc->default_bss->rateset.rates, rs.rates, $ --
ERROR: spaces required around that ':' (ctx:VxV)
+ pval = arg ? (int *)arg:NULL;
--

---
 drivers/staging/brcm80211/brcmsmac/main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/brcm80211/brcmsmac/main.c +3 -3
index e2d8d23..611873c 100644
@@ -278,7 +278,7 @@ const u8 wme_fifo2ac[] = { AC_BK, AC_BE, AC_VI, AC_VO, AC_BE, AC_BE };
 /* WME/802.1E Access Category to TX FIFO number */
 static const u8 wme_ac2fifo[] = { 1, 0, 2, 3 };
 
-static bool in_send_q = false;
+static bool in_send_q;
 
 /* Shared memory location index for various AC params */
 #define wme_shmemacindex(ac)	wme_ac2fifo[ac]
@@ -2363,7 +2363,7 @@ int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config)
 
 	/* Set default bss rateset */
 	wlc->default_bss->rateset.count = rs.count;
-	memcpy(wlc->default_bss->rateset.rates, rs.rates, 
+	memcpy(wlc->default_bss->rateset.rates, rs.rates,
 	       sizeof(wlc->default_bss->rateset.rates));
 
 	return ret;
@@ -2556,7 +2556,7 @@ _brcms_c_ioctl(struct brcms_c_info *wlc, int cmd, void *arg, int len,
 	}
 
 	/* default argument is generic integer */
-	pval = arg ? (int *)arg:NULL;
+	pval = arg ? (int *)arg : NULL;
 
 	/* This will prevent the misaligned access */
 	if (pval && (u32) len >= sizeof(val))
Signature · 1 line
1.7.4.1
#25 lore raw

PATCH 20/21 staging: brcm80211: fix checkpatch errors in brcmsmac driver

In reply to Roland Vossen

From: Arend van Spriel <[email protected]>

Several source files in brcmsmac driver have checkpatch errors that have been removed (see below).

ERROR: spaces required around that ':' (ctx:VxV)
+ (u8)NPHY_RSSI_SEL_TSSI_5G:(u8)NPHY_RSSI_SEL_TSSI_2G;
--
ERROR: code indent should use tabs where possible
+ ^Ierr = initvars_table(base, vp, vars, count);$
--

---
 drivers/staging/brcm80211/brcmsmac/phy/phy_n.c |    2 +-
 drivers/staging/brcm80211/brcmsmac/srom.c      |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +1 -1
index bc5da60..696825f 100644
@@ -23456,7 +23456,7 @@ wlc_phy_est_tonepwr_nphy(phy_info_t *pi, s32 *qdBm_pwrbuf, u8 num_samps)
 
 	tssi_type =
 	    CHSPEC_IS5G(pi->radio_chanspec) ?
-	    (u8)NPHY_RSSI_SEL_TSSI_5G:(u8)NPHY_RSSI_SEL_TSSI_2G;
+	    (u8)NPHY_RSSI_SEL_TSSI_5G : (u8)NPHY_RSSI_SEL_TSSI_2G;
 
 	wlc_phy_poll_rssi_nphy(pi, tssi_type, rssi_buf, num_samps);
 
drivers/staging/brcm80211/brcmsmac/srom.c +2 -2
index 8aa6d01..1117f91 100644
@@ -1318,9 +1318,9 @@ static int initvars_srom_pci(struct si_pub *sih, void *curmap, char **vars,
 	vp = b.buf;
 	*vp++ = '\0';
 
- 	err = initvars_table(base, vp, vars, count);
+	err = initvars_table(base, vp, vars, count);
 
- errout:
+errout:
 	if (base)
 		kfree(base);
 
Signature · 1 line
1.7.4.1
#26 lore raw

PATCH 21/21 staging: brcm80211: change wl_cfg80211_suspend corresponding to cfg80211

In reply to Roland Vossen

Change wl_cfg80211_suspend in fullmac to meet cfg80211 interface update.

---
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +3 -2
index 235cc59..63e2173 100644
@@ -101,7 +101,8 @@ static s32 wl_cfg80211_config_default_mgmt_key(struct wiphy *wiphy,
 						 struct net_device *dev,
 						 u8 key_idx);
 static s32 wl_cfg80211_resume(struct wiphy *wiphy);
-static s32 wl_cfg80211_suspend(struct wiphy *wiphy);
+static s32 wl_cfg80211_suspend(struct wiphy *wiphy,
+				 struct cfg80211_wowlan *wow);
 static s32 wl_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *dev,
 				   struct cfg80211_pmksa *pmksa);
 static s32 wl_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
@@ -2092,7 +2093,7 @@ static s32 wl_cfg80211_resume(struct wiphy *wiphy)
 	return 0;
 }
 
-static s32 wl_cfg80211_suspend(struct wiphy *wiphy)
+static s32 wl_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow)
 {
 	struct wl_priv *wl = wiphy_to_wl(wiphy);
 	struct net_device *ndev = wl_to_ndev(wl);
Signature · 1 line
1.7.4.1
#28 lore raw

Roland,
I'm happy to compile test this change (I don't have the hardware on a working machine) but I can't get this series to apply again, what tree are you using?
If it's -next a tag reference would be helpful, it could be that my version is too recent. :-)

Cheers
Julie

#29 lore raw

Hi Julie,

Quoted 3 lines

I'm happy to compile test this change (I don't have the hardware on a working machine) but I can't get this series to apply again, what tree are you using?

I am using GregKH's staging-next repo: git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6.git

Quoted 2 lines

If it's -next a tag reference would be helpful, it could be that my version is too recent. :-)

The patch applies on top of 5ad7b85b90e30eb5af4fbf6ce21907a2bd8934df.

Bye, Roland.

#30 lore raw
Quoted 8 lines

I am using GregKH's staging-next repo:
git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6.git

The patch applies on top of 5ad7b85b90e30eb5af4fbf6ce21907a2bd8934df.

Bye, Roland.

OK, this compiles fine on x86-64/SMP. It's probably not interesting but there are just a few warnings:

drivers/staging/brcm80211/brcmfmac/dhd_sdio.c: In function ‘dhdsdio_probe_attach’:
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c:5418:14: warning: cast to pointer from integer of different size drivers/staging/brcm80211/brcmfmac/dhd_sdio.c: In function ‘dhdsdio_chip_recognition’:
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c:6018:19: warning: cast from pointer to integer of different size

drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c: In function ‘sdioh_request_packet’:
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c:814:3: warning: cast from pointer to integer of different size drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c: In function ‘sdioh_request_buffer’:
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c:909:14: warning:
cast from pointer to integer of different size

which were there before the patches were applied too. The following disappeared after the patches were applied:

drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c:2308:2: warning:
initialization from incompatible pointer type

Cheers
Julie

#31 lore raw
Quoted 4 lines · julie Sullivan
Quoted 3 lines

I am using GregKH's staging-next repo:
git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6.git

Quoted 8 lines
Quoted 4 lines

The patch applies on top of 5ad7b85b90e30eb5af4fbf6ce21907a2bd8934df.

Bye, Roland.

OK, this compiles fine on x86-64/SMP. It's probably not interesting but there are just a few warnings:

Yeah. The driver only works under 32 bit. This is listed in the TODO file as something to fix before it leaves staging.

regards,
dan carpenter

#32 lore raw
Quoted 8 lines

Yeah.  The driver only works under 32 bit.  This is listed in the TODO file as something to fix before it leaves staging.

regards,
dan carpenter

Oh, OK. Thanks for the response.

Cheers
Julie

#33 lore raw
In reply to Dan Carpenter
Quoted 10 lines · Dan Carpenter
Quoted 9 lines · julie Sullivan
Quoted 8 lines

I am using GregKH's staging-next repo:
git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6.git

The patch applies on top of 5ad7b85b90e30eb5af4fbf6ce21907a2bd8934df.

Bye, Roland.

Quoted 7 lines
Quoted 3 lines

OK, this compiles fine on x86-64/SMP. It's probably not interesting but there are just a few warnings:

Yeah. The driver only works under 32 bit. This is listed in the TODO file as something to fix before it leaves staging.

At the moment, we haven't really seen any interest in 64-bit support with sdio (almost all actual usage is 32-bit ARM as far as I can tell), but it will definitely get more relevant when we add USB support to brcmfmac. We'll work on getting it up and running, but any help would be appreciated.

Is it safe to assume the related modules (mmc.ko, etc) work on 64-bit?

- Henry

#34 lore raw
Quoted 22 lines · Henry Ptasinski
Quoted 12 lines · Dan Carpenter
Quoted 10 lines · julie Sullivan
Quoted 10 lines

I am using GregKH's staging-next repo:
git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6.git

The patch applies on top of 5ad7b85b90e30eb5af4fbf6ce21907a2bd8934df.

Bye, Roland.

Quoted 8 lines
Quoted 4 lines

OK, this compiles fine on x86-64/SMP. It's probably not interesting but there are just a few warnings:

Yeah. The driver only works under 32 bit. This is listed in the TODO file as something to fix before it leaves staging.

Quoted 8 lines

At the moment, we haven't really seen any interest in 64-bit support with sdio (almost all actual usage is 32-bit ARM as far as I can tell), but it will definitely get more relevant when we add USB support to brcmfmac. We'll work on getting it up and running, but any help would be appreciated.

Is it safe to assume the related modules (mmc.ko, etc) work on 64-bit?

- Henry

I've verified that the brcmfmac driver works on 64-bit x86 kernels. There are a few compiler warnings that we'll clean up.

- Henry

#35 lore raw
In reply to Roland Vossen
Quoted 88 lines · Roland Vossen

Arend van Spriel (9):
 staging: brcm80211: remove 'used' keyword from function ai_ispcie()
 staging: brcm80211: remove regs variable from brcms_ioctl function
 staging: brcm80211: remove d11regs_t parameter from wlc_tbtt function
 staging: brcm80211: remove device id parameter from ai_attach()
 staging: brcm80211: remove unused fields from struct si_info
 staging: brcm80211: use __BIG_ENDIAN macro in dma.c
 staging: brcm80211: remove checkpatch errors found in fullmac
 staging: brcm80211: fix checkpatch errors from main.c
 staging: brcm80211: fix checkpatch errors in brcmsmac driver

Franky Lin (1):
 staging: brcm80211: Remove flags from wl_is_nonetwork

Roland Vossen (10):
 staging: brcm80211: moved typedefs to decrease header file dependencies
 staging: brcm80211: cleaned brcmu_utils.h
 staging: brcm80211: #include reduction
 staging: brcm80211: fixed double #include problem
 staging: brcm80211: replaced bmac acronym by brcms_b_
 staging: brcm80211: replaced wlc_ by brcms_c_
 staging: brcm80211: removed superfluous forward struct declarations
 staging: brcm80211: further replaced wlc_ by brcmsmac_c_
 staging: brcm80211: replaced wlc_ by brcms_c_, part 2
 staging: brcm80211: change wl_cfg80211_suspend corresponding to cfg80211

Sukesh Srikakula (1):
 staging: brcm80211: Fix for suspend issue in brcmfmac driver

 drivers/staging/brcm80211/brcmfmac/bcmsdh.c        |    7 +- drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c  |   20 +- .../brcm80211/brcmfmac/bcmsdh_sdmmc_linux.c        |   19 +- drivers/staging/brcm80211/brcmfmac/dhd_cdc.c       |   10 +- drivers/staging/brcm80211/brcmfmac/dhd_common.c    |   14 +- .../staging/brcm80211/brcmfmac/dhd_custom_gpio.c   |    4 +- drivers/staging/brcm80211/brcmfmac/dhd_linux.c     |   24 +- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c      |   15 +- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c   |   76 +- drivers/staging/brcm80211/brcmfmac/wl_iw.c         |   22 +- drivers/staging/brcm80211/brcmsmac/aiutils.c       |   45 +- drivers/staging/brcm80211/brcmsmac/aiutils.h       |   18 +-

 drivers/staging/brcm80211/brcmsmac/alloc.c         |   94 +-
 drivers/staging/brcm80211/brcmsmac/alloc.h         |    5 +-
 drivers/staging/brcm80211/brcmsmac/ampdu.c         |  199 ++--
 drivers/staging/brcm80211/brcmsmac/ampdu.h         |   15 +-
 drivers/staging/brcm80211/brcmsmac/antsel.c        |   77 +-
 drivers/staging/brcm80211/brcmsmac/antsel.h        |   10 +-

 drivers/staging/brcm80211/brcmsmac/bmac.c          |  846 ++++++------ drivers/staging/brcm80211/brcmsmac/bmac.h          |  127 +- drivers/staging/brcm80211/brcmsmac/channel.c       |  254 ++-- drivers/staging/brcm80211/brcmsmac/channel.h       |   26 +-

 drivers/staging/brcm80211/brcmsmac/d11.h           |   55 +-
 drivers/staging/brcm80211/brcmsmac/dma.c           |   28 +-
 drivers/staging/brcm80211/brcmsmac/dma.h           |   21 +-

 drivers/staging/brcm80211/brcmsmac/mac80211_if.c   |  118 +- drivers/staging/brcm80211/brcmsmac/mac80211_if.h   |    7 +- drivers/staging/brcm80211/brcmsmac/main.c          | 1384 ++++++++++---------- drivers/staging/brcm80211/brcmsmac/main.h          |  321 +++--- drivers/staging/brcm80211/brcmsmac/nicpci.c        |   13 +- drivers/staging/brcm80211/brcmsmac/nicpci.h        |    4 +- drivers/staging/brcm80211/brcmsmac/otp.c           |   14 +- drivers/staging/brcm80211/brcmsmac/otp.h           |    2 +

 drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c   |   23 +-
 drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h   |   33 +-
 drivers/staging/brcm80211/brcmsmac/phy/phy_int.h   |   98 +-
 drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c   |   21 +-
 drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.h   |    2 +

 drivers/staging/brcm80211/brcmsmac/phy/phy_n.c     |   24 +- drivers/staging/brcm80211/brcmsmac/phy/phy_qmath.c |    2 - drivers/staging/brcm80211/brcmsmac/phy/phy_qmath.h |    2 + .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.c    |    6 +- .../staging/brcm80211/brcmsmac/phy/phytbl_lcn.h    |    7 +- drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.c  |    7 +- drivers/staging/brcm80211/brcmsmac/phy/phytbl_n.h  |    3 +- drivers/staging/brcm80211/brcmsmac/phy_shim.c      |   73 +- drivers/staging/brcm80211/brcmsmac/phy_shim.h      |    9 +-

 drivers/staging/brcm80211/brcmsmac/pmu.c           |    6 +-
 drivers/staging/brcm80211/brcmsmac/pmu.h           |    5 +-
 drivers/staging/brcm80211/brcmsmac/pub.h           |  155 ++--
 drivers/staging/brcm80211/brcmsmac/rate.c          |   46 +-
 drivers/staging/brcm80211/brcmsmac/rate.h          |   38 +-
 drivers/staging/brcm80211/brcmsmac/scb.h           |   12 +-
 drivers/staging/brcm80211/brcmsmac/srom.c          |   21 +-
 drivers/staging/brcm80211/brcmsmac/srom.h          |    2 +
 drivers/staging/brcm80211/brcmsmac/stf.c           |  108 +-
 drivers/staging/brcm80211/brcmsmac/stf.h           |   30 +-
Quoted 7 lines

 drivers/staging/brcm80211/brcmsmac/types.h         |  105 ++- drivers/staging/brcm80211/brcmsmac/ucode_loader.c  |    2 +- drivers/staging/brcm80211/brcmutil/utils.c         |   10 - drivers/staging/brcm80211/brcmutil/wifi.c          |    5 - drivers/staging/brcm80211/include/brcmu_utils.h    |  114 +-- drivers/staging/brcm80211/include/defs.h           |    2 +

 63 files changed, 2384 insertions(+), 2481 deletions(-)

Looks good, I particularly like patch #15.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/