1 /******************************************************************************
3 * Copyright(c) 2007 - 2017 Realtek Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 *****************************************************************************/
15 #ifndef _RTW_SRESET_H_
16 #define _RTW_SRESET_H_
18 /* #include <drv_types.h> */
22 SRESET_TGP_XMIT_STATUS = 1,
23 SRESET_TGP_LINK_STATUS = 2,
28 _mutex silentreset_mutex;
29 u8 silent_reset_inprogress;
32 systime last_tx_complete_time;
34 s32 dbg_trigger_point;
38 u64 tx_dma_status_cnt;
39 u64 rx_dma_status_cnt;
43 u16 last_mac_rxff_ptr;
49 #define WIFI_STATUS_SUCCESS 0
50 #define USB_VEN_REQ_CMD_FAIL BIT0
51 #define USB_READ_PORT_FAIL BIT1
52 #define USB_WRITE_PORT_FAIL BIT2
53 #define WIFI_MAC_TXDMA_ERROR BIT3
54 #define WIFI_TX_HANG BIT4
55 #define WIFI_RX_HANG BIT5
56 #define WIFI_IF_NOT_EXIST BIT6
58 void sreset_init_value(_adapter *padapter);
59 void sreset_reset_value(_adapter *padapter);
60 u8 sreset_get_wifi_status(_adapter *padapter);
61 void sreset_set_wifi_error_status(_adapter *padapter, u32 status);
62 void sreset_set_trigger_point(_adapter *padapter, s32 tgp);
63 bool sreset_inprogress(_adapter *padapter);
64 void sreset_reset(_adapter *padapter);