aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/ath10k-ct
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2021-07-23 20:19:43 +0200
committerDavid Bauer <mail@david-bauer.net>2021-08-05 01:46:26 +0200
commit91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1 (patch)
treef28017e5a42615c51b599d6de96c9fb91d27d476 /package/kernel/ath10k-ct
parentedb6bc199049769be76bb3966debcc2b31511e4b (diff)
downloadupstream-91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1.tar.gz
upstream-91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1.tar.bz2
upstream-91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1.zip
treewide: backport support for nvmem on non platform devices
In the current state, nvmem cells are only detected on platform device. To quickly fix the problem, we register the affected problematic driver with the of_platform but that is more an hack than a real solution. Backport from net-next the required patch so that nvmem can work also with non-platform devices and rework our current patch. Drop the mediatek and dsa workaround and rework the ath10k patches. Rework every driver that use the of_get_mac_address api. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'package/kernel/ath10k-ct')
-rw-r--r--package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch25
1 files changed, 3 insertions, 22 deletions
diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
index b5c53baf67..3b5d9d45ac 100644
--- a/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
+++ b/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
@@ -20,38 +20,19 @@ diff --git a/ath10k-5.10/core.c b/ath10k-5.10/core.c
index 5f4e12196..9ed7b9883 100644
--- a/ath10k-5.10/core.c
+++ b/ath10k-5.10/core.c
-@@ -8,6 +8,9 @@
+@@ -8,6 +8,7 @@
#include <linux/module.h>
#include <linux/firmware.h>
#include <linux/of.h>
+#include <linux/of_net.h>
-+#include <linux/of_platform.h>
-+#include <linux/property.h>
#include <linux/property.h>
#include <linux/dmi.h>
#include <linux/ctype.h>
-@@ -2961,8 +2963,14 @@ EXPORT_SYMBOL(ath10k_core_stop);
- static int ath10k_core_probe_fw(struct ath10k *ar)
- {
- struct bmi_target_info target_info;
-+ const char *mac;
- int ret = 0;
-
-+#ifdef CONFIG_OF
-+ /* register the platform to be found by the of api */
-+ of_platform_device_create(ar->dev->of_node, NULL, NULL);
-+#endif
-+
- ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
- if (ret) {
- ath10k_err(ar, "could not power on hif bus (%d)\n", ret);
-@@ -3062,6 +3068,10 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
+@@ -3062,6 +3068,8 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
-+ mac = of_get_mac_address(ar->dev->of_node);
-+ if (!IS_ERR(mac))
-+ ether_addr_copy(ar->mac_addr, mac);
++ of_get_mac_address(ar->dev->of_node, ar->mac_addr);
+
ret = ath10k_core_init_firmware_features(ar);
if (ret) {