new LED control
This commit is contained in:
parent
268ace68de
commit
2f4fa07243
@ -1745,22 +1745,6 @@ void BlinkHandler(PLED_USB pLed)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
// 1 is normal blinking
|
||||
if (padapter->registrypriv.led_ctrl != 1) {
|
||||
if (padapter->registrypriv.led_ctrl == 0)
|
||||
{
|
||||
// Set LED to be off
|
||||
pLed->BlinkingLedState = RTW_LED_OFF;
|
||||
} else {
|
||||
// Set LED to be on solid for 2 or greater
|
||||
pLed->BlinkingLedState = RTW_LED_ON;
|
||||
}
|
||||
// Skip various switch cases where SwLedBlink*() is 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:
|
||||
|
@ -57,11 +57,19 @@ static void swledon(PADAPTER padapter, PLED_USB led)
|
||||
case LED_PIN_LED1:
|
||||
case LED_PIN_LED2:
|
||||
default:
|
||||
rtw_halmac_led_switch(adapter_to_dvobj(padapter), 1);
|
||||
if (padapter->registrypriv.led_ctrl == 0) {
|
||||
rtw_halmac_led_switch(adapter_to_dvobj(padapter), 0);
|
||||
} else {
|
||||
rtw_halmac_led_switch(adapter_to_dvobj(padapter), 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
led->bLedOn = _TRUE;
|
||||
if (padapter->registrypriv.led_ctrl == 0) {
|
||||
led->bLedOn = _FALSE;
|
||||
} else {
|
||||
led->bLedOn = _TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -83,11 +91,19 @@ static void swledoff(PADAPTER padapter, PLED_USB led)
|
||||
case LED_PIN_LED1:
|
||||
case LED_PIN_LED2:
|
||||
default:
|
||||
rtw_halmac_led_switch(adapter_to_dvobj(padapter), 0);
|
||||
if (padapter->registrypriv.led_ctrl <= 1) {
|
||||
rtw_halmac_led_switch(adapter_to_dvobj(padapter), 0);
|
||||
} else {
|
||||
rtw_halmac_led_switch(adapter_to_dvobj(padapter), 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
led->bLedOn = _FALSE;
|
||||
if (padapter->registrypriv.led_ctrl <= 1) {
|
||||
led->bLedOn = _FALSE;
|
||||
} else {
|
||||
led->bLedOn = _TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -177,7 +177,7 @@
|
||||
|
||||
#define CONFIG_RTW_LED
|
||||
#ifdef CONFIG_RTW_LED
|
||||
// #define CONFIG_RTW_SW_LED
|
||||
#define CONFIG_RTW_SW_LED
|
||||
#ifdef CONFIG_RTW_SW_LED
|
||||
/* #define CONFIG_RTW_LED_HANDLED_BY_CMD_THREAD */
|
||||
#endif
|
||||
|
@ -242,7 +242,7 @@ struct registry_priv {
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
u8 early_mode;
|
||||
#endif
|
||||
#ifdef CONFIG_SW_LED
|
||||
#ifdef CONFIG_RTW_SW_LED
|
||||
u8 led_ctrl;
|
||||
#endif
|
||||
#ifdef CONFIG_NARROWBAND_SUPPORTING
|
||||
|
@ -142,8 +142,8 @@ int rtw_check_fw_ps = 1;
|
||||
int rtw_early_mode = 1;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
int rtw_led_ctrl = 1; // default to normal blinking
|
||||
#ifdef CONFIG_RTW_SW_LED
|
||||
int rtw_led_ctrl = 1; /* default led blink */
|
||||
#endif
|
||||
|
||||
int rtw_usb_rxagg_mode = 2;/* RX_AGG_DMA=1, RX_AGG_USB=2 */
|
||||
@ -617,9 +617,9 @@ module_param(rtw_pci_aspm_enable, int, 0644);
|
||||
module_param(rtw_early_mode, int, 0644);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SW_LED
|
||||
#ifdef CONFIG_RTW_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");
|
||||
MODULE_PARM_DESC(rtw_led_ctrl,"led control, 0:led off, 1:led blink, 2:led on");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
@ -1318,7 +1318,7 @@ uint loadparam(_adapter *padapter)
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
registry_par->early_mode = (u8)rtw_early_mode;
|
||||
#endif
|
||||
#ifdef CONFIG_SW_LED
|
||||
#ifdef CONFIG_RTW_SW_LED
|
||||
registry_par->led_ctrl = (u8)rtw_led_ctrl;
|
||||
#endif
|
||||
registry_par->trx_path_bmp = (u8)rtw_trx_path_bmp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user