aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/604-rt2x00-of_load_eeprom_filename.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-11-12 22:11:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-11-12 22:11:33 +0000
commitd32df2f65a01ea6237d736c3c3c017830f58e781 (patch)
treea4a1eaea15e95e099378ba823a4b32c754342bde /package/kernel/mac80211/patches/604-rt2x00-of_load_eeprom_filename.patch
parent23e82fd7ba81f610d46f0ca4ed301b151ca18f4e (diff)
downloadmaster-187ad058-d32df2f65a01ea6237d736c3c3c017830f58e781.tar.gz
master-187ad058-d32df2f65a01ea6237d736c3c3c017830f58e781.tar.bz2
master-187ad058-d32df2f65a01ea6237d736c3c3c017830f58e781.zip
mac80211: update to wireless-testing 2013-11-05
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38783 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches/604-rt2x00-of_load_eeprom_filename.patch')
-rw-r--r--package/kernel/mac80211/patches/604-rt2x00-of_load_eeprom_filename.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/604-rt2x00-of_load_eeprom_filename.patch b/package/kernel/mac80211/patches/604-rt2x00-of_load_eeprom_filename.patch
new file mode 100644
index 0000000000..666bc2dc55
--- /dev/null
+++ b/package/kernel/mac80211/patches/604-rt2x00-of_load_eeprom_filename.patch
@@ -0,0 +1,31 @@
+--- a/drivers/net/wireless/rt2x00/rt2x00eeprom.c
++++ b/drivers/net/wireless/rt2x00/rt2x00eeprom.c
+@@ -26,6 +26,7 @@
+
+ #include <linux/kernel.h>
+ #include <linux/module.h>
++#include <linux/of.h>
+
+ #include "rt2x00.h"
+ #include "rt2x00lib.h"
+@@ -34,11 +35,19 @@ static const char *
+ rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
+ {
+ struct rt2x00_platform_data *pdata = rt2x00dev->dev->platform_data;
++ struct device_node *np;
++ char *eep;
+
+ if (pdata && pdata->eeprom_file_name)
+ return pdata->eeprom_file_name;
+
+- return NULL
++#ifdef CONFIG_OF
++ np = rt2x00dev->dev->of_node;
++ if (np && of_property_read_string(np, "ralink,eeprom", &eep) == 0)
++ return eep;
++#endif
++
++ return NULL;
+ }
+
+ static int rt2x00lib_request_eeprom_file(struct rt2x00_dev *rt2x00dev)