DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
@ 2020-03-24 10:36 Bastien Nocera
  2020-03-24 11:38 ` Greg Kroah-Hartman
  2020-03-24 15:20 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 12+ messages in thread
From: Bastien Nocera @ 2020-03-24 10:36 UTC (permalink / raw)
  To: devel, linux-wireless; +Cc: Greg Kroah-Hartman, Kalle Valo, 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>
---
 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;

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 10:36 [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter Bastien Nocera
@ 2020-03-24 11:38 ` Greg Kroah-Hartman
  2020-03-24 11:47   ` Bastien Nocera
  2020-03-24 15:20 ` Greg Kroah-Hartman
  1 sibling, 1 reply; 12+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-24 11:38 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: devel, linux-wireless, Kalle Valo, Larry Finger

On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> ---
>  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);

Ick, really?  No, no nee module parameters, this is not the 1990's.

This should be done on a per-device basis, using the correct apis.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 11:38 ` Greg Kroah-Hartman
@ 2020-03-24 11:47   ` Bastien Nocera
  2020-03-24 12:32     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien Nocera @ 2020-03-24 11:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-wireless, Kalle Valo, Larry Finger

On Tue, 2020-03-24 at 12:38 +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> > ---
> >  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);
> 
> Ick, really?  No, no nee module parameters, this is not the 1990's.
> 
> This should be done on a per-device basis, using the correct apis.

What API?

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 11:47   ` Bastien Nocera
@ 2020-03-24 12:32     ` Greg Kroah-Hartman
  2020-03-24 12:38       ` Bastien Nocera
  0 siblings, 1 reply; 12+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-24 12:32 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: devel, linux-wireless, Kalle Valo, Larry Finger

On Tue, Mar 24, 2020 at 12:47:01PM +0100, Bastien Nocera wrote:
> On Tue, 2020-03-24 at 12:38 +0100, Greg Kroah-Hartman wrote:
> > On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> > > ---
> > >  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);
> > 
> > Ick, really?  No, no nee module parameters, this is not the 1990's.
> > 
> > This should be done on a per-device basis, using the correct apis.
> 
> What API?

Documentation/leds/index.rst should give you a good start :)

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 12:32     ` Greg Kroah-Hartman
@ 2020-03-24 12:38       ` Bastien Nocera
  2020-03-24 12:48         ` Greg Kroah-Hartman
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien Nocera @ 2020-03-24 12:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-wireless, Kalle Valo, Larry Finger

On Tue, 2020-03-24 at 13:32 +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 24, 2020 at 12:47:01PM +0100, Bastien Nocera wrote:
> > On Tue, 2020-03-24 at 12:38 +0100, Greg Kroah-Hartman wrote:
> > > On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> > > > ---
> > > >  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);
> > > 
> > > Ick, really?  No, no nee module parameters, this is not the
> > > 1990's.
> > > 
> > > This should be done on a per-device basis, using the correct
> > > apis.
> > 
> > What API?
> 
> Documentation/leds/index.rst should give you a good start :)

Given how much work it'd be, I'll give it a miss and carry on using the
out-of-tree driver.

Thanks for the hint.

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 12:38       ` Bastien Nocera
@ 2020-03-24 12:48         ` Greg Kroah-Hartman
  2020-03-24 12:52           ` Bastien Nocera
  0 siblings, 1 reply; 12+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-24 12:48 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: devel, linux-wireless, Kalle Valo, Larry Finger

On Tue, Mar 24, 2020 at 01:38:53PM +0100, Bastien Nocera wrote:
> On Tue, 2020-03-24 at 13:32 +0100, Greg Kroah-Hartman wrote:
> > On Tue, Mar 24, 2020 at 12:47:01PM +0100, Bastien Nocera wrote:
> > > On Tue, 2020-03-24 at 12:38 +0100, Greg Kroah-Hartman wrote:
> > > > On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> > > > > ---
> > > > >  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);
> > > > 
> > > > Ick, really?  No, no nee module parameters, this is not the
> > > > 1990's.
> > > > 
> > > > This should be done on a per-device basis, using the correct
> > > > apis.
> > > 
> > > What API?
> > 
> > Documentation/leds/index.rst should give you a good start :)
> 
> Given how much work it'd be, I'll give it a miss and carry on using the
> out-of-tree driver.

Huh?  Why not fix this properly, as that's the only way this driver is
ever going to be fixed up correctly and get out of staging at all.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 12:48         ` Greg Kroah-Hartman
@ 2020-03-24 12:52           ` Bastien Nocera
  0 siblings, 0 replies; 12+ messages in thread
From: Bastien Nocera @ 2020-03-24 12:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-wireless, Kalle Valo, Larry Finger

On Tue, 2020-03-24 at 13:48 +0100, Greg Kroah-Hartman wrote:
> 
<snip>
> Huh?  Why not fix this properly, as that's the only way this driver
> is
> ever going to be fixed up correctly and get out of staging at all.

Because, unfortunately, I have limited free time.

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 10:36 [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter Bastien Nocera
  2020-03-24 11:38 ` Greg Kroah-Hartman
