[PATCH 1/3] staging: brcm80211: allow both driver are created in single build

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

 



This patch allows to build both drivers. Previous patch for this
failed using -j option. This has been fixed by adding files with
include statement for the fullmac driver. Verified this is working
using -j4 option.

Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
---
 drivers/staging/brcm80211/Kconfig              |   14 +++++++-------
 drivers/staging/brcm80211/Makefile             |    5 +++--
 drivers/staging/brcm80211/brcmfmac/Makefile    |   23 +++++++++++++----------
 drivers/staging/brcm80211/brcmfmac/aiutils.c   |    1 +
 drivers/staging/brcm80211/brcmfmac/bcmutils.c  |    1 +
 drivers/staging/brcm80211/brcmfmac/bcmwifi.c   |    1 +
 drivers/staging/brcm80211/brcmfmac/hndpmu.c    |    1 +
 drivers/staging/brcm80211/brcmfmac/linux_osl.c |    1 +
 drivers/staging/brcm80211/brcmfmac/sbutils.c   |    1 +
 drivers/staging/brcm80211/brcmfmac/siutils.c   |    1 +
 drivers/staging/brcm80211/brcmsmac/Makefile    |    3 +--
 11 files changed, 31 insertions(+), 21 deletions(-)
 create mode 100644 drivers/staging/brcm80211/brcmfmac/aiutils.c
 create mode 100644 drivers/staging/brcm80211/brcmfmac/bcmutils.c
 create mode 100644 drivers/staging/brcm80211/brcmfmac/bcmwifi.c
 create mode 100644 drivers/staging/brcm80211/brcmfmac/hndpmu.c
 create mode 100644 drivers/staging/brcm80211/brcmfmac/linux_osl.c
 create mode 100644 drivers/staging/brcm80211/brcmfmac/sbutils.c
 create mode 100644 drivers/staging/brcm80211/brcmfmac/siutils.c

diff --git a/drivers/staging/brcm80211/Kconfig b/drivers/staging/brcm80211/Kconfig
index 3208352..b6f8635 100644
--- a/drivers/staging/brcm80211/Kconfig
+++ b/drivers/staging/brcm80211/Kconfig
@@ -2,12 +2,6 @@ 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
@@ -30,4 +24,10 @@ 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.
-endchoice
+
+config BRCMDBG
+	bool "Broadcom driver debug functions"
+	default n
+	depends on BRCM80211
+	---help---
+	  Selecting this enables additional code for debug purposes.
diff --git a/drivers/staging/brcm80211/Makefile b/drivers/staging/brcm80211/Makefile
index 5caaea5..c064cdf 100644
--- a/drivers/staging/brcm80211/Makefile
+++ b/drivers/staging/brcm80211/Makefile
@@ -15,8 +15,9 @@
 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-# one and only common flag
-subdir-ccflags-y := -DBCMDBG
+# common flags
+subdir-ccflags-y					:= -DBCMDMA32
+subdir-ccflags-$(CONFIG_BRCMDBG)	+= -DBCMDBG -DBCMDBG_ASSERT
 
 obj-$(CONFIG_BRCMFMAC)	+= brcmfmac/
 obj-$(CONFIG_BRCMSMAC)	+= brcmsmac/
diff --git a/drivers/staging/brcm80211/brcmfmac/Makefile b/drivers/staging/brcm80211/brcmfmac/Makefile
index b3931b0..040f4a7 100644
--- a/drivers/staging/brcm80211/brcmfmac/Makefile
+++ b/drivers/staging/brcm80211/brcmfmac/Makefile
@@ -22,7 +22,6 @@ ccflags-y :=			\
 	-DBCMSDIO		\
 	-DBDC			\
 	-DBRCM_FULLMAC		\
-	-DDHD_DEBUG		\
 	-DDHD_FIRSTREAD=64	\
 	-DDHD_SCHED		\
 	-DDHD_SDALIGN=64	\
@@ -31,8 +30,12 @@ ccflags-y :=			\
 	-DMMC_SDIO_ABORT	\
 	-DPKT_FILTER_SUPPORT	\
 	-DSHOW_EVENTS		\
