WIFI (broadcom4313) | crash and reboot when turn on the Wi-Fi on androidx86 7.1rc1

509 views
Skip to first unread message

Om Sukualam

unread,
Jun 22, 2017, 9:42:52 PM6/22/17
to Android-x86
yesterday, i check the android-x86 site and found the new update for android version, nougat. I download it the 64 bit version (androidx86 7.1rc1 x86_64) .

When the setup wizard is displaying, I want to connect the Network. So, I'm trying to turn the Wi-Fi on, but after that, suddenly my laptop hang for a second, then reboot. The sign before reboot is, my laptop hang, and the capslock light is blinking few times, then reboot itself.

When i using debug mode, or just skip the wizard, it's still reboot if I trying to turn-on the Wi-Fi.

my Network card is Broadcom4313 (i check via linux), and I actually have no problem running previous android-x86 version, I recently using Marshmallow 6.0r3 (32bit) with this same machine and Wi-Fi is just work, and It's stable.

So my question is, what's make my Wi-Fi not working on this version? is this kernel panic? or because it's still rc1? or because x86 and x86_64 version of this release has some difference on how my Wi-Fi work? thank you.

bk chaw

unread,
Jun 25, 2017, 1:55:44 AM6/25/17
to Android-x86
my broadcom wifi BCM94352HMB is also having this problems. it works fine in marshmallow.

Mauro Rossi

unread,
Jul 1, 2017, 7:05:45 PM7/1/17
to Android-x86
The problem is most probably due to a missing linux48.patch in the current kernel-4.9 branch

Archlinux uses a way to build the package similar to android-x86:

The quicker way to apply it to kernel-4.9 after having added the linux48.patch file in

drivers/net/wireless/broadcom/wl/linux48.patch

