Skip to content

Commit 64d900a

Browse files
kpy3Mic92
andauthored
Unload brcmfmac_wcc (if loaded) before brcmfmac (#1200)
Module brcmfmac cannot be unloaded with rmmod when brcmfmac_wcc is loaded. This leads brcmfmac to crash on wake up. Co-authored-by: Jörg Thalheim <[email protected]>
1 parent 22e8de2 commit 64d900a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apple/macbook-pro/12-1/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
# https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116.
1717
# Also brcmfmac could randomly crash on resume from sleep.
1818
powerUpCommands = lib.mkBefore "${pkgs.kmod}/bin/modprobe brcmfmac";
19-
powerDownCommands = lib.mkBefore "${pkgs.kmod}/bin/rmmod brcmfmac";
19+
powerDownCommands = lib.mkBefore ''
20+
${pkgs.kmod}/bin/rmmod -f -v brcmfmac_wcc 2>/dev/null || true
21+
${pkgs.kmod}/bin/rmmod brcmfmac
22+
'';
2023
};
2124

2225
# USB subsystem wakes up MBP right after suspend unless we disable it.

0 commit comments

Comments
 (0)