hal/rtl8192e/pci/rtl8192ee_led.c
static void
SwLedOff_8192EE(
	_adapter			*padapter,
	PLED_PCIE		pLed
)
{
	u16	LedReg = REG_LEDCFG0;
	HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
	struct led_priv	*ledpriv = &(padapter->ledpriv);

	if (RTW_CANNOT_RUN(padapter))
		return;

	switch (pLed->LedPin) {
	case LED_PIN_LED0:
		if (ledpriv->LedStrategy == SW_LED_MODE10)
			LedReg = REG_LEDCFG0;
		else
			LedReg = REG_LEDCFG1;
		break;

	case LED_PIN_LED1:
		LedReg = REG_LEDCFG2;
		break;

	case LED_PIN_GPIO0:
	default:
		break;
	}

	/* RTW_INFO("In SwLedOff,LedAddr:%X LEDPIN=%d\n", LedReg, pLed->LedPin); */

	if (pHalData->bLedOpenDrain == _TRUE) { /* Open-drain arrangement for controlling the LED */
		u8	LedCfg = rtw_read8(padapter, LedReg);

		LedCfg &= 0xd0; /* Set to software control. */
		rtw_write8(padapter, LedReg, (LedCfg | BIT3));

		/* Open-drain arrangement */
		LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG);
		LedCfg &= 0xFE;/* Set GPIO[8] to input mode */
		rtw_write8(padapter, REG_MAC_PINMUX_CFG, LedCfg);

	} else
		rtw_write8(padapter, LedReg, 0x28);

	pLed->bLedOn = _FALSE;
}
/*
 *	Description:
 *		Turn off LED according to LedPin specified.
 *   */
Turn off LED according to LedPin specified.
Turn off LED according to LedPin specified .
static void
SwLedOff_8192EE(
	_adapter			*padapter,
	PLED_PCIE		pLed
)
{
	u16	LedReg = REG_LEDCFG0;
	HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
	struct led_priv	*ledpriv = &(padapter->ledpriv);
	if (RTW_CANNOT_RUN(padapter))
		return;
	switch (pLed->LedPin) {
	case LED_PIN_LED0:
		if (ledpriv->LedStrategy == SW_LED_MODE10)
			LedReg = REG_LEDCFG0;
		else
			LedReg = REG_LEDCFG1;
		break;
	case LED_PIN_LED1:
		LedReg = REG_LEDCFG2;
		break;
	case LED_PIN_GPIO0:
	default:
		break;
	}
	if (pHalData->bLedOpenDrain == _TRUE) { 
		u8	LedCfg = rtw_read8(padapter, LedReg);
		LedCfg &= 0xd0; 
		rtw_write8(padapter, LedReg, (LedCfg | BIT3));
		LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG);
		LedCfg &= 0xFE;
		rtw_write8(padapter, REG_MAC_PINMUX_CFG, LedCfg);
	} else
		rtw_write8(padapter, LedReg, 0x28);
	pLed->bLedOn = _FALSE;
}
static void SwLedOff_8192EE ( _adapter * padapter , PLED_PCIE pLed ) { u16 LedReg = REG_LEDCFG0 ; HAL_DATA_TYPE * pHalData = GET_HAL_DATA ( padapter ) ; struct led_priv * ledpriv = & ( padapter -> ledpriv ) ; if ( RTW_CANNOT_RUN ( padapter ) ) return ; switch ( pLed -> LedPin ) { case LED_PIN_LED0 : if ( ledpriv -> LedStrategy == SW_LED_MODE10 ) LedReg = REG_LEDCFG0 ; else LedReg = REG_LEDCFG1 ; break ; case LED_PIN_LED1 : LedReg = REG_LEDCFG2 ; break ; case LED_PIN_GPIO0 : default : break ; } if ( pHalData -> bLedOpenDrain == _TRUE ) { u8 LedCfg = rtw_read8 ( padapter , LedReg ) ; LedCfg &= 0xd0 ; rtw_write8 ( padapter , LedReg , ( LedCfg | BIT3 ) ) ; LedCfg = rtw_read8 ( padapter , REG_MAC_PINMUX_CFG ) ; LedCfg &= 0xFE ; rtw_write8 ( padapter , REG_MAC_PINMUX_CFG , LedCfg ) ; } else rtw_write8 ( padapter , LedReg , 0x28 ) ; pLed -> bLedOn = _FALSE ; }
Description:
              Turn off LED according to LedPin specified.
Description : Turn off LED according to LedPin specified .
/* RTW_INFO("In SwLedOff,LedAddr:%X LEDPIN=%d\n", LedReg, pLed->LedPin); */ /* Open-drain arrangement for controlling the LED */ /* Set to software control. */ /* Open-drain arrangement */ /* Set GPIO[8] to input mode */