From 7899a2cad619434ef9678f33bda6328e182c91f3 Mon Sep 17 00:00:00 2001 From: fariouche Date: Tue, 9 Oct 2018 21:24:54 +0200 Subject: [PATCH] fix compilation error if led is disabled --- hal/rtl8814a/usb/rtl8814au_led.c | 4 ++-- hal/rtl8814a/usb/usb_halinit.c | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/hal/rtl8814a/usb/rtl8814au_led.c b/hal/rtl8814a/usb/rtl8814au_led.c index a8eaac5..070f886 100644 --- a/hal/rtl8814a/usb/rtl8814au_led.c +++ b/hal/rtl8814a/usb/rtl8814au_led.c @@ -21,7 +21,7 @@ //#include #include - +#ifdef CONFIG_RTW_SW_LED //================================================================================ // LED object. //================================================================================ @@ -144,4 +144,4 @@ rtl8814au_DeInitSwLeds( DeInitLed( &(ledpriv->SwLed1) ); DeInitLed( &(ledpriv->SwLed2) ); } - +#endif diff --git a/hal/rtl8814a/usb/usb_halinit.c b/hal/rtl8814a/usb/usb_halinit.c index 78c630f..1602d0f 100644 --- a/hal/rtl8814a/usb/usb_halinit.c +++ b/hal/rtl8814a/usb/usb_halinit.c @@ -1937,7 +1937,9 @@ hal_CustomizedBehavior_8814AU( { case RT_CID_DEFAULT: pledpriv->LedStrategy = SW_LED_MODE9; +#ifdef CONFIG_RTW_SW_LED pledpriv->bRegUseLed = _TRUE; +#endif break; default: @@ -2023,7 +2025,7 @@ ReadLEDSetting_8814AU( { struct led_priv *pledpriv = adapter_to_led(Adapter); -#ifdef CONFIG_RTW_LED +#ifdef CONFIG_RTW_SW_LED pledpriv->bRegUseLed = _TRUE; #else // HW LED pledpriv->LedStrategy = HW_LED; @@ -2375,12 +2377,12 @@ void rtl8814au_set_hal_ops(_adapter * padapter) pHalFunc->init_recv_priv = &rtl8814au_init_recv_priv; pHalFunc->free_recv_priv = &rtl8814au_free_recv_priv; -#ifdef CONFIG_RTW_LED +#ifdef CONFIG_RTW_SW_LED pHalFunc->InitSwLeds = &rtl8814au_InitSwLeds; pHalFunc->DeInitSwLeds = &rtl8814au_DeInitSwLeds; -#else //case of hw led or no led - pHalFunc->InitSwLeds = NULL; - pHalFunc->DeInitSwLeds = NULL; +//#else //case of hw led or no led +// pHalFunc->InitSwLeds = NULL; +// pHalFunc->DeInitSwLeds = NULL; #endif//CONFIG_RTW_LED pHalFunc->init_default_value = &rtl8814au_init_default_value;