* [PATCH] wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig
@ 2025-01-16 5:43 Ping-Ke Shih
2025-01-16 5:54 ` Ping-Ke Shih
2025-01-16 10:17 ` Kalle Valo
0 siblings, 2 replies; 5+ messages in thread
From: Ping-Ke Shih @ 2025-01-16 5:43 UTC (permalink / raw)
To: kvalo, linux-wireless; +Cc: rtl8821cerfe2
When using allmodconfig, .config has CONFIG_LEDS_CLASS=m but
autoconf.h has CONFIG_LEDS_CLASS_MODULE (additional suffix _MODULE)
instead of CONFIG_LEDS_CLASS, which condition CONFIG_LEDS_CLASS in
rtw88/led.h can't work properly.
Add RTW88_LEDS to Kconfig, and use it as condition to fix this problem.
drivers/net/wireless/realtek/rtw88/led.c:19:6: error: redefinition of 'rtw_led_init'
19 | void rtw_led_init(struct rtw_dev *rtwdev)
| ^~~~~~~~~~~~
In file included from drivers/net/wireless/realtek/rtw88/led.c:7:
drivers/net/wireless/realtek/rtw88/led.h:15:20: note: previous definition of 'rtw_led_init' with type 'void(struct rtw_dev *)'
15 | static inline void rtw_led_init(struct rtw_dev *rtwdev)
| ^~~~~~~~~~~~
drivers/net/wireless/realtek/rtw88/led.c:64:6: error: redefinition of 'rtw_led_deinit'
64 | void rtw_led_deinit(struct rtw_dev *rtwdev)
| ^~~~~~~~~~~~~~
drivers/net/wireless/realtek/rtw88/led.h:19:20: note: previous definition of 'rtw_led_deinit' with type 'void(struct rtw_dev *)'
19 | static inline void rtw_led_deinit(struct rtw_dev *rtwdev)
| ^~~~~~~~~~~~~~
Fixes: 4b6652bc6d8d ("wifi: rtw88: Add support for LED blinking")
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw88/Kconfig | 5 +++++
drivers/net/wireless/realtek/rtw88/Makefile | 2 +-
drivers/net/wireless/realtek/rtw88/led.h | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/Kconfig b/drivers/net/wireless/realtek/rtw88/Kconfig
index 733b3e58da51..5828162add6f 100644
--- a/drivers/net/wireless/realtek/rtw88/Kconfig
+++ b/drivers/net/wireless/realtek/rtw88/Kconfig
@@ -238,4 +238,9 @@ config RTW88_DEBUGFS
If unsure, say Y to simplify debug problems
+config RTW88_LEDS
+ bool
+ depends on LEDS_CLASS
+ default y
+
endif
diff --git a/drivers/net/wireless/realtek/rtw88/Makefile b/drivers/net/wireless/realtek/rtw88/Makefile
index e8bad9d099a4..0cbbb366e393 100644
--- a/drivers/net/wireless/realtek/rtw88/Makefile
+++ b/drivers/net/wireless/realtek/rtw88/Makefile
@@ -20,7 +20,7 @@ rtw88_core-y += main.o \
rtw88_core-$(CONFIG_PM) += wow.o
-rtw88_core-$(CONFIG_LEDS_CLASS) += led.o
+rtw88_core-$(CONFIG_RTW88_LEDS) += led.o
obj-$(CONFIG_RTW88_8822B) += rtw88_8822b.o
rtw88_8822b-objs := rtw8822b.o rtw8822b_table.o
diff --git a/drivers/net/wireless/realtek/rtw88/led.h b/drivers/net/wireless/realtek/rtw88/led.h
index c3bb6fe49b49..fa64002b0215 100644
--- a/drivers/net/wireless/realtek/rtw88/led.h
+++ b/drivers/net/wireless/realtek/rtw88/led.h
@@ -5,7 +5,7 @@
#ifndef __RTW_LED_H
#define __RTW_LED_H
-#ifdef CONFIG_LEDS_CLASS
+#ifdef CONFIG_RTW88_LEDS
void rtw_led_init(struct rtw_dev *rtwdev);
void rtw_led_deinit(struct rtw_dev *rtwdev);
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig
2025-01-16 5:43 [PATCH] wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig Ping-Ke Shih
@ 2025-01-16 5:54 ` Ping-Ke Shih
2025-01-16 10:17 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Ping-Ke Shih @ 2025-01-16 5:54 UTC (permalink / raw)
To: kvalo@kernel.org, linux-wireless@vger.kernel.org; +Cc: rtl8821cerfe2@gmail.com
Hi Kalle,
Ping-Ke Shih <pkshih@realtek.com> wrote:
> When using allmodconfig, .config has CONFIG_LEDS_CLASS=m but
> autoconf.h has CONFIG_LEDS_CLASS_MODULE (additional suffix _MODULE)
> instead of CONFIG_LEDS_CLASS, which condition CONFIG_LEDS_CLASS in
> rtw88/led.h can't work properly.
>
> Add RTW88_LEDS to Kconfig, and use it as condition to fix this problem.
>
> drivers/net/wireless/realtek/rtw88/led.c:19:6: error: redefinition of 'rtw_led_init'
> 19 | void rtw_led_init(struct rtw_dev *rtwdev)
> | ^~~~~~~~~~~~
> In file included from drivers/net/wireless/realtek/rtw88/led.c:7:
> drivers/net/wireless/realtek/rtw88/led.h:15:20: note: previous definition of 'rtw_led_init' with type
> 'void(struct rtw_dev *)'
> 15 | static inline void rtw_led_init(struct rtw_dev *rtwdev)
> | ^~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw88/led.c:64:6: error: redefinition of 'rtw_led_deinit'
> 64 | void rtw_led_deinit(struct rtw_dev *rtwdev)
> | ^~~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw88/led.h:19:20: note: previous definition of 'rtw_led_deinit' with type
> 'void(struct rtw_dev *)'
> 19 | static inline void rtw_led_deinit(struct rtw_dev *rtwdev)
> | ^~~~~~~~~~~~~~
>
> Fixes: 4b6652bc6d8d ("wifi: rtw88: Add support for LED blinking")
If this patch is good to you, please take it to wireless-next to fix the
problem caused by Commit 4b6652bc6d8d.
Assigned to you in patchwork. Thanks.
Ping-Ke
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig
2025-01-16 5:43 [PATCH] wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig Ping-Ke Shih
2025-01-16 5:54 ` Ping-Ke Shih
@ 2025-01-16 10:17 ` Kalle Valo
2025-01-16 12:06 ` Ping-Ke Shih
1 sibling, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2025-01-16 10:17 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: linux-wireless, rtl8821cerfe2, Stephen Rothwell
+ stephen
Ping-Ke Shih <pkshih@realtek.com> writes:
> When using allmodconfig, .config has CONFIG_LEDS_CLASS=m but
> autoconf.h has CONFIG_LEDS_CLASS_MODULE (additional suffix _MODULE)
> instead of CONFIG_LEDS_CLASS, which condition CONFIG_LEDS_CLASS in
> rtw88/led.h can't work properly.
>
> Add RTW88_LEDS to Kconfig, and use it as condition to fix this problem.
>
> drivers/net/wireless/realtek/rtw88/led.c:19:6: error: redefinition of 'rtw_led_init'
> 19 | void rtw_led_init(struct rtw_dev *rtwdev)
> | ^~~~~~~~~~~~
> In file included from drivers/net/wireless/realtek/rtw88/led.c:7:
> drivers/net/wireless/realtek/rtw88/led.h:15:20: note: previous
> definition of 'rtw_led_init' with type 'void(struct rtw_dev *)'
> 15 | static inline void rtw_led_init(struct rtw_dev *rtwdev)
> | ^~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw88/led.c:64:6: error: redefinition of 'rtw_led_deinit'
> 64 | void rtw_led_deinit(struct rtw_dev *rtwdev)
> | ^~~~~~~~~~~~~~
> drivers/net/wireless/realtek/rtw88/led.h:19:20: note: previous
> definition of 'rtw_led_deinit' with type 'void(struct rtw_dev *)'
> 19 | static inline void rtw_led_deinit(struct rtw_dev *rtwdev)
> | ^~~~~~~~~~~~~~
>
> Fixes: 4b6652bc6d8d ("wifi: rtw88: Add support for LED blinking")
> Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Maybe add Reported-by and Closes pointing to Stephen's report?
> --- a/drivers/net/wireless/realtek/rtw88/Kconfig
> +++ b/drivers/net/wireless/realtek/rtw88/Kconfig
> @@ -238,4 +238,9 @@ config RTW88_DEBUGFS
>
> If unsure, say Y to simplify debug problems
>
> +config RTW88_LEDS
> + bool
> + depends on LEDS_CLASS
> + default y
> +
> endif
As led.c uses ieee80211_create_tpt_led_trigger() should we depend on
mac80211? For example ath10k has:
config ATH10K_LEDS
bool
depends on ATH10K
depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
default y
I can't recall the details but I suspect that's handling the case where
one of the modules is 'm' and other one 'y' (or something like that).
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig
2025-01-16 10:17 ` Kalle Valo
@ 2025-01-16 12:06 ` Ping-Ke Shih
2025-01-16 12:21 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Ping-Ke Shih @ 2025-01-16 12:06 UTC (permalink / raw)
To: Kalle Valo
Cc: linux-wireless@vger.kernel.org, rtl8821cerfe2@gmail.com,
Stephen Rothwell
Kalle Valo <kvalo@kernel.org> wrote:
> + stephen
>
> Ping-Ke Shih <pkshih@realtek.com> writes:
>
> > When using allmodconfig, .config has CONFIG_LEDS_CLASS=m but
> > autoconf.h has CONFIG_LEDS_CLASS_MODULE (additional suffix _MODULE)
> > instead of CONFIG_LEDS_CLASS, which condition CONFIG_LEDS_CLASS in
> > rtw88/led.h can't work properly.
> >
> > Add RTW88_LEDS to Kconfig, and use it as condition to fix this problem.
> >
> > drivers/net/wireless/realtek/rtw88/led.c:19:6: error: redefinition of 'rtw_led_init'
> > 19 | void rtw_led_init(struct rtw_dev *rtwdev)
> > | ^~~~~~~~~~~~
> > In file included from drivers/net/wireless/realtek/rtw88/led.c:7:
> > drivers/net/wireless/realtek/rtw88/led.h:15:20: note: previous
> > definition of 'rtw_led_init' with type 'void(struct rtw_dev *)'
> > 15 | static inline void rtw_led_init(struct rtw_dev *rtwdev)
> > | ^~~~~~~~~~~~
> > drivers/net/wireless/realtek/rtw88/led.c:64:6: error: redefinition of 'rtw_led_deinit'
> > 64 | void rtw_led_deinit(struct rtw_dev *rtwdev)
> > | ^~~~~~~~~~~~~~
> > drivers/net/wireless/realtek/rtw88/led.h:19:20: note: previous
> > definition of 'rtw_led_deinit' with type 'void(struct rtw_dev *)'
> > 19 | static inline void rtw_led_deinit(struct rtw_dev *rtwdev)
> > | ^~~~~~~~~~~~~~
> >
> > Fixes: 4b6652bc6d8d ("wifi: rtw88: Add support for LED blinking")
> > Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
>
> Maybe add Reported-by and Closes pointing to Stephen's report?
add these by v2.
>
> > --- a/drivers/net/wireless/realtek/rtw88/Kconfig
> > +++ b/drivers/net/wireless/realtek/rtw88/Kconfig
> > @@ -238,4 +238,9 @@ config RTW88_DEBUGFS
> >
> > If unsure, say Y to simplify debug problems
> >
> > +config RTW88_LEDS
> > + bool
> > + depends on LEDS_CLASS
> > + default y
> > +
> > endif
>
> As led.c uses ieee80211_create_tpt_led_trigger() should we depend on
> mac80211? For example ath10k has:
>
> config ATH10K_LEDS
> bool
> depends on ATH10K
Kconfig of rtw89 uses a big 'if RTW88', so I will not add 'depdens on RTW88'.
> depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
> default y
>
> I can't recall the details but I suspect that's handling the case where
> one of the modules is 'm' and other one 'y' (or something like that).
>
Since ieee80211_create_tpt_led_trigger() depends on CONFIG_MAC80211_LEDS,
which looks like
config MAC80211_LEDS
bool "Enable LED triggers"
depends on MAC80211
depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
So I will imitate ath10k to use 'depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211'
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig
2025-01-16 12:06 ` Ping-Ke Shih
@ 2025-01-16 12:21 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2025-01-16 12:21 UTC (permalink / raw)
To: Ping-Ke Shih
Cc: linux-wireless@vger.kernel.org, rtl8821cerfe2@gmail.com,
Stephen Rothwell
Ping-Ke Shih <pkshih@realtek.com> writes:
> Kalle Valo <kvalo@kernel.org> wrote:
>
>> + stephen
>>
>> Ping-Ke Shih <pkshih@realtek.com> writes:
>>
>> > When using allmodconfig, .config has CONFIG_LEDS_CLASS=m but
>> > autoconf.h has CONFIG_LEDS_CLASS_MODULE (additional suffix _MODULE)
>> > instead of CONFIG_LEDS_CLASS, which condition CONFIG_LEDS_CLASS in
>> > rtw88/led.h can't work properly.
>> >
>> > Add RTW88_LEDS to Kconfig, and use it as condition to fix this problem.
>> >
>> > drivers/net/wireless/realtek/rtw88/led.c:19:6: error: redefinition of 'rtw_led_init'
>> > 19 | void rtw_led_init(struct rtw_dev *rtwdev)
>> > | ^~~~~~~~~~~~
>> > In file included from drivers/net/wireless/realtek/rtw88/led.c:7:
>> > drivers/net/wireless/realtek/rtw88/led.h:15:20: note: previous
>> > definition of 'rtw_led_init' with type 'void(struct rtw_dev *)'
>> > 15 | static inline void rtw_led_init(struct rtw_dev *rtwdev)
>> > | ^~~~~~~~~~~~
>> > drivers/net/wireless/realtek/rtw88/led.c:64:6: error: redefinition of 'rtw_led_deinit'
>> > 64 | void rtw_led_deinit(struct rtw_dev *rtwdev)
>> > | ^~~~~~~~~~~~~~
>> > drivers/net/wireless/realtek/rtw88/led.h:19:20: note: previous
>> > definition of 'rtw_led_deinit' with type 'void(struct rtw_dev *)'
>> > 19 | static inline void rtw_led_deinit(struct rtw_dev *rtwdev)
>> > | ^~~~~~~~~~~~~~
>> >
>> > Fixes: 4b6652bc6d8d ("wifi: rtw88: Add support for LED blinking")
>> > Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>
>> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
>>
>> Maybe add Reported-by and Closes pointing to Stephen's report?
>
> add these by v2.
Thanks.
>> > --- a/drivers/net/wireless/realtek/rtw88/Kconfig
>> > +++ b/drivers/net/wireless/realtek/rtw88/Kconfig
>> > @@ -238,4 +238,9 @@ config RTW88_DEBUGFS
>> >
>> > If unsure, say Y to simplify debug problems
>> >
>> > +config RTW88_LEDS
>> > + bool
>> > + depends on LEDS_CLASS
>> > + default y
>> > +
>> > endif
>>
>> As led.c uses ieee80211_create_tpt_led_trigger() should we depend on
>> mac80211? For example ath10k has:
>>
>> config ATH10K_LEDS
>> bool
>> depends on ATH10K
>
> Kconfig of rtw89 uses a big 'if RTW88', so I will not add 'depdens on
> RTW88'.
Ok.
>
>> depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
>> default y
>>
>> I can't recall the details but I suspect that's handling the case where
>> one of the modules is 'm' and other one 'y' (or something like that).
>>
>
> Since ieee80211_create_tpt_led_trigger() depends on CONFIG_MAC80211_LEDS,
> which looks like
>
> config MAC80211_LEDS
> bool "Enable LED triggers"
> depends on MAC80211
> depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
>
> So I will imitate ath10k to use 'depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211'
Thanks. I think the leds stuff is number one cause of build failures in
wireless so this is always tricky, let's hope this works.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-16 12:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16 5:43 [PATCH] wifi: rtw88: add RTW88_LEDS depends on LEDS_CLASS to Kconfig Ping-Ke Shih
2025-01-16 5:54 ` Ping-Ke Shih
2025-01-16 10:17 ` Kalle Valo
2025-01-16 12:06 ` Ping-Ke Shih
2025-01-16 12:21 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).