staging: r8188eu: move linked status check from hal to rtw_mlme_ext
authorMartin Kaiser <martin@kaiser.cx>
Sun, 12 Dec 2021 18:58:32 +0000 (19:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Dec 2021 16:47:43 +0000 (17:47 +0100)
Move rtl8188e_sreset_linked_status_check from the hal layer into
rtw_mlme_ext.c.

Like the xmit status check, this is a simple function that's only
called from one place.

With this function gone, hal/rtl8188e_sreset.c and
include/rtl8188e_sreset.h are now empty and can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211212185833.22000-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/Makefile
drivers/staging/r8188eu/core/rtw_cmd.c
drivers/staging/r8188eu/core/rtw_mlme_ext.c
drivers/staging/r8188eu/hal/rtl8188e_sreset.c [deleted file]
drivers/staging/r8188eu/include/rtl8188e_hal.h
drivers/staging/r8188eu/include/rtl8188e_sreset.h [deleted file]

index 62933b0f29b5dedc753d51b08914c490b32e9bab..580b9308d5664fb89da0131e683964d5d8673dc9 100644 (file)
@@ -21,7 +21,6 @@ r8188eu-y = \
                hal/rtl8188e_phycfg.o \
                hal/rtl8188e_rf6052.o \
                hal/rtl8188e_rxdesc.o \
-               hal/rtl8188e_sreset.o \
                hal/rtl8188e_xmit.o \
                hal/rtl8188eu_led.o \
                hal/rtl8188eu_recv.o \
index 283ae08ae4cb24ab8420badbdcf47f7b2369127a..6d503eb7ff266fc7df8720c9311ae987df9f0625 100644 (file)
@@ -10,7 +10,6 @@
 #include "../include/rtw_br_ext.h"
 #include "../include/rtw_mlme_ext.h"
 #include "../include/rtl8188e_dm.h"
-#include "../include/rtl8188e_sreset.h"
 
 /*
 Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
index 4b6d33249d9573bf995dc65731c14a53b8eb4090..15a443b9bc6d808deaa4bde489b17066ca811b10 100644 (file)
@@ -10,7 +10,6 @@
 #include "../include/wlan_bssdef.h"
 #include "../include/mlme_osdep.h"
 #include "../include/recv_osdep.h"
-#include "../include/rtl8188e_sreset.h"
 #include "../include/rtl8188e_xmit.h"
 #include "../include/rtl8188e_dm.h"
 
@@ -7160,6 +7159,24 @@ static u8 chk_ap_is_alive(struct adapter *padapter, struct sta_info *psta)
        return ret;
 }
 
+static void rtl8188e_sreset_linked_status_check(struct adapter *padapter)
+{
+       u32 rx_dma_status = 0;
+       u8 fw_status = 0;
+       rx_dma_status = rtw_read32(padapter, REG_RXDMA_STATUS);
+       if (rx_dma_status != 0x00) {
+               DBG_88E("%s REG_RXDMA_STATUS:0x%08x\n", __func__, rx_dma_status);
+               rtw_write32(padapter, REG_RXDMA_STATUS, rx_dma_status);
+       }
+       fw_status = rtw_read8(padapter, REG_FMETHR);
+       if (fw_status != 0x00) {
+               if (fw_status == 1)
+                       DBG_88E("%s REG_FW_STATUS (0x%02x), Read_Efuse_Fail !!\n", __func__, fw_status);
+               else if (fw_status == 2)
+                       DBG_88E("%s REG_FW_STATUS (0x%02x), Condition_No_Match !!\n", __func__, fw_status);
+       }
+}
+
 void linked_status_chk(struct adapter *padapter)
 {
        u32     i;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_sreset.c b/drivers/staging/r8188eu/hal/rtl8188e_sreset.c
deleted file mode 100644 (file)
index 7fec776..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#define _RTL8188E_SRESET_C_
-
-#include "../include/rtl8188e_sreset.h"
-#include "../include/rtl8188e_hal.h"
-
-void rtl8188e_sreset_linked_status_check(struct adapter *padapter)
-{
-       u32 rx_dma_status = 0;
-       u8 fw_status = 0;
-       rx_dma_status = rtw_read32(padapter, REG_RXDMA_STATUS);
-       if (rx_dma_status != 0x00) {
-               DBG_88E("%s REG_RXDMA_STATUS:0x%08x\n", __func__, rx_dma_status);
-               rtw_write32(padapter, REG_RXDMA_STATUS, rx_dma_status);
-       }
-       fw_status = rtw_read8(padapter, REG_FMETHR);
-       if (fw_status != 0x00) {
-               if (fw_status == 1)
-                       DBG_88E("%s REG_FW_STATUS (0x%02x), Read_Efuse_Fail !!\n", __func__, fw_status);
-               else if (fw_status == 2)
-                       DBG_88E("%s REG_FW_STATUS (0x%02x), Condition_No_Match !!\n", __func__, fw_status);
-       }
-}
index f8ac4920f0491429fa8f3e86aeeb2d9189109a62..9bfa255f16796f2058da5b2026ed976a47a67972 100644 (file)
@@ -13,7 +13,6 @@
 #include "rtl8188e_recv.h"
 #include "rtl8188e_xmit.h"
 #include "rtl8188e_cmd.h"
-#include "rtl8188e_sreset.h"
 #include "rtw_efuse.h"
 #include "odm_precomp.h"
 #include "odm.h"
diff --git a/drivers/staging/r8188eu/include/rtl8188e_sreset.h b/drivers/staging/r8188eu/include/rtl8188e_sreset.h
deleted file mode 100644 (file)
index 4e96a5a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef _RTL8188E_SRESET_H_
-#define _RTL8188E_SRESET_H_
-
-#include "osdep_service.h"
-#include "drv_types.h"
-
-void rtl8188e_sreset_linked_status_check(struct adapter *padapter);
-
-#endif