Files
openwrt/target/linux/generic/pending-6.18/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch
T
John Audia c252e6d3b1 kernel: bump 6.18 to 6.18.22
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.18.22

Removed upstreamed:
  ramips/patches-6.18/100-mips-ralink-update-CPU-clock-index.patch[1]

Manually rebased:
  pending-6.18/361-Revert-MIPS-mm-Prevent-a-TLB-shutdown-on-initial-uni.patch

All patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.22&id=a99f94e4f28a3c289bd397d521de1187b6320158

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/22890
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-30 01:14:12 +02:00

60 lines
2.0 KiB
Diff

From 686c603f67ae87bf21a61b5e4b1564443f41c3ee Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Thu, 20 Oct 2022 03:34:43 +0200
Subject: [PATCH] net: permit ieee80211_ptr even with no CFG82111 support
Introduce a new flag CONFIG_CFG80211_HEADERS to compile in ieee80211_ptr
even if CFG80211 support is not compiled in. This is needed for the
backports project and for any downstream wireless driver that loads in
the kernel dynamically.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
include/linux/netdevice.h | 2 +-
net/batman-adv/hard-interface.c | 2 +-
net/wireless/Kconfig | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2304,7 +2304,7 @@ struct net_device {
#if IS_ENABLED(CONFIG_AX25)
struct ax25_dev __rcu *ax25_ptr;
#endif
-#if IS_ENABLED(CONFIG_CFG80211)
+#if IS_ENABLED(CONFIG_CFG80211_HEADERS)
struct wireless_dev *ieee80211_ptr;
#endif
#if IS_ENABLED(CONFIG_IEEE802154) || IS_ENABLED(CONFIG_6LOWPAN)
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -310,7 +310,7 @@ static bool batadv_is_cfg80211_netdev(st
if (!net_device)
return false;
-#if IS_ENABLED(CONFIG_CFG80211)
+#if IS_ENABLED(CONFIG_CFG80211_HEADERS)
/* cfg80211 drivers have to set ieee80211_ptr */
if (net_device->ieee80211_ptr)
return true;
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
@@ -23,6 +23,7 @@ config CFG80211
# using a different algorithm, though right now they shouldn't
# (this is here rather than below to allow it to be a module)
select CRYPTO_SHA256 if CFG80211_USE_KERNEL_REGDB_KEYS
+ select CFG80211_HEADERS
help
cfg80211 is the Linux wireless LAN (802.11) configuration API.
Enable this if you have a wireless device.
@@ -33,6 +34,9 @@ config CFG80211
When built as a module it will be called cfg80211.
+config CFG80211_HEADERS
+ bool "cfg80211 - headers support"
+
if CFG80211
config NL80211_TESTMODE