From c52224b54d80c72cf08508750180b7cf833cd244 Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Tue, 10 Jan 2023 17:06:00 -0500 Subject: gnu: Add r8168-linux-module. * nongnu/packages/linux.scm (r8168-linux-module): New variable. Signed-off-by: Jonathan Brielmaier --- nongnu/packages/linux.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm index 6713390..f826d5f 100644 --- a/nongnu/packages/linux.scm +++ b/nongnu/packages/linux.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2022 Remco van 't Veer ;;; Copyright © 2022 Simen Endsjø ;;; Copyright © 2022 Leo Famulari +;;; Copyright © 2023 Morgan Smith (define-module (nongnu packages linux) #:use-module (gnu packages) @@ -663,6 +664,39 @@ RTL8812AU, RTL8821AU, and RTL8814AU chips.") ;; hal/rtl8812a/hal8812a_fw.c (license gpl2+)))) +(define-public r8168-linux-module + (package + (name "r8168-linux-module") + (version "8.051.02") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mtorromeo/r8168") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16mpr0np6xbmzdnwg4p3q6yli2gh032k98g4vplya33hrn50vh52")))) + (arguments + (list #:tests? #f + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'enter-src-directory + (lambda _ + (chdir "src"))) + ;; Needed to compile module for linux >= 6.1 + (add-before 'build 'fix-build + (lambda _ + (substitute* "r8168.h" + (("netif_napi_add\\(ndev, &priv->napi, function, weight\\)") + "netif_napi_add(ndev, &priv->napi, function)"))))))) + (build-system linux-module-build-system) + (home-page "https://github.com/mtorromeo/r8168") + (synopsis "Linux driver for Realtek PCIe network adapters") + (description + "Linux driver for Realtek PCIe network adapters. If the r8169 kernel module is +giving you trouble, you can try this module.") + (license gpl2))) + (define broadcom-sta-version "6.30.223.271") (define broadcom-sta-x86_64-source -- cgit v1.2.3