1 /****************************************************************************** 2 * 3 * Copyright(c) 2007 - 2017 Realtek Corporation. 4 * 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. 8 * 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 12 * more details. 13 * 14 *****************************************************************************/ 15 16 /******************************************** CONST ************************/ 17 #define NUM_OF_REGISTER_BANK 13 18 #define NUM_OF_TOTAL_DWORD (NUM_OF_REGISTER_BANK * 64) 19 #define TOTAL_LEN_FOR_HIOE ((NUM_OF_TOTAL_DWORD + 1) * 8) 20 #define LPS_POFF_STATIC_FILE_LEN (TOTAL_LEN_FOR_HIOE + TXDESC_SIZE) 21 #define LPS_POFF_DYNAMIC_FILE_LEN (512 + TXDESC_SIZE) 22 /******************************************** CONST ************************/ 23 24 /******************************************** MACRO ************************/ 25 /* HOIE Entry Definition */ 26 #define SET_HOIE_ENTRY_LOW_DATA(__pHOIE, __Value) \ 27 SET_BITS_TO_LE_4BYTE((__pHOIE), 0, 16, __Value) 28 #define SET_HOIE_ENTRY_HIGH_DATA(__pHOIE, __Value) \ 29 SET_BITS_TO_LE_4BYTE((__pHOIE), 16, 16, __Value) 30 #define SET_HOIE_ENTRY_MODE_SELECT(__pHOIE, __Value) \ 31 SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 0, 1, __Value) 32 #define SET_HOIE_ENTRY_ADDRESS(__pHOIE, __Value) \ 33 SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 1, 14, __Value) 34 #define SET_HOIE_ENTRY_BYTE_MASK(__pHOIE, __Value) \ 35 SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 15, 4, __Value) 36 #define SET_HOIE_ENTRY_IO_LOCK(__pHOIE, __Value) \ 37 SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 19, 1, __Value) 38 #define SET_HOIE_ENTRY_RD_EN(__pHOIE, __Value) \ 39 SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 20, 1, __Value) 40 #define SET_HOIE_ENTRY_WR_EN(__pHOIE, __Value) \ 41 SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 21, 1, __Value) 42 #define SET_HOIE_ENTRY_RAW_RW(__pHOIE, __Value) \ 43 SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 22, 1, __Value) 44 #define SET_HOIE_ENTRY_RAW(__pHOIE, __Value) \ 45 SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 23, 1, __Value) 46 #define SET_HOIE_ENTRY_IO_DELAY(__pHOIE, __Value) \ 47 SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 24, 8, __Value) 48 49 /*********************Function Definition*******************************************/ 50 void rtl8723d_lps_poff_init(PADAPTER padapter); 51 void rtl8723d_lps_poff_deinit(PADAPTER padapter); 52 bool rtl8723d_lps_poff_get_txbndy_status(PADAPTER padapter); 53 void rtl8723d_lps_poff_h2c_ctrl(PADAPTER padapter, u8 enable); 54 void rtl8723d_lps_poff_set_ps_mode(PADAPTER padapter, bool bEnterLPS); 55 bool rtl8723d_lps_poff_get_status(PADAPTER padapter); 56 void rtl8723d_lps_poff_wow(PADAPTER padapter); 57