Skip to content

Commit

Permalink
Unload brcmfmac_wcc (if loaded) before brcmfmac (#1200)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kpy3 and Mic92 authored Oct 23, 2024
1 parent 22e8de2 commit 64d900a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apple/macbook-pro/12-1/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
# https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116.
# Also brcmfmac could randomly crash on resume from sleep.
powerUpCommands = lib.mkBefore "${pkgs.kmod}/bin/modprobe brcmfmac";
powerDownCommands = lib.mkBefore "${pkgs.kmod}/bin/rmmod brcmfmac";
powerDownCommands = lib.mkBefore ''
${pkgs.kmod}/bin/rmmod -f -v brcmfmac_wcc 2>/dev/null || true
${pkgs.kmod}/bin/rmmod brcmfmac
'';
};

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

0 comments on commit 64d900a

Please sign in to comment.