push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchFromGitHub,
kernel,
bc,
nukeReferences,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rtl8852au";
version = "${kernel.version}-unstable-2024-05-06";
src = fetchFromGitHub {
owner = "lwfinger";
repo = "rtl8852au";
rev = "865ab0fa91471d595c283d2f3db323f7f15455f5";
hash = "sha256-c2dpnZS6a0waL1khB9ZEglTwJIBsyRebTMig1B4A0xU=";
};
nativeBuildInputs = [
bc
nukeReferences
]
++ kernel.moduleBuildDependencies;
hardeningDisable = [
"pic"
"format"
];
patches = [
# https://github.com/lwfinger/rtl8852au/pull/115
./fix-build-for-kernels-6.13-6.14.patch
];
postPatch = ''
substituteInPlace ./Makefile \
--replace-fail /sbin/depmod \# \
--replace-fail '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/" \
--replace-fail '/usr/lib/systemd/system-sleep' "$out/usr/lib/systemd/system-sleep"
substituteInPlace ./platform/i386_pc.mk \
--replace-fail /lib/modules "${kernel.dev}/lib/modules"
'';
makeFlags = [
"ARCH=${stdenv.hostPlatform.linuxArch}"
("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n"))
("CONFIG_PLATFORM_ARM_RPI=" + (if stdenv.hostPlatform.isAarch then "y" else "n"))
]
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
preInstall = ''
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
mkdir -p "$out/usr/lib/systemd/system-sleep"
'';
postInstall = ''
nuke-refs $out/lib/modules/*/kernel/net/wireless/*.ko
'';
# GCC 14 makes this an error by default
env.NIX_CFLAGS_COMPILE = "-Wno-designated-init";
enableParallelBuilding = true;
meta = with lib; {
description = "Driver for Realtek 802.11ac, rtl8852au, provides the 8852au mod";
homepage = "https://github.com/lwfinger/rtl8852au";
license = licenses.gpl2Only;
platforms = [ "x86_64-linux" ];
# FIX: error: invalid initializer
broken = kernel.kernelOlder "6" && kernel.isHardened;
maintainers = with maintainers; [ lonyelon ];
};
})

View File

@@ -0,0 +1,77 @@
From c65ed43f42656aecf43e7ea80c58d204c3c67aca Mon Sep 17 00:00:00 2001
From: Soham Nandy <soham.nandy2006@gmail.com>
Date: Fri, 28 Mar 2025 17:24:55 +0530
Subject: [PATCH 1/2] rtl8852au(fix): remove MODULE_IMPORT and net_device for
kernel versions over 6.13
---
os_dep/linux/ioctl_cfg80211.c | 3 +++
os_dep/osdep_service_linux.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 2b79c97..277dffb 100755
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -6350,6 +6350,9 @@ static void rtw_get_chbwoff_from_cfg80211_chan_def(
static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
+ , struct net_device *dev
+#endif
, struct cfg80211_chan_def *chandef
#else
, struct ieee80211_channel *chan
diff --git a/os_dep/osdep_service_linux.c b/os_dep/osdep_service_linux.c
index fe47c3b..8fdbcfc 100644
--- a/os_dep/osdep_service_linux.c
+++ b/os_dep/osdep_service_linux.c
@@ -390,7 +390,9 @@ static int openFile(struct file **fpp, const char *path, int flag, int mode)
struct file *fp;
#if defined(MODULE_IMPORT_NS)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0))
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
+#endif
#endif
fp = filp_open(path, flag, mode);
@@ -508,7 +510,9 @@ static int isFileReadable(const char *path, u32 *sz)
char buf;
#if defined(MODULE_IMPORT_NS)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0))
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
+#endif
#endif
fp = filp_open(path, O_RDONLY, 0);
From 91d168fc5aa818b4e85aa5b2b43d7f25470e925c Mon Sep 17 00:00:00 2001
From: Soham Nandy <soham.nandy2006@gmail.com>
Date: Mon, 7 Apr 2025 10:25:03 +0530
Subject: [PATCH 2/2] rtl8852au(fix): get_tx_power callback by adding link_id
parameter
kernel versions >6.14 cfg80211_ops was updated to include an unsigned
int link_id parameter.
---
os_dep/linux/ioctl_cfg80211.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 277dffb..3d7620e 100755
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -4454,6 +4454,10 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
struct wireless_dev *wdev,
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,14,0))
+ unsigned int link_id,
+#endif
#endif
int *dbm)
{