Merge pull request #304 from hadess/wip/hadess/add-led-disable-option

rtl8188eu: Add rtw_led_enable module parameter
This commit is contained in:
lwfinger 2020-01-06 15:25:14 -06:00 committed by GitHub
commit 16d8b7a0d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View file

@ -1652,6 +1652,7 @@ void BlinkHandler(struct LED_871x *pLed)
void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction)
{
struct led_priv *ledpriv = &(padapter->ledpriv);
struct registry_priv *registry_par;
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped) ||
(!padapter->hw_init_completed))
@ -1660,6 +1661,10 @@ void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction)
if (!ledpriv->bRegUseLed)
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 ||

View file

@ -114,6 +114,8 @@ struct registry_priv {
u8 uapsd_acvi_en;
u8 uapsd_acvo_en;
u8 led_enable;
struct wlan_bssid_ex dev_network;
u8 ht_enable;

View file

@ -86,6 +86,8 @@ static int rtw_uapsd_acbe_en;
static int rtw_uapsd_acvi_en;
static int rtw_uapsd_acvo_en;
static int rtw_led_enable = 1;
int rtw_ht_enable = 1;
int rtw_cbw40_enable = 3; /* 0 :disable, bit(0): enable 2.4g, bit(1): enable 5g */
int rtw_ampdu_enable = 1;/* for enable tx_ampdu */
@ -137,6 +139,7 @@ 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_busy_thresh, 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);
@ -562,6 +565,8 @@ static uint loadparam(struct adapter *padapter, struct net_device *pnetdev)
registry_par->uapsd_acvi_en = (u8)rtw_uapsd_acvi_en;
registry_par->uapsd_acvo_en = (u8)rtw_uapsd_acvo_en;
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;