-	-DTOE			\
-	-Idrivers/staging/brcm80211/brcmfmac		\
+	-DTOE
+
+ccflags-$(CONFIG_BRCMDBG)	+= -DDHD_DEBUG
+
+ccflags-y += \
+	-Idrivers/staging/brcm80211/brcmfmac	\
 	-Idrivers/staging/brcm80211/include		\
 	-Idrivers/staging/brcm80211/util
 
@@ -49,13 +52,13 @@ DHDOFILES = \
 	bcmsdh_linux.o	\
 	bcmsdh_sdmmc.o \
 	bcmsdh_sdmmc_linux.o \
-	../util/linux_osl.o \
-	../util/aiutils.o \
-	../util/siutils.o \
-	../util/sbutils.o \
-	../util/bcmutils.o \
-	../util/bcmwifi.o \
-	../util/hndpmu.o
+	linux_osl.o \
+	aiutils.o \
+	siutils.o \
+	sbutils.o \
+	bcmutils.o \
+	bcmwifi.o \
+	hndpmu.o
 
 obj-m += brcmfmac.o
 brcmfmac-objs += $(DHDOFILES)
diff --git a/drivers/staging/brcm80211/brcmfmac/aiutils.c b/drivers/staging/brcm80211/brcmfmac/aiutils.c
new file mode 100644
index 0000000..e648086
--- /dev/null
+++ b/drivers/staging/brcm80211/brcmfmac/aiutils.c
@@ -0,0 +1 @@
+#include "../util/aiutils.c"
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmutils.c b/drivers/staging/brcm80211/brcmfmac/bcmutils.c
new file mode 100644
index 0000000..8e1296a
--- /dev/null
+++ b/drivers/staging/brcm80211/brcmfmac/bcmutils.c
@@ -0,0 +1 @@
+#include "../util/bcmutils.c"
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmwifi.c b/drivers/staging/brcm80211/brcmfmac/bcmwifi.c
new file mode 100644
index 0000000..9fe988c
--- /dev/null
+++ b/drivers/staging/brcm80211/brcmfmac/bcmwifi.c
@@ -0,0 +1 @@
+#include "../util/bcmwifi.c"
diff --git a/drivers/staging/brcm80211/brcmfmac/hndpmu.c b/drivers/staging/brcm80211/brcmfmac/hndpmu.c
new file mode 100644
index 0000000..e841da6
--- /dev/null
+++ b/drivers/staging/brcm80211/brcmfmac/hndpmu.c
@@ -0,0 +1 @@
+#include "../util/hndpmu.c"
diff --git a/drivers/staging/brcm80211/brcmfmac/linux_osl.c b/drivers/staging/brcm80211/brcmfmac/linux_osl.c
new file mode 100644
index 0000000..a4d338d
--- /dev/null
+++ b/drivers/staging/brcm80211/brcmfmac/linux_osl.c
@@ -0,0 +1 @@
+#include "../util/linux_osl.c"
diff --git a/drivers/staging/brcm80211/brcmfmac/sbutils.c b/drivers/staging/brcm80211/brcmfmac/sbutils.c
new file mode 100644
index 0000000..64496b8
--- /dev/null
+++ b/drivers/staging/brcm80211/brcmfmac/sbutils.c
@@ -0,0 +1 @@
+#include "../util/sbutils.c"
diff --git a/drivers/staging/brcm80211/brcmfmac/siutils.c b/drivers/staging/brcm80211/brcmfmac/siutils.c
new file mode 100644
index 0000000..f428e99
--- /dev/null
+++ b/drivers/staging/brcm80211/brcmfmac/siutils.c
@@ -0,0 +1 @@
+#include "../util/siutils.c"
diff --git a/drivers/staging/brcm80211/brcmsmac/Makefile b/drivers/staging/brcm80211/brcmsmac/Makefile
index ea29702..5da39be 100644
--- a/drivers/staging/brcm80211/brcmsmac/Makefile
+++ b/drivers/staging/brcm80211/brcmsmac/Makefile
@@ -15,14 +15,13 @@
 # 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 \
-- 
1.7.1


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


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