rtw_android.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. #ifndef __RTW_ANDROID_H__
  16. #define __RTW_ANDROID_H__
  17. enum ANDROID_WIFI_CMD {
  18. ANDROID_WIFI_CMD_START,
  19. ANDROID_WIFI_CMD_STOP,
  20. ANDROID_WIFI_CMD_SCAN_ACTIVE,
  21. ANDROID_WIFI_CMD_SCAN_PASSIVE,
  22. ANDROID_WIFI_CMD_RSSI,
  23. ANDROID_WIFI_CMD_LINKSPEED,
  24. ANDROID_WIFI_CMD_RXFILTER_START,
  25. ANDROID_WIFI_CMD_RXFILTER_STOP,
  26. ANDROID_WIFI_CMD_RXFILTER_ADD,
  27. ANDROID_WIFI_CMD_RXFILTER_REMOVE,
  28. ANDROID_WIFI_CMD_BTCOEXSCAN_START,
  29. ANDROID_WIFI_CMD_BTCOEXSCAN_STOP,
  30. ANDROID_WIFI_CMD_BTCOEXMODE,
  31. ANDROID_WIFI_CMD_SETSUSPENDOPT,
  32. ANDROID_WIFI_CMD_P2P_DEV_ADDR,
  33. ANDROID_WIFI_CMD_SETFWPATH,
  34. ANDROID_WIFI_CMD_SETBAND,
  35. ANDROID_WIFI_CMD_GETBAND,
  36. ANDROID_WIFI_CMD_COUNTRY,
  37. ANDROID_WIFI_CMD_P2P_SET_NOA,
  38. ANDROID_WIFI_CMD_P2P_GET_NOA,
  39. ANDROID_WIFI_CMD_P2P_SET_PS,
  40. ANDROID_WIFI_CMD_SET_AP_WPS_P2P_IE,
  41. ANDROID_WIFI_CMD_MIRACAST,
  42. #ifdef CONFIG_PNO_SUPPORT
  43. ANDROID_WIFI_CMD_PNOSSIDCLR_SET,
  44. ANDROID_WIFI_CMD_PNOSETUP_SET,
  45. ANDROID_WIFI_CMD_PNOENABLE_SET,
  46. ANDROID_WIFI_CMD_PNODEBUG_SET,
  47. #endif
  48. ANDROID_WIFI_CMD_MACADDR,
  49. ANDROID_WIFI_CMD_BLOCK_SCAN,
  50. ANDROID_WIFI_CMD_BLOCK,
  51. ANDROID_WIFI_CMD_WFD_ENABLE,
  52. ANDROID_WIFI_CMD_WFD_DISABLE,
  53. ANDROID_WIFI_CMD_WFD_SET_TCPPORT,
  54. ANDROID_WIFI_CMD_WFD_SET_MAX_TPUT,
  55. ANDROID_WIFI_CMD_WFD_SET_DEVTYPE,
  56. ANDROID_WIFI_CMD_CHANGE_DTIM,
  57. ANDROID_WIFI_CMD_HOSTAPD_SET_MACADDR_ACL,
  58. ANDROID_WIFI_CMD_HOSTAPD_ACL_ADD_STA,
  59. ANDROID_WIFI_CMD_HOSTAPD_ACL_REMOVE_STA,
  60. #if defined(CONFIG_GTK_OL) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0))
  61. ANDROID_WIFI_CMD_GTK_REKEY_OFFLOAD,
  62. #endif /* CONFIG_GTK_OL */
  63. ANDROID_WIFI_CMD_P2P_DISABLE,
  64. ANDROID_WIFI_CMD_SET_AEK,
  65. ANDROID_WIFI_CMD_DRIVERVERSION,
  66. ANDROID_WIFI_CMD_MAX
  67. };
  68. int rtw_android_cmdstr_to_num(char *cmdstr);
  69. int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd);
  70. #if defined(CONFIG_PNO_SUPPORT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
  71. int rtw_android_pno_enable(struct net_device *net, int pno_enable);
  72. int rtw_android_cfg80211_pno_setup(struct net_device *net,
  73. struct cfg80211_ssid *ssid, int n_ssids, int interval);
  74. #endif
  75. #if defined(RTW_ENABLE_WIFI_CONTROL_FUNC)
  76. int rtw_android_wifictrl_func_add(void);
  77. void rtw_android_wifictrl_func_del(void);
  78. void *wl_android_prealloc(int section, unsigned long size);
  79. int wifi_get_irq_number(unsigned long *irq_flags_ptr);
  80. int wifi_set_power(int on, unsigned long msec);
  81. int wifi_get_mac_addr(unsigned char *buf);
  82. void *wifi_get_country_code(char *ccode);
  83. #else
  84. static inline int rtw_android_wifictrl_func_add(void)
  85. {
  86. return 0;
  87. }
  88. static inline void rtw_android_wifictrl_func_del(void) {}
  89. #endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */
  90. #ifdef CONFIG_GPIO_WAKEUP
  91. #ifdef CONFIG_PLATFORM_INTEL_BYT
  92. int wifi_configure_gpio(void);
  93. #endif /* CONFIG_PLATFORM_INTEL_BYT */
  94. void wifi_free_gpio(unsigned int gpio);
  95. #endif /* CONFIG_GPIO_WAKEUP */
  96. #endif /* __RTW_ANDROID_H__ */