nixos-generate-config: detect brcmfmac requirement

This makes the firmware available (or would, if someone switched off
enableAllFirmware). Corresponding kernel module should get auto-loaded.

See #9948. Close #9971.

authored by Charles Strahan and committed by Vladimír Čunát cb38f10d 4c626f44

+16
+16
nixos/modules/installer/tools/nixos-generate-config.pl
··· 152 152 push @kernelModules, "wl"; 153 153 } 154 154 155 + # broadcom FullMac driver 156 + # list taken from 157 + # https://wireless.wiki.kernel.org/en/users/Drivers/brcm80211#brcmfmac 158 + if ($vendor eq "0x14e4" && 159 + ($device eq "0x43a3" || $device eq "0x43df" || $device eq "0x43ec" || 160 + $device eq "0x43d3" || $device eq "0x43d9" || $device eq "0x43e9" || 161 + $device eq "0x43ba" || $device eq "0x43bb" || $device eq "0x43bc" || 162 + $device eq "0xaa52" || $device eq "0x43ca" || $device eq "0x43cb" || 163 + $device eq "0x43cc" || $device eq "0x43c3" || $device eq "0x43c4" || 164 + $device eq "0x43c5" 165 + ) ) 166 + { 167 + # we need e.g. brcmfmac43602-pcie.bin 168 + push @imports, "<nixos/modules/hardware/network/broadcom-43xx.nix>"; 169 + } 170 + 155 171 # Can't rely on $module here, since the module may not be loaded 156 172 # due to missing firmware. Ideally we would check modules.pcimap 157 173 # here.