From 43f4fb3c52fd8ecab119b0aa0ecab6eac0888a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 8 Jan 2019 23:47:13 +0100 Subject: [PATCH] linux: Adds patch for fixing wifi on raspberry pi --- pkgs/os-specific/linux/kernel/patches.nix | 4 ++++ .../linux/kernel/raspberry-pi-wifi-fix.patch | 16 ++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 21 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel/raspberry-pi-wifi-fix.patch diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index d54e0153229d..38b642600b84 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -58,4 +58,8 @@ rec { }; }; + raspberry_pi_wifi_fix = rec { + name = "raspberry-pi-wifi-fix"; + patch = ./raspberry-pi-wifi-fix.patch; + }; } diff --git a/pkgs/os-specific/linux/kernel/raspberry-pi-wifi-fix.patch b/pkgs/os-specific/linux/kernel/raspberry-pi-wifi-fix.patch new file mode 100644 index 000000000000..355715f26b95 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/raspberry-pi-wifi-fix.patch @@ -0,0 +1,16 @@ +diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c +index d0e83db42ae5..94eeed2a1b53 100644 +--- a/drivers/mmc/host/sdhci-iproc.c ++++ b/drivers/mmc/host/sdhci-iproc.c +@@ -279,7 +279,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev) + + iproc_host->data = iproc_data; + +- mmc_of_parse(host->mmc); ++ ret = mmc_of_parse(host->mmc); ++ if (ret) ++ goto err; ++ + sdhci_get_of_property(pdev); + + host->mmc->caps |= iproc_host->data->mmc_caps; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c042ce529e8a..1e958ee79d7d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14113,6 +14113,7 @@ with pkgs; # when adding a new linux version # kernelPatches.cpu-cgroup-v2."4.11" kernelPatches.modinst_arg_list_too_long + kernelPatches.raspberry_pi_wifi_fix ]; };