rtl8723d_lps_poff.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
  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. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. /******************************************** CONST ************************/
  21. #define NUM_OF_REGISTER_BANK 13
  22. #define NUM_OF_TOTAL_DWORD (NUM_OF_REGISTER_BANK * 64)
  23. #define TOTAL_LEN_FOR_HIOE ((NUM_OF_TOTAL_DWORD + 1) * 8)
  24. #define LPS_POFF_STATIC_FILE_LEN (TOTAL_LEN_FOR_HIOE + TXDESC_SIZE)
  25. #define LPS_POFF_DYNAMIC_FILE_LEN (512 + TXDESC_SIZE)
  26. /******************************************** CONST ************************/
  27. /******************************************** MACRO ************************/
  28. /* HOIE Entry Definition */
  29. #define SET_HOIE_ENTRY_LOW_DATA(__pHOIE, __Value) \
  30. SET_BITS_TO_LE_4BYTE((__pHOIE), 0, 16, __Value)
  31. #define SET_HOIE_ENTRY_HIGH_DATA(__pHOIE, __Value) \
  32. SET_BITS_TO_LE_4BYTE((__pHOIE), 16, 16, __Value)
  33. #define SET_HOIE_ENTRY_MODE_SELECT(__pHOIE, __Value) \
  34. SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 0, 1, __Value)
  35. #define SET_HOIE_ENTRY_ADDRESS(__pHOIE, __Value) \
  36. SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 1, 14, __Value)
  37. #define SET_HOIE_ENTRY_BYTE_MASK(__pHOIE, __Value) \
  38. SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 15, 4, __Value)
  39. #define SET_HOIE_ENTRY_IO_LOCK(__pHOIE, __Value) \
  40. SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 19, 1, __Value)
  41. #define SET_HOIE_ENTRY_RD_EN(__pHOIE, __Value) \
  42. SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 20, 1, __Value)
  43. #define SET_HOIE_ENTRY_WR_EN(__pHOIE, __Value) \
  44. SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 21, 1, __Value)
  45. #define SET_HOIE_ENTRY_RAW_RW(__pHOIE, __Value) \
  46. SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 22, 1, __Value)
  47. #define SET_HOIE_ENTRY_RAW(__pHOIE, __Value) \
  48. SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 23, 1, __Value)
  49. #define SET_HOIE_ENTRY_IO_DELAY(__pHOIE, __Value) \
  50. SET_BITS_TO_LE_4BYTE((__pHOIE)+4, 24, 8, __Value)
  51. /*********************Function Definition*******************************************/
  52. void rtl8723d_lps_poff_init(PADAPTER padapter);
  53. void rtl8723d_lps_poff_deinit(PADAPTER padapter);
  54. bool rtl8723d_lps_poff_get_txbndy_status(PADAPTER padapter);
  55. void rtl8723d_lps_poff_h2c_ctrl(PADAPTER padapter, u8 enable);
  56. void rtl8723d_lps_poff_set_ps_mode(PADAPTER padapter, bool bEnterLPS);
  57. bool rtl8723d_lps_poff_get_status(PADAPTER padapter);
  58. void rtl8723d_lps_poff_wow(PADAPTER padapter);