is to modify drivers/net/wireless/broadcom/wl/build.mk like this

 # parts of build/core/tasks/kernel.mk
 
 WL_ENABLED := $(if $(wildcard $(WL_PATH)),$(shell grep ^CONFIG_WL=[my] $(KERNEL_CONFIG_FILE)))
 WL_SRC := $(WL_PATH)/hybrid-v35$(if $(filter x86,$(TARGET_KERNEL_ARCH)),,_64)-nodebug-pcoem-6_30_223_271.tar.gz
 WL_LIB := $(WL_PATH)/lib$(if $(filter x86,$(TARGET_KERNEL_ARCH)),32,64)
 $(WL_SRC):
 	@echo Downloading $(@F)...
 	$(hide) curl https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/$(@F) > $@
 
 $(WL_LIB): $(WL_SRC) $(wildcard $(WL_PATH)/*.patch)
 	$(hide) tar zxf $< -C $(@D) --overwrite -m && \
 		rm -rf $@ && mv $(@D)/lib $@ && \
 		patch -p1 -d $(@D) -i wl.patch && \
-		patch -p1 -d $(@D) -i linux-recent.patch
+		patch -p1 -d $(@D) -i linux-recent.patch && \
+		patch -p1 -d $(@D) -i linux48.patch
$(INSTALLED_KERNEL_TARGET): $(if $(WL_ENABLED),$(WL_LIB))


I will prepare a patch soon, would you like to test?
Mauro


Mauro Rossi

unread,
Jul 1, 2017, 8:04:34 PM7/1/17
to Android-x86

Here it is,

tomorrow I'll fix also vanilla kernel 4.11 and 4.12 in my github,
which require similar incremental patches

Mauro

From 722289c95238655bbeebdaa6b3e503550cd8b139 Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor...@gmail.com>
Date: Sun, 2 Jul 2017 01:40:32 +0200
Subject: [PATCH] net: wireless: broadcom: wl: fix kernel >= 4.8 panic

linux-recent.patch was ok up till kernel 4.7
with kernel 4.8 (and 4.9) new changes are critical to avoid crash

build.mk is modified to apply incremental patch linux-48.patch
copied from https://aur.archlinux.org/cgit/aur.git/tree/?h=broadcom-wl

Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839629
---
 drivers/net/wireless/broadcom/wl/build.mk       |  3 +-
 drivers/net/wireless/broadcom/wl/linux-48.patch | 52 +++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/wireless/broadcom/wl/linux-48.patch

diff --git a/drivers/net/wireless/broadcom/wl/build.mk b/drivers/net/wireless/broadcom/wl/build.mk
index a8631cb1e732..dd7914923d26 100644
--- a/drivers/net/wireless/broadcom/wl/build.mk
+++ b/drivers/net/wireless/broadcom/wl/build.mk
@@ -11,6 +11,7 @@ $(WL_LIB): $(WL_SRC) $(wildcard $(WL_PATH)/*.patch)

     $(hide) tar zxf $< -C $(@D) --overwrite -m && \
         rm -rf $@ && mv $(@D)/lib $@ && touch $@ && \

         patch -p1 -d $(@D) -i wl.patch && \
-        patch -p1 -d $(@D) -i linux-recent.patch
+        patch -p1 -d $(@D) -i linux-recent.patch && \
+        patch -p1 -d $(@D) -i linux-48.patch
 
 $(INSTALLED_KERNEL_TARGET): $(if $(WL_ENABLED),$(WL_LIB))
diff --git a/drivers/net/wireless/broadcom/wl/linux-48.patch b/drivers/net/wireless/broadcom/wl/linux-48.patch
new file mode 100644
index 000000000000..0f3e81906226
--- /dev/null
+++ b/drivers/net/wireless/broadcom/wl/linux-48.patch
@@ -0,0 +1,52 @@
+Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839629
+
+--- a/src/wl/sys/wl_cfg80211_hybrid.c    2016-10-03 10:53:55.588036464 +0200
++++ b/src/wl/sys/wl_cfg80211_hybrid.c    2016-10-03 10:54:11.911695944 +0200
+@@ -2386,8 +2386,15 @@
+     s32 err = 0;
+
+     if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++        struct cfg80211_scan_info info = {
++            .aborted = true
++        };
+         WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
+-        cfg80211_scan_done(wl->scan_request, true);    
++        cfg80211_scan_done(wl->scan_request, &info);
++#else
++        cfg80211_scan_done(wl->scan_request, true);
++#endif
+         wl->scan_request = NULL;
+     }
+
+@@ -2488,7 +2495,14 @@
+
+ scan_done_out:
+     if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++        struct cfg80211_scan_info info = {
++            .aborted = false
++        };
++        cfg80211_scan_done(wl->scan_request, &info);
++#else
+         cfg80211_scan_done(wl->scan_request, false);
++#endif
+         wl->scan_request = NULL;
+     }
+     rtnl_unlock();
+@@ -2913,7 +2927,14 @@
+     s32 err = 0;
+
+     if (wl->scan_request) {
+-        cfg80211_scan_done(wl->scan_request, true);   
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++        struct cfg80211_scan_info info = {
++            .aborted = true
++        };
++        cfg80211_scan_done(wl->scan_request, &info);
++#else
++        cfg80211_scan_done(wl->scan_request, true);
++#endif
+         wl->scan_request = NULL;
+     }
+
--
2.11.0

0001-net-wireless-broadcom-wl-fix-kernel-4.8-panic.patch

Chih-Wei Huang

unread,
Jul 3, 2017, 2:38:31 AM7/3/17
to Android-x86
Thank you for the patch.
I've applied it (with minor cosmetic).
> --
> You received this message because you are subscribed to the Google Groups
> "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-x86...@googlegroups.com.
> To post to this group, send email to andro...@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-x86.
> For more options, visit https://groups.google.com/d/optout.



--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Yossi Spitz

unread,
Jul 21, 2017, 2:27:47 AM7/21/17
to Android-x86
בתאריך יום שישי, 23 ביוני 2017 בשעה 04:42:52 UTC+3, מאת Om Sukualam:
Hi.
Can one please share instruction how to apply the patch? I have the exact same problem, and I would like to check whether this PATCH can solve it for me, but have no expiriance in installing patches. thanks!
Reply all
Reply to author
Forward
0 new messages