Skip to contentSkip to conversation

mt76: enable MAC80211_LEDS by default

PATCH In review Lorenzo Bianconi 3 participants 6 messages Mar 16, 2018 – Mar 22, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 mt76: enable MAC80211_LEDS by default

In reply to a message not in the archive

Select mac80211 led support by default in order to fix the following compilation error that occurs when CONFIG_LEDS_CLASS/CONFIG_MAC80211_LEDS options are not enabled on the system

ERROR: "devm_of_led_classdev_register" undefined!

Fixes 17f1de56df05 ("mt76: add common code shared between multiple chipsets")
---
 drivers/net/wireless/mediatek/mt76/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/mediatek/mt76/Kconfig +3 -0
index fc05d79c80d0..0bbd492c2c2b 100644
@@ -1,5 +1,8 @@
 config MT76_CORE
 	tristate
+	select MAC80211_LEDS
+	select LEDS_CLASS
+	select NEW_LEDS
 
 config MT76x2E
 	tristate "MediaTek MT76x2E (PCIe) support"
Signature · 1 line
2.14.3
#2 lore raw

drivers/net/wireless/mediatek/mt76/Kconfig line 3

Quoted 6 lines · Lorenzo Bianconi
drivers/net/wireless/mediatek/mt76/Kconfig +1 -0
@@ -1,5 +1,8 @@
 config MT76_CORE
 	tristate
+	select MAC80211_LEDS

Should drivers really mess with mac80211's configuration that way? I believe this is a user-visible config, no?

johannes

#3 lore raw
Quoted 10 lines · Johannes Berg

drivers/net/wireless/mediatek/mt76/Kconfig line 3

Quoted 6 lines · Lorenzo Bianconi
drivers/net/wireless/mediatek/mt76/Kconfig +1 -0
@@ -1,5 +1,8 @@
 config MT76_CORE
      tristate
+     select MAC80211_LEDS

Should drivers really mess with mac80211's configuration that way? I believe this is a user-visible config, no?

We have a couple of drivers using 'select LEDS_CLASS' and others doing 'depends on LEDS_CLASS'. I think the latter is what we should have here for all those drivers.

MAC80211_LEDS looks like it's designed to be optional, so nothing should select or depend on that.

Arnd

#4 lore raw
Quoted 13 lines · Arnd Bergmann
Quoted 10 lines · Johannes Berg

drivers/net/wireless/mediatek/mt76/Kconfig line 3

Quoted 6 lines · Lorenzo Bianconi
drivers/net/wireless/mediatek/mt76/Kconfig +1 -0
@@ -1,5 +1,8 @@
 config MT76_CORE
      tristate
+     select MAC80211_LEDS

Should drivers really mess with mac80211's configuration that way? I believe this is a user-visible config, no?

Quoted 8 lines

We have a couple of drivers using 'select LEDS_CLASS' and others doing 'depends on LEDS_CLASS'. I think the latter is what we should have here for all those drivers.

MAC80211_LEDS looks like it's designed to be optional, so nothing should select or depend on that.

Arnd

Reviewing the current code we do not actually need MAC80211_LEDS, so I agree to remove it from Kconfig and let userspace selects the option. I would use select for LEDS_CLASS. If you agree I can send a v2 otherwise I fine to apply Arnd's patch.
Felix what do you think?

Regards,
Lorenzo

#5 lore raw
Quoted 22 lines · On Wed, Mar 21, 2018, 23:27 Lorenzo Bianconi <[email protected]>…
Quoted 20 lines · Arnd Bergmann
Quoted 10 lines · Johannes Berg

drivers/net/wireless/mediatek/mt76/Kconfig line 3

Quoted 6 lines · Lorenzo Bianconi
drivers/net/wireless/mediatek/mt76/Kconfig +1 -0
@@ -1,5 +1,8 @@
 config MT76_CORE
      tristate
+     select MAC80211_LEDS

Should drivers really mess with mac80211's configuration that way? I believe this is a user-visible config, no?

We have a couple of drivers using 'select LEDS_CLASS' and others doing 'depends on LEDS_CLASS'. I think the latter is what we should have here for all those drivers.

MAC80211_LEDS looks like it's designed to be optional, so nothing should select or depend on that.

Quoted 7 lines
Quoted 1 line

Arnd

Reviewing the current code we do not actually need MAC80211_LEDS, so I agree to remove it from Kconfig and let userspace selects the option. I would use select for LEDS_CLASS. If you agree I can send a v2 otherwise I fine to apply Arnd's patch.
Felix what do you think?

Looking at mt76 again, my impression is that the core driver should not have an dependency on LEDS at all, the dependency should instead be restricted to the CONFIG_MT76_LEDS symbol as my patch from January did (with the change to 'default y').

Arnd

#6 lore raw
Quoted 32 lines · Arnd Bergmann
Quoted 22 lines · On Wed, Mar 21, 2018, 23:27 Lorenzo Bianconi <[email protected]>…
Quoted 20 lines · Arnd Bergmann
Quoted 10 lines · Johannes Berg

drivers/net/wireless/mediatek/mt76/Kconfig line 3

Quoted 6 lines · Lorenzo Bianconi
drivers/net/wireless/mediatek/mt76/Kconfig +1 -0
@@ -1,5 +1,8 @@
 config MT76_CORE
      tristate
+     select MAC80211_LEDS

Should drivers really mess with mac80211's configuration that way? I believe this is a user-visible config, no?

We have a couple of drivers using 'select LEDS_CLASS' and others doing 'depends on LEDS_CLASS'. I think the latter is what we should have here for all those drivers.

MAC80211_LEDS looks like it's designed to be optional, so nothing should select or depend on that.

Quoted 7 lines
Quoted 1 line

Arnd

Reviewing the current code we do not actually need MAC80211_LEDS, so I agree to remove it from Kconfig and let userspace selects the option. I would use select for LEDS_CLASS. If you agree I can send a v2 otherwise I fine to apply Arnd's patch.
Felix what do you think?

Quoted 6 lines

Looking at mt76 again, my impression is that the core driver should not have an dependency on LEDS at all, the dependency should instead be restricted to the CONFIG_MT76_LEDS symbol as my patch from January did (with the change to 'default y').

Arnd

I agree.
Fell free to add Acked-by: Lorenzo Bianconi <[email protected]>

Regards,
Lorenzo