[PATCH 137/961] Revert "staging: brcm80211: assure common sources are truly common"

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

 



This reverts commit ead1256410cb5a79fd3615ba70ba56779c5d21e2 as it
broke the build when building with multiple threads at the same time.

Cc: Brett Rudley <brudley@xxxxxxxxxxxx>
Cc: Henry Ptasinski <henryp@xxxxxxxxxxxx>
Cc: Roland Vossen <rvossen@xxxxxxxxxxxx>
Cc: Arend van Spriel <arend@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/brcm80211/Kconfig           |   14 +++++++-------
 drivers/staging/brcm80211/Makefile          |    5 ++---
 drivers/staging/brcm80211/brcmfmac/Makefile |    9 +++------
 drivers/staging/brcm80211/brcmsmac/Makefile |    3 ++-
 drivers/staging/brcm80211/util/aiutils.c    |    4 ++++
 drivers/staging/brcm80211/util/bcmutils.c   |    1 -
 drivers/staging/brcm80211/util/hnddma.c     |    1 -
 drivers/staging/brcm80211/util/hndpmu.c     |   14 ++++++--------
 8 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/brcm80211/Kconfig b/drivers/staging/brcm80211/Kconfig
index b6f8635..3208352 100644
--- a/drivers/staging/brcm80211/Kconfig
+++ b/drivers/staging/brcm80211/Kconfig
@@ -2,6 +2,12 @@ menuconfig BRCM80211
 	tristate "Broadcom IEEE802.11n WLAN drivers"
 	depends on WLAN
 
+choice
+	prompt "Broadcom IEEE802.11n driver style"
+	depends on BRCM80211
+	help
+	Select the appropriate driver style from the list below.
+
 config BRCMSMAC
 	bool "Broadcom IEEE802.11n PCIe SoftMAC WLAN driver"
 	depends on PCI
@@ -24,10 +30,4 @@ config BRCMFMAC
 	  Broadcom IEEE802.11n FullMAC chipsets.  This driver uses the kernel's
 	  wireless extensions subsystem.  If you choose to build a module,
 	  it'll be called brcmfmac.ko.
-
-config BRCMDBG
-	bool "Broadcom driver debug functions"
-	default n
-	depends on BRCM80211
-	---help---
-	  Selecting this enables additional code for debug purposes.
+endchoice
diff --git a/drivers/staging/brcm80211/Makefile b/drivers/staging/brcm80211/Makefile
index b6d9afc..5caaea5 100644
--- a/drivers/staging/brcm80211/Makefile
+++ b/drivers/staging/brcm80211/Makefile
@@ -15,9 +15,8 @@
 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-# common flags
-subdir-ccflags-y			:= -DBCMDMA32
-subdir-ccflags-$(CONFIG_BRCMDBG)	+= -DBCMDBG -DBCMDBG_ASSERT
+# one and only common flag
+subdir-ccflags-y := -DBCMDBG
 
 obj-$(CONFIG_BRCMFMAC)	+= brcmfmac/
 obj-$(CONFIG_BRCMSMAC)	+= brcmsmac/
diff --git a/drivers/staging/brcm80211/brcmfmac/Makefile b/drivers/staging/brcm80211/brcmfmac/Makefile
index aa7f72d..b3931b0 100644
--- a/drivers/staging/brcm80211/brcmfmac/Makefile
+++ b/drivers/staging/brcm80211/brcmfmac/Makefile
@@ -22,6 +22,7 @@ ccflags-y :=			\
 	-DBCMSDIO		\
 	-DBDC			\
 	-DBRCM_FULLMAC		\
+	-DDHD_DEBUG		\
 	-DDHD_FIRSTREAD=64	\
 	-DDHD_SCHED		\
 	-DDHD_SDALIGN=64	\
@@ -30,12 +31,8 @@ ccflags-y :=			\
 	-DMMC_SDIO_ABORT	\
 	-DPKT_FILTER_SUPPORT	\
 	-DSHOW_EVENTS		\
-	-DTOE
-
-ccflags-$(CONFIG_BRCMDBG)	+= -DDHD_DEBUG
-
-ccflags-y += \
-	-Idrivers/staging/brcm80211/brcmfmac	\
+	-DTOE			\
+	-Idrivers/staging/brcm80211/brcmfmac		\
 	-Idrivers/staging/brcm80211/include		\
 	-Idrivers/staging/brcm80211/util
 
diff --git a/drivers/staging/brcm80211/brcmsmac/Makefile b/drivers/staging/brcm80211/brcmsmac/Makefile
index 5da39be..ea29702 100644
--- a/drivers/staging/brcm80211/brcmsmac/Makefile
+++ b/drivers/staging/brcm80211/brcmsmac/Makefile
@@ -15,13 +15,14 @@
 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-ccflags-y :=				\
+ccflags-y :=					\
 	-DWLC_HIGH				\
 	-DWLC_LOW				\
 	-DSTA					\
 	-DWME					\
 	-DWL11N					\
 	-DDBAND					\
+	-DBCMDMA32				\
 	-DBCMNVRAMR				\
 	-Idrivers/staging/brcm80211/brcmsmac \
 	-Idrivers/staging/brcm80211/brcmsmac/phy \
