Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4746909ybb; Tue, 24 Mar 2020 04:39:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuKOB+pSQ+MtxcA5l4gryB1jZVvC6zUNKCj4cohv+BA46mHAIWZIcktqs1FCsOn9RmF6O4c X-Received: by 2002:aca:af12:: with SMTP id y18mr2906926oie.78.1585049960490; Tue, 24 Mar 2020 04:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585049960; cv=none; d=google.com; s=arc-20160816; b=fzEELR6ZB0lNuf4ffIE4SIlTlZ/2mIi0vVtBUhBN0A6iXHgnixqUvU4UMnsrQVHAIi lK0NA/UJUBMvPaEeOZSoIWjEcllb41Ef1u2eUMdq7vt5i8EOFV8oR09j+bD6KIhq5XzX 0QJ8IGygWXdoVrlRYV19PguPPO1elY3JFa6u2kk1wXf7SaHBLU1Ws6ckQfC5q3+ybgNL 5YFKqo7mAaI9uw/REENK/PLoXXHXrLrwH8t+1WGHaSn6QvWUdawxgHkBr6U5eebeDehz zkgf0dDoUXoQaGk2ebp//0ooe9uuzar/SEZ6ywvu/Iy7MSWiEvvR+J5MPXA2U8MiYVGm r4UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=uGuC1A9O+k3wZ0Xo3fyOGAcsdRfoVuvWt/H8mpwfvM8=; b=KcmqBN+2E3H4DJcmyH2mCiInUPdDp6OndeHQ0QJ10a1N83+LPxAOaoyj64YJHz1Duz f0d2Lwr/zMvsoR2h5YMRkveNJczlMFvX1J0uaps48d/nlY6/o66/gxkqvVvcnJguEaYJ 4a8zaHDVkKnZKJRwqkj9RFnx8ckoZewFBl4DnA8enK2r2G3avN2CTUW4U7cBLq4P+6eI Wuu4rA//YNw5WsmhP0ocOzwQQbhkw1NdLYoqaU8Q7GQF091+mVjomrTWOuDkRl3MxSnc u8cx74LZl8AP7x6r1Jqd+SILq7K6JcCWqKh7o7O6tbu8CPIZfn2Kjmvkstd1OoyONoW0 xy7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dUKwOVNO; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d75si9011802oib.22.2020.03.24.04.38.57; Tue, 24 Mar 2020 04:39:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dUKwOVNO; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727273AbgCXLin (ORCPT + 99 others); Tue, 24 Mar 2020 07:38:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:47492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727112AbgCXLin (ORCPT ); Tue, 24 Mar 2020 07:38:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 531B920870; Tue, 24 Mar 2020 11:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585049922; bh=gAj0zsq2sm0jJ6R2Vhcv+yGoA9qkvlTrTLZle9Fprbg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dUKwOVNOBCwlYad3hDZKHHD6nmt5DJb27qx+fajUQcxoB05DJ5I+tlPQRiAV4L9ks N5HzIzH1tXs2rN7dZphzdX9dY5LHboB9YToAHwrPX3C0Vu90mCAJgfyXC3KPLP46Ch IfCJtGb0VZ10XnTvgZFeXUdNjLdQEaeI0UzVxMOQ= Date: Tue, 24 Mar 2020 12:38:40 +0100 From: Greg Kroah-Hartman To: Bastien Nocera Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, Larry Finger , Kalle Valo Subject: Re: [PATCH resend 3] staging: rtl8188eu: Add rtw_led_enable module parameter Message-ID: <20200324113840.GA2322042@kroah.com> References: <97d2ef68a6bcb7d1ece978eef6315e95732ca39d.camel@hadess.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <97d2ef68a6bcb7d1ece978eef6315e95732ca39d.camel@hadess.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 > --- > 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