staging: rtl8188eu: remove unused sreset_get_wifi_status()
authorMichael Straube <straube.linux@gmail.com>
Thu, 26 Jul 2018 19:46:59 +0000 (21:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jul 2018 08:08:02 +0000 (10:08 +0200)
The function sreset_get_wifi_status() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_sreset.c
drivers/staging/rtl8188eu/include/rtw_sreset.h

index 4097380..fb5adaf 100644 (file)
@@ -15,33 +15,6 @@ void rtw_hal_sreset_init(struct adapter *padapter)
        psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
 }
 
-u8 sreset_get_wifi_status(struct adapter *padapter)
-{
-       struct sreset_priv *psrtpriv = &padapter->HalData->srestpriv;
-
-       u8 status = WIFI_STATUS_SUCCESS;
-       u32 val32 = 0;
-
-       val32 = usb_read32(padapter, REG_TXDMA_STATUS);
-       if (val32 == 0xeaeaeaea) {
-               psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST;
-       } else if (val32 != 0) {
-               DBG_88E("txdmastatu(%x)\n", val32);
-               psrtpriv->Wifi_Error_Status = WIFI_MAC_TXDMA_ERROR;
-       }
-
-       if (WIFI_STATUS_SUCCESS != psrtpriv->Wifi_Error_Status) {
-               DBG_88E("==>%s error_status(0x%x)\n", __func__, psrtpriv->Wifi_Error_Status);
-               status = psrtpriv->Wifi_Error_Status & (~(USB_READ_PORT_FAIL|USB_WRITE_PORT_FAIL));
-       }
-       DBG_88E("==> %s wifi_status(0x%x)\n", __func__, status);
-
-       /* status restore */
-       psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
-
-       return status;
-}
-
 void sreset_set_wifi_error_status(struct adapter *padapter, u32 status)
 {
        padapter->HalData->srestpriv.Wifi_Error_Status = status;
index a039894..3ee6a4a 100644 (file)
@@ -25,7 +25,6 @@ struct sreset_priv {
 #define        WIFI_RX_HANG                    BIT(5)
 #define                WIFI_IF_NOT_EXIST       BIT(6)
 
-u8 sreset_get_wifi_status(struct adapter *padapter);
 void sreset_set_wifi_error_status(struct adapter *padapter, u32 status);
 
 #endif