staging: r8188eu: move linked status check from hal to rtw_mlme_ext
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>
This commit is contained in:
parent
22f92b7747
commit
b66fbc855e
6 changed files with 18 additions and 41 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue