linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rtl8188eu: Add rtw_led_enable module parameter
@ 2020-02-29 19:01 Bastien Nocera
  2020-03-12 13:38 ` Kalle Valo
       [not found] ` <20200312133800.096EDC433CB@smtp.codeaurora.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Bastien Nocera @ 2020-02-29 19:01 UTC (permalink / raw)
  To: linux-wireless; +Cc: Larry Finger

Make it possible to disable the LED, as it can be pretty annoying
depending on where it's located.

See also https://github.com/lwfinger/rtl8188eu/pull/304 for the
out-of-tree version.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
---

Changes since v1:
- added snippet about the out-of-tree version
- resend

 drivers/staging/rtl8188eu/core/rtw_led.c      | 6 ++++++
 drivers/staging/rtl8188eu/include/drv_types.h | 2 ++
 drivers/staging/rtl8188eu/os_dep/os_intfs.c   | 5 +++++
 3 files changed, 13 insertions(+)

diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c
b/drivers/staging/rtl8188eu/core/rtw_led.c
index d1406cc99768..75a859accb7e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_led.c
+++ b/drivers/staging/rtl8188eu/core/rtw_led.c
@@ -467,10 +467,16 @@ void blink_handler(struct LED_871x *pLed)
 
 void led_control_8188eu(struct adapter *padapter, enum LED_CTL_MODE
LedAction)
 {
+	struct registry_priv *registry_par;
+
 	if (padapter->bSurpriseRemoved || padapter->bDriverStopped ||
 	    !padapter->hw_init_completed)
 		return;
 
+	registry_par = &padapter->registrypriv;
+	if (!registry_par->led_enable)
+		return;
+
 	if ((padapter->pwrctrlpriv.rf_pwrstate != rf_on &&
 	     padapter->pwrctrlpriv.rfoff_reason > RF_CHANGE_BY_PS) &&
 	    (LedAction == LED_CTL_TX || LedAction == LED_CTL_RX ||
diff --git a/drivers/staging/rtl8188eu/include/drv_types.h
b/drivers/staging/rtl8188eu/include/drv_types.h
index 35c0946bc65d..4ca828141d3f 100644
--- a/drivers/staging/rtl8188eu/include/drv_types.h
+++ b/drivers/staging/rtl8188eu/include/drv_types.h
@@ -67,6 +67,8 @@ struct registry_priv {
 	u8	wmm_enable;
 	u8	uapsd_enable;
 
+	u8	led_enable;
+
 	struct wlan_bssid_ex    dev_network;
 
 	u8	ht_enable;
diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index 8907bf6bb7ff..ba55ae741215 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -47,6 +47,8 @@ static int rtw_acm_method;/*  0:By SW 1:By HW. */
 static int rtw_wmm_enable = 1;/*  default is set to enable the wmm. */
 static int rtw_uapsd_enable;
 
+static int rtw_led_enable = 1;
+
 static int rtw_ht_enable = 1;
 /* 0 :disable, bit(0): enable 2.4g, bit(1): enable 5g */
 static int rtw_cbw40_enable = 3;
@@ -98,6 +100,7 @@ module_param(rtw_channel, int, 0644);
 module_param(rtw_wmm_enable, int, 0644);
 module_param(rtw_vrtl_carrier_sense, int, 0644);
 module_param(rtw_vcs_type, int, 0644);
+module_param(rtw_led_enable, int, 0644);
 module_param(rtw_ht_enable, int, 0644);
 module_param(rtw_cbw40_enable, int, 0644);
 module_param(rtw_ampdu_enable, int, 0644);
@@ -162,6 +165,8 @@ static void loadparam(struct adapter *padapter,
struct net_device *pnetdev)
 	registry_par->wmm_enable = (u8)rtw_wmm_enable;
 	registry_par->uapsd_enable = (u8)rtw_uapsd_enable;
 
+	registry_par->led_enable = (u8)rtw_led_enable;
+
 	registry_par->ht_enable = (u8)rtw_ht_enable;
 	registry_par->cbw40_enable = (u8)rtw_cbw40_enable;
 	registry_par->ampdu_enable = (u8)rtw_ampdu_enable;


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] rtl8188eu: Add rtw_led_enable module parameter
  2020-02-29 19:01 [PATCH v2] rtl8188eu: Add rtw_led_enable module parameter Bastien Nocera
@ 2020-03-12 13:38 ` Kalle Valo
       [not found] ` <20200312133800.096EDC433CB@smtp.codeaurora.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2020-03-12 13:38 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: linux-wireless, Larry Finger

Bastien Nocera <hadess@hadess.net> wrote:

> Make it possible to disable the LED, as it can be pretty annoying
> depending on where it's located.
> 
> See also https://github.com/lwfinger/rtl8188eu/pull/304 for the
> out-of-tree version.
> 
> Signed-off-by: Bastien Nocera <hadess@hadess.net>

Please use "staging: " prefix for staging patches, easier for me to filter that
way.

-- 
https://patchwork.kernel.org/patch/11413973/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] rtl8188eu: Add rtw_led_enable module parameter
       [not found] ` <20200312133800.096EDC433CB@smtp.codeaurora.org>
@ 2020-03-12 13:46   ` Bastien Nocera
  2020-03-12 14:15     ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien Nocera @ 2020-03-12 13:46 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, Larry Finger

On Thu, 2020-03-12 at 13:38 +0000, Kalle Valo wrote:
> Bastien Nocera <hadess@hadess.net> wrote:
> 
> > Make it possible to disable the LED, as it can be pretty annoying
> > depending on where it's located.
> > 
> > See also https://github.com/lwfinger/rtl8188eu/pull/304 for the
> > out-of-tree version.
> > 
> > Signed-off-by: Bastien Nocera <hadess@hadess.net>
> 
> Please use "staging: " prefix for staging patches, easier for me to
> filter that
> way.

Do you want me to resend it, or will you amend this patch?

Cheers


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] rtl8188eu: Add rtw_led_enable module parameter
  2020-03-12 13:46   ` Bastien Nocera
@ 2020-03-12 14:15     ` Kalle Valo
  2020-03-24 10:36       ` Bastien Nocera
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2020-03-12 14:15 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: linux-wireless, Larry Finger

Bastien Nocera <hadess@hadess.net> writes:

> On Thu, 2020-03-12 at 13:38 +0000, Kalle Valo wrote:
>> Bastien Nocera <hadess@hadess.net> wrote:
>> 
>> > Make it possible to disable the LED, as it can be pretty annoying
>> > depending on where it's located.
>> > 
>> > See also https://github.com/lwfinger/rtl8188eu/pull/304 for the
>> > out-of-tree version.
>> > 
>> > Signed-off-by: Bastien Nocera <hadess@hadess.net>
>> 
>> Please use "staging: " prefix for staging patches, easier for me to
>> filter that
>> way.
>
> Do you want me to resend it, or will you amend this patch?

Greg applies staging patches so it's up to him. Ah, only noticed now tha
you didn't CC him so he didn't see this patch. You should check how
staging patches are supposed to be sent, I don't know that subsystem
exactly works.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] rtl8188eu: Add rtw_led_enable module parameter
  2020-03-12 14:15     ` Kalle Valo
@ 2020-03-24 10:36       ` Bastien Nocera
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien Nocera @ 2020-03-24 10:36 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, Larry Finger

On Thu, 2020-03-12 at 16:15 +0200, Kalle Valo wrote:
> Bastien Nocera <hadess@hadess.net> writes:
> 
> > On Thu, 2020-03-12 at 13:38 +0000, Kalle Valo wrote:
> > > Bastien Nocera <hadess@hadess.net> wrote:
> > > 
> > > > Make it possible to disable the LED, as it can be pretty
> > > > annoying
> > > > depending on where it's located.
> > > > 
> > > > See also https://github.com/lwfinger/rtl8188eu/pull/304 for the
> > > > out-of-tree version.
> > > > 
> > > > Signed-off-by: Bastien Nocera <hadess@hadess.net>
> > > 
> > > Please use "staging: " prefix for staging patches, easier for me
> > > to
> > > filter that
> > > way.
> > 
> > Do you want me to resend it, or will you amend this patch?
> 
> Greg applies staging patches so it's up to him. Ah, only noticed now
> tha
> you didn't CC him so he didn't see this patch. You should check how
> staging patches are supposed to be sent, I don't know that subsystem
> exactly works.

Done.

Cheers


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-24 10:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29 19:01 [PATCH v2] rtl8188eu: Add rtw_led_enable module parameter Bastien Nocera
2020-03-12 13:38 ` Kalle Valo
     [not found] ` <20200312133800.096EDC433CB@smtp.codeaurora.org>
2020-03-12 13:46   ` Bastien Nocera
2020-03-12 14:15     ` Kalle Valo
2020-03-24 10:36       ` Bastien Nocera

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).