@ 2020-03-24 15:20 ` Greg Kroah-Hartman
  2020-03-24 15:21   ` Bastien Nocera
  1 sibling, 1 reply; 12+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-24 15:20 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: devel, linux-wireless, Kalle Valo, Larry Finger

On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> ---
>  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(+)


Why was this resent?  Didn't I just reject this?

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 15:20 ` Greg Kroah-Hartman
@ 2020-03-24 15:21   ` Bastien Nocera
  2020-03-24 15:42     ` Greg Kroah-Hartman
  2020-03-24 17:35     ` Dan Carpenter
  0 siblings, 2 replies; 12+ messages in thread
From: Bastien Nocera @ 2020-03-24 15:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, linux-wireless, Kalle Valo, Larry Finger

On Tue, 2020-03-24 at 16:20 +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> > ---
> >  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(+)
> 
> Why was this resent?  Didn't I just reject this?

It wasn't resent, it's the same mail you already answered.

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 15:21   ` Bastien Nocera
@ 2020-03-24 15:42     ` Greg Kroah-Hartman
  2020-03-24 17:35     ` Dan Carpenter
  1 sibling, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-24 15:42 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: devel, linux-wireless, Kalle Valo, Larry Finger

On Tue, Mar 24, 2020 at 04:21:47PM +0100, Bastien Nocera wrote:
> On Tue, 2020-03-24 at 16:20 +0100, Greg Kroah-Hartman wrote:
> > On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> > > ---
> > >  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(+)
> > 
> > Why was this resent?  Didn't I just reject this?
> 
> It wasn't resent, it's the same mail you already answered.

Ah, slow mailing lists, sorry :)

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 15:21   ` Bastien Nocera
  2020-03-24 15:42     ` Greg Kroah-Hartman
@ 2020-03-24 17:35     ` Dan Carpenter
  2020-03-25 15:01       ` Bastien Nocera
  1 sibling, 1 reply; 12+ messages in thread
From: Dan Carpenter @ 2020-03-24 17:35 UTC (permalink / raw)
  To: Bastien Nocera
  Cc: devel, Greg Kroah-Hartman, linux-wireless, Kalle Valo, Larry Finger

On Tue, Mar 24, 2020 at 04:21:47PM +0100, Bastien Nocera wrote:
> On Tue, 2020-03-24 at 16:20 +0100, Greg Kroah-Hartman wrote:
> > On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> > > ---
> > >  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(+)
> > 
> > Why was this resent?  Didn't I just reject this?
> 
> It wasn't resent, it's the same mail you already answered.

It says "resend" in the subject.

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter
  2020-03-24 17:35     ` Dan Carpenter
@ 2020-03-25 15:01       ` Bastien Nocera
  0 siblings, 0 replies; 12+ messages in thread
From: Bastien Nocera @ 2020-03-25 15:01 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: devel, Greg Kroah-Hartman, linux-wireless, Kalle Valo, Larry Finger

On Tue, 2020-03-24 at 20:35 +0300, Dan Carpenter wrote:
> On Tue, Mar 24, 2020 at 04:21:47PM +0100, Bastien Nocera wrote:
> > On Tue, 2020-03-24 at 16:20 +0100, Greg Kroah-Hartman wrote:
> > > On Tue, Mar 24, 2020 at 11:36:00AM +0100, Bastien Nocera 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>
> > > > ---
> > > >  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(+)
> > > 
> > > Why was this resent?  Didn't I just reject this?
> > 
> > It wasn't resent, it's the same mail you already answered.
> 
> It says "resend" in the subject.

This isn't what we were talking about though ;)

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 10:36 [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter Bastien Nocera
2020-03-24 11:38 ` Greg Kroah-Hartman
2020-03-24 11:47   ` Bastien Nocera
2020-03-24 12:32     ` Greg Kroah-Hartman
2020-03-24 12:38       ` Bastien Nocera
2020-03-24 12:48         ` Greg Kroah-Hartman
2020-03-24 12:52           ` Bastien Nocera
2020-03-24 15:20 ` Greg Kroah-Hartman
2020-03-24 15:21   ` Bastien Nocera
2020-03-24 15:42     ` Greg Kroah-Hartman
2020-03-24 17:35     ` Dan Carpenter
2020-03-25 15:01       ` Bastien Nocera

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git