1
0

975-ath10k-use-tpt-trigger-by-default.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 79c9d7aabae1d1da9eea97d83b61e1517a8a2221 Mon Sep 17 00:00:00 2001
  2. From: Mathias Kresin <dev@kresin.me>
  3. Date: Fri, 22 Jun 2018 18:59:44 +0200
  4. Subject: [PATCH] ath10k: use tpt LED trigger by default
  5. Use the tpt LED trigger for each created phy led. Ths way LEDs attached
  6. to the ath10k GPIO pins are indicating the phy status and blink on
  7. traffic.
  8. Signed-off-by: Mathias Kresin <dev@kresin.me>
  9. ---
  10. drivers/net/wireless/ath/ath10k/core.h | 4 ++++
  11. drivers/net/wireless/ath/ath10k/leds.c | 4 +---
  12. drivers/net/wireless/ath/ath10k/mac.c | 2 +-
  13. 3 files changed, 6 insertions(+), 4 deletions(-)
  14. --- a/drivers/net/wireless/ath/ath10k/core.h
  15. +++ b/drivers/net/wireless/ath/ath10k/core.h
  16. @@ -1309,6 +1309,10 @@ struct ath10k {
  17. s32 tx_power_2g_limit;
  18. s32 tx_power_5g_limit;
  19. +#ifdef CPTCFG_MAC80211_LEDS
  20. + const char *led_default_trigger;
  21. +#endif
  22. +
  23. /* must be last */
  24. u8 drv_priv[] __aligned(sizeof(void *));
  25. };
  26. --- a/drivers/net/wireless/ath/ath10k/leds.c
  27. +++ b/drivers/net/wireless/ath/ath10k/leds.c
  28. @@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k *
  29. ar->leds.cdev.name = ar->leds.label;
  30. ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking;
  31. -
  32. - /* FIXME: this assignment doesn't make sense as it's NULL, remove it? */
  33. - ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger;
  34. + ar->leds.cdev.default_trigger = ar->led_default_trigger;
  35. ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
  36. if (ret)
  37. --- a/drivers/net/wireless/ath/ath10k/mac.c
  38. +++ b/drivers/net/wireless/ath/ath10k/mac.c
  39. @@ -10284,7 +10284,7 @@ int ath10k_mac_register(struct ath10k *a
  40. ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
  41. #ifdef CPTCFG_MAC80211_LEDS
  42. - ieee80211_create_tpt_led_trigger(ar->hw,
  43. + ar->led_default_trigger = ieee80211_create_tpt_led_trigger(ar->hw,
  44. IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink,
  45. ARRAY_SIZE(ath10k_tpt_blink));
  46. #endif