-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor USB network card patch a bit
* Rename the module to ax88179_178a, which is the kernel module name. * Enable manually based on option instead of condition based on config.boot.kernelPackages.kernel.version, which started to cause infinite recursion when evaluating against nixos-unstable. * Enable manually only for platforms knwon having affected 6.1.x kernel. Signed-off-by: Mika Tammi <mika.tammi@unikie.com>
- Loading branch information
Mika Tammi
committed
Apr 10, 2024
1 parent
ae77a61
commit 8800210
Showing
6 changed files
with
35 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright 2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Fix for ax88179_178a USB network card kernel driver MAC-address issue. | ||
{ | ||
lib, | ||
pkgs, | ||
config, | ||
... | ||
}: let | ||
cfg = config.ghaf.hardware.ax88179_178a; | ||
in { | ||
options.ghaf.hardware.ax88179_178a = { | ||
enable = lib.mkEnableOption "fix for ax88179_178a USB network card kernel driver MAC-address"; | ||
}; | ||
|
||
config = lib.mkIf cfg.enable { | ||
boot.kernelPatches = [ | ||
# Fix MAC-address randomized on USB network cards because of kernel bug. | ||
# This specifically affects network cards used in testing. | ||
{ | ||
patch = pkgs.fetchpatch2 { | ||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/patch/?id=2e91bb99b9d4f756e92e83c4453f894dda220f09"; | ||
hash = "sha256-fX7yBsXW1oFt1Nfns42oZnCXf36qehXijvCNEmqBGsE="; | ||
}; | ||
} | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
./x86_64-generic | ||
./definition.nix | ||
|
||
./usb-network-kernel-patch.nix | ||
./ax88179_178a.nix | ||
]; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters