bianbu-linux-6.6/drivers/net/wireless/intel/iwlegacy
Arnd Bergmann efdbfa0ad0 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
2021-12-08 20:17:06 +02:00
..
3945-debug.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 183 2019-05-30 11:29:20 -07:00
3945-mac.c wireless: Remove redundant 'flush_workqueue()' calls 2021-10-13 09:22:19 +03:00
3945-rs.c iwlegacy: 3945-rs: Remove all non-conformant kernel-doc headers 2020-09-01 16:05:02 +03:00
3945.c intel: switch from 'pci_' to 'dma_' API 2021-08-29 14:47:21 +03:00
3945.h wireless-drivers-next patches for 5.3 2019-06-26 10:12:17 -07:00
4965-calib.c iwlegacy: 4965-calib: Demote seemingly accidental kernel-doc header 2020-09-01 12:22:42 +03:00
4965-debug.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 183 2019-05-30 11:29:20 -07:00
4965-mac.c wireless: Remove redundant 'flush_workqueue()' calls 2021-10-13 09:22:19 +03:00
4965-rs.c iwlegacy: 4965-rs: Demote non kernel-doc headers to standard comment blocks 2020-09-01 12:22:41 +03:00
4965.c iwlegacy: 4965: Demote a bunch of nonconformant kernel-doc headers 2020-09-01 12:06:16 +03:00
4965.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 183 2019-05-30 11:29:20 -07:00
commands.h treewide: Replace open-coded flex arrays in unions 2021-10-18 12:28:53 -07:00
common.c intel: switch from 'pci_' to 'dma_' API 2021-08-29 14:47:21 +03:00
common.h iwlegacy: avoid -Wempty-body warning 2021-04-11 12:31:01 +03:00
csr.h
debug.c iwlegacy: debug: Demote seemingly unintentional kerneldoc header 2020-09-01 12:02:40 +03:00
iwl-spectrum.h iwlegacy: Replace zero-length array with flexible-array 2020-05-12 11:54:47 +03:00
Kconfig iwlwifi: fix LED dependencies 2021-12-08 20:17:06 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
prph.h