aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mwlwifi
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/mwlwifi')
-rw-r--r--package/kernel/mwlwifi/Makefile8
-rw-r--r--package/kernel/mwlwifi/patches/001-Fix-compile-with-mac80211-backports-5_3+.patch35
-rw-r--r--package/kernel/mwlwifi/patches/001-vendor_command_policy.patch19
3 files changed, 39 insertions, 23 deletions
diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
index b9e0e75690..79addeda8a 100644
--- a/package/kernel/mwlwifi/Makefile
+++ b/package/kernel/mwlwifi/Makefile
@@ -8,16 +8,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mwlwifi
-PKG_RELEASE=2
+PKG_RELEASE=1
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2019-03-02
-PKG_SOURCE_VERSION:=31d9386079b91cc699658c19294e139b62b512bc
-PKG_MIRROR_HASH:=7bdd05765d8215a9c293cdcb028d63a04c9e55b337eaac9e8d3659bd86218321
+PKG_SOURCE_DATE:=2020-02-06
+PKG_SOURCE_VERSION:=a2fd00bb74c35820dfe233d762690c0433a87ef5
+PKG_MIRROR_HASH:=0eda0e774a87e58e611d6436350e1cf2be3de50fddde334909a07a15b0c9862b
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
PKG_BUILD_PARALLEL:=1
diff --git a/package/kernel/mwlwifi/patches/001-Fix-compile-with-mac80211-backports-5_3+.patch b/package/kernel/mwlwifi/patches/001-Fix-compile-with-mac80211-backports-5_3+.patch
new file mode 100644
index 0000000000..fdba575f04
--- /dev/null
+++ b/package/kernel/mwlwifi/patches/001-Fix-compile-with-mac80211-backports-5_3+.patch
@@ -0,0 +1,35 @@
+From 182391a3c96ff6ad79bbba0758338a16a66abbd8 Mon Sep 17 00:00:00 2001
+From: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
+Date: Wed, 12 Feb 2020 14:18:58 +0800
+Subject: [PATCH] Fix driver loading with backports 5.3+
+
+Commit 747796b2f126 did not solve the issue that it crashes when an older kernel
+with a newer backport tries loading it, because it only detects kernel version.
+
+As net/cfg80211.h in 5.3+ defines VENDOR_CMD_RAW_DATA, use it as a condition.
+
+Signed-off-by: DENG Qingfang <dqfext@gmail.com>
+---
+ vendor_cmd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/vendor_cmd.c
++++ b/vendor_cmd.c
+@@ -92,7 +92,7 @@ static const struct wiphy_vendor_command
+ .subcmd = MWL_VENDOR_CMD_SET_BF_TYPE},
+ .flags = WIPHY_VENDOR_CMD_NEED_NETDEV,
+ .doit = mwl_vendor_cmd_set_bf_type,
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0))
++#ifdef VENDOR_CMD_RAW_DATA
+ .policy = mwl_vendor_attr_policy,
+ #endif
+ },
+@@ -101,7 +101,7 @@ static const struct wiphy_vendor_command
+ .subcmd = MWL_VENDOR_CMD_GET_BF_TYPE},
+ .flags = WIPHY_VENDOR_CMD_NEED_NETDEV,
+ .doit = mwl_vendor_cmd_get_bf_type,
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0))
++#ifdef VENDOR_CMD_RAW_DATA
+ .policy = mwl_vendor_attr_policy,
+ #endif
+ }
diff --git a/package/kernel/mwlwifi/patches/001-vendor_command_policy.patch b/package/kernel/mwlwifi/patches/001-vendor_command_policy.patch
deleted file mode 100644
index 1f06d55fc8..0000000000
--- a/package/kernel/mwlwifi/patches/001-vendor_command_policy.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-mac80211 from kernel 5.3 and later checks the new policy attribute.
-
---- a/vendor_cmd.c
-+++ b/vendor_cmd.c
-@@ -92,12 +92,14 @@ static const struct wiphy_vendor_command
- .subcmd = MWL_VENDOR_CMD_SET_BF_TYPE},
- .flags = WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = mwl_vendor_cmd_set_bf_type,
-+ .policy = mwl_vendor_attr_policy,
- },
- {
- .info = { .vendor_id = MRVL_OUI,
- .subcmd = MWL_VENDOR_CMD_GET_BF_TYPE},
- .flags = WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = mwl_vendor_cmd_get_bf_type,
-+ .policy = mwl_vendor_attr_policy,
- }
- };
-