WIFI Leds on R7800 (18.06.x)

Today I received my new R7800. Flashed 18.06.2 on it. Works as expected. Only downside is that the two wifi leds (2.4 and 5 GHz) aren't working. There is no configuration for them in Luci.

I found this post which deals with this topic.
R7800 - No Wi-fi LEDs in OpenWrt 18.06.0-rc2 r7141
However, as I'm a noob, I don't completely understand what the problem is and possible solution.

Is there a simple way to get them working or should i just wait for the next release (18.06.3 or 19.07)?

Have you tried snapshot already instead of 18.06.2?

The LED for ath10k was introduced after the 18.06 branching and has not been backported from master to 18.06. You need to patch the source code and compile OpenWrt.
(or you could flash my R7800 community build, which includes the necessary patch)

The needed patch for 18.06 that patches several source code files is:

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index f091199864..3fe9e569be 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -75,6 +75,7 @@ PKG_CONFIG_DEPENDS:= \
 	CONFIG_PACKAGE_RTLWIFI_DEBUG \
 	CONFIG_ATH9K_SUPPORT_PCOEM \
 	CONFIG_ATH9K_TX99 \
+	CONFIG_ATH10K_LEDS \
 	CONFIG_ATH_USER_REGD \
 
 include $(INCLUDE_DIR)/package.mk
@@ -350,6 +351,14 @@ Atheros IEEE 802.11ac family of chipsets. For now only
 PCI is supported.
 endef
 
+define KernelPackage/ath10k/config
+
+	config ATH10K_LEDS
+		bool "Enable LED support"
+		default y
+		depends on PACKAGE_kmod-ath10k
+endef
+
 #Broadcom firmware
 ifneq ($(CONFIG_B43_FW_6_30),)
   PKG_B43_FWV4_NAME:=broadcom-wl
@@ -1636,6 +1645,7 @@ config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD
 config-$(CONFIG_ATH9K_SUPPORT_PCOEM) += ATH9K_PCOEM
 config-$(CONFIG_ATH9K_TX99) += ATH9K_TX99
 config-$(CONFIG_ATH9K_UBNTHSR) += ATH9K_UBNTHSR
+config-$(CONFIG_ATH10K_LEDS) += ATH10K_LEDS
 
 config-$(call config_package,ath9k-htc) += ATH9K_HTC
 config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
diff --git a/package/kernel/mac80211/patches/975-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/mac80211/patches/975-ath10k-use-tpt-trigger-by-default.patch
new file mode 100644
index 0000000000..2b34b70661
--- /dev/null
+++ b/package/kernel/mac80211/patches/975-ath10k-use-tpt-trigger-by-default.patch
@@ -0,0 +1,53 @@
+From 79c9d7aabae1d1da9eea97d83b61e1517a8a2221 Mon Sep 17 00:00:00 2001
+From: Mathias Kresin <dev@kresin.me>
+Date: Fri, 22 Jun 2018 18:59:44 +0200
+Subject: [PATCH] ath10k: use tpt LED trigger by default
+
+Use the tpt LED trigger for each created phy led. Ths way LEDs attached
+to the ath10k GPIO pins are indicating the phy status and blink on
+traffic.
+
+Signed-off-by: Mathias Kresin <dev@kresin.me>
+---
+ drivers/net/wireless/ath/ath10k/core.h | 4 ++++
+ drivers/net/wireless/ath/ath10k/leds.c | 4 +---
+ drivers/net/wireless/ath/ath10k/mac.c  | 2 +-
+ 3 files changed, 6 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath10k/core.h
++++ b/drivers/net/wireless/ath/ath10k/core.h
+@@ -1010,6 +1010,10 @@ struct ath10k {
+ 
+ 	void *ce_priv;
+ 
++#ifdef CPTCFG_MAC80211_LEDS
++	const char *led_default_trigger;
++#endif
++
+ 	/* must be last */
+ 	u8 drv_priv[0] __aligned(sizeof(void *));
+ };
+--- a/drivers/net/wireless/ath/ath10k/leds.c
++++ b/drivers/net/wireless/ath/ath10k/leds.c
+@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k *
+ 
+ 	ar->leds.cdev.name = ar->leds.label;
+ 	ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking;
+-
+-	/* FIXME: this assignment doesn't make sense as it's NULL, remove it? */
+-	ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger;
++	ar->leds.cdev.default_trigger = ar->led_default_trigger;
+ 
+ 	ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
+ 	if (ret)
+--- a/drivers/net/wireless/ath/ath10k/mac.c
++++ b/drivers/net/wireless/ath/ath10k/mac.c
+@@ -8366,7 +8366,7 @@ int ath10k_mac_register(struct ath10k *a
+ 	wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
+ 
+ #ifdef CPTCFG_MAC80211_LEDS
+-	ieee80211_create_tpt_led_trigger(ar->hw,
++	ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw,
+ 		IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink,
+ 		ARRAY_SIZE(ath10k_tpt_blink));
+ #endif

Or alternatively you can follow the alternative advice from me found in the other thread that you referenced. But also that requires patching and compiling.

Since Jack calls himself a noob, I think this would be the easiest solution for him.

@tmomas and @hnyman; thanks for your suggestions but as i stated "i'm a noob" on this. Compiling my own build is at this point in time a bridge to far.
I will however try the @hnyman community build.

To upgrade from the current 18.06.2 to 19.07 I would need this file as it is an upgrade?

R7800-owrt1907-r10225-94a1999b4f-20190626-2251-s…s-sysupgrade.bin

If i decided, for what ever reason, to go back to 18.06.2 stable, is that possible?

Please use the 18.06 build for now.
The whole 19.07 is still under initial branch launch...

That is the correct file. "Sysupgrade"
And you can go back to 18.06.2 easily.

1 Like

@hnyman Thanks for your advice. I will flash the 18.06 version.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.