From 9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00 Mon Sep 17 00:00:00 2001 From: Yunhong Jiang Date: Tue, 4 Aug 2015 12:17:53 -0700 Subject: Add the rt linux 4.1.3-rt3 as base Import the rt linux 4.1.3-rt3 as OPNFV kvm base. It's from git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-4.1.y-rt and the base is: commit 0917f823c59692d751951bf5ea699a2d1e2f26a2 Author: Sebastian Andrzej Siewior Date: Sat Jul 25 12:13:34 2015 +0200 Prepare v4.1.3-rt3 Signed-off-by: Sebastian Andrzej Siewior We lose all the git history this way and it's not good. We should apply another opnfv project repo in future. Change-Id: I87543d81c9df70d99c5001fbdf646b202c19f423 Signed-off-by: Yunhong Jiang --- kernel/drivers/staging/rtl8188eu/core/rtw_sreset.c | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 kernel/drivers/staging/rtl8188eu/core/rtw_sreset.c (limited to 'kernel/drivers/staging/rtl8188eu/core/rtw_sreset.c') diff --git a/kernel/drivers/staging/rtl8188eu/core/rtw_sreset.c b/kernel/drivers/staging/rtl8188eu/core/rtw_sreset.c new file mode 100644 index 000000000..e725a4708 --- /dev/null +++ b/kernel/drivers/staging/rtl8188eu/core/rtw_sreset.c @@ -0,0 +1,64 @@ +/****************************************************************************** + * + * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + * + * + ******************************************************************************/ + +#include +#include + +void sreset_init_value(struct adapter *padapter) +{ + struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); + struct sreset_priv *psrtpriv = &pHalData->srestpriv; + + psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS; +} + +u8 sreset_get_wifi_status(struct adapter *padapter) +{ + struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); + struct sreset_priv *psrtpriv = &pHalData->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) +{ + struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter); + pHalData->srestpriv.Wifi_Error_Status = status; +} -- cgit 1.2.3-korg