wma.h 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333
  1. /*
  2. * Copyright (c) 2013-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. #ifndef WMA_H
  27. #define WMA_H
  28. #include "a_types.h"
  29. #include "qdf_types.h"
  30. #include "osapi_linux.h"
  31. #include "htc_packet.h"
  32. #include "i_qdf_event.h"
  33. #include "wmi_services.h"
  34. #include "wmi_unified.h"
  35. #include "wmi_version.h"
  36. #include "qdf_types.h"
  37. #include "cfg_api.h"
  38. #include "qdf_status.h"
  39. #include "cds_sched.h"
  40. #include "sir_mac_prot_def.h"
  41. #include "wma_types.h"
  42. #include <linux/workqueue.h>
  43. #include "utils_api.h"
  44. #include "lim_types.h"
  45. #include "wmi_unified_api.h"
  46. #include "cdp_txrx_cmn.h"
  47. #include "dbglog.h"
  48. #include "cds_ieee80211_common.h"
  49. /* Platform specific configuration for max. no. of fragments */
  50. #define QCA_OL_11AC_TX_MAX_FRAGS 2
  51. /* Private */
  52. #define WMA_READY_EVENTID_TIMEOUT 6000
  53. #define WMA_SERVICE_READY_EXT_TIMEOUT 6000
  54. #define WMA_TGT_SUSPEND_COMPLETE_TIMEOUT 6000
  55. #define WMA_WAKE_LOCK_TIMEOUT 1000
  56. #define WMA_RESUME_TIMEOUT 6000
  57. #define MAX_MEM_CHUNKS 32
  58. #define WMA_CRASH_INJECT_TIMEOUT 5000
  59. /* MAC ID to PDEV ID mapping is as given below
  60. * MAC_ID PDEV_ID
  61. * 0 1
  62. * 1 2
  63. * SOC Level WMI_PDEV_ID_SOC
  64. */
  65. #define WMA_MAC_TO_PDEV_MAP(x) ((x) + (1))
  66. #define WMA_PDEV_TO_MAC_MAP(x) ((x) - (1))
  67. /* In prima 12 HW stations are supported including BCAST STA(staId 0)
  68. * and SELF STA(staId 1) so total ASSOC stations which can connect to Prima
  69. * SoftAP = 12 - 1(Self STa) - 1(Bcast Sta) = 10 Stations.
  70. */
  71. #ifdef WLAN_SOFTAP_VSTA_FEATURE
  72. #define WMA_MAX_SUPPORTED_STAS 38
  73. #else
  74. #define WMA_MAX_SUPPORTED_STAS 12
  75. #endif
  76. #define WMA_MAX_SUPPORTED_BSS 5
  77. #define FRAGMENT_SIZE 3072
  78. #define WMA_INVALID_VDEV_ID 0xFF
  79. #define MAX_MEM_CHUNKS 32
  80. #define WMA_MAX_VDEV_SIZE 20
  81. #define WMA_VDEV_TBL_ENTRY_ADD 1
  82. #define WMA_VDEV_TBL_ENTRY_DEL 0
  83. /* 11A/G channel boundary */
  84. #define WMA_11A_CHANNEL_BEGIN 34
  85. #define WMA_11A_CHANNEL_END 165
  86. #define WMA_11G_CHANNEL_BEGIN 1
  87. #define WMA_11G_CHANNEL_END 14
  88. #define WMA_11P_CHANNEL_BEGIN (170)
  89. #define WMA_11P_CHANNEL_END (184)
  90. #define WMA_LOGD(args ...) \
  91. QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_DEBUG, ## args)
  92. #define WMA_LOGI(args ...) \
  93. QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_INFO, ## args)
  94. #define WMA_LOGW(args ...) \
  95. QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_WARN, ## args)
  96. #define WMA_LOGE(args ...) \
  97. QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, ## args)
  98. #define WMA_LOGP(args ...) \
  99. QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_FATAL, ## args)
  100. #define WMA_DEBUG_ALWAYS
  101. #ifdef WMA_DEBUG_ALWAYS
  102. #define WMA_LOGA(args ...) \
  103. QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_FATAL, ## args)
  104. #else
  105. #define WMA_LOGA(args ...)
  106. #endif
  107. #define ALIGNED_WORD_SIZE 4
  108. #define WLAN_HAL_MSG_TYPE_MAX_ENUM_SIZE 0x7FFF
  109. #define WMA_WILDCARD_PDEV_ID 0x0
  110. /* Prefix used by scan req ids generated on the host */
  111. #define WMA_HOST_SCAN_REQID_PREFIX 0xA000
  112. /* Prefix used by roam scan req ids generated on the host */
  113. #define WMA_HOST_ROAM_SCAN_REQID_PREFIX 0xA800
  114. /* Prefix used by scan requestor id on host */
  115. #define WMA_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  116. #define WMA_HW_DEF_SCAN_MAX_DURATION 30000 /* 30 secs */
  117. /* Max offchannel duration */
  118. #define WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS (3)
  119. #define WMA_SCAN_NPROBES_DEFAULT (2)
  120. #define WMA_SCAN_IDLE_TIME_DEFAULT (25)
  121. #define WMA_P2P_SCAN_MAX_BURST_DURATION (180)
  122. #define WMA_CTS_DURATION_MS_MAX (32)
  123. #define WMA_GO_MIN_ACTIVE_SCAN_BURST_DURATION (40)
  124. #define WMA_GO_MAX_ACTIVE_SCAN_BURST_DURATION (120)
  125. #define WMA_DWELL_TIME_PASSIVE_DEFAULT (110)
  126. #define WMA_DWELL_TIME_PROBE_TIME_MAP_SIZE (11)
  127. #define WMA_3PORT_CONC_SCAN_MAX_BURST_DURATION (25)
  128. #define WMA_SEC_TO_USEC (1000000)
  129. #define BEACON_TX_BUFFER_SIZE (512)
  130. /* WMA_ETHER_TYPE_OFFSET = sa(6) + da(6) */
  131. #define WMA_ETHER_TYPE_OFFSET (6 + 6)
  132. /* WMA_ICMP_V6_HEADER_OFFSET = sa(6) + da(6) + eth_type(2) + icmp_v6_hdr(6)*/
  133. #define WMA_ICMP_V6_HEADER_OFFSET (6 + 6 + 2 + 6)
  134. /* WMA_ICMP_V6_TYPE_OFFSET = sa(6) + da(6) + eth_type(2) + 40 */
  135. #define WMA_ICMP_V6_TYPE_OFFSET (6 + 6 + 2 + 40)
  136. /* WMA_IPV4_PROTOCOL = sa(6) + da(6) + eth_type(2) + 9 */
  137. #define WMA_IPV4_PROTOCOL (6 + 6 + 2 + 9)
  138. #define WMA_ICMP_V6_HEADER_TYPE (0x3A)
  139. #define WMA_ICMP_V6_RA_TYPE (0x86)
  140. #define WMA_ICMP_V6_NS_TYPE (0x87)
  141. #define WMA_ICMP_V6_NA_TYPE (0x88)
  142. #define WMA_BCAST_MAC_ADDR (0xFF)
  143. #define WMA_MCAST_IPV4_MAC_ADDR (0x01)
  144. #define WMA_MCAST_IPV6_MAC_ADDR (0x33)
  145. #define WMA_ICMP_PROTOCOL (0x01)
  146. #define WMA_IS_EAPOL_GET_MIN_LEN 14
  147. #define WMA_EAPOL_SUBTYPE_GET_MIN_LEN 21
  148. #define WMA_EAPOL_INFO_GET_MIN_LEN 23
  149. #define WMA_IS_DHCP_GET_MIN_LEN 38
  150. #define WMA_DHCP_SUBTYPE_GET_MIN_LEN 0x11D
  151. #define WMA_DHCP_INFO_GET_MIN_LEN 50
  152. #define WMA_IS_ARP_GET_MIN_LEN 14
  153. #define WMA_ARP_SUBTYPE_GET_MIN_LEN 22
  154. #define WMA_IPV4_PROTO_GET_MIN_LEN 24
  155. #define WMA_IPV4_PKT_INFO_GET_MIN_LEN 42
  156. #define WMA_ICMP_SUBTYPE_GET_MIN_LEN 35
  157. #define WMA_IPV6_PROTO_GET_MIN_LEN 21
  158. #define WMA_IPV6_PKT_INFO_GET_MIN_LEN 62
  159. #define WMA_ICMPV6_SUBTYPE_GET_MIN_LEN 55
  160. /**
  161. * ds_mode: distribution system mode
  162. * @IEEE80211_NO_DS: NO DS at either side
  163. * @IEEE80211_TO_DS: DS at receiver side
  164. * @IEEE80211_FROM_DS: DS at sender side
  165. * @IEEE80211_DS_TO_DS: DS at both sender and revceiver side
  166. */
  167. enum ds_mode {
  168. IEEE80211_NO_DS,
  169. IEEE80211_TO_DS,
  170. IEEE80211_FROM_DS,
  171. IEEE80211_DS_TO_DS
  172. };
  173. /* Roaming default values
  174. * All time and period values are in milliseconds.
  175. * All rssi values are in dB except for WMA_NOISE_FLOOR_DBM_DEFAULT.
  176. */
  177. #define WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME (4)
  178. #define WMA_NOISE_FLOOR_DBM_DEFAULT (-96)
  179. #define WMA_ROAM_RSSI_DIFF_DEFAULT (5)
  180. #define WMA_ROAM_DWELL_TIME_ACTIVE_DEFAULT (100)
  181. #define WMA_ROAM_DWELL_TIME_PASSIVE_DEFAULT (110)
  182. #define WMA_ROAM_MIN_REST_TIME_DEFAULT (50)
  183. #define WMA_ROAM_MAX_REST_TIME_DEFAULT (500)
  184. #define WMA_ROAM_LOW_RSSI_TRIGGER_DEFAULT (20)
  185. #define WMA_ROAM_LOW_RSSI_TRIGGER_VERYLOW (10)
  186. #define WMA_ROAM_BEACON_WEIGHT_DEFAULT (14)
  187. #define WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT (120000)
  188. #define WMA_ROAM_OPP_SCAN_AGING_PERIOD_DEFAULT (WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT * 5)
  189. #define WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT (10)
  190. #define WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT (10)
  191. #define WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT_P2P (15)
  192. #define WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT_P2P (45)
  193. #define WMA_INVALID_KEY_IDX 0xff
  194. #define WMA_DFS_RADAR_FOUND 1
  195. #define WMA_MAX_RF_CHAINS(x) ((1 << x) - 1)
  196. #define WMA_MIN_RF_CHAINS (1)
  197. #ifdef FEATURE_WLAN_EXTSCAN
  198. #define WMA_MAX_EXTSCAN_MSG_SIZE 1536
  199. #define WMA_EXTSCAN_REST_TIME 100
  200. #define WMA_EXTSCAN_MAX_SCAN_TIME 50000
  201. #define WMA_EXTSCAN_BURST_DURATION 150
  202. #endif
  203. #define WMA_BCN_BUF_MAX_SIZE 2500
  204. #define WMA_NOA_IE_SIZE(num_desc) (2 + (13 * (num_desc)))
  205. #define WMA_MAX_NOA_DESCRIPTORS 4
  206. #define WMA_TIM_SUPPORTED_PVB_LENGTH ((HAL_NUM_STA / 8) + 1)
  207. #define WMA_WOW_PTRN_MASK_VALID 0xFF
  208. #define WMA_NUM_BITS_IN_BYTE 8
  209. #define WMA_AP_WOW_DEFAULT_PTRN_MAX 4
  210. #define WMA_STA_WOW_DEFAULT_PTRN_MAX 5
  211. #define WMA_BSS_STATUS_STARTED 0x1
  212. #define WMA_BSS_STATUS_STOPPED 0x2
  213. #define WMA_TARGET_REQ_TYPE_VDEV_START 0x1
  214. #define WMA_TARGET_REQ_TYPE_VDEV_STOP 0x2
  215. #define WMA_TARGET_REQ_TYPE_VDEV_DEL 0x3
  216. #define WMA_PEER_ASSOC_CNF_START 0x01
  217. #define WMA_PEER_ASSOC_TIMEOUT (6000) /* 6 seconds */
  218. #define WMA_DELETE_STA_RSP_START 0x02
  219. #define WMA_DELETE_STA_TIMEOUT (6000) /* 6 seconds */
  220. #define WMA_DEL_P2P_SELF_STA_RSP_START 0x03
  221. #define WMA_VDEV_START_REQUEST_TIMEOUT (6000) /* 6 seconds */
  222. #define WMA_VDEV_STOP_REQUEST_TIMEOUT (6000) /* 6 seconds */
  223. #define WMA_TGT_INVALID_SNR 0x127
  224. #define WMA_TX_Q_RECHECK_TIMER_WAIT 2 /* 2 ms */
  225. #define WMA_TX_Q_RECHECK_TIMER_MAX_WAIT 20 /* 20 ms */
  226. #define WMA_MAX_NUM_ARGS 8
  227. #define WMA_SMPS_MASK_LOWER_16BITS 0xFF
  228. #define WMA_SMPS_MASK_UPPER_3BITS 0x7
  229. #define WMA_SMPS_PARAM_VALUE_S 29
  230. #define WMA_MAX_SCAN_ID 0x00FF
  231. /*
  232. * Setting the Tx Comp Timeout to 1 secs.
  233. * TODO: Need to Revist the Timing
  234. */
  235. #define WMA_TX_FRAME_COMPLETE_TIMEOUT 1000
  236. #define WMA_TX_FRAME_BUFFER_NO_FREE 0
  237. #define WMA_TX_FRAME_BUFFER_FREE 1
  238. /* Default InActivity Time is 200 ms */
  239. #define POWERSAVE_DEFAULT_INACTIVITY_TIME 200
  240. /* Default Listen Interval */
  241. #define POWERSAVE_DEFAULT_LISTEN_INTERVAL 1
  242. /*
  243. * TODO: Add WMI_CMD_ID_MAX as part of WMI_CMD_ID
  244. * instead of assigning it to the last valid wmi
  245. * cmd+1 to avoid updating this when a command is
  246. * added/deleted.
  247. */
  248. #define WMI_CMDID_MAX (WMI_TXBF_CMDID + 1)
  249. #define WMA_NLO_FREQ_THRESH 1000 /* in MHz */
  250. #define WMA_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */
  251. #define WMA_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */
  252. /* Default rssi threshold defined in CFG80211 */
  253. #define WMA_RSSI_THOLD_DEFAULT -300
  254. #ifdef FEATURE_WLAN_SCAN_PNO
  255. #define WMA_PNO_MATCH_WAKE_LOCK_TIMEOUT (5 * 1000) /* in msec */
  256. #define WMA_PNO_SCAN_COMPLETE_WAKE_LOCK_TIMEOUT (2 * 1000) /* in msec */
  257. #endif
  258. #define WMA_AUTH_REQ_RECV_WAKE_LOCK_TIMEOUT (5 * 1000) /* in msec */
  259. #define WMA_ASSOC_REQ_RECV_WAKE_LOCK_DURATION (5 * 1000) /* in msec */
  260. #define WMA_DEAUTH_RECV_WAKE_LOCK_DURATION (5 * 1000) /* in msec */
  261. #define WMA_DISASSOC_RECV_WAKE_LOCK_DURATION (5 * 1000) /* in msec */
  262. #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
  263. #define WMA_AUTO_SHUTDOWN_WAKE_LOCK_DURATION (5 * 1000) /* in msec */
  264. #endif
  265. #define WMA_BMISS_EVENT_WAKE_LOCK_DURATION (4 * 1000) /* in msec */
  266. #define WMA_FW_RSP_EVENT_WAKE_LOCK_DURATION (3 * 1000) /* in msec */
  267. #define WMA_TXMIC_LEN 8
  268. #define WMA_RXMIC_LEN 8
  269. /*
  270. * Length = (2 octets for Index and CTWin/Opp PS) and
  271. * (13 octets for each NOA Descriptors)
  272. */
  273. #define WMA_P2P_NOA_IE_OPP_PS_SET (0x80)
  274. #define WMA_P2P_NOA_IE_CTWIN_MASK (0x7F)
  275. #define WMA_P2P_IE_ID 0xdd
  276. #define WMA_P2P_WFA_OUI { 0x50, 0x6f, 0x9a }
  277. #define WMA_P2P_WFA_VER 0x09 /* ver 1.0 */
  278. #define WMA_WSC_OUI { 0x00, 0x50, 0xF2 } /* Microsoft WSC OUI byte */
  279. /* P2P Sub element defintions (according to table 5 of Wifi's P2P spec) */
  280. #define WMA_P2P_SUB_ELEMENT_STATUS 0
  281. #define WMA_P2P_SUB_ELEMENT_MINOR_REASON 1
  282. #define WMA_P2P_SUB_ELEMENT_CAPABILITY 2
  283. #define WMA_P2P_SUB_ELEMENT_DEVICE_ID 3
  284. #define WMA_P2P_SUB_ELEMENT_GO_INTENT 4
  285. #define WMA_P2P_SUB_ELEMENT_CONFIGURATION_TIMEOUT 5
  286. #define WMA_P2P_SUB_ELEMENT_LISTEN_CHANNEL 6
  287. #define WMA_P2P_SUB_ELEMENT_GROUP_BSSID 7
  288. #define WMA_P2P_SUB_ELEMENT_EXTENDED_LISTEN_TIMING 8
  289. #define WMA_P2P_SUB_ELEMENT_INTENDED_INTERFACE_ADDR 9
  290. #define WMA_P2P_SUB_ELEMENT_MANAGEABILITY 10
  291. #define WMA_P2P_SUB_ELEMENT_CHANNEL_LIST 11
  292. #define WMA_P2P_SUB_ELEMENT_NOA 12
  293. #define WMA_P2P_SUB_ELEMENT_DEVICE_INFO 13
  294. #define WMA_P2P_SUB_ELEMENT_GROUP_INFO 14
  295. #define WMA_P2P_SUB_ELEMENT_GROUP_ID 15
  296. #define WMA_P2P_SUB_ELEMENT_INTERFACE 16
  297. #define WMA_P2P_SUB_ELEMENT_OP_CHANNEL 17
  298. #define WMA_P2P_SUB_ELEMENT_INVITATION_FLAGS 18
  299. #define WMA_P2P_SUB_ELEMENT_VENDOR 221
  300. /* Macros for handling unaligned memory accesses */
  301. #define P2PIE_PUT_LE16(a, val) \
  302. do { \
  303. (a)[1] = ((u16) (val)) >> 8; \
  304. (a)[0] = ((u16) (val)) & 0xff; \
  305. } while (0)
  306. #define P2PIE_PUT_LE32(a, val) \
  307. do { \
  308. (a)[3] = (u8) ((((u32) (val)) >> 24) & 0xff); \
  309. (a)[2] = (u8) ((((u32) (val)) >> 16) & 0xff); \
  310. (a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff); \
  311. (a)[0] = (u8) (((u32) (val)) & 0xff); \
  312. } while (0)
  313. #define WMA_DEFAULT_MAX_PSPOLL_BEFORE_WAKE 1
  314. #define WMA_DEFAULT_QPOWER_MAX_PSPOLL_BEFORE_WAKE 1
  315. #define WMA_DEFAULT_QPOWER_TX_WAKE_THRESHOLD 2
  316. #define WMA_DEFAULT_SIFS_BURST_DURATION 8160
  317. #define WMA_VHT_PPS_PAID_MATCH 1
  318. #define WMA_VHT_PPS_GID_MATCH 2
  319. #define WMA_VHT_PPS_DELIM_CRC_FAIL 3
  320. #define WMA_DFS_MAX_20M_SUB_CH 8
  321. #define WMA_80MHZ_START_CENTER_CH_DIFF 6
  322. #define WMA_160MHZ_START_CENTER_CH_DIFF 14
  323. #define WMA_NEXT_20MHZ_START_CH_DIFF 4
  324. #define WMA_DEFAULT_HW_MODE_INDEX 0xFFFF
  325. #define TWO_THIRD (2/3)
  326. /**
  327. * WMA hardware mode list bit-mask definitions.
  328. * Bits 4:0, 31:29 are unused.
  329. *
  330. * The below definitions are added corresponding to WMI DBS HW mode
  331. * list to make it independent of firmware changes for WMI definitions.
  332. * Currently these definitions have dependency with BIT positions of
  333. * the existing WMI macros. Thus, if the BIT positions are changed for
  334. * WMI macros, then these macros' BIT definitions are also need to be
  335. * changed.
  336. */
  337. #define WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  338. #define WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  339. #define WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  340. #define WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  341. #define WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  342. #define WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  343. #define WMA_HW_MODE_DBS_MODE_BITPOS (7)
  344. #define WMA_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  345. #define WMA_HW_MODE_SBS_MODE_BITPOS (5)
  346. #define WMA_HW_MODE_MAC0_TX_STREAMS_MASK \
  347. (0xf << WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  348. #define WMA_HW_MODE_MAC0_RX_STREAMS_MASK \
  349. (0xf << WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  350. #define WMA_HW_MODE_MAC1_TX_STREAMS_MASK \
  351. (0xf << WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  352. #define WMA_HW_MODE_MAC1_RX_STREAMS_MASK \
  353. (0xf << WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  354. #define WMA_HW_MODE_MAC0_BANDWIDTH_MASK \
  355. (0xf << WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  356. #define WMA_HW_MODE_MAC1_BANDWIDTH_MASK \
  357. (0xf << WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  358. #define WMA_HW_MODE_DBS_MODE_MASK \
  359. (0x1 << WMA_HW_MODE_DBS_MODE_BITPOS)
  360. #define WMA_HW_MODE_AGILE_DFS_MODE_MASK \
  361. (0x1 << WMA_HW_MODE_AGILE_DFS_MODE_BITPOS)
  362. #define WMA_HW_MODE_SBS_MODE_MASK \
  363. (0x1 << WMA_HW_MODE_SBS_MODE_BITPOS)
  364. #define WMA_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  365. WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  366. #define WMA_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  367. WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  368. #define WMA_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  369. WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  370. #define WMA_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  371. WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  372. #define WMA_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  373. WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  374. #define WMA_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  375. WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  376. #define WMA_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  377. WMI_SET_BITS(hw_mode, WMA_HW_MODE_DBS_MODE_BITPOS, 1, value)
  378. #define WMA_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  379. WMI_SET_BITS(hw_mode, WMA_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  380. #define WMA_HW_MODE_SBS_MODE_SET(hw_mode, value) \
  381. WMI_SET_BITS(hw_mode, WMA_HW_MODE_SBS_MODE_BITPOS, 1, value)
  382. #define WMA_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  383. ((hw_mode & WMA_HW_MODE_MAC0_TX_STREAMS_MASK) >> \
  384. WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  385. #define WMA_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  386. ((hw_mode & WMA_HW_MODE_MAC0_RX_STREAMS_MASK) >> \
  387. WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  388. #define WMA_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  389. ((hw_mode & WMA_HW_MODE_MAC1_TX_STREAMS_MASK) >> \
  390. WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  391. #define WMA_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  392. ((hw_mode & WMA_HW_MODE_MAC1_RX_STREAMS_MASK) >> \
  393. WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  394. #define WMA_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  395. ((hw_mode & WMA_HW_MODE_MAC0_BANDWIDTH_MASK) >> \
  396. WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  397. #define WMA_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  398. ((hw_mode & WMA_HW_MODE_MAC1_BANDWIDTH_MASK) >> \
  399. WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  400. #define WMA_HW_MODE_DBS_MODE_GET(hw_mode) \
  401. ((hw_mode & WMA_HW_MODE_DBS_MODE_MASK) >> \
  402. WMA_HW_MODE_DBS_MODE_BITPOS)
  403. #define WMA_HW_MODE_AGILE_DFS_GET(hw_mode) \
  404. ((hw_mode & WMA_HW_MODE_AGILE_DFS_MODE_MASK) >> \
  405. WMA_HW_MODE_AGILE_DFS_MODE_BITPOS)
  406. #define WMA_HW_MODE_SBS_MODE_GET(hw_mode) \
  407. ((hw_mode & WMA_HW_MODE_SBS_MODE_MASK) >> \
  408. WMA_HW_MODE_SBS_MODE_BITPOS)
  409. #define WMA_SCAN_END_EVENT (WMI_SCAN_EVENT_COMPLETED | \
  410. WMI_SCAN_EVENT_DEQUEUED | \
  411. WMI_SCAN_EVENT_START_FAILED)
  412. /**
  413. * struct probeTime_dwellTime - probe time, dwell time map
  414. * @dwell_time: dwell time
  415. * @probe_time: repeat probe time
  416. */
  417. typedef struct probeTime_dwellTime {
  418. uint8_t dwell_time;
  419. uint8_t probe_time;
  420. } t_probeTime_dwellTime;
  421. static const t_probeTime_dwellTime
  422. probe_time_dwell_time_map[WMA_DWELL_TIME_PROBE_TIME_MAP_SIZE] = {
  423. {28, 11}, /* 0 SSID */
  424. {28, 20}, /* 1 SSID */
  425. {28, 20}, /* 2 SSID */
  426. {28, 20}, /* 3 SSID */
  427. {28, 20}, /* 4 SSID */
  428. {28, 20}, /* 5 SSID */
  429. {28, 20}, /* 6 SSID */
  430. {28, 11}, /* 7 SSID */
  431. {28, 11}, /* 8 SSID */
  432. {28, 11}, /* 9 SSID */
  433. {28, 8} /* 10 SSID */
  434. };
  435. typedef void (*txFailIndCallback)(uint8_t *peer_mac, uint8_t seqNo);
  436. typedef void (*encrypt_decrypt_cb)(struct sir_encrypt_decrypt_rsp_params
  437. *encrypt_decrypt_rsp_params);
  438. /**
  439. * enum t_wma_drv_type - wma driver type
  440. * @WMA_DRIVER_TYPE_PRODUCTION: production driver type
  441. * @WMA_DRIVER_TYPE_MFG: manufacture driver type
  442. * @WMA_DRIVER_TYPE_INVALID: invalid driver type
  443. */
  444. typedef enum {
  445. WMA_DRIVER_TYPE_PRODUCTION = 0,
  446. WMA_DRIVER_TYPE_MFG = 1,
  447. WMA_DRIVER_TYPE_INVALID = 0x7FFFFFFF
  448. } t_wma_drv_type;
  449. #ifdef FEATURE_WLAN_TDLS
  450. /**
  451. * enum t_wma_tdls_mode - TDLS mode
  452. * @WMA_TDLS_SUPPORT_NOT_ENABLED: tdls is disable
  453. * @WMA_TDLS_SUPPORT_DISABLED: suppress implicit trigger and not respond to peer
  454. * @WMA_TDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY: suppress implicit trigger,
  455. * but respond to the peer
  456. * @WMA_TDLS_SUPPORT_ENABLED: implicit trigger
  457. * @WMA_TDLS_SUPPORT_ACTIVE_EXTERNAL_CONTROL: External control means
  458. * implicit trigger but only to a peer mac configured by user space.
  459. */
  460. typedef enum {
  461. WMA_TDLS_SUPPORT_NOT_ENABLED = 0,
  462. WMA_TDLS_SUPPORT_DISABLED,
  463. WMA_TDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY,
  464. WMA_TDLS_SUPPORT_ENABLED,
  465. WMA_TDLS_SUPPORT_ACTIVE_EXTERNAL_CONTROL,
  466. } t_wma_tdls_mode;
  467. /**
  468. * enum wma_tdls_peer_notification - TDLS events
  469. * @WMA_TDLS_SHOULD_DISCOVER: tdls discovery recommended for peer (always based
  470. * on tx bytes per second > tx_discover threshold
  471. * NB: notification will be re-sent after
  472. * discovery_request_interval_ms
  473. * @WMA_TDLS_SHOULD_TEARDOWN: tdls link tear down recommended for peer
  474. * due to tx bytes per second below
  475. * tx_teardown_threshold
  476. * NB: this notification sent once
  477. * @WMA_TDLS_PEER_DISCONNECTED: tx peer TDLS link tear down complete
  478. */
  479. enum wma_tdls_peer_notification {
  480. WMA_TDLS_SHOULD_DISCOVER,
  481. WMA_TDLS_SHOULD_TEARDOWN,
  482. WMA_TDLS_PEER_DISCONNECTED,
  483. };
  484. /**
  485. * enum wma_tdls_peer_reason - TDLS peer reason
  486. * @WMA_TDLS_TEARDOWN_REASON_TX: tdls teardown recommended due to low transmits
  487. * @WMA_TDLS_TEARDOWN_REASON_RATE: tdls tear down recommended due to
  488. * packet rates < AP rates
  489. * @WMA_TDLS_TEARDOWN_REASON_RSSI: tdls link tear down recommended
  490. * due to poor RSSI
  491. * @WMA_TDLS_TEARDOWN_REASON_SCAN: tdls link tear down recommended
  492. * due to offchannel scan
  493. * @WMA_TDLS_DISCONNECTED_REASON_PEER_DELETE: tdls peer disconnected
  494. * due to peer deletion
  495. */
  496. enum wma_tdls_peer_reason {
  497. WMA_TDLS_TEARDOWN_REASON_TX,
  498. WMA_TDLS_TEARDOWN_REASON_RATE,
  499. WMA_TDLS_TEARDOWN_REASON_RSSI,
  500. WMA_TDLS_TEARDOWN_REASON_SCAN,
  501. WMA_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  502. };
  503. #endif /* FEATURE_WLAN_TDLS */
  504. /**
  505. * enum wma_rx_exec_ctx - wma rx execution context
  506. * @WMA_RX_WORK_CTX: work queue context execution
  507. * @WMA_RX_TASKLET_CTX: tasklet context execution
  508. * @WMA_RX_SERIALIZER_CTX: MC thread context execution
  509. *
  510. */
  511. enum wma_rx_exec_ctx {
  512. WMA_RX_WORK_CTX,
  513. WMA_RX_TASKLET_CTX,
  514. WMA_RX_SERIALIZER_CTX
  515. };
  516. /**
  517. * enum wma_phy_idx
  518. * @PHY1: to notify caller that PHY1 specific param needed
  519. * @PHY2: to notify caller that PHY2 specific param needed
  520. * @PHY1_PHY2: to notify caller that both PHY's param needed
  521. * Note: Firmware sends phy map in terms of bitmask, so enum
  522. * also needs to be defined that way.
  523. *
  524. * For example, 0x3 = 0011 = BIT0 corresponds to one phy and
  525. * BIT1 coresponds to another phy. There is no direct relation between
  526. * each bit to particular PHY (ex. PHYA or PHYB).
  527. *
  528. * In simple terms, 3 means referring both PHYs & 1 or 2 means
  529. * referring to either PHYA or PHYB.
  530. */
  531. enum wma_phy_idx {
  532. PHY1 = 0x1, /* 0x1 */
  533. PHY2, /* 0x2 */
  534. PHY1_PHY2, /* 0x3 */
  535. };
  536. /**
  537. * struct wma_mem_chunk - memory chunks
  538. * @vaddr: virtual address
  539. * @paddr: physical address
  540. * @memctx: dma mapped memory
  541. * @len: length of data
  542. * @req_id: request id
  543. *
  544. * memory chunck allocated by Host to be managed by FW
  545. * used only for low latency interfaces like pcie
  546. */
  547. struct wma_mem_chunk {
  548. uint32_t *vaddr;
  549. uint32_t paddr;
  550. qdf_dma_mem_context(memctx);
  551. uint32_t len;
  552. uint32_t req_id;
  553. };
  554. /**
  555. * struct p2p_scan_param - p2p scan listen parameters
  556. * @scan_id: scan id
  557. * @p2p_scan_type: p2p scan type
  558. */
  559. struct p2p_scan_param {
  560. uint32_t scan_id;
  561. tSirP2pScanType p2p_scan_type;
  562. };
  563. /**
  564. * struct scan_param - scan parameters
  565. * @scan_id: scan id
  566. * @scan_requestor_id: scan requestor id
  567. * @p2p_scan_type: p2p scan type
  568. */
  569. struct scan_param {
  570. uint32_t scan_id;
  571. uint32_t scan_requestor_id;
  572. tSirP2pScanType p2p_scan_type;
  573. uint32_t chan_freq;
  574. };
  575. /**
  576. * struct beacon_info - structure to store beacon template
  577. * @buf: skb ptr
  578. * @len: length
  579. * @dma_mapped: is it dma mapped or not
  580. * @tim_ie_offset: TIM IE offset
  581. * @dtim_count: DTIM count
  582. * @seq_no: sequence no
  583. * @noa_sub_ie: NOA sub IE
  584. * @noa_sub_ie_len: NOA sub IE length
  585. * @noa_ie: NOA IE
  586. * @p2p_ie_offset: p2p IE offset
  587. * @lock: lock
  588. */
  589. struct beacon_info {
  590. qdf_nbuf_t buf;
  591. uint32_t len;
  592. uint8_t dma_mapped;
  593. uint32_t tim_ie_offset;
  594. uint8_t dtim_count;
  595. uint16_t seq_no;
  596. uint8_t noa_sub_ie[2 + WMA_NOA_IE_SIZE(WMA_MAX_NOA_DESCRIPTORS)];
  597. uint16_t noa_sub_ie_len;
  598. uint8_t *noa_ie;
  599. uint16_t p2p_ie_offset;
  600. qdf_spinlock_t lock;
  601. };
  602. /**
  603. * struct beacon_tim_ie - structure to store TIM IE of beacon
  604. * @tim_ie: tim ie
  605. * @tim_len: tim ie length
  606. * @dtim_count: dtim count
  607. * @dtim_period: dtim period
  608. * @tim_bitctl: tim bit control
  609. * @tim_bitmap: tim bitmap
  610. */
  611. struct beacon_tim_ie {
  612. uint8_t tim_ie;
  613. uint8_t tim_len;
  614. uint8_t dtim_count;
  615. uint8_t dtim_period;
  616. uint8_t tim_bitctl;
  617. uint8_t tim_bitmap[1];
  618. } __ATTRIB_PACK;
  619. /**
  620. * struct pps - packet power save parameter
  621. * @paid_match_enable: paid match enable
  622. * @gid_match_enable: gid match enable
  623. * @tim_clear: time clear
  624. * @dtim_clear: dtim clear
  625. * @eof_delim: eof delim
  626. * @mac_match: mac match
  627. * @delim_fail: delim fail
  628. * @nsts_zero: nsts zero
  629. * @rssi_chk: RSSI check
  630. * @ebt_5g: ebt 5GHz
  631. */
  632. struct pps {
  633. bool paid_match_enable;
  634. bool gid_match_enable;
  635. bool tim_clear;
  636. bool dtim_clear;
  637. bool eof_delim;
  638. bool mac_match;
  639. bool delim_fail;
  640. bool nsts_zero;
  641. bool rssi_chk;
  642. bool ebt_5g;
  643. };
  644. /**
  645. * struct qpower_params - qpower related parameters
  646. * @max_ps_poll_cnt: max ps poll count
  647. * @max_tx_before_wake: max tx before wake
  648. * @spec_ps_poll_wake_interval: ps poll wake interval
  649. * @max_spec_nodata_ps_poll: no data ps poll
  650. */
  651. struct qpower_params {
  652. uint32_t max_ps_poll_cnt;
  653. uint32_t max_tx_before_wake;
  654. uint32_t spec_ps_poll_wake_interval;
  655. uint32_t max_spec_nodata_ps_poll;
  656. };
  657. /**
  658. * struct gtx_config_t - GTX config
  659. * @gtxRTMask: for HT and VHT rate masks
  660. * @gtxUsrcfg: host request for GTX mask
  661. * @gtxPERThreshold: PER Threshold (default: 10%)
  662. * @gtxPERMargin: PER margin (default: 2%)
  663. * @gtxTPCstep: TCP step (default: 1)
  664. * @gtxTPCMin: TCP min (default: 5)
  665. * @gtxBWMask: BW mask (20/40/80/160 Mhz)
  666. */
  667. typedef struct {
  668. uint32_t gtxRTMask[2];
  669. uint32_t gtxUsrcfg;
  670. uint32_t gtxPERThreshold;
  671. uint32_t gtxPERMargin;
  672. uint32_t gtxTPCstep;
  673. uint32_t gtxTPCMin;
  674. uint32_t gtxBWMask;
  675. } gtx_config_t;
  676. /**
  677. * struct pdev_cli_config_t - store pdev parameters
  678. * @ani_enable: ANI is enabled/disable on target
  679. * @ani_poll_len: store ANI polling period
  680. * @ani_listen_len: store ANI listening period
  681. * @ani_ofdm_level: store ANI OFDM immunity level
  682. * @ani_cck_level: store ANI CCK immunity level
  683. * @cwmenable: Dynamic bw is enable/disable in fw
  684. * @txchainmask: tx chain mask
  685. * @rxchainmask: rx chain mask
  686. * @txpow2g: tx power limit for 2GHz
  687. * @txpow5g: tx power limit for 5GHz
  688. * @burst_enable: is burst enable/disable
  689. * @burst_dur: burst duration
  690. *
  691. * This structure stores pdev parameters.
  692. * Some of these parameters are set in fw and some
  693. * parameters are only maintained in host.
  694. */
  695. typedef struct {
  696. uint32_t ani_enable;
  697. uint32_t ani_poll_len;
  698. uint32_t ani_listen_len;
  699. uint32_t ani_ofdm_level;
  700. uint32_t ani_cck_level;
  701. uint32_t cwmenable;
  702. uint32_t cts_cbw;
  703. uint32_t txchainmask;
  704. uint32_t rxchainmask;
  705. uint32_t txpow2g;
  706. uint32_t txpow5g;
  707. uint32_t burst_enable;
  708. uint32_t burst_dur;
  709. } pdev_cli_config_t;
  710. /**
  711. * struct vdev_cli_config_t - store vdev parameters
  712. * @nss: nss width
  713. * @ldpc: is ldpc is enable/disable
  714. * @tx_stbc: TX STBC is enable/disable
  715. * @rx_stbc: RX STBC is enable/disable
  716. * @shortgi: short gi is enable/disable
  717. * @rtscts_en: RTS/CTS is enable/disable
  718. * @chwidth: channel width
  719. * @tx_rate: tx rate
  720. * @ampdu: ampdu size
  721. * @amsdu: amsdu size
  722. * @erx_adjust: enable/disable early rx enable
  723. * @erx_bmiss_num: target bmiss number per sample
  724. * @erx_bmiss_cycle: sample cycle
  725. * @erx_slop_step: slop_step value
  726. * @erx_init_slop: init slop
  727. * @erx_adj_pause: pause adjust enable/disable
  728. * @erx_dri_sample: enable/disable drift sample
  729. * @pps_params: packet power save parameters
  730. * @qpower_params: qpower parameters
  731. * @gtx_info: GTX offload info
  732. *
  733. * This structure stores vdev parameters.
  734. * Some of these parameters are set in fw and some
  735. * parameters are only maintained in host.
  736. */
  737. typedef struct {
  738. uint32_t nss;
  739. uint32_t ldpc;
  740. uint32_t tx_stbc;
  741. uint32_t rx_stbc;
  742. uint32_t shortgi;
  743. uint32_t rtscts_en;
  744. uint32_t chwidth;
  745. uint32_t tx_rate;
  746. uint32_t ampdu;
  747. uint32_t amsdu;
  748. uint32_t erx_adjust;
  749. uint32_t erx_bmiss_num;
  750. uint32_t erx_bmiss_cycle;
  751. uint32_t erx_slop_step;
  752. uint32_t erx_init_slop;
  753. uint32_t erx_adj_pause;
  754. uint32_t erx_dri_sample;
  755. struct pps pps_params;
  756. struct qpower_params qpower_params;
  757. gtx_config_t gtx_info;
  758. } vdev_cli_config_t;
  759. /**
  760. * struct wma_version_info - Store wmi version info
  761. * @major: wmi major version
  762. * @minor: wmi minor version
  763. * @revision: wmi revision number
  764. */
  765. struct wma_version_info {
  766. u_int32_t major;
  767. u_int32_t minor;
  768. u_int32_t revision;
  769. };
  770. /**
  771. * struct wma_wow - store wow patterns
  772. * @magic_ptrn_enable: magic pattern enable/disable
  773. * @wow_enable: wow enable/disable
  774. * @wow_enable_cmd_sent: is wow enable command sent to fw
  775. * @deauth_enable: is deauth wakeup enable/disable
  776. * @disassoc_enable: is disassoc wakeup enable/disable
  777. * @bmiss_enable: is bmiss wakeup enable/disable
  778. * @gtk_pdev_enable: is GTK based wakeup enable/disable
  779. * @gtk_err_enable: is GTK error wakeup enable/disable
  780. * @lphb_cache: lphb cache
  781. *
  782. * This structure stores wow patterns and
  783. * wow related parameters in host.
  784. */
  785. struct wma_wow {
  786. bool magic_ptrn_enable;
  787. bool wow_enable;
  788. bool wow_enable_cmd_sent;
  789. bool deauth_enable;
  790. bool disassoc_enable;
  791. bool bmiss_enable;
  792. bool gtk_err_enable[WMA_MAX_SUPPORTED_BSS];
  793. #ifdef FEATURE_WLAN_LPHB
  794. /* currently supports only vdev 0.
  795. * cache has two entries: one for TCP and one for UDP.
  796. */
  797. tSirLPHBReq lphb_cache[2];
  798. #endif
  799. };
  800. #ifdef WLAN_FEATURE_11W
  801. #define CMAC_IPN_LEN (6)
  802. #define WMA_IGTK_KEY_INDEX_4 (4)
  803. #define WMA_IGTK_KEY_INDEX_5 (5)
  804. /**
  805. * struct wma_igtk_ipn_t - GTK IPN info
  806. * @ipn: IPN info
  807. */
  808. typedef struct {
  809. uint8_t ipn[CMAC_IPN_LEN];
  810. } wma_igtk_ipn_t;
  811. /**
  812. * struct wma_igtk_key_t - GTK key
  813. * @key_length: key length
  814. * @key: key
  815. * @key_id: key id
  816. */
  817. typedef struct {
  818. uint16_t key_length;
  819. uint8_t key[CSR_AES_KEY_LEN];
  820. /* IPN is maintained per iGTK keyID
  821. * 0th index for iGTK keyID = 4;
  822. * 1st index for iGTK KeyID = 5
  823. */
  824. wma_igtk_ipn_t key_id[2];
  825. } wma_igtk_key_t;
  826. #endif
  827. /**
  828. * struct vdev_restart_params_t - vdev restart parameters
  829. * @vdev_id: vdev id
  830. * @ssid: ssid
  831. * @flags: flags
  832. * @requestor_id: requestor id
  833. * @chan: channel
  834. * @hidden_ssid_restart_in_progress: hidden ssid restart flag
  835. * @ssidHidden: is ssid hidden or not
  836. */
  837. typedef struct {
  838. A_UINT32 vdev_id;
  839. wmi_ssid ssid;
  840. A_UINT32 flags;
  841. A_UINT32 requestor_id;
  842. A_UINT32 disable_hw_ack;
  843. wmi_channel chan;
  844. qdf_atomic_t hidden_ssid_restart_in_progress;
  845. uint8_t ssidHidden;
  846. } vdev_restart_params_t;
  847. /**
  848. * struct wma_txrx_node - txrx node
  849. * @addr: mac address
  850. * @bssid: bssid
  851. * @handle: wma handle
  852. * @beacon: beacon info
  853. * @vdev_restart_params: vdev restart parameters
  854. * @config: per vdev config parameters
  855. * @scan_info: scan info
  856. * @type: type
  857. * @sub_type: sub type
  858. * @nlo_match_evt_received: is nlo match event received or not
  859. * @pno_in_progress: is pno in progress or not
  860. * @plm_in_progress: is plm in progress or not
  861. * @ptrn_match_enable: is pattern match is enable or not
  862. * @num_wow_default_patterns: number of default wow patterns configured for vdev
  863. * @num_wow_user_patterns: number of user wow patterns configured for vdev
  864. * @conn_state: connection state
  865. * @beaconInterval: beacon interval
  866. * @llbCoexist: 11b coexist
  867. * @shortSlotTimeSupported: is short slot time supported or not
  868. * @dtimPeriod: DTIM period
  869. * @chanmode: channel mode
  870. * @vht_capable: VHT capablity flag
  871. * @ht_capable: HT capablity flag
  872. * @mhz: channel frequency in KHz
  873. * @chan_width: channel bandwidth
  874. * @vdev_up: is vdev up or not
  875. * @tsfadjust: TSF adjust
  876. * @addBssStaContext: add bss context
  877. * @aid: association id
  878. * @rmfEnabled: Robust Management Frame (RMF) enabled/disabled
  879. * @key: GTK key
  880. * @uapsd_cached_val: uapsd cached value
  881. * @stats_rsp: stats response
  882. * @fw_stats_set: fw stats value
  883. * @del_staself_req: delete sta self request
  884. * @bss_status: bss status
  885. * @rate_flags: rate flags
  886. * @nss: nss value
  887. * @is_channel_switch: is channel switch
  888. * @pause_bitmap: pause bitmap
  889. * @tx_power: tx power in dbm
  890. * @max_tx_power: max tx power in dbm
  891. * @nwType: network type (802.11a/b/g/n/ac)
  892. * @staKeyParams: sta key parameters
  893. * @ps_enabled: is powersave enable/disable
  894. * @dtim_policy: DTIM policy
  895. * @peer_count: peer count
  896. * @roam_synch_in_progress: flag is in progress or not
  897. * @plink_status_req: link status request
  898. * @psnr_req: snr request
  899. * @delay_before_vdev_stop: delay
  900. * @tx_streams: number of tx streams can be used by the vdev
  901. * @rx_streams: number of rx streams can be used by the vdev
  902. * @chain_mask: chain mask can be used by the vdev
  903. * @mac_id: the mac on which vdev is on
  904. * @wep_default_key_idx: wep default index for group key
  905. * @arp_offload_req: cached arp offload request
  906. * @ns_offload_req: cached ns offload request
  907. * It stores parameters per vdev in wma.
  908. */
  909. struct wma_txrx_node {
  910. uint8_t addr[IEEE80211_ADDR_LEN];
  911. uint8_t bssid[IEEE80211_ADDR_LEN];
  912. void *handle;
  913. struct beacon_info *beacon;
  914. vdev_restart_params_t vdev_restart_params;
  915. vdev_cli_config_t config;
  916. struct scan_param scan_info;
  917. uint32_t type;
  918. uint32_t sub_type;
  919. #ifdef FEATURE_WLAN_SCAN_PNO
  920. bool nlo_match_evt_received;
  921. bool pno_in_progress;
  922. #endif
  923. #ifdef FEATURE_WLAN_ESE
  924. bool plm_in_progress;
  925. #endif
  926. bool ptrn_match_enable;
  927. uint8_t num_wow_default_patterns;
  928. uint8_t num_wow_user_patterns;
  929. bool conn_state;
  930. tSirMacBeaconInterval beaconInterval;
  931. uint8_t llbCoexist;
  932. uint8_t shortSlotTimeSupported;
  933. uint8_t dtimPeriod;
  934. WLAN_PHY_MODE chanmode;
  935. uint8_t vht_capable;
  936. uint8_t ht_capable;
  937. A_UINT32 mhz;
  938. enum phy_ch_width chan_width;
  939. bool vdev_active;
  940. bool vdev_up;
  941. uint64_t tsfadjust;
  942. void *addBssStaContext;
  943. uint8_t aid;
  944. uint8_t rmfEnabled;
  945. #ifdef WLAN_FEATURE_11W
  946. wma_igtk_key_t key;
  947. #endif /* WLAN_FEATURE_11W */
  948. uint32_t uapsd_cached_val;
  949. tAniGetPEStatsRsp *stats_rsp;
  950. uint8_t fw_stats_set;
  951. void *del_staself_req;
  952. qdf_atomic_t bss_status;
  953. uint8_t rate_flags;
  954. uint8_t nss;
  955. bool is_channel_switch;
  956. uint16_t pause_bitmap;
  957. int8_t tx_power;
  958. int8_t max_tx_power;
  959. uint32_t nwType;
  960. void *staKeyParams;
  961. uint32_t dtim_policy;
  962. uint32_t peer_count;
  963. bool roam_synch_in_progress;
  964. void *plink_status_req;
  965. void *psnr_req;
  966. uint8_t delay_before_vdev_stop;
  967. #ifdef FEATURE_WLAN_EXTSCAN
  968. bool extscan_in_progress;
  969. #endif
  970. uint32_t alt_modulated_dtim;
  971. bool alt_modulated_dtim_enabled;
  972. uint32_t tx_streams;
  973. uint32_t rx_streams;
  974. uint32_t chain_mask;
  975. uint32_t mac_id;
  976. bool roaming_in_progress;
  977. int32_t roam_synch_delay;
  978. uint8_t nss_2g;
  979. uint8_t nss_5g;
  980. bool p2p_lo_in_progress;
  981. uint8_t wep_default_key_idx;
  982. tSirHostOffloadReq arp_offload_req;
  983. tSirHostOffloadReq ns_offload_req;
  984. bool is_vdev_valid;
  985. };
  986. #if defined(QCA_WIFI_FTM)
  987. #define MAX_UTF_EVENT_LENGTH 2048
  988. #define MAX_WMI_UTF_LEN 252
  989. /**
  990. * struct SEG_HDR_INFO_STRUCT - header info
  991. * @len: length
  992. * @msgref: message refrence
  993. * @segmentInfo: segment info
  994. * @pad: padding
  995. */
  996. typedef struct {
  997. A_UINT32 len;
  998. A_UINT32 msgref;
  999. A_UINT32 segmentInfo;
  1000. A_UINT32 pad;
  1001. } SEG_HDR_INFO_STRUCT;
  1002. /**
  1003. * struct utf_event_info - UTF event info
  1004. * @data: data ptr
  1005. * @length: length
  1006. * @offset: offset
  1007. * @currentSeq: curent squence
  1008. * @expectedSeq: expected sequence
  1009. */
  1010. struct utf_event_info {
  1011. uint8_t *data;
  1012. uint32_t length;
  1013. qdf_size_t offset;
  1014. uint8_t currentSeq;
  1015. uint8_t expectedSeq;
  1016. };
  1017. #endif
  1018. /**
  1019. * struct scan_timer_info - scan timer info
  1020. * @vdev_id: vdev id
  1021. * @scan_id: scan id
  1022. */
  1023. typedef struct {
  1024. uint8_t vdev_id;
  1025. uint32_t scan_id;
  1026. } scan_timer_info;
  1027. /**
  1028. * struct ibss_power_save_params - IBSS power save parameters
  1029. * @atimWindowLength: ATIM window length
  1030. * @isPowerSaveAllowed: is power save allowed
  1031. * @isPowerCollapseAllowed: is power collapsed allowed
  1032. * @isAwakeonTxRxEnabled: is awake on tx/rx enabled
  1033. * @inactivityCount: inactivity count
  1034. * @txSPEndInactivityTime: tx SP end inactivity time
  1035. * @ibssPsWarmupTime: IBSS power save warm up time
  1036. * @ibssPs1RxChainInAtimEnable: IBSS power save rx chain in ATIM enable
  1037. */
  1038. typedef struct {
  1039. uint32_t atimWindowLength;
  1040. uint32_t isPowerSaveAllowed;
  1041. uint32_t isPowerCollapseAllowed;
  1042. uint32_t isAwakeonTxRxEnabled;
  1043. uint32_t inactivityCount;
  1044. uint32_t txSPEndInactivityTime;
  1045. uint32_t ibssPsWarmupTime;
  1046. uint32_t ibssPs1RxChainInAtimEnable;
  1047. } ibss_power_save_params;
  1048. /**
  1049. * struct dbs_hw_mode_info - WLAN_DBS_HW_MODES_TLV Format
  1050. * @tlv_header: TLV header, TLV tag and len; tag equals WMITLV_TAG_ARRAY_UINT32
  1051. * @hw_mode_list: WLAN_DBS_HW_MODE_LIST entries
  1052. */
  1053. struct dbs_hw_mode_info {
  1054. uint32_t tlv_header;
  1055. uint32_t *hw_mode_list;
  1056. };
  1057. /**
  1058. * struct mac_ss_bw_info - hw_mode_list PHY/MAC params for each MAC
  1059. * @mac_tx_stream: Max TX stream
  1060. * @mac_rx_stream: Max RX stream
  1061. * @mac_bw: Max bandwidth
  1062. */
  1063. struct mac_ss_bw_info {
  1064. uint32_t mac_tx_stream;
  1065. uint32_t mac_rx_stream;
  1066. uint32_t mac_bw;
  1067. };
  1068. /* Current HTC credit is 2, pool size of 50 is sufficient */
  1069. #define WMI_DESC_POOL_MAX 50
  1070. /**
  1071. * struct wmi_desc_t - wmi management Tx descriptor.
  1072. * @tx_cmpl_cb_func: completion callback function, when DL completion and
  1073. * OTA done.
  1074. * @ota_post_proc_func: Post process callback function registered.
  1075. * @nbuf: Network buffer to be freed.
  1076. * @desc_id: WMI descriptor.
  1077. */
  1078. struct wmi_desc_t {
  1079. pWMATxRxCompFunc tx_cmpl_cb;
  1080. pWMAAckFnTxComp ota_post_proc_cb;
  1081. qdf_nbuf_t nbuf;
  1082. uint32_t desc_id;
  1083. };
  1084. /**
  1085. * union wmi_desc_elem_t - linked list wmi desc pool.
  1086. * @next: Pointer next descritor in the pool.
  1087. * @wmi_desc: wmi descriptor element.
  1088. */
  1089. union wmi_desc_elem_t {
  1090. union wmi_desc_elem_t *next;
  1091. struct wmi_desc_t wmi_desc;
  1092. };
  1093. /**
  1094. * struct dual_mac_config - Dual MAC configurations
  1095. * @prev_scan_config: Previous scan configuration
  1096. * @prev_fw_mode_config: Previous FW mode configuration
  1097. * @cur_scan_config: Current scan configuration
  1098. * @cur_fw_mode_config: Current FW mode configuration
  1099. * @req_scan_config: Requested scan configuration
  1100. * @req_fw_mode_config: Requested FW mode configuration
  1101. */
  1102. struct dual_mac_config {
  1103. uint32_t prev_scan_config;
  1104. uint32_t prev_fw_mode_config;
  1105. uint32_t cur_scan_config;
  1106. uint32_t cur_fw_mode_config;
  1107. uint32_t req_scan_config;
  1108. uint32_t req_fw_mode_config;
  1109. };
  1110. /**
  1111. * struct wma_ini_config - Structure to hold wma ini configuration
  1112. * @max_no_of_peers: Max Number of supported
  1113. *
  1114. * Placeholder for WMA ini parameters.
  1115. */
  1116. struct wma_ini_config {
  1117. uint8_t max_no_of_peers;
  1118. };
  1119. /**
  1120. * struct wmi_valid_channels - Channel details part of WMI_SCAN_CHAN_LIST_CMDID
  1121. * @num_channels: Number of channels
  1122. * @channel_list: Channel list
  1123. */
  1124. struct wma_valid_channels {
  1125. uint8_t num_channels;
  1126. uint8_t channel_list[MAX_NUM_CHAN];
  1127. };
  1128. /**
  1129. * struct hw_mode_idx_to_mac_cap_idx - map between hw_mode to capabilities
  1130. * @num_of_macs: number of macs/PHYs for given hw_mode through hw_mode_id
  1131. * @mac_cap_idx: index of the mac/PHY for given hw_mode through hw_mode_id
  1132. * @hw_mode_id: given hw_mode id
  1133. */
  1134. struct hw_mode_idx_to_mac_cap_idx {
  1135. uint8_t num_of_macs;
  1136. uint8_t mac_cap_idx;
  1137. uint8_t hw_mode_id;
  1138. };
  1139. /**
  1140. * struct extended_caps - new extended caps given by firmware
  1141. * @num_hw_modes: number of hardware modes for current SOC
  1142. * @each_hw_mode_cap: hw mode id to phy id mapping
  1143. * @each_phy_cap_per_hwmode: PHY's caps for each hw mode
  1144. * @num_phy_for_hal_reg_cap: number of phy for hal reg cap
  1145. * @hw_mode_to_mac_cap_map: map between hw_mode to capabilities
  1146. */
  1147. struct extended_caps {
  1148. WMI_SOC_MAC_PHY_HW_MODE_CAPS num_hw_modes;
  1149. WMI_HW_MODE_CAPABILITIES *each_hw_mode_cap;
  1150. WMI_MAC_PHY_CAPABILITIES *each_phy_cap_per_hwmode;
  1151. WMI_SOC_HAL_REG_CAPABILITIES num_phy_for_hal_reg_cap;
  1152. WMI_HAL_REG_CAPABILITIES_EXT *each_phy_hal_reg_cap;
  1153. struct hw_mode_idx_to_mac_cap_idx *hw_mode_to_mac_cap_map;
  1154. };
  1155. /**
  1156. * struct t_wma_handle - wma context
  1157. * @wmi_handle: wmi handle
  1158. * @htc_handle: htc handle
  1159. * @cds_context: cds handle
  1160. * @mac_context: mac context
  1161. * @wma_ready_event: wma rx ready event
  1162. * @wma_resume_event: wma resume event
  1163. * @target_suspend: target suspend event
  1164. * @recovery_event: wma FW recovery event
  1165. * @max_station: max stations
  1166. * @max_bssid: max bssid
  1167. * @frame_xln_reqd: frame transmission required
  1168. * @driver_type: driver type
  1169. * @myaddr: current mac address
  1170. * @hwaddr: mac address from EEPROM
  1171. * @target_abi_vers: target firmware version
  1172. * @final_abi_vers: The final ABI version to be used for communicating
  1173. * @target_fw_version: Target f/w build version
  1174. * @target_fw_vers_ext: Target f/w build version sub id
  1175. * @lpss_support: LPSS feature is supported in target or not
  1176. * @egap_support: Enhanced Green AP support flag
  1177. * @wmi_ready: wmi status flag
  1178. * @wlan_init_status: wlan init status
  1179. * @qdf_dev: qdf device
  1180. * @phy_capability: PHY Capability from Target
  1181. * @max_frag_entry: Max number of Fragment entry
  1182. * @wmi_service_bitmap: wmi services bitmap received from Target
  1183. * @wlan_resource_config: resource config
  1184. * @frameTransRequired: frame transmission required
  1185. * @wmaGlobalSystemRole: global system role
  1186. * @tx_frm_download_comp_cb: Tx Frame Compl Cb registered by umac
  1187. * @tx_frm_download_comp_event: Event to wait for tx download completion
  1188. * @tx_queue_empty_event: wait for tx queue to get flushed
  1189. * @umac_ota_ack_cb: Ack Complete Callback registered by umac
  1190. * @umac_data_ota_ack_cb: ack complete callback
  1191. * @last_umac_data_ota_timestamp: timestamp when OTA of last umac data was done
  1192. * @last_umac_data_nbuf: cache nbuf ptr for the last umac data buf
  1193. * @needShutdown: is shutdown needed or not
  1194. * @num_mem_chunks: number of memory chunk
  1195. * @mem_chunks: memory chunks
  1196. * @tgt_cfg_update_cb: configuration update callback
  1197. * @dfs_radar_indication_cb: Callback to indicate radar to HDD
  1198. * @reg_cap: regulatory capablities
  1199. * @scan_id: scan id
  1200. * @interfaces: txrx nodes(per vdev)
  1201. * @pdevconfig: pdev related configrations
  1202. * @vdev_resp_queue: vdev response queue
  1203. * @vdev_respq_lock: vdev response queue lock
  1204. * @ht_cap_info: HT capablity info
  1205. * @vht_cap_info: VHT capablity info
  1206. * @vht_supp_mcs: VHT supported MCS
  1207. * @num_rf_chains: number of RF chains
  1208. * @utf_event_info: UTF event information
  1209. * @is_fw_assert: is fw asserted
  1210. * @wow: wow related patterns & parameters
  1211. * @no_of_suspend_ind: number of suspend indications
  1212. * @no_of_resume_ind: number of resume indications
  1213. * @mArpInfo: arp info
  1214. * @powersave_mode: power save mode
  1215. * @ptrn_match_enable_all_vdev: is pattern match is enable/disable
  1216. * @pGetRssiReq: get RSSI request
  1217. * @thermal_mgmt_info: Thermal mitigation related info
  1218. * @roam_offload_enabled: is roam offload enable/disable
  1219. * @ol_ini_info: store ini status of arp offload, ns offload
  1220. * @ssdp: ssdp flag
  1221. * @enable_mc_list : To Check if Multicast list filtering is enabled in FW
  1222. * @ibss_started: is IBSS started or not
  1223. * @ibsskey_info: IBSS key info
  1224. * @dfs_ic: DFS umac interface information
  1225. * @hddTxFailCb: tx fail indication callback
  1226. * @pno_wake_lock: PNO wake lock
  1227. * @extscan_wake_lock: extscan wake lock
  1228. * @wow_wake_lock: wow wake lock
  1229. * @wow_nack: wow negative ack flag
  1230. * @ap_client_cnt: ap client count
  1231. * @is_wow_bus_suspended: is wow bus suspended flag
  1232. * @wma_scan_comp_timer: scan completion timer
  1233. * @dfs_phyerr_filter_offload: dfs phy error filter is offloaded or not
  1234. * @suitable_ap_hb_failure: better ap found
  1235. * @wma_ibss_power_save_params: IBSS Power Save config Parameters
  1236. * @IsRArateLimitEnabled: RA rate limiti s enabled or not
  1237. * @RArateLimitInterval: RA rate limit interval
  1238. * @is_lpass_enabled: Flag to indicate if LPASS feature is enabled or not
  1239. * @is_nan_enabled: Flag to indicate if NaN feature is enabled or not
  1240. * @staMaxLIModDtim: station max listen interval
  1241. * @staModDtim: station mode DTIM
  1242. * @staDynamicDtim: station dynamic DTIM
  1243. * @enable_mhf_offload: is MHF offload enable/disable
  1244. * @last_mhf_entries_timestamp: timestamp when last entries where set
  1245. * @dfs_pri_multiplier: DFS multiplier
  1246. * @hw_bd_id: hardware board id
  1247. * @hw_bd_info: hardware board info
  1248. * @in_d0wow: D0WOW is enable/disable
  1249. * @miracast_value: miracast value
  1250. * @log_completion_timer: log completion timer
  1251. * @mgmt_rx: management rx callback
  1252. * @num_dbs_hw_modes: Number of HW modes supported by the FW
  1253. * @dbs_mode: DBS HW mode list
  1254. * @old_hw_mode_index: Previous configured HW mode index
  1255. * @new_hw_mode_index: Current configured HW mode index
  1256. * @extended_caps phy_caps: extended caps per hw mode
  1257. * @peer_authorized_cb: peer authorized hdd callback
  1258. * @ocb_callback: callback to OCB commands
  1259. * @ocb_resp: response to OCB commands
  1260. * @wow_pno_match_wake_up_count: PNO match wake up count
  1261. * @wow_pno_complete_wake_up_count: PNO complete wake up count
  1262. * @wow_gscan_wake_up_count: Gscan wake up count
  1263. * @wow_low_rssi_wake_up_count: Low rssi wake up count
  1264. * @wow_rssi_breach_wake_up_count: RSSI breach wake up count
  1265. * @wow_ucast_wake_up_count: WoW unicast packet wake up count
  1266. * @wow_bcast_wake_up_count: WoW brodcast packet wake up count
  1267. * @wow_ipv4_mcast_wake_up_count: WoW IPV4 mcast packet wake up count
  1268. * @wow_ipv6_mcast_wake_up_count: WoW IPV6 mcast packet wake up count
  1269. * @wow_ipv6_mcast_ra_stats: WoW IPV6 mcast RA packet wake up count
  1270. * @wow_ipv6_mcast_ns_stats: WoW IPV6 mcast NS packet wake up count
  1271. * @wow_ipv6_mcast_na_stats: WoW IPV6 mcast NA packet wake up count
  1272. * @wow_icmpv4_count: WoW ipv4 icmp packet wake up count
  1273. * @wow_icmpv6_count: WoW ipv6 icmp packet wake up count
  1274. * @dual_mac_cfg: Dual mac configuration params for scan and fw mode
  1275. *
  1276. * @max_scan: maximum scan requests than can be queued
  1277. * This structure is global wma context
  1278. * It contains global wma module parameters and
  1279. * handle of other modules.
  1280. * @saved_wmi_init_cmd: Saved WMI INIT command
  1281. * @bool bpf_packet_filter_enable: BPF filter enabled or not
  1282. * @service_ready_ext_evt: Wait event for service ready ext
  1283. * @wmi_cmd_rsp_wake_lock: wmi command response wake lock
  1284. * @wmi_cmd_rsp_runtime_lock: wmi command response bus lock
  1285. * @saved_chan: saved channel list sent as part of WMI_SCAN_CHAN_LIST_CMDID
  1286. */
  1287. typedef struct {
  1288. void *wmi_handle;
  1289. void *htc_handle;
  1290. void *cds_context;
  1291. void *mac_context;
  1292. qdf_event_t wma_ready_event;
  1293. qdf_event_t wma_resume_event;
  1294. qdf_event_t target_suspend;
  1295. qdf_event_t runtime_suspend;
  1296. qdf_event_t recovery_event;
  1297. uint16_t max_station;
  1298. uint16_t max_bssid;
  1299. uint32_t frame_xln_reqd;
  1300. t_wma_drv_type driver_type;
  1301. uint8_t myaddr[IEEE80211_ADDR_LEN];
  1302. uint8_t hwaddr[IEEE80211_ADDR_LEN];
  1303. wmi_abi_version target_abi_vers;
  1304. wmi_abi_version final_abi_vers;
  1305. uint32_t target_fw_version;
  1306. uint32_t target_fw_vers_ext;
  1307. #ifdef WLAN_FEATURE_LPSS
  1308. uint8_t lpss_support;
  1309. #endif
  1310. uint8_t ap_arpns_support;
  1311. #ifdef FEATURE_GREEN_AP
  1312. bool egap_support;
  1313. #endif
  1314. bool wmi_ready;
  1315. uint32_t wlan_init_status;
  1316. qdf_device_t qdf_dev;
  1317. uint32_t phy_capability;
  1318. uint32_t max_frag_entry;
  1319. uint32_t wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  1320. wmi_resource_config wlan_resource_config;
  1321. uint32_t frameTransRequired;
  1322. tBssSystemRole wmaGlobalSystemRole;
  1323. pWMATxRxCompFunc tx_frm_download_comp_cb;
  1324. qdf_event_t tx_frm_download_comp_event;
  1325. /*
  1326. * Dummy event to wait for draining MSDUs left in hardware tx
  1327. * queue and before requesting VDEV_STOP. Nobody will set this
  1328. * and wait will timeout, and code will poll the pending tx
  1329. * descriptors number to be zero.
  1330. */
  1331. qdf_event_t tx_queue_empty_event;
  1332. pWMAAckFnTxComp umac_ota_ack_cb[SIR_MAC_MGMT_RESERVED15];
  1333. pWMAAckFnTxComp umac_data_ota_ack_cb;
  1334. unsigned long last_umac_data_ota_timestamp;
  1335. qdf_nbuf_t last_umac_data_nbuf;
  1336. bool needShutdown;
  1337. uint32_t num_mem_chunks;
  1338. struct wmi_host_mem_chunk mem_chunks[MAX_MEM_CHUNKS];
  1339. wma_tgt_cfg_cb tgt_cfg_update_cb;
  1340. wma_dfs_radar_indication_cb dfs_radar_indication_cb;
  1341. HAL_REG_CAPABILITIES reg_cap;
  1342. uint32_t scan_id;
  1343. struct wma_txrx_node *interfaces;
  1344. pdev_cli_config_t pdevconfig;
  1345. qdf_list_t vdev_resp_queue;
  1346. qdf_spinlock_t vdev_respq_lock;
  1347. qdf_list_t wma_hold_req_queue;
  1348. qdf_spinlock_t wma_hold_req_q_lock;
  1349. uint32_t ht_cap_info;
  1350. uint32_t vht_cap_info;
  1351. uint32_t vht_supp_mcs;
  1352. uint32_t num_rf_chains;
  1353. #if defined(QCA_WIFI_FTM)
  1354. struct utf_event_info utf_event_info;
  1355. #endif
  1356. uint8_t is_fw_assert;
  1357. struct wma_wow wow;
  1358. uint8_t no_of_suspend_ind;
  1359. uint8_t no_of_resume_ind;
  1360. /* Have a back up of arp info to send along
  1361. * with ns info suppose if ns also enabled
  1362. */
  1363. tSirHostOffloadReq mArpInfo;
  1364. struct wma_tx_ack_work_ctx *ack_work_ctx;
  1365. uint8_t powersave_mode;
  1366. bool ptrn_match_enable_all_vdev;
  1367. void *pGetRssiReq;
  1368. t_thermal_mgmt thermal_mgmt_info;
  1369. bool roam_offload_enabled;
  1370. /* Here ol_ini_info is used to store ini
  1371. * status of arp offload, ns offload
  1372. * and others. Currently 1st bit is used
  1373. * for arp off load and 2nd bit for ns
  1374. * offload currently, rest bits are unused
  1375. */
  1376. uint8_t ol_ini_info;
  1377. bool ssdp;
  1378. bool enable_mc_list;
  1379. uint8_t ibss_started;
  1380. tSetBssKeyParams ibsskey_info;
  1381. struct ieee80211com *dfs_ic;
  1382. txFailIndCallback hddTxFailCb;
  1383. #ifdef FEATURE_WLAN_SCAN_PNO
  1384. qdf_wake_lock_t pno_wake_lock;
  1385. #endif
  1386. #ifdef FEATURE_WLAN_EXTSCAN
  1387. qdf_wake_lock_t extscan_wake_lock;
  1388. #endif
  1389. qdf_wake_lock_t wow_wake_lock;
  1390. int wow_nack;
  1391. bool wow_initial_wake_up;
  1392. qdf_atomic_t is_wow_bus_suspended;
  1393. qdf_mc_timer_t wma_scan_comp_timer;
  1394. uint8_t dfs_phyerr_filter_offload;
  1395. bool suitable_ap_hb_failure;
  1396. ibss_power_save_params wma_ibss_power_save_params;
  1397. #ifdef FEATURE_WLAN_RA_FILTERING
  1398. bool IsRArateLimitEnabled;
  1399. uint16_t RArateLimitInterval;
  1400. #endif
  1401. #ifdef WLAN_FEATURE_LPSS
  1402. bool is_lpass_enabled;
  1403. #endif
  1404. #ifdef WLAN_FEATURE_NAN
  1405. bool is_nan_enabled;
  1406. #endif
  1407. uint8_t staMaxLIModDtim;
  1408. uint8_t staModDtim;
  1409. uint8_t staDynamicDtim;
  1410. uint8_t enable_mhf_offload;
  1411. unsigned long last_mhf_entries_timestamp;
  1412. int32_t dfs_pri_multiplier;
  1413. uint32_t hw_bd_id;
  1414. uint32_t hw_bd_info[HW_BD_INFO_SIZE];
  1415. uint32_t miracast_value;
  1416. qdf_mc_timer_t log_completion_timer;
  1417. wma_mgmt_frame_rx_callback mgmt_rx;
  1418. uint32_t num_dbs_hw_modes;
  1419. struct dbs_hw_mode_info hw_mode;
  1420. uint32_t old_hw_mode_index;
  1421. uint32_t new_hw_mode_index;
  1422. struct extended_caps phy_caps;
  1423. qdf_atomic_t scan_id_counter;
  1424. qdf_atomic_t num_pending_scans;
  1425. wma_peer_authorized_fp peer_authorized_cb;
  1426. uint32_t wow_pno_match_wake_up_count;
  1427. uint32_t wow_pno_complete_wake_up_count;
  1428. uint32_t wow_gscan_wake_up_count;
  1429. uint32_t wow_low_rssi_wake_up_count;
  1430. uint32_t wow_rssi_breach_wake_up_count;
  1431. uint32_t wow_ucast_wake_up_count;
  1432. uint32_t wow_bcast_wake_up_count;
  1433. uint32_t wow_ipv4_mcast_wake_up_count;
  1434. uint32_t wow_ipv6_mcast_wake_up_count;
  1435. uint32_t wow_ipv6_mcast_ra_stats;
  1436. uint32_t wow_ipv6_mcast_ns_stats;
  1437. uint32_t wow_ipv6_mcast_na_stats;
  1438. uint32_t wow_icmpv4_count;
  1439. uint32_t wow_icmpv6_count;
  1440. uint32_t wow_oem_response_wake_up_count;
  1441. /* OCB request contexts */
  1442. struct sir_ocb_config *ocb_config_req;
  1443. struct dual_mac_config dual_mac_cfg;
  1444. struct {
  1445. uint16_t pool_size;
  1446. uint16_t num_free;
  1447. union wmi_desc_elem_t *array;
  1448. union wmi_desc_elem_t *freelist;
  1449. qdf_spinlock_t wmi_desc_pool_lock;
  1450. } wmi_desc_pool;
  1451. uint8_t max_scan;
  1452. uint16_t self_gen_frm_pwr;
  1453. bool tx_chain_mask_cck;
  1454. /* Going with a timer instead of wait event because on receiving the
  1455. * service ready event, we will be waiting on the MC thread for the
  1456. * service extended ready event which is also processed in MC thread.
  1457. * This leads to MC thread being stuck. Alternative was to process
  1458. * these events in tasklet/workqueue context. But, this leads to
  1459. * race conditions when the events are processed in two different
  1460. * context. So, processing ready event and extended ready event in
  1461. * the serialized MC thread context with a timer.
  1462. */
  1463. qdf_mc_timer_t service_ready_ext_timer;
  1464. void (*csr_roam_synch_cb)(tpAniSirGlobal mac,
  1465. roam_offload_synch_ind *roam_synch_data,
  1466. tpSirBssDescription bss_desc_ptr,
  1467. enum sir_roam_op_code reason);
  1468. QDF_STATUS (*pe_roam_synch_cb)(tpAniSirGlobal mac,
  1469. roam_offload_synch_ind *roam_synch_data,
  1470. tpSirBssDescription bss_desc_ptr);
  1471. qdf_wake_lock_t wmi_cmd_rsp_wake_lock;
  1472. qdf_runtime_lock_t wmi_cmd_rsp_runtime_lock;
  1473. qdf_runtime_lock_t wma_runtime_resume_lock;
  1474. uint32_t fine_time_measurement_cap;
  1475. bool bpf_enabled;
  1476. bool bpf_packet_filter_enable;
  1477. struct wma_ini_config ini_config;
  1478. struct wma_valid_channels saved_chan;
  1479. /* NAN datapath support enabled in firmware */
  1480. bool nan_datapath_enabled;
  1481. QDF_STATUS (*pe_ndp_event_handler)(tpAniSirGlobal mac_ctx,
  1482. cds_msg_t *msg);
  1483. bool fw_timeout_crash;
  1484. bool sub_20_support;
  1485. tSirLLStatsResults *link_stats_results;
  1486. } t_wma_handle, *tp_wma_handle;
  1487. /**
  1488. * struct wma_target_cap - target capabality
  1489. * @wmi_service_bitmap: wmi services bitmap
  1490. * @wlan_resource_config: resource config
  1491. */
  1492. struct wma_target_cap {
  1493. /* wmi services bitmap received from Target */
  1494. uint32_t wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  1495. /* default resource config,the os shim can overwrite it */
  1496. wmi_resource_config wlan_resource_config;
  1497. };
  1498. /**
  1499. * struct t_wma_start_req - wma start request parameters
  1500. * @pConfigBuffer: config buffer
  1501. * @usConfigBufferLen: Length of the config buffer above
  1502. * @driver_type: Production or FTM driver
  1503. * @pUserData: user data
  1504. * @pIndUserData: indication function pointer to send to UMAC
  1505. *
  1506. * The shared memory between WDI and HAL is 4K so maximum data can be
  1507. * transferred from WDI to HAL is 4K
  1508. */
  1509. typedef struct {
  1510. void *pConfigBuffer;
  1511. uint16_t usConfigBufferLen;
  1512. t_wma_drv_type driver_type;
  1513. void *pUserData;
  1514. void *pIndUserData;
  1515. } t_wma_start_req;
  1516. /* Enumeration for Version */
  1517. typedef enum {
  1518. WLAN_HAL_MSG_VERSION0 = 0,
  1519. WLAN_HAL_MSG_VERSION1 = 1,
  1520. WLAN_HAL_MSG_WCNSS_CTRL_VERSION = 0x7FFF, /*define as 2 bytes data */
  1521. WLAN_HAL_MSG_VERSION_MAX_FIELD = WLAN_HAL_MSG_WCNSS_CTRL_VERSION
  1522. } tHalHostMsgVersion;
  1523. /**
  1524. * struct sHalMacStartParameter - mac start request parameters
  1525. * @driverType: driver type (production/FTM)
  1526. * @uConfigBufferLen: length of config buffer
  1527. */
  1528. typedef struct qdf_packed sHalMacStartParameter {
  1529. tDriverType driverType;
  1530. uint32_t uConfigBufferLen;
  1531. /* Following this there is a TLV formatted buffer of length
  1532. * "uConfigBufferLen" bytes containing all config values.
  1533. * The TLV is expected to be formatted like this:
  1534. * 0 15 31 31+CFG_LEN-1 length-1
  1535. * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
  1536. */
  1537. } tHalMacStartParameter, *tpHalMacStartParameter;
  1538. extern void cds_wma_complete_cback(void *p_cds_context);
  1539. extern void wma_send_regdomain_info_to_fw(uint32_t reg_dmn, uint16_t regdmn2G,
  1540. uint16_t regdmn5G, int8_t ctl2G,
  1541. int8_t ctl5G);
  1542. /**
  1543. * enum frame_index - Frame index
  1544. * @GENERIC_NODOWNLD_NOACK_COMP_INDEX: Frame index for no download comp no ack
  1545. * @GENERIC_DOWNLD_COMP_NOACK_COMP_INDEX: Frame index for download comp no ack
  1546. * @GENERIC_DOWNLD_COMP_ACK_COMP_INDEX: Frame index for download comp and ack
  1547. * @GENERIC_NODOWLOAD_ACK_COMP_INDEX: Frame index for no download comp and ack
  1548. * @FRAME_INDEX_MAX: maximum frame index
  1549. */
  1550. enum frame_index {
  1551. GENERIC_NODOWNLD_NOACK_COMP_INDEX,
  1552. GENERIC_DOWNLD_COMP_NOACK_COMP_INDEX,
  1553. GENERIC_DOWNLD_COMP_ACK_COMP_INDEX,
  1554. GENERIC_NODOWLOAD_ACK_COMP_INDEX,
  1555. FRAME_INDEX_MAX
  1556. };
  1557. /**
  1558. * struct wma_tx_ack_work_ctx - tx ack work context
  1559. * @wma_handle: wma handle
  1560. * @sub_type: sub type
  1561. * @status: status
  1562. * @ack_cmp_work: work structure
  1563. */
  1564. struct wma_tx_ack_work_ctx {
  1565. tp_wma_handle wma_handle;
  1566. uint16_t sub_type;
  1567. int32_t status;
  1568. qdf_work_t ack_cmp_work;
  1569. };
  1570. /**
  1571. * struct wma_target_req - target request parameters
  1572. * @event_timeout: event timeout
  1573. * @node: list
  1574. * @user_data: user data
  1575. * @msg_type: message type
  1576. * @vdev_id: vdev id
  1577. * @type: type
  1578. */
  1579. struct wma_target_req {
  1580. qdf_mc_timer_t event_timeout;
  1581. qdf_list_node_t node;
  1582. void *user_data;
  1583. uint32_t msg_type;
  1584. uint8_t vdev_id;
  1585. uint8_t type;
  1586. };
  1587. /**
  1588. * struct wma_vdev_start_req - vdev start request parameters
  1589. * @beacon_intval: beacon interval
  1590. * @dtim_period: dtim period
  1591. * @max_txpow: max tx power
  1592. * @chan_offset: channel offset
  1593. * @is_dfs: is dfs supported or not
  1594. * @vdev_id: vdev id
  1595. * @chan: channel
  1596. * @oper_mode: operating mode
  1597. * @ssid: ssid
  1598. * @hidden_ssid: hidden ssid
  1599. * @pmf_enabled: is pmf enabled or not
  1600. * @vht_capable: VHT capabality
  1601. * @ht_capable: HT capabality
  1602. * @dfs_pri_multiplier: DFS multiplier
  1603. * @dot11_mode: 802.11 mode
  1604. * @is_half_rate: is the channel operating at 10MHz
  1605. * @is_quarter_rate: is the channel operating at 5MHz
  1606. * @preferred_tx_streams: policy manager indicates the preferred
  1607. * number of transmit streams
  1608. * @preferred_rx_streams: policy manager indicates the preferred
  1609. * number of receive streams
  1610. */
  1611. struct wma_vdev_start_req {
  1612. uint32_t beacon_intval;
  1613. uint32_t dtim_period;
  1614. int32_t max_txpow;
  1615. enum phy_ch_width chan_width;
  1616. bool is_dfs;
  1617. uint8_t vdev_id;
  1618. uint8_t chan;
  1619. uint8_t oper_mode;
  1620. tSirMacSSid ssid;
  1621. uint8_t hidden_ssid;
  1622. uint8_t pmf_enabled;
  1623. uint8_t vht_capable;
  1624. uint8_t ch_center_freq_seg0;
  1625. uint8_t ch_center_freq_seg1;
  1626. uint8_t ht_capable;
  1627. int32_t dfs_pri_multiplier;
  1628. uint8_t dot11_mode;
  1629. bool is_half_rate;
  1630. bool is_quarter_rate;
  1631. uint32_t preferred_tx_streams;
  1632. uint32_t preferred_rx_streams;
  1633. uint8_t beacon_tx_rate;
  1634. };
  1635. /**
  1636. * struct wma_set_key_params - set key parameters
  1637. * @vdev_id: vdev id
  1638. * @def_key_idx: used to see if we have to read the key from cfg
  1639. * @key_len: key length
  1640. * @peer_mac: peer mac address
  1641. * @singl_tid_rc: 1=Single TID based Replay Count, 0=Per TID based RC
  1642. * @key_type: key type
  1643. * @key_idx: key index
  1644. * @unicast: unicast flag
  1645. * @key_data: key data
  1646. */
  1647. struct wma_set_key_params {
  1648. uint8_t vdev_id;
  1649. /* def_key_idx can be used to see if we have to read the key from cfg */
  1650. uint32_t def_key_idx;
  1651. uint16_t key_len;
  1652. uint8_t peer_mac[IEEE80211_ADDR_LEN];
  1653. uint8_t singl_tid_rc;
  1654. enum eAniEdType key_type;
  1655. uint32_t key_idx;
  1656. bool unicast;
  1657. uint8_t key_data[SIR_MAC_MAX_KEY_LENGTH];
  1658. };
  1659. /**
  1660. * struct t_thermal_cmd_params - thermal command parameters
  1661. * @minTemp: minimum temprature
  1662. * @maxTemp: maximum temprature
  1663. * @thermalEnable: thermal enable
  1664. */
  1665. typedef struct {
  1666. uint16_t minTemp;
  1667. uint16_t maxTemp;
  1668. uint8_t thermalEnable;
  1669. } t_thermal_cmd_params, *tp_thermal_cmd_params;
  1670. /**
  1671. * enum wma_cfg_cmd_id - wma cmd ids
  1672. * @WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID: txrx firmware stats enable command
  1673. * @WMA_VDEV_TXRX_FWSTATS_RESET_CMDID: txrx firmware stats reset command
  1674. * @WMA_VDEV_MCC_SET_TIME_LATENCY: set MCC latency time
  1675. * @WMA_VDEV_MCC_SET_TIME_QUOTA: set MCC time quota
  1676. * @WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE: set IBSS ATIM window size
  1677. * @WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED: set IBSS enable power save
  1678. * @WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED: set IBSS power collapse enable
  1679. * @WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX: awake IBSS on TX/RX
  1680. * @WMA_VDEV_IBSS_SET_INACTIVITY_TIME: set IBSS inactivity time
  1681. * @WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME: set IBSS TXSP
  1682. * @WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS: set IBSS power save warmup time
  1683. * @WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW: set IBSS power save ATIM
  1684. * @WMA_VDEV_DFS_CONTROL_CMDID: DFS control command
  1685. * @WMA_VDEV_TXRX_GET_IPA_UC_FW_STATS_CMDID: get IPA microcontroller fw stats
  1686. *
  1687. * wma command ids for configuration request which
  1688. * does not involve sending a wmi command.
  1689. */
  1690. enum wma_cfg_cmd_id {
  1691. WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID = WMI_CMDID_MAX,
  1692. WMA_VDEV_TXRX_FWSTATS_RESET_CMDID,
  1693. WMA_VDEV_MCC_SET_TIME_LATENCY,
  1694. WMA_VDEV_MCC_SET_TIME_QUOTA,
  1695. WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE,
  1696. WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED,
  1697. WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED,
  1698. WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX,
  1699. WMA_VDEV_IBSS_SET_INACTIVITY_TIME,
  1700. WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME,
  1701. WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS,
  1702. WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW,
  1703. WMA_VDEV_DFS_CONTROL_CMDID,
  1704. WMA_VDEV_TXRX_GET_IPA_UC_FW_STATS_CMDID,
  1705. WMA_CMD_ID_MAX
  1706. };
  1707. /**
  1708. * struct wma_trigger_uapsd_params - trigger uapsd parameters
  1709. * @wmm_ac: wmm access catagory
  1710. * @user_priority: user priority
  1711. * @service_interval: service interval
  1712. * @suspend_interval: suspend interval
  1713. * @delay_interval: delay interval
  1714. */
  1715. typedef struct wma_trigger_uapsd_params {
  1716. uint32_t wmm_ac;
  1717. uint32_t user_priority;
  1718. uint32_t service_interval;
  1719. uint32_t suspend_interval;
  1720. uint32_t delay_interval;
  1721. } t_wma_trigger_uapsd_params, *tp_wma_trigger_uapsd_params;
  1722. /**
  1723. * enum uapsd_peer_param_max_sp - U-APSD maximum service period of peer station
  1724. * @UAPSD_MAX_SP_LEN_UNLIMITED: unlimited max service period
  1725. * @UAPSD_MAX_SP_LEN_2: max service period = 2
  1726. * @UAPSD_MAX_SP_LEN_4: max service period = 4
  1727. * @UAPSD_MAX_SP_LEN_6: max service period = 6
  1728. */
  1729. enum uapsd_peer_param_max_sp {
  1730. UAPSD_MAX_SP_LEN_UNLIMITED = 0,
  1731. UAPSD_MAX_SP_LEN_2 = 2,
  1732. UAPSD_MAX_SP_LEN_4 = 4,
  1733. UAPSD_MAX_SP_LEN_6 = 6
  1734. };
  1735. /**
  1736. * enum uapsd_peer_param_enabled_ac - U-APSD Enabled AC's of peer station
  1737. * @UAPSD_VO_ENABLED: enable uapsd for voice
  1738. * @UAPSD_VI_ENABLED: enable uapsd for video
  1739. * @UAPSD_BK_ENABLED: enable uapsd for background
  1740. * @UAPSD_BE_ENABLED: enable uapsd for best effort
  1741. */
  1742. enum uapsd_peer_param_enabled_ac {
  1743. UAPSD_VO_ENABLED = 0x01,
  1744. UAPSD_VI_ENABLED = 0x02,
  1745. UAPSD_BK_ENABLED = 0x04,
  1746. UAPSD_BE_ENABLED = 0x08
  1747. };
  1748. /**
  1749. * enum profile_id_t - Firmware profiling index
  1750. * @PROF_CPU_IDLE: cpu idle profile
  1751. * @PROF_PPDU_PROC: ppdu processing profile
  1752. * @PROF_PPDU_POST: ppdu post profile
  1753. * @PROF_HTT_TX_INPUT: htt tx input profile
  1754. * @PROF_MSDU_ENQ: msdu enqueue profile
  1755. * @PROF_PPDU_POST_HAL: ppdu post profile
  1756. * @PROF_COMPUTE_TX_TIME: tx time profile
  1757. * @PROF_MAX_ID: max profile index
  1758. */
  1759. enum profile_id_t {
  1760. PROF_CPU_IDLE,
  1761. PROF_PPDU_PROC,
  1762. PROF_PPDU_POST,
  1763. PROF_HTT_TX_INPUT,
  1764. PROF_MSDU_ENQ,
  1765. PROF_PPDU_POST_HAL,
  1766. PROF_COMPUTE_TX_TIME,
  1767. PROF_MAX_ID,
  1768. };
  1769. /**
  1770. * struct p2p_ie - P2P IE structural definition.
  1771. * @p2p_id: p2p id
  1772. * @p2p_len: p2p length
  1773. * @p2p_oui: p2p OUI
  1774. * @p2p_oui_type: p2p OUI type
  1775. */
  1776. struct p2p_ie {
  1777. uint8_t p2p_id;
  1778. uint8_t p2p_len;
  1779. uint8_t p2p_oui[3];
  1780. uint8_t p2p_oui_type;
  1781. } __packed;
  1782. /**
  1783. * struct p2p_noa_descriptor - noa descriptor
  1784. * @type_count: 255: continuous schedule, 0: reserved
  1785. * @duration: Absent period duration in micro seconds
  1786. * @interval: Absent period interval in micro seconds
  1787. * @start_time: 32 bit tsf time when in starts
  1788. */
  1789. struct p2p_noa_descriptor {
  1790. uint8_t type_count;
  1791. uint32_t duration;
  1792. uint32_t interval;
  1793. uint32_t start_time;
  1794. } __packed;
  1795. /**
  1796. * struct p2p_sub_element_noa - p2p noa element
  1797. * @p2p_sub_id: p2p sub id
  1798. * @p2p_sub_len: p2p sub length
  1799. * @index: identifies instance of NOA su element
  1800. * @oppPS: oppPS state of the AP
  1801. * @ctwindow: ctwindow in TUs
  1802. * @num_descriptors: number of NOA descriptors
  1803. * @noa_descriptors: noa descriptors
  1804. */
  1805. struct p2p_sub_element_noa {
  1806. uint8_t p2p_sub_id;
  1807. uint8_t p2p_sub_len;
  1808. uint8_t index; /* identifies instance of NOA su element */
  1809. uint8_t oppPS:1, /* oppPS state of the AP */
  1810. ctwindow:7; /* ctwindow in TUs */
  1811. uint8_t num_descriptors; /* number of NOA descriptors */
  1812. struct p2p_noa_descriptor noa_descriptors[WMA_MAX_NOA_DESCRIPTORS];
  1813. };
  1814. /**
  1815. * struct wma_decap_info_t - decapsulation info
  1816. * @hdr: header
  1817. * @hdr_len: header length
  1818. */
  1819. struct wma_decap_info_t {
  1820. uint8_t hdr[sizeof(struct ieee80211_qosframe_addr4)];
  1821. int32_t hdr_len;
  1822. };
  1823. /**
  1824. * enum packet_power_save - packet power save params
  1825. * @WMI_VDEV_PPS_PAID_MATCH: paid match param
  1826. * @WMI_VDEV_PPS_GID_MATCH: gid match param
  1827. * @WMI_VDEV_PPS_EARLY_TIM_CLEAR: early tim clear param
  1828. * @WMI_VDEV_PPS_EARLY_DTIM_CLEAR: early dtim clear param
  1829. * @WMI_VDEV_PPS_EOF_PAD_DELIM: eof pad delim param
  1830. * @WMI_VDEV_PPS_MACADDR_MISMATCH: macaddr mismatch param
  1831. * @WMI_VDEV_PPS_DELIM_CRC_FAIL: delim CRC fail param
  1832. * @WMI_VDEV_PPS_GID_NSTS_ZERO: gid nsts zero param
  1833. * @WMI_VDEV_PPS_RSSI_CHECK: RSSI check param
  1834. * @WMI_VDEV_PPS_5G_EBT: 5G ebt param
  1835. */
  1836. typedef enum {
  1837. WMI_VDEV_PPS_PAID_MATCH = 0,
  1838. WMI_VDEV_PPS_GID_MATCH = 1,
  1839. WMI_VDEV_PPS_EARLY_TIM_CLEAR = 2,
  1840. WMI_VDEV_PPS_EARLY_DTIM_CLEAR = 3,
  1841. WMI_VDEV_PPS_EOF_PAD_DELIM = 4,
  1842. WMI_VDEV_PPS_MACADDR_MISMATCH = 5,
  1843. WMI_VDEV_PPS_DELIM_CRC_FAIL = 6,
  1844. WMI_VDEV_PPS_GID_NSTS_ZERO = 7,
  1845. WMI_VDEV_PPS_RSSI_CHECK = 8,
  1846. WMI_VDEV_VHT_SET_GID_MGMT = 9,
  1847. WMI_VDEV_PPS_5G_EBT = 10
  1848. } packet_power_save;
  1849. /**
  1850. * enum green_tx_param - green tx parameters
  1851. * @WMI_VDEV_PARAM_GTX_HT_MCS: ht mcs param
  1852. * @WMI_VDEV_PARAM_GTX_VHT_MCS: vht mcs param
  1853. * @WMI_VDEV_PARAM_GTX_USR_CFG: user cfg param
  1854. * @WMI_VDEV_PARAM_GTX_THRE: thre param
  1855. * @WMI_VDEV_PARAM_GTX_MARGIN: green tx margin param
  1856. * @WMI_VDEV_PARAM_GTX_STEP: green tx step param
  1857. * @WMI_VDEV_PARAM_GTX_MINTPC: mintpc param
  1858. * @WMI_VDEV_PARAM_GTX_BW_MASK: bandwidth mask
  1859. */
  1860. typedef enum {
  1861. WMI_VDEV_PARAM_GTX_HT_MCS,
  1862. WMI_VDEV_PARAM_GTX_VHT_MCS,
  1863. WMI_VDEV_PARAM_GTX_USR_CFG,
  1864. WMI_VDEV_PARAM_GTX_THRE,
  1865. WMI_VDEV_PARAM_GTX_MARGIN,
  1866. WMI_VDEV_PARAM_GTX_STEP,
  1867. WMI_VDEV_PARAM_GTX_MINTPC,
  1868. WMI_VDEV_PARAM_GTX_BW_MASK,
  1869. } green_tx_param;
  1870. #ifdef FEATURE_WLAN_TDLS
  1871. /**
  1872. * struct wma_tdls_params - TDLS parameters
  1873. * @vdev_id: vdev id
  1874. * @tdls_state: TDLS state
  1875. * @notification_interval_ms: notification inerval
  1876. * @tx_discovery_threshold: tx discovery threshold
  1877. * @tx_teardown_threshold: tx teardown threashold
  1878. * @rssi_teardown_threshold: RSSI teardown threshold
  1879. * @rssi_delta: RSSI delta
  1880. * @tdls_options: TDLS options
  1881. * @peer_traffic_ind_window: raffic indication window
  1882. * @peer_traffic_response_timeout: traffic response timeout
  1883. * @puapsd_mask: uapsd mask
  1884. * @puapsd_inactivity_time: uapsd inactivity time
  1885. * @puapsd_rx_frame_threshold: uapsd rx frame threshold
  1886. * @teardown_notification_ms: tdls teardown notification interval
  1887. * @tdls_peer_kickout_threshold: tdls packet threshold for
  1888. * peer kickout operation
  1889. */
  1890. typedef struct wma_tdls_params {
  1891. uint32_t vdev_id;
  1892. uint32_t tdls_state;
  1893. uint32_t notification_interval_ms;
  1894. uint32_t tx_discovery_threshold;
  1895. uint32_t tx_teardown_threshold;
  1896. int32_t rssi_teardown_threshold;
  1897. int32_t rssi_delta;
  1898. uint32_t tdls_options;
  1899. uint32_t peer_traffic_ind_window;
  1900. uint32_t peer_traffic_response_timeout;
  1901. uint32_t puapsd_mask;
  1902. uint32_t puapsd_inactivity_time;
  1903. uint32_t puapsd_rx_frame_threshold;
  1904. uint32_t teardown_notification_ms;
  1905. uint32_t tdls_peer_kickout_threshold;
  1906. } t_wma_tdls_params;
  1907. /**
  1908. * struct wma_tdls_peer_event - TDLS peer event
  1909. * @vdev_id: vdev id
  1910. * @peer_macaddr: peer MAC address
  1911. * @peer_status: TDLS peer status
  1912. * @peer_reason: TDLS peer reason
  1913. */
  1914. typedef struct {
  1915. A_UINT32 vdev_id;
  1916. wmi_mac_addr peer_macaddr;
  1917. A_UINT32 peer_status;
  1918. A_UINT32 peer_reason;
  1919. } wma_tdls_peer_event;
  1920. #endif /* FEATURE_WLAN_TDLS */
  1921. /**
  1922. * struct wma_dfs_radar_channel_list - dfs radar channel list
  1923. * @nchannels: nuber of channels
  1924. * @channels: Channel number including bonded channels on which
  1925. * radar is present
  1926. */
  1927. struct wma_dfs_radar_channel_list {
  1928. A_UINT32 nchannels;
  1929. uint8_t channels[WMA_DFS_MAX_20M_SUB_CH];
  1930. };
  1931. /**
  1932. * struct wma_dfs_radar_indication - Structure to indicate RADAR
  1933. * @vdev_id: vdev id
  1934. * @chan_list: Channel list on which RADAR is detected
  1935. * @dfs_radar_status: Flag to Indicate RADAR presence on the current channel
  1936. * @use_nol: Flag to indicate use NOL
  1937. */
  1938. struct wma_dfs_radar_indication {
  1939. A_UINT32 vdev_id;
  1940. struct wma_dfs_radar_channel_list chan_list;
  1941. uint32_t dfs_radar_status;
  1942. int use_nol;
  1943. };
  1944. /**
  1945. * enum uapsd_ac - U-APSD Access Categories
  1946. * @UAPSD_BE: best effort
  1947. * @UAPSD_BK: back ground
  1948. * @UAPSD_VI: video
  1949. * @UAPSD_VO: voice
  1950. */
  1951. enum uapsd_ac {
  1952. UAPSD_BE,
  1953. UAPSD_BK,
  1954. UAPSD_VI,
  1955. UAPSD_VO
  1956. };
  1957. QDF_STATUS wma_disable_uapsd_per_ac(tp_wma_handle wma_handle,
  1958. uint32_t vdev_id, enum uapsd_ac ac);
  1959. /**
  1960. * enum uapsd_up - U-APSD User Priorities
  1961. * @UAPSD_UP_BE: best effort
  1962. * @UAPSD_UP_BK: back ground
  1963. * @UAPSD_UP_RESV: reserve
  1964. * @UAPSD_UP_EE: Excellent Effort
  1965. * @UAPSD_UP_CL: Critical Applications
  1966. * @UAPSD_UP_VI: video
  1967. * @UAPSD_UP_VO: voice
  1968. * @UAPSD_UP_NC: Network Control
  1969. */
  1970. enum uapsd_up {
  1971. UAPSD_UP_BE,
  1972. UAPSD_UP_BK,
  1973. UAPSD_UP_RESV,
  1974. UAPSD_UP_EE,
  1975. UAPSD_UP_CL,
  1976. UAPSD_UP_VI,
  1977. UAPSD_UP_VO,
  1978. UAPSD_UP_NC,
  1979. UAPSD_UP_MAX
  1980. };
  1981. /**
  1982. * struct wma_unit_test_cmd - unit test command parameters
  1983. * @vdev_id: vdev id
  1984. * @module_id: module id
  1985. * @num_args: number of arguments
  1986. * @args: arguments
  1987. */
  1988. typedef struct wma_unit_test_cmd {
  1989. uint32_t vdev_id;
  1990. WLAN_MODULE_ID module_id;
  1991. uint32_t num_args;
  1992. uint32_t args[WMA_MAX_NUM_ARGS];
  1993. } t_wma_unit_test_cmd;
  1994. /**
  1995. * struct wma_roam_invoke_cmd - roam invoke command
  1996. * @vdev_id: vdev id
  1997. * @bssid: mac address
  1998. * @channel: channel
  1999. */
  2000. struct wma_roam_invoke_cmd {
  2001. uint32_t vdev_id;
  2002. uint8_t bssid[IEEE80211_ADDR_LEN];
  2003. uint32_t channel;
  2004. };
  2005. /**
  2006. * struct wma_process_fw_event_params - fw event parameters
  2007. * @wmi_handle: wmi handle
  2008. * @evt_buf: event buffer
  2009. */
  2010. typedef struct {
  2011. void *wmi_handle;
  2012. void *evt_buf;
  2013. } wma_process_fw_event_params;
  2014. int wma_process_fw_event_handler(void *ctx, void *ev, uint8_t rx_ctx);
  2015. A_UINT32 e_csr_auth_type_to_rsn_authmode(eCsrAuthType authtype,
  2016. eCsrEncryptionType encr);
  2017. A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr);
  2018. /*
  2019. * WMA-DFS Hooks
  2020. */
  2021. int ol_if_dfs_attach(struct ieee80211com *ic, void *ptr, void *radar_info);
  2022. uint64_t ol_if_get_tsf64(struct ieee80211com *ic);
  2023. int ol_if_dfs_disable(struct ieee80211com *ic);
  2024. struct dfs_ieee80211_channel *ieee80211_find_channel(struct ieee80211com *ic,
  2025. int freq, uint32_t flags);
  2026. int ol_if_dfs_enable(struct ieee80211com *ic, int *is_fastclk, void *pe);
  2027. uint32_t ieee80211_ieee2mhz(uint32_t chan, uint32_t flags);
  2028. int ol_if_dfs_get_ext_busy(struct ieee80211com *ic);
  2029. int ol_if_dfs_get_mib_cycle_counts_pct(struct ieee80211com *ic,
  2030. uint32_t *rxc_pcnt, uint32_t *rxf_pcnt,
  2031. uint32_t *txf_pcnt);
  2032. uint16_t ol_if_dfs_usenol(struct ieee80211com *ic);
  2033. void ieee80211_mark_dfs(struct ieee80211com *ic,
  2034. struct dfs_ieee80211_channel *ichan);
  2035. int wma_dfs_indicate_radar(struct ieee80211com *ic,
  2036. struct dfs_ieee80211_channel *ichan);
  2037. QDF_STATUS wma_trigger_uapsd_params(tp_wma_handle wma_handle, uint32_t vdev_id,
  2038. tp_wma_trigger_uapsd_params
  2039. trigger_uapsd_params);
  2040. /* added to get average snr for both data and beacon */
  2041. QDF_STATUS wma_send_snr_request(tp_wma_handle wma_handle, void *pGetRssiReq);
  2042. QDF_STATUS wma_update_vdev_tbl(tp_wma_handle wma_handle, uint8_t vdev_id,
  2043. void *tx_rx_vdev_handle,
  2044. uint8_t *mac, uint32_t vdev_type, bool add_del);
  2045. void wma_send_flush_logs_to_fw(tp_wma_handle wma_handle);
  2046. void wma_log_completion_timeout(void *data);
  2047. QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma,
  2048. struct rssi_monitor_req *req);
  2049. QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
  2050. struct wmi_pcl_chan_weights *msg);
  2051. QDF_STATUS wma_send_pdev_set_hw_mode_cmd(tp_wma_handle wma_handle,
  2052. struct sir_hw_mode *msg);
  2053. QDF_STATUS wma_get_scan_id(uint32_t *scan_id);
  2054. QDF_STATUS wma_send_pdev_set_dual_mac_config(tp_wma_handle wma_handle,
  2055. struct sir_dual_mac_config *msg);
  2056. QDF_STATUS wma_send_pdev_set_antenna_mode(tp_wma_handle wma_handle,
  2057. struct sir_antenna_mode_param *msg);
  2058. QDF_STATUS wma_crash_inject(tp_wma_handle wma_handle, uint32_t type,
  2059. uint32_t delay_time_ms);
  2060. struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma,
  2061. uint8_t vdev_id,
  2062. uint32_t msg_type, uint8_t type,
  2063. void *params, uint32_t timeout);
  2064. struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma,
  2065. uint8_t vdev_id, uint32_t msg_type,
  2066. uint8_t type, void *params,
  2067. uint32_t timeout);
  2068. QDF_STATUS wma_vdev_start(tp_wma_handle wma,
  2069. struct wma_vdev_start_req *req, bool isRestart);
  2070. void wma_remove_vdev_req(tp_wma_handle wma, uint8_t vdev_id,
  2071. uint8_t type);
  2072. int wmi_desc_pool_init(tp_wma_handle wma_handle, uint32_t pool_size);
  2073. void wmi_desc_pool_deinit(tp_wma_handle wma_handle);
  2074. struct wmi_desc_t *wmi_desc_get(tp_wma_handle wma_handle);
  2075. void wmi_desc_put(tp_wma_handle wma_handle, struct wmi_desc_t *wmi_desc);
  2076. int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params,
  2077. uint32_t len);
  2078. int wma_mgmt_tx_bundle_completion_handler(void *handle,
  2079. uint8_t *cmpl_event_params, uint32_t len);
  2080. void wma_set_dfs_region(tp_wma_handle wma, enum dfs_region dfs_region);
  2081. uint32_t wma_get_vht_ch_width(void);
  2082. QDF_STATUS
  2083. wma_config_debug_module_cmd(wmi_unified_t wmi_handle, A_UINT32 param,
  2084. A_UINT32 val, A_UINT32 *module_id_bitmap,
  2085. A_UINT32 bitmap_len);
  2086. #ifdef FEATURE_LFR_SUBNET_DETECTION
  2087. QDF_STATUS wma_set_gateway_params(tp_wma_handle wma,
  2088. struct gateway_param_update_req *req);
  2089. #else
  2090. static inline QDF_STATUS wma_set_gateway_params(tp_wma_handle wma,
  2091. struct gateway_param_update_req *req)
  2092. {
  2093. return QDF_STATUS_SUCCESS;
  2094. }
  2095. #endif /* FEATURE_LFR_SUBNET_DETECTION */
  2096. #if defined(FEATURE_LRO)
  2097. QDF_STATUS wma_lro_config_cmd(tp_wma_handle wma_handle,
  2098. struct wma_lro_config_cmd_t *wma_lro_cmd);
  2099. #else
  2100. static inline QDF_STATUS wma_lro_config_cmd(tp_wma_handle wma_handle,
  2101. struct wma_lro_config_cmd_t *wma_lro_cmd)
  2102. {
  2103. return QDF_STATUS_SUCCESS;
  2104. }
  2105. #endif
  2106. void
  2107. wma_indicate_err(enum ol_rx_err_type err_type,
  2108. struct ol_error_info *err_info);
  2109. QDF_STATUS wma_ht40_stop_obss_scan(tp_wma_handle wma_handle,
  2110. int32_t vdev_id);
  2111. void wma_process_fw_test_cmd(WMA_HANDLE handle,
  2112. struct set_fwtest_params *wma_fwtest);
  2113. QDF_STATUS wma_send_ht40_obss_scanind(tp_wma_handle wma,
  2114. struct obss_ht40_scanind *req);
  2115. int wma_get_bpf_caps_event_handler(void *handle,
  2116. u_int8_t *cmd_param_info,
  2117. u_int32_t len);
  2118. uint32_t wma_get_num_of_setbits_from_bitmask(uint32_t mask);
  2119. QDF_STATUS wma_get_bpf_capabilities(tp_wma_handle wma);
  2120. QDF_STATUS wma_set_bpf_instructions(tp_wma_handle wma,
  2121. struct sir_bpf_set_offload *bpf_set_offload);
  2122. void wma_process_set_pdev_ie_req(tp_wma_handle wma,
  2123. struct set_ie_param *ie_params);
  2124. void wma_process_set_pdev_ht_ie_req(tp_wma_handle wma,
  2125. struct set_ie_param *ie_params);
  2126. void wma_process_set_pdev_vht_ie_req(tp_wma_handle wma,
  2127. struct set_ie_param *ie_params);
  2128. void wma_remove_peer(tp_wma_handle wma, u_int8_t *bssid,
  2129. u_int8_t vdev_id, void *peer,
  2130. bool roam_synch_in_progress);
  2131. QDF_STATUS wma_add_wow_wakeup_event(tp_wma_handle wma,
  2132. uint32_t vdev_id,
  2133. uint32_t bitmap,
  2134. bool enable);
  2135. QDF_STATUS wma_create_peer(tp_wma_handle wma, void *pdev,
  2136. void *vdev, u8 peer_addr[6],
  2137. u_int32_t peer_type, u_int8_t vdev_id,
  2138. bool roam_synch_in_progress);
  2139. #endif
  2140. struct wma_ini_config *wma_get_ini_handle(tp_wma_handle wma_handle);
  2141. WLAN_PHY_MODE wma_chan_phy_mode(u8 chan, enum phy_ch_width chan_width,
  2142. u8 dot11_mode);
  2143. #ifdef FEATURE_OEM_DATA_SUPPORT
  2144. QDF_STATUS wma_start_oem_data_req(tp_wma_handle wma_handle,
  2145. struct oem_data_req *oem_req);
  2146. #endif
  2147. QDF_STATUS wma_enable_disable_caevent_ind(tp_wma_handle wma_handle,
  2148. uint8_t val);
  2149. void wma_update_sta_inactivity_timeout(tp_wma_handle wma,
  2150. struct sme_sta_inactivity_timeout *sta_inactivity_timer);
  2151. void wma_peer_set_default_routing(void *scn_handle, uint8_t *peer_macaddr,
  2152. uint8_t vdev_id, bool hash_based, uint8_t ring_num);
  2153. int wma_peer_rx_reorder_queue_setup(void *scn_handle,
  2154. uint8_t vdev_id, uint8_t *peer_macaddr, qdf_dma_addr_t hw_qdesc,
  2155. int tid, uint16_t queue_no);
  2156. int wma_peer_rx_reorder_queue_remove(void *scn_handle,
  2157. uint8_t vdev_id, uint8_t *peer_macaddr, uint32_t peer_tid_bitmap);