wmi_services.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. /*
  2. * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /**
  27. * This file defines WMI services bitmap and the set of WMI services .
  28. * defines macrso to set/clear/get different service bits from the bitmap.
  29. * the service bitmap is sent up to the host via WMI_READY command.
  30. *
  31. */
  32. #ifndef _WMI_SERVICES_H_
  33. #define _WMI_SERVICES_H_
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. typedef enum {
  38. WMI_SERVICE_BEACON_OFFLOAD = 0, /* beacon offload */
  39. WMI_SERVICE_SCAN_OFFLOAD, /* scan offload */
  40. WMI_SERVICE_ROAM_SCAN_OFFLOAD, /* roam scan offload */
  41. WMI_SERVICE_BCN_MISS_OFFLOAD, /* beacon miss offload */
  42. WMI_SERVICE_STA_PWRSAVE, /* fake sleep + basic power save */
  43. WMI_SERVICE_STA_ADVANCED_PWRSAVE, /* uapsd, pspoll, force sleep */
  44. WMI_SERVICE_AP_UAPSD, /* uapsd on AP */
  45. WMI_SERVICE_AP_DFS, /* DFS on AP */
  46. WMI_SERVICE_11AC, /* supports 11ac */
  47. WMI_SERVICE_BLOCKACK, /* Supports triggering ADDBA/DELBA from host */
  48. WMI_SERVICE_PHYERR, /* PHY error */
  49. WMI_SERVICE_BCN_FILTER, /* Beacon filter support */
  50. WMI_SERVICE_RTT, /* RTT (round trip time) support */
  51. WMI_SERVICE_WOW, /* WOW Support */
  52. WMI_SERVICE_RATECTRL_CACHE, /* Rate-control caching */
  53. WMI_SERVICE_IRAM_TIDS, /* TIDs in IRAM */
  54. WMI_SERVICE_ARPNS_OFFLOAD, /* ARP NS Offload support for STA vdev*/
  55. WMI_SERVICE_NLO, /* Network list offload service */
  56. WMI_SERVICE_GTK_OFFLOAD, /* GTK offload */
  57. WMI_SERVICE_SCAN_SCH, /* Scan Scheduler Service */
  58. WMI_SERVICE_CSA_OFFLOAD, /* CSA offload service */
  59. WMI_SERVICE_CHATTER, /* Chatter service */
  60. WMI_SERVICE_COEX_FREQAVOID, /* FW report freq range to avoid */
  61. WMI_SERVICE_PACKET_POWER_SAVE, /* packet power save service */
  62. WMI_SERVICE_FORCE_FW_HANG, /* Service to test the firmware recovery mechanism */
  63. WMI_SERVICE_GPIO, /* GPIO service */
  64. WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, /* Modulated DTIM support */
  65. WMI_STA_UAPSD_BASIC_AUTO_TRIG, /* Basic version of station UAPSD AC Trigger Generation Method with
  66. * variable tigger periods (service, delay, and suspend intervals) */
  67. WMI_STA_UAPSD_VAR_AUTO_TRIG, /* Station UAPSD AC Trigger Generation Method with variable
  68. * trigger periods (service, delay, and suspend intervals) */
  69. WMI_SERVICE_STA_KEEP_ALIVE, /* Serivce to support the STA KEEP ALIVE mechanism */
  70. WMI_SERVICE_TX_ENCAP, /* Packet type for TX encapsulation */
  71. WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, /* detect out-of-sync sleeping stations */
  72. WMI_SERVICE_EARLY_RX, /* adaptive early-rx feature */
  73. WMI_SERVICE_STA_SMPS, /* STA MIMO-PS */
  74. WMI_SERVICE_FWTEST, /* Firmware test service */
  75. WMI_SERVICE_STA_WMMAC, /* STA WMMAC */
  76. WMI_SERVICE_TDLS, /* TDLS support */
  77. WMI_SERVICE_BURST, /* SIFS spaced burst support */
  78. WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE, /* Dynamic beaocn interval change for SAP/P2p GO in MCC scenario */
  79. WMI_SERVICE_ADAPTIVE_OCS, /* Service to support adaptive off-channel scheduler */
  80. WMI_SERVICE_BA_SSN_SUPPORT, /* target will provide Sequence number for the peer/tid combo */
  81. WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE,
  82. WMI_SERVICE_WLAN_HB, /* wlan HB service */
  83. WMI_SERVICE_LTE_ANT_SHARE_SUPPORT, /* support LTE/WLAN antenna sharing */
  84. WMI_SERVICE_BATCH_SCAN, /*Service to support batch scan */
  85. WMI_SERVICE_QPOWER, /* QPower service */
  86. WMI_SERVICE_PLMREQ,
  87. WMI_SERVICE_THERMAL_MGMT, /* thermal throttling support */
  88. WMI_SERVICE_RMC, /* RMC support */
  89. WMI_SERVICE_MHF_OFFLOAD, /* multi-hop forwarding offload */
  90. WMI_SERVICE_COEX_SAR, /* target support SAR tx limit from WMI_PDEV_PARAM_TXPOWER_LIMITxG */
  91. WMI_SERVICE_BCN_TXRATE_OVERRIDE, /* Will support the bcn/prb rsp rate override */
  92. WMI_SERVICE_NAN, /* Neighbor Awareness Network */
  93. WMI_SERVICE_L1SS_STAT, /* L1SS statistics counter report */
  94. WMI_SERVICE_ESTIMATE_LINKSPEED, /* Linkspeed Estimation per peer */
  95. WMI_SERVICE_OBSS_SCAN, /* Service to support OBSS scan */
  96. WMI_SERVICE_TDLS_OFFCHAN, /* TDLS off channel support */
  97. WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, /* TDLS UAPSD Buffer STA support */
  98. WMI_SERVICE_TDLS_UAPSD_SLEEP_STA, /* TDLS UAPSD Sleep STA support */
  99. WMI_SERVICE_IBSS_PWRSAVE, /* IBSS power save support */
  100. WMI_SERVICE_LPASS, /*Service to support LPASS */
  101. WMI_SERVICE_EXTSCAN, /* Extended Scans */
  102. WMI_SERVICE_D0WOW, /* D0-WOW Support */
  103. WMI_SERVICE_HSOFFLOAD, /* Hotspot offload feature Support */
  104. WMI_SERVICE_ROAM_HO_OFFLOAD, /* roam handover offload */
  105. WMI_SERVICE_RX_FULL_REORDER, /* target-based Rx full reorder */
  106. WMI_SERVICE_DHCP_OFFLOAD, /* DHCP offload support */
  107. WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT, /* STA RX DATA offload to IPA support */
  108. WMI_SERVICE_MDNS_OFFLOAD, /* mDNS responder offload support */
  109. WMI_SERVICE_SAP_AUTH_OFFLOAD, /* softap auth offload */
  110. WMI_SERVICE_DUAL_BAND_SIMULTANEOUS_SUPPORT, /* Dual Band Simultaneous support */
  111. WMI_SERVICE_OCB, /* OCB mode support */
  112. WMI_SERVICE_AP_ARPNS_OFFLOAD, /* arp offload support for ap mode vdev */
  113. WMI_SERVICE_PER_BAND_CHAINMASK_SUPPORT, /* Per band chainmask support */
  114. WMI_SERVICE_PACKET_FILTER_OFFLOAD, /* Per vdev packet filters */
  115. WMI_SERVICE_MGMT_TX_HTT, /* Mgmt Tx via HTT interface */
  116. WMI_SERVICE_MGMT_TX_WMI, /* Mgmt Tx via WMI interface */
  117. WMI_SERVICE_EXT_MSG, /* WMI_SERVICE_READY_EXT msg follows */
  118. WMI_SERVICE_MAWC, /* Motion Aided WiFi Connectivity (MAWC)*/
  119. /* target will send ASSOC_CONF after ASSOC_CMD is processed */
  120. WMI_SERVICE_PEER_ASSOC_CONF,
  121. /* enhanced green ap support */
  122. WMI_SERVICE_EGAP,
  123. /* FW supports 11W PMF Offload for STA */
  124. WMI_SERVICE_STA_PMF_OFFLOAD,
  125. /* FW supports unified D0 and D3 wow */
  126. WMI_SERVICE_UNIFIED_WOW_CAPABILITY,
  127. WMI_SERVICE_ENHANCED_PROXY_STA, /* Enhanced ProxySTA mode support */
  128. WMI_SERVICE_ATF, /* Air Time Fairness support */
  129. WMI_SERVICE_COEX_GPIO, /* BTCOEX GPIO support */
  130. WMI_SERVICE_AUX_SPECTRAL_INTF, /* Aux Radio enhancement support for ignoring spectral scan intf from main radios */
  131. WMI_SERVICE_AUX_CHAN_LOAD_INTF, /* Aux Radio enhancement support for ignoring chan load intf from main radios*/
  132. WMI_SERVICE_BSS_CHANNEL_INFO_64, /* BSS channel info (freq, noise floor, 64-bit counters) event support */
  133. WMI_SERVICE_ENTERPRISE_MESH, /* Enterprise MESH Service Support */
  134. WMI_SERVICE_RESTRT_CHNL_SUPPORT, /* Restricted Channel Support */
  135. WMI_SERVICE_BPF_OFFLOAD, /* FW supports bpf offload */
  136. WMI_SERVICE_SYNC_DELETE_CMDS, /* FW sends response event for Peer, Vdev delete commands */
  137. WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT,
  138. WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT,
  139. /* allow per-peer tx MCS min/max limits by host */
  140. WMI_SERVICE_RATECTRL_LIMIT_MAX_MIN_RATES,
  141. WMI_SERVICE_NAN_DATA, /* FW supports NAN data */
  142. WMI_SERVICE_NAN_RTT, /* FW supports NAN RTT */
  143. WMI_SERVICE_11AX, /* FW supports 802.11ax */
  144. /* WMI_SERVICE_DEPRECATED_REPLACE
  145. * FW supports these new WMI commands, to be used rather than
  146. * deprecated matching commands:
  147. * - WMI_PDEV_SET_PCL_CMDID (vs. WMI_SOC_SET_PCL_CMDID)
  148. * - WMI_PDEV_SET_HW_MODE_CMDID (vs. WMI_SOC_SET_HW_MODE_CMDID)
  149. * - WMI_PDEV_SET_MAC_CONFIG_CMDID
  150. * (vs. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID)
  151. * - WMI_PDEV_SET_ANTENNA_MODE_CMDID
  152. * (vs. WMI_SOC_SET_ANTENNA_MODE_CMDID)
  153. * - WMI_VDEV_SET_DSCP_TID_MAP_CMDID (vs. WMI_VDEV_SET_WMM_PARAMS_CMDID)
  154. */
  155. WMI_SERVICE_DEPRECATED_REPLACE,
  156. WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE, /* FW supports a new mode that allows to run connection tracker in host */
  157. WMI_SERVICE_ENHANCED_MCAST_FILTER,/* FW supports enhanced multicast filtering (of mcast IP inside ucast WLAN) */
  158. /* periodic channel stats service */
  159. WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT,
  160. WMI_SERVICE_MESH_11S, /* 11s mesh service support */
  161. /*
  162. * FW+HW supports 10 MHz(half rate) and 5 MHz(quarter rate) channel
  163. * bandwidth
  164. */
  165. WMI_SERVICE_HALF_RATE_QUARTER_RATE_SUPPORT,
  166. WMI_MAX_SERVICE = 128 /* max service */
  167. } WMI_SERVICE;
  168. #define WMI_SERVICE_BM_SIZE ((WMI_MAX_SERVICE + sizeof(A_UINT32)- 1)/sizeof(A_UINT32))
  169. /*
  170. * depreciated the name WMI_SERVICE_ROAM_OFFLOAD, but here to help compiling
  171. * with old host driver
  172. */
  173. #define WMI_SERVICE_ROAM_OFFLOAD WMI_SERVICE_ROAM_SCAN_OFFLOAD
  174. /*
  175. * turn on the WMI service bit corresponding to the WMI service.
  176. */
  177. #define WMI_SERVICE_ENABLE(pwmi_svc_bmap,svc_id) \
  178. ( (pwmi_svc_bmap)[(svc_id)/(sizeof(A_UINT32))] |= \
  179. (1 << ((svc_id)%(sizeof(A_UINT32)))) )
  180. #define WMI_SERVICE_DISABLE(pwmi_svc_bmap,svc_id) \
  181. ( (pwmi_svc_bmap)[(svc_id)/(sizeof(A_UINT32))] &= \
  182. ( ~(1 << ((svc_id)%(sizeof(A_UINT32)))) ) )
  183. #define WMI_SERVICE_IS_ENABLED(pwmi_svc_bmap,svc_id) \
  184. ( ((pwmi_svc_bmap)[(svc_id)/(sizeof(A_UINT32))] & \
  185. (1 << ((svc_id)%(sizeof(A_UINT32)))) ) != 0)
  186. #ifdef __cplusplus
  187. }
  188. #endif
  189. #endif /*_WMI_SERVICES_H_*/