diff --git a/drivers/staging/brcm80211/util/aiutils.c b/drivers/staging/brcm80211/util/aiutils.c
index e4842c1..b6e7a9e 100644
--- a/drivers/staging/brcm80211/util/aiutils.c
+++ b/drivers/staging/brcm80211/util/aiutils.c
@@ -131,8 +131,10 @@ void ai_scan(si_t *sih, void *regs, uint devid)
 		eromptr = regs;
 		break;
 
+#ifdef BCMSDIO
 	case SPI_BUS:
 	case SDIO_BUS:
+#endif				/* BCMSDIO */
 		eromptr = (u32 *)(unsigned long)erombase;
 		break;
 
@@ -353,8 +355,10 @@ void *ai_setcoreidx(si_t *sih, uint coreidx)
 		pci_write_config_dword(sii->osh->pdev, PCI_BAR0_WIN2, wrap);
 		break;
 
+#ifdef BCMSDIO
 	case SPI_BUS:
 	case SDIO_BUS:
+#endif				/* BCMSDIO */
 		sii->curmap = regs = (void *)(unsigned long)addr;
 		sii->curwrap = (void *)(unsigned long)wrap;
 		break;
diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c
index a6ffb14..258fd90 100644
--- a/drivers/staging/brcm80211/util/bcmutils.c
+++ b/drivers/staging/brcm80211/util/bcmutils.c
@@ -214,7 +214,6 @@ void pktq_flush(struct osl_info *osh, struct pktq *pq, bool dir)
 	ASSERT(pq->len == 0);
 }
 #else /* !BRCM_FULLMAC */
-/* TODO: can we remove callback for softmac? */
 void
 pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir,
 	    ifpkt_cb_t fn, int arg)
diff --git a/drivers/staging/brcm80211/util/hnddma.c b/drivers/staging/brcm80211/util/hnddma.c
index 92b2c80..d088692 100644
--- a/drivers/staging/brcm80211/util/hnddma.c
+++ b/drivers/staging/brcm80211/util/hnddma.c
@@ -2329,7 +2329,6 @@ static int BCMFASTPATH dma64_txfast(dma_info_t *di, struct sk_buff *p0,
 		data = p->data;
 		len = p->len;
 #ifdef BCM_DMAPAD
-		/* TODO: when is this used? */
 		len += PKTDMAPAD(di->osh, p);
 #endif				/* BCM_DMAPAD */
 		next = p->next;
diff --git a/drivers/staging/brcm80211/util/hndpmu.c b/drivers/staging/brcm80211/util/hndpmu.c
index c8af68f..49d19a1 100644
--- a/drivers/staging/brcm80211/util/hndpmu.c
+++ b/drivers/staging/brcm80211/util/hndpmu.c
@@ -32,10 +32,6 @@
 
 #ifdef BCMDBG
 #define	PMU_MSG(args)	printf args
-
-/* debug-only definitions */
-/* #define BCMDBG_FORCEHT */
-/* #define CHIPC_UART_ALWAYS_ON */
 #else
 #define	PMU_MSG(args)
 #endif				/* BCMDBG */
@@ -1470,7 +1466,6 @@ si_pmu1_cpuclk0(si_t *sih, struct osl_info *osh, chipcregs_t *cc)
 	m1div = (tmp & PMU1_PLL0_PC1_M1DIV_MASK) >> PMU1_PLL0_PC1_M1DIV_SHIFT;
 
 #ifdef BCMDBG
-	/* TODO: seems more like a workaround */
 	/* Read p2div/p1div from pllcontrol[0] */
 	W_REG(osh, &cc->pllcontrol_addr, PMU1_PLL0_PLLCTL0);
 	tmp = R_REG(osh, &cc->pllcontrol_data);
@@ -1555,7 +1550,6 @@ void si_pmu_pll_init(si_t *sih, struct osl_info *osh, uint xtalfreq)
 	}
 
 #ifdef BCMDBG_FORCEHT
-	/* TODO: when is this flag used? what does it do? */
 	OR_REG(osh, &cc->clk_ctl_st, CCS_FORCEHT);
 #endif
 
@@ -2510,7 +2504,12 @@ bool si_pmu_is_otp_powered(si_t *sih, struct osl_info *osh)
 	return st;
 }
 
-void si_pmu_sprom_enable(si_t *sih, struct osl_info *osh, bool enable)
+void
+#if defined(BCMDBG)
+si_pmu_sprom_enable(si_t *sih, struct osl_info *osh, bool enable)
+#else
+si_pmu_sprom_enable(si_t *sih, struct osl_info *osh, bool enable)
+#endif
 {
 	chipcregs_t *cc;
 	uint origidx;
@@ -2532,7 +2531,6 @@ void si_pmu_chip_init(si_t *sih, struct osl_info *osh)
 	ASSERT(sih->cccaps & CC_CAP_PMU);
 
 #ifdef CHIPC_UART_ALWAYS_ON
-	/* TODO: are these special for debugging purposes? */
 	si_corereg(sih, SI_CC_IDX, offsetof(chipcregs_t, clk_ctl_st),
 		   CCS_FORCEALP, CCS_FORCEALP);
 #endif				/* CHIPC_UART_ALWAYS_ON */
-- 
1.7.4.1

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


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