mt76: enable MAC80211_LEDS by default
Subsystems (2)
PATCH 1/1 mt76: enable MAC80211_LEDS by default
In reply to a message not in the archiveSelect 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!
--- drivers/net/wireless/mediatek/mt76/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/wireless/mediatek/mt76/Kconfig +3 -0
@@ -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
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
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_LEDSShould 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
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_LEDSShould 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 onLEDS_CLASS'. I think the latter is what we should have here for all those drivers.
MAC80211_LEDSlooks 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
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_LEDSShould 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 onLEDS_CLASS'. I think the latter is what we should have here for all those drivers.
MAC80211_LEDSlooks 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 fromKconfigand let userspace selects the option. I would use select forLEDS_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
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_LEDSShould 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 onLEDS_CLASS'. I think the latter is what we should have here for all those drivers.
MAC80211_LEDSlooks 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 fromKconfigand let userspace selects the option. I would use select forLEDS_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_LEDSsymbol 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