summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-01-16 13:51:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-16 13:51:57 -0500
commit912fdfca681d38f1ec1eca0051a9a9c16cb4c9a0 (patch)
treec299f257f40504664075a2d9ba0237346978d4ad
parent6c1c9987c61dc3c67ad8ffbd9ea2ec3fe4eba73f (diff)
downloadkernel-912fdfca681d38f1ec1eca0051a9a9c16cb4c9a0.tar.gz
kernel-912fdfca681d38f1ec1eca0051a9a9c16cb4c9a0.tar.xz
kernel-912fdfca681d38f1ec1eca0051a9a9c16cb4c9a0.zip
Re-enable CONFIG_BRCMFMAC builds (found work-around for GCC 4.7 builds)
-rw-r--r--brcmfmac-gcc47.patch27
-rw-r--r--compat-wireless-config-fixups.patch9
-rw-r--r--kernel.spec7
3 files changed, 34 insertions, 9 deletions
diff --git a/brcmfmac-gcc47.patch b/brcmfmac-gcc47.patch
new file mode 100644
index 000000000..751876c36
--- /dev/null
+++ b/brcmfmac-gcc47.patch
@@ -0,0 +1,27 @@
+Alexandre Oliva <oliva@lsd.ic.unicamp.br> sent me a patch:
+
+"I see you ran into the same problem I did in brcmfmac. I wasn't sure a
+build with compat-wireless would run into the same problem I did without
+it and with Linux-libre.
+
+It's an issue brought about by GCC 4.7's partial-inlining, that ends up
+splitting the udelay function just at the wrong spot, in such a way that
+some sanity checks for constants fails, and we end up calling
+bad_udelay.
+
+This patch fixes the problem. Feel free to push it upstream if it makes
+sense to you."
+
+diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+index 5eddabe..eda1d4e 100644
+--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
++++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+@@ -2463,7 +2463,7 @@ static s32 brcmf_init_iscan(struct brcmf_cfg80211_priv *cfg_priv)
+ return err;
+ }
+
+-static void brcmf_delay(u32 ms)
++static __always_inline void brcmf_delay(u32 ms)
+ {
+ if (ms < 1000 / HZ) {
+ cond_resched();
diff --git a/compat-wireless-config-fixups.patch b/compat-wireless-config-fixups.patch
index 3ec33a07f..938f35c5c 100644
--- a/compat-wireless-config-fixups.patch
+++ b/compat-wireless-config-fixups.patch
@@ -29,15 +29,6 @@ diff -up compat-wireless-2011-12-18/config.mk.orig compat-wireless-2011-12-18/co
CONFIG_RT2800USB_UNKNOWN=y
endif #CONFIG_CRC_CCITT
CONFIG_RT2X00_LIB_USB=m
-@@ -615,7 +618,7 @@ CONFIG_ATH6KL=m
- endif #CONFIG_COMPAT_KERNEL_2_6_27
-
- ifndef CONFIG_COMPAT_KERNEL_2_6_29
--CONFIG_BRCMFMAC=m
-+# CONFIG_BRCMFMAC=m
- endif #CONFIG_COMPAT_KERNEL_2_6_29
-
- endif #CONFIG_MMC
diff -up compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile.orig compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile
--- compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile.orig 2012-01-05 13:54:21.214595837 -0500
+++ compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile 2012-01-05 13:54:27.274520077 -0500
diff --git a/kernel.spec b/kernel.spec
index 2c0fd3771..3d2196626 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -770,6 +770,8 @@ Patch50001: compat-wireless-pr_fmt-warning-avoidance.patch
Patch50002: compat-wireless-integrated-build.patch
Patch50003: compat-wireless-rtl8192cu-Fix-WARNING-on-suspend-resume.patch
+Patch50100: brcmfmac-gcc47.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1550,6 +1552,8 @@ ApplyPatch compat-wireless-integrated-build.patch
ApplyPatch compat-wireless-rtl8192cu-Fix-WARNING-on-suspend-resume.patch
ApplyPatch mac80211-fix-rx-key-NULL-ptr-deref-in-promiscuous-mode.patch
+ApplyPatch brcmfmac-gcc47.patch
+
cd ..
%endif
@@ -2318,6 +2322,9 @@ fi
# ||----w |
# || ||
%changelog
+* Mon Jan 16 2012 John W. Linville <linville@redhat.com>
+- Re-enable CONFIG_BRCMFMAC builds (found work-around for GCC 4.7 builds)
+
* Sun Jan 15 2012 Josh Boyer <jwboyer@redhat.com>
- Avoid packaging symlinks for kernel-doc files (rhbz 767351)
- Apply mac80211 NULL ptr deref fix to compat-wireless too (rhbz 769766)