diff mbox series

[72/74] patches: add patch for class_create() in hwsim

Message ID 20240524190908.30870adf76f4.I5f967e020ac6400b14780e6fd8c757530b3efee9@changeid (mailing list archive)
State New, archived
Headers show
Series backport updates from Intel | expand

Commit Message

Johannes Berg May 24, 2024, 5:08 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 patches/0086-hwsim-class-create.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 patches/0086-hwsim-class-create.patch
diff mbox series

Patch

diff --git a/patches/0086-hwsim-class-create.patch b/patches/0086-hwsim-class-create.patch
new file mode 100644
index 000000000000..786a5966be0d
--- /dev/null
+++ b/patches/0086-hwsim-class-create.patch
@@ -0,0 +1,14 @@ 
+--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
++++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
+@@ -6564,7 +6566,11 @@ static int __init init_mac80211_hwsim(void)
+ 	if (err)
+ 		goto out_exit_netlink;
+ 
++#if LINUX_VERSION_IS_GEQ(6,4,0)
+ 	hwsim_class = class_create("mac80211_hwsim");
++#else
++	hwsim_class = class_create(THIS_MODULE, "mac80211_hwsim");
++#endif
+ 	if (IS_ERR(hwsim_class)) {
+ 		err = PTR_ERR(hwsim_class);
+ 		goto out_exit_virtio;