rtl8188eu: Remove CONFIG_LED configuration variables

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-18 10:22:43 -05:00
parent 83e1776605
commit 8fbf5c37a9
5 changed files with 4 additions and 110 deletions

View file

@ -36,11 +36,7 @@ void BlinkTimerCallback(void *data)
return; return;
} }
#ifdef CONFIG_LED_HANDLED_BY_CMD_THREAD
rtw_led_blink_cmd(padapter, pLed);
#else
_set_workitem(&(pLed->BlinkWorkItem)); _set_workitem(&(pLed->BlinkWorkItem));
#endif
} }
/* */ /* */
@ -121,8 +117,6 @@ DeInitLed871x(
void SwLedOn(_adapter *padapter, PLED_871x pLed); void SwLedOn(_adapter *padapter, PLED_871x pLed);
void SwLedOff(_adapter *padapter, PLED_871x pLed); void SwLedOff(_adapter *padapter, PLED_871x pLed);
#define CONFIG_LED_REMOVE_HAL
static void static void
SwLedBlink( SwLedBlink(
PLED_871x pLed PLED_871x pLed
@ -247,19 +241,11 @@ SwLedBlink1(
) )
{ {
_adapter *padapter = pLed->padapter; _adapter *padapter = pLed->padapter;
#ifndef CONFIG_LED_REMOVE_HAL
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
#endif
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &(padapter->ledpriv);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
PLED_871x pLed1 = &(ledpriv->SwLed1); PLED_871x pLed1 = &(ledpriv->SwLed1);
u8 bStopBlinking = false; u8 bStopBlinking = false;
#ifndef CONFIG_LED_REMOVE_HAL
if (pHalData->EEPROMCustomerID == RT_CID_819x_CAMEO)
pLed = &(ledpriv->SwLed1);
#endif
/* Change LED according to BlinkingLedState specified. */ /* Change LED according to BlinkingLedState specified. */
if ( pLed->BlinkingLedState == RTW_LED_ON ) if ( pLed->BlinkingLedState == RTW_LED_ON )
{ {
@ -272,35 +258,6 @@ SwLedBlink1(
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn off\n", pLed->BlinkTimes)); RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (%d): turn off\n", pLed->BlinkTimes));
} }
#ifndef CONFIG_LED_REMOVE_HAL
if (pHalData->EEPROMCustomerID == RT_CID_DEFAULT)
{
if (check_fwstate(pmlmepriv, _FW_LINKED)== true)
{
if (!pLed1->bSWLedCtrl)
{
SwLedOn(padapter, pLed1);
pLed1->bSWLedCtrl = true;
}
else if (!pLed1->bLedOn)
SwLedOn(padapter, pLed1);
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (): turn on pLed1\n"));
}
else
{
if (!pLed1->bSWLedCtrl)
{
SwLedOff(padapter, pLed1);
pLed1->bSWLedCtrl = true;
}
else if (pLed1->bLedOn)
SwLedOff(padapter, pLed1);
RT_TRACE(_module_rtl8712_led_c_,_drv_info_,("Blinktimes (): turn off pLed1\n"));
}
}
#endif
if ( padapter->pwrctrlpriv.rf_pwrstate != rf_on ) if ( padapter->pwrctrlpriv.rf_pwrstate != rf_on )
{ {
SwLedOff(padapter, pLed); SwLedOff(padapter, pLed);
@ -1208,20 +1165,11 @@ SwLedControlMode1(
LED_CTL_MODE LedAction LED_CTL_MODE LedAction
) )
{ {
#ifndef CONFIG_LED_REMOVE_HAL
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
#endif
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &(padapter->ledpriv);
PLED_871x pLed = &(ledpriv->SwLed0); PLED_871x pLed = &(ledpriv->SwLed0);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
#ifndef CONFIG_LED_REMOVE_HAL switch (LedAction) {
if (pHalData->EEPROMCustomerID == RT_CID_819x_CAMEO)
pLed = &(ledpriv->SwLed1);
#endif
switch (LedAction)
{
case LED_CTL_POWER_ON: case LED_CTL_POWER_ON:
case LED_CTL_START_TO_LINK: case LED_CTL_START_TO_LINK:
case LED_CTL_NO_LINK: case LED_CTL_NO_LINK:
@ -2159,20 +2107,11 @@ SwLedControlMode5(
LED_CTL_MODE LedAction LED_CTL_MODE LedAction
) )
{ {
#ifndef CONFIG_LED_REMOVE_HAL
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
#endif
struct led_priv *ledpriv = &(padapter->ledpriv); struct led_priv *ledpriv = &(padapter->ledpriv);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
PLED_871x pLed = &(ledpriv->SwLed0); PLED_871x pLed = &(ledpriv->SwLed0);
#ifndef CONFIG_LED_REMOVE_HAL switch (LedAction) {
if (pHalData->EEPROMCustomerID == RT_CID_819x_CAMEO)
pLed = &(ledpriv->SwLed1);
#endif
switch (LedAction)
{
case LED_CTL_POWER_ON: case LED_CTL_POWER_ON:
case LED_CTL_NO_LINK: case LED_CTL_NO_LINK:
case LED_CTL_LINK: /* solid blue */ case LED_CTL_LINK: /* solid blue */

View file

@ -10392,18 +10392,8 @@ u8 set_chplan_hdl(_adapter *padapter, unsigned char *pbuf)
u8 led_blink_hdl(_adapter *padapter, unsigned char *pbuf) u8 led_blink_hdl(_adapter *padapter, unsigned char *pbuf)
{ {
#ifdef CONFIG_LED_HANDLED_BY_CMD_THREAD
struct LedBlink_param *ledBlink_param;
#endif
if (!pbuf) if (!pbuf)
return H2C_PARAMETERS_ERROR; return H2C_PARAMETERS_ERROR;
#ifdef CONFIG_LED_HANDLED_BY_CMD_THREAD
ledBlink_param = (struct LedBlink_param *)pbuf;
BlinkHandler(ledBlink_param->pLed);
#endif
return H2C_SUCCESS; return H2C_SUCCESS;
} }

View file

@ -711,18 +711,10 @@ _InitEDCA(
rtw_write32(Adapter, REG_EDCA_VO_PARAM, 0x002FA226); rtw_write32(Adapter, REG_EDCA_VO_PARAM, 0x002FA226);
} }
static void _InitBeaconMaxError(PADAPTER Adapter, bool InfraMode)
static void
_InitBeaconMaxError(
PADAPTER Adapter,
bool InfraMode
)
{ {
} }
#ifdef CONFIG_LED
static void _InitHWLed(PADAPTER Adapter) static void _InitHWLed(PADAPTER Adapter)
{ {
struct led_priv *pledpriv = &(Adapter->ledpriv); struct led_priv *pledpriv = &(Adapter->ledpriv);
@ -735,12 +727,8 @@ static void _InitHWLed(PADAPTER Adapter)
/* must consider cases of antenna diversity/ commbo card/solo card/mini card */ /* must consider cases of antenna diversity/ commbo card/solo card/mini card */
} }
#endif /* CONFIG_LED */
static void static void _InitRDGSetting(PADAPTER Adapter)
_InitRDGSetting(
PADAPTER Adapter
)
{ {
rtw_write8(Adapter,REG_RD_CTRL,0xFF); rtw_write8(Adapter,REG_RD_CTRL,0xFF);
rtw_write16(Adapter, REG_RD_NAV_NXT, 0x200); rtw_write16(Adapter, REG_RD_NAV_NXT, 0x200);
@ -1476,10 +1464,7 @@ _func_enter_;
rtw_write16(Adapter, REG_PKT_VO_VI_LIFE_TIME, 0x0400); /* unit: 256us. 256ms */ rtw_write16(Adapter, REG_PKT_VO_VI_LIFE_TIME, 0x0400); /* unit: 256us. 256ms */
rtw_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x0400); /* unit: 256us. 256ms */ rtw_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x0400); /* unit: 256us. 256ms */
#ifdef CONFIG_LED
_InitHWLed(Adapter); _InitHWLed(Adapter);
#endif /* CONFIG_LED */
/* */ /* */
/* Joseph Note: Keep RfRegChnlVal for later use. */ /* Joseph Note: Keep RfRegChnlVal for later use. */
@ -1828,7 +1813,6 @@ _ReadLEDSetting(
{ {
struct led_priv *pledpriv = &(Adapter->ledpriv); struct led_priv *pledpriv = &(Adapter->ledpriv);
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
#ifdef CONFIG_SW_LED
pledpriv->bRegUseLed = true; pledpriv->bRegUseLed = true;
switch (pHalData->CustomerID) switch (pHalData->CustomerID)
@ -1838,9 +1822,6 @@ _ReadLEDSetting(
break; break;
} }
pHalData->bLedOpenDrain = true;/* Support Open-drain arrangement for controlling the LED. Added by Roger, 2009.10.16. */ pHalData->bLedOpenDrain = true;/* Support Open-drain arrangement for controlling the LED. Added by Roger, 2009.10.16. */
#else /* HW LED */
pledpriv->LedStrategy = HW_LED;
#endif /* CONFIG_SW_LED */
} }
static void static void
@ -3662,13 +3643,8 @@ _func_enter_;
pHalFunc->init_recv_priv = &rtl8188eu_init_recv_priv; pHalFunc->init_recv_priv = &rtl8188eu_init_recv_priv;
pHalFunc->free_recv_priv = &rtl8188eu_free_recv_priv; pHalFunc->free_recv_priv = &rtl8188eu_free_recv_priv;
#ifdef CONFIG_SW_LED
pHalFunc->InitSwLeds = &rtl8188eu_InitSwLeds; pHalFunc->InitSwLeds = &rtl8188eu_InitSwLeds;
pHalFunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds; pHalFunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds;
#else /* case of hw led or no led */
pHalFunc->InitSwLeds = NULL;
pHalFunc->DeInitSwLeds = NULL;
#endif/* CONFIG_SW_LED */
pHalFunc->init_default_value = &rtl8188eu_init_default_value; pHalFunc->init_default_value = &rtl8188eu_init_default_value;
pHalFunc->intf_chip_configure = &rtl8188eu_interface_configure; pHalFunc->intf_chip_configure = &rtl8188eu_interface_configure;

View file

@ -99,13 +99,6 @@
#define CONFIG_SKB_COPY //for amsdu #define CONFIG_SKB_COPY //for amsdu
#define CONFIG_LED
#ifdef CONFIG_LED
#define CONFIG_SW_LED
#endif // CONFIG_LED
#define USB_INTERFERENCE_ISSUE // this should be checked in all usb interface
#define CONFIG_NEW_SIGNAL_STAT_PROCESS #define CONFIG_NEW_SIGNAL_STAT_PROCESS
#define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */ #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */

View file

@ -171,15 +171,11 @@ struct led_priv{
/* add for led controll */ /* add for led controll */
}; };
#ifdef CONFIG_SW_LED
#define rtw_led_control(adapter, LedAction) \ #define rtw_led_control(adapter, LedAction) \
do { \ do { \
if ((adapter)->ledpriv.LedControlHandler) \ if ((adapter)->ledpriv.LedControlHandler) \
(adapter)->ledpriv.LedControlHandler((adapter), (LedAction)); \ (adapter)->ledpriv.LedControlHandler((adapter), (LedAction)); \
} while (0) } while (0)
#else //CONFIG_SW_LED
#define rtw_led_control(adapter, LedAction)
#endif //CONFIG_SW_LED
void BlinkTimerCallback(void *data); void BlinkTimerCallback(void *data);
void BlinkWorkItemCallback(struct work_struct *work); void BlinkWorkItemCallback(struct work_struct *work);