mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Ping-Ke Shih" <pkshih@realtek.com>,
	"Arnd Bergmann" <arnd@kernel.org>,
	"Johnson Tsai" <wenjie.tsai@realtek.com>
Cc: "rtl8821cerfe2@gmail.com" <rtl8821cerfe2@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] wifi: rtw89: fix LED dependencies
Date: Fri, 02 Oct 2026 08:11:58 +0200	[thread overview]
Message-ID: <7cdc36a9-aadd-4636-8a29-847d89638c8d@app.fastmail.com> (raw)
In-Reply-To: <bdb19ff5e0bc456cb035a1aa0124612f@realtek.com>

On Fri, Oct 2, 2026, at 02:22, Ping-Ke Shih wrote:
> Arnd Bergmann <arnd@arndb.de> wrote:
>> On Wed, Sep 30, 2026, at 02:28, Ping-Ke Shih wrote:
>> - we already have a mix of 'depends on' and 'select'
>>   for the LED support, which can lead to circular dependencies
>>   and other problems. Adding a third way can only make it
>>   worse.
>> 
>
> Agree. I'll remove these two discouraged 'imply'. 

Ok, thanks!

>> The way this was meant to be used is to have
>> 
>> config RTW89_LEDS
>>       def_bool RTW89_CORE && MAC80211_LEDS
>> 
>
> I'd keep first block as
>
>         depends on LEDS_CLASS=y || LEDS_CLASS=MAC80211
>
> mac80211 implements ieee80211_get_assoc_led_name() used by this driver as
>
>   static inline const char *ieee80211_get_assoc_led_name(struct 
> ieee80211_hw *hw)
>   {
>   #ifdef CONFIG_MAC80211_LEDS
> 	  return __ieee80211_get_assoc_led_name(hw);
>   #else
> 	  return NULL;
>   #endif
>   }
>
> That means if CONFIG_MAC80211_LEDS wasn't defined, driver can still use
> ieee80211_get_assoc_led_name() as default trigger, but just NULL.
> More, use space can adjust LED trigger via sysfs, so having LED support
> is still usable if LEDS_CLASS exists.

Right, this should work and is consistent with how other wireless
drivers do this.

I think it would be nicer to just use MAC80211_LEDS as a simple
dependency as I suggested above. If we do that, it should
be done the same way for all the wireless drivers, but that
is a probably something for another day.

       Arnd

      reply	other threads:[~2026-10-02  6:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 10:41 Arnd Bergmann
2026-09-30  0:28 ` Ping-Ke Shih
2026-09-30  7:52   ` Arnd Bergmann
2026-10-02  0:22     ` Ping-Ke Shih
2026-10-02  6:11       ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cdc36a9-aadd-4636-8a29-847d89638c8d@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=rtl8821cerfe2@gmail.com \
    --cc=wenjie.tsai@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®