aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorSven Over <sp@cedenti.st>2020-02-23 14:26:46 -0500
committerDaniel Golle <daniel@makrotopia.org>2020-03-07 20:18:30 +0100
commit5b13ea8d28fd087aac4c7730a4f9c1143dda15db (patch)
treee14c4d5ae70fb4e96cd6dd965db93cd3db7a0f2d /package
parent00b319e9be3198eb306bf58577b4e2c6fc86af34 (diff)
downloadupstream-5b13ea8d28fd087aac4c7730a4f9c1143dda15db.tar.gz
upstream-5b13ea8d28fd087aac4c7730a4f9c1143dda15db.tar.bz2
upstream-5b13ea8d28fd087aac4c7730a4f9c1143dda15db.zip
mac80211: fix symbol dependency of rt2x00lib kernel module
On platforms that do not have CONFIG_MTD enabled, loading the rt2x00lib kernel module fails because it depends on symbols from the mtd module ("Unknown symbol get_mtd_device_nm"). This commit disables the code that can read the eeprom from mtd if mtd is not enabled. Signed-off-by: Sven Over <sp@cedenti.st> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package')
-rw-r--r--package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch10
1 files changed, 8 insertions, 2 deletions
diff --git a/package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch b/package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch
index 08ca7c96fd..43754c43c2 100644
--- a/package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch
+++ b/package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch
@@ -22,17 +22,20 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
Supported chips: RT2880, RT3050, RT3052, RT3350, RT3352.
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
-@@ -26,11 +26,72 @@
+@@ -26,11 +26,76 @@
#include <linux/kernel.h>
#include <linux/module.h>
++#if IS_ENABLED(CONFIG_MTD)
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
++#endif
#include <linux/of.h>
#include "rt2x00.h"
#include "rt2x00lib.h"
++#if IS_ENABLED(CONFIG_MTD)
+static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
+{
+ int ret = -EINVAL;
@@ -91,16 +94,19 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
+ return ret;
+}
++#endif
+
static const char *
rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
{
-@@ -58,6 +119,9 @@ static int rt2x00lib_request_eeprom_file
+@@ -58,6 +123,11 @@ static int rt2x00lib_request_eeprom_file
const char *ee_name;
int retval;
++#if IS_ENABLED(CONFIG_MTD)
+ if (!rt2800lib_read_eeprom_mtd(rt2x00dev))
+ return 0;
++#endif
+
ee_name = rt2x00lib_get_eeprom_file_name(rt2x00dev);
if (!ee_name && test_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags)) {