Re-enable CONFIG_BRCMFMAC builds (found work-around for GCC 4.7 builds)

This commit is contained in:
John W. Linville 2012-01-16 13:51:57 -05:00
parent 6c1c9987c6
commit 912fdfca68
3 changed files with 34 additions and 9 deletions

27
brcmfmac-gcc47.patch Normal file
View File

@ -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();

View File

@ -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

View File

@ -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)