mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-27 15:44:18 +00:00
Added LED control
This commit is contained in:
parent
2e294ae369
commit
75a5725e0b
@ -1745,6 +1745,22 @@ void BlinkHandler(PLED_USB pLed)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
// led_enable 1 is normal blinking so don't cause always on/off
|
||||
if (padapter->registrypriv.led_ctrl != 1) {
|
||||
if (padapter->registrypriv.led_ctrl == 0)
|
||||
{
|
||||
// Cause LED to be always off
|
||||
pLed->BlinkingLedState = RTW_LED_OFF;
|
||||
} else {
|
||||
// Cause LED to be always on for led_ctrl 2 or greater
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
}
|
||||
// Skip various switch cases where SwLedBlink*() called below
|
||||
pLed->CurrLedState = LED_UNKNOWN;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (ledpriv->LedStrategy) {
|
||||
#if CONFIG_RTW_SW_LED_TRX_DA_CLASSIFY
|
||||
case SW_LED_MODE_UC_TRX_ONLY:
|
||||
|
@ -210,6 +210,9 @@ struct registry_priv {
|
||||
u8 software_decrypt;
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
u8 early_mode;
|
||||
#endif
|
||||
#ifdef CONFIG_SW_LED
|
||||
u8 led_ctrl;
|
||||
#endif
|
||||
u8 acm_method;
|
||||
/* WMM */
|
||||
|
@ -105,6 +105,10 @@ int rtw_check_fw_ps = 1;
|
||||
int rtw_early_mode = 1;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
int rtw_led_ctrl = 1; // default to normal blink
|
||||
#endif
|
||||
|
||||
int rtw_usb_rxagg_mode = 2;/* RX_AGG_DMA=1, RX_AGG_USB=2 */
|
||||
module_param(rtw_usb_rxagg_mode, int, 0644);
|
||||
|
||||
@ -460,6 +464,12 @@ module_param(rtw_pci_aspm_enable, int, 0644);
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
module_param(rtw_early_mode, int, 0644);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
module_param(rtw_led_ctrl, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_led_ctrl,"Led Control: 0=Always off, 1=Normal blink, 2=Always on");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
char *rtw_adaptor_info_caching_file_path = "/data/misc/wifi/rtw_cache";
|
||||
module_param(rtw_adaptor_info_caching_file_path, charp, 0644);
|
||||
@ -1004,6 +1014,9 @@ uint loadparam(_adapter *padapter)
|
||||
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
registry_par->early_mode = (u8)rtw_early_mode;
|
||||
#endif
|
||||
#ifdef CONFIG_SW_LED
|
||||
registry_par->led_ctrl = (u8)rtw_led_ctrl;
|
||||
#endif
|
||||
registry_par->lowrate_two_xmit = (u8)rtw_lowrate_two_xmit;
|
||||
registry_par->rf_config = (u8)rtw_rf_config;
|
||||
|
Loading…
Reference in New Issue
Block a user