Skip to content

Commit efdbfa0

Browse files
arndbKalle Valo
authored andcommitted
iwlwifi: fix LED dependencies
The dependencies for LED configuration are highly inconsistent and too complicated at the moment. One of the results is a randconfig failure I get very rarely when LEDS_CLASS is in a loadable module, but the wireless core is built-in: WARNING: unmet direct dependencies detected for MAC80211_LEDS Depends on [n]: NET [=y] && WIRELESS [=y] && MAC80211 [=y] && (LEDS_CLASS [=m]=y || LEDS_CLASS [=m]=MAC80211 [=y]) Selected by [m]: - IWLEGACY [=m] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_INTEL [=y] - IWLWIFI_LEDS [=y] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_INTEL [=y] && IWLWIFI [=m] && (LEDS_CLASS [=m]=y || LEDS_CLASS [=m]=IWLWIFI [=m]) && (IWLMVM [=m] || IWLDVM [=m]) aarch64-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function `ath5k_register_led': led.c:(.text+0x60): undefined reference to `led_classdev_register_ext' aarch64-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function `ath5k_unregister_leds': led.c:(.text+0x200): undefined reference to `led_classdev_unregister' For iwlwifi, the dependency is wrong, since this config prevents the MAC80211_LEDS code from being part of a built-in MAC80211 driver. For iwlegacy, this is worse because the driver tries to force-enable the other subsystems, which is both a layering violation and a bug because it will still fail with MAC80211=y and IWLEGACY=m, leading to LEDS_CLASS being a module as well. The actual link failure in the ath5k driver is a result of MAC80211_LEDS being enabled but not usable. With the Kconfig logic fixed in the Intel drivers, the ath5k driver works as expected again. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20211204173848.873293-1-arnd@kernel.org
1 parent d599f71 commit efdbfa0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/wireless/intel/iwlegacy/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
config IWLEGACY
33
tristate
44
select FW_LOADER
5-
select NEW_LEDS
6-
select LEDS_CLASS
75
select LEDS_TRIGGERS
86
select MAC80211_LEDS
97

108
config IWL4965
119
tristate "Intel Wireless WiFi 4965AGN (iwl4965)"
1210
depends on PCI && MAC80211
11+
depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
1312
select IWLEGACY
1413
help
1514
This option enables support for
@@ -38,6 +37,7 @@ config IWL4965
3837
config IWL3945
3938
tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)"
4039
depends on PCI && MAC80211
40+
depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
4141
select IWLEGACY
4242
help
4343
Select to build the driver supporting the:

drivers/net/wireless/intel/iwlwifi/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if IWLWIFI
4747

4848
config IWLWIFI_LEDS
4949
bool
50-
depends on LEDS_CLASS=y || LEDS_CLASS=IWLWIFI
50+
depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
5151
depends on IWLMVM || IWLDVM
5252
select LEDS_TRIGGERS
5353
select MAC80211_LEDS

0 commit comments

Comments
 (0)