wlan_tdls_public_structs.h 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081
  1. /*
  2. * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * DOC: wlan_tdls_public_structs.h
  20. *
  21. * TDLS public structure definations
  22. */
  23. #ifndef _WLAN_TDLS_STRUCTS_H_
  24. #define _WLAN_TDLS_STRUCTS_H_
  25. #include <qdf_timer.h>
  26. #include <qdf_list.h>
  27. #include <qdf_mc_timer.h>
  28. #include <wlan_cmn.h>
  29. #include <wlan_cmn_ieee80211.h>
  30. #define WLAN_TDLS_STA_MAX_NUM 8
  31. #define WLAN_TDLS_STA_P_UAPSD_OFFCHAN_MAX_NUM 1
  32. #define WLAN_TDLS_PEER_LIST_SIZE 16
  33. #define WLAN_TDLS_CT_TABLE_SIZE 8
  34. #define WLAN_TDLS_PEER_SUB_LIST_SIZE 10
  35. #define WLAN_MAC_MAX_EXTN_CAP 8
  36. #define WLAN_MAC_MAX_SUPP_CHANNELS 100
  37. #define WLAN_MAC_WMI_MAX_SUPP_CHANNELS 128
  38. #define WLAN_MAX_SUPP_OPER_CLASSES 32
  39. #define WLAN_MAC_MAX_SUPP_RATES 32
  40. #define WLAN_CHANNEL_14 14
  41. #define ENABLE_CHANSWITCH 1
  42. #define DISABLE_CHANSWITCH 2
  43. #define WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_MIN 1
  44. #define WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_MAX 165
  45. #define WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEF 36
  46. #define AC_PRIORITY_NUM 4
  47. /** Maximum time(ms) to wait for tdls add sta to complete **/
  48. #define WAIT_TIME_TDLS_ADD_STA 1500
  49. /** Maximum time(ms) to wait for tdls del sta to complete **/
  50. #define WAIT_TIME_TDLS_DEL_STA 1500
  51. /** Maximum time(ms) to wait for Link Establish Req to complete **/
  52. #define WAIT_TIME_TDLS_LINK_ESTABLISH_REQ 1500
  53. /** Maximum time(ms) to wait for tdls mgmt to complete **/
  54. #define WAIT_TIME_FOR_TDLS_MGMT 11000
  55. /** Maximum time(ms) to wait for tdls mgmt to complete **/
  56. #define WAIT_TIME_FOR_TDLS_USER_CMD 11000
  57. /** Maximum waittime for TDLS teardown links **/
  58. #define WAIT_TIME_FOR_TDLS_TEARDOWN_LINKS 10000
  59. /** Maximum waittime for TDLS antenna switch **/
  60. #define WAIT_TIME_FOR_TDLS_ANTENNA_SWITCH 1000
  61. #define TDLS_TEARDOWN_PEER_UNREACHABLE 25
  62. #define TDLS_TEARDOWN_PEER_UNSPEC_REASON 26
  63. #define INVALID_TDLS_PEER_ID 0xFF
  64. #define TDLS_STA_INDEX_CHECK(sta_id) \
  65. (((sta_id) >= 0) && ((sta_id) < 0xFF))
  66. /**
  67. * enum tdls_conc_cap - tdls concurrency support
  68. * @TDLS_SUPPORTED_ONLY_ON_STA: only support sta tdls
  69. * @TDLS_SUPPORTED_ONLY_ON_P2P_CLIENT: only support p2p client tdls
  70. */
  71. enum tdls_conc_cap {
  72. TDLS_SUPPORTED_ONLY_ON_STA = 0,
  73. TDLS_SUPPORTED_ONLY_ON_P2P_CLIENT,
  74. };
  75. /**
  76. * enum tdls_peer_capab - tdls capability type
  77. * @TDLS_CAP_NOT_SUPPORTED: tdls not supported
  78. * @TDLS_CAP_UNKNOWN: unknown capability
  79. * @TDLS_CAP_SUPPORTED: tdls capability supported
  80. */
  81. enum tdls_peer_capab {
  82. TDLS_CAP_NOT_SUPPORTED = -1,
  83. TDLS_CAP_UNKNOWN = 0,
  84. TDLS_CAP_SUPPORTED = 1,
  85. };
  86. /**
  87. * enum tdls_peer_state - tdls peer state
  88. * @TDLS_PEER_STATE_PEERING: tdls connection in progress
  89. * @TDLS_PEER_STATE_CONNCTED: tdls peer is connected
  90. * @TDLS_PEER_STATE_TEARDOWN: tdls peer is tear down
  91. * @TDLS_PEER_ADD_MAC_ADDR: add peer mac into connection table
  92. * @TDLS_PEER_REMOVE_MAC_ADDR: remove peer mac from connection table
  93. */
  94. enum tdls_peer_state {
  95. TDLS_PEER_STATE_PEERING,
  96. TDLS_PEER_STATE_CONNCTED,
  97. TDLS_PEER_STATE_TEARDOWN,
  98. TDLS_PEER_ADD_MAC_ADDR,
  99. TDLS_PEER_REMOVE_MAC_ADDR
  100. };
  101. /**
  102. * enum tdls_link_state - tdls link state
  103. * @TDLS_LINK_IDLE: tdls link idle
  104. * @TDLS_LINK_DISCOVERING: tdls link discovering
  105. * @TDLS_LINK_DISCOVERED: tdls link discovered
  106. * @TDLS_LINK_CONNECTING: tdls link connecting
  107. * @TDLS_LINK_CONNECTED: tdls link connected
  108. * @TDLS_LINK_TEARING: tdls link tearing
  109. */
  110. enum tdls_link_state {
  111. TDLS_LINK_IDLE = 0,
  112. TDLS_LINK_DISCOVERING,
  113. TDLS_LINK_DISCOVERED,
  114. TDLS_LINK_CONNECTING,
  115. TDLS_LINK_CONNECTED,
  116. TDLS_LINK_TEARING,
  117. };
  118. /**
  119. * enum tdls_link_state_reason - tdls link reason
  120. * @TDLS_LINK_SUCCESS: Success
  121. * @TDLS_LINK_UNSPECIFIED: Unspecified reason
  122. * @TDLS_LINK_NOT_SUPPORTED: Remote side doesn't support TDLS
  123. * @TDLS_LINK_UNSUPPORTED_BAND: Remote side doesn't support this band
  124. * @TDLS_LINK_NOT_BENEFICIAL: Going to AP is better than direct
  125. * @TDLS_LINK_DROPPED_BY_REMOTE: Remote side doesn't want it anymore
  126. */
  127. enum tdls_link_state_reason {
  128. TDLS_LINK_SUCCESS,
  129. TDLS_LINK_UNSPECIFIED = -1,
  130. TDLS_LINK_NOT_SUPPORTED = -2,
  131. TDLS_LINK_UNSUPPORTED_BAND = -3,
  132. TDLS_LINK_NOT_BENEFICIAL = -4,
  133. TDLS_LINK_DROPPED_BY_REMOTE = -5,
  134. };
  135. /**
  136. * enum tdls_feature_mode - TDLS support mode
  137. * @TDLS_SUPPORT_DISABLED: Disabled in ini or FW
  138. * @TDLS_SUPPORT_SUSPENDED: TDLS supported by ini and FW, but disabled
  139. * temporarily due to off-channel operations or due to other reasons
  140. * @TDLS_SUPPORT_EXP_TRIG_ONLY: Explicit trigger mode
  141. * @TDLS_SUPPORT_IMP_MODE: Implicit mode
  142. * @TDLS_SUPPORT_EXT_CONTROL: External control mode
  143. */
  144. enum tdls_feature_mode {
  145. TDLS_SUPPORT_DISABLED = 0,
  146. TDLS_SUPPORT_SUSPENDED,
  147. TDLS_SUPPORT_EXP_TRIG_ONLY,
  148. TDLS_SUPPORT_IMP_MODE,
  149. TDLS_SUPPORT_EXT_CONTROL,
  150. };
  151. /**
  152. * enum tdls_command_type - TDLS command type
  153. * @TDLS_CMD_TX_ACTION: send tdls action frame
  154. * @TDLS_CMD_ADD_STA: add tdls peer
  155. * @TDLS_CMD_CHANGE_STA: change tdls peer
  156. * @TDLS_CMD_ENABLE_LINK: enable tdls link
  157. * @TDLS_CMD_DISABLE_LINK: disable tdls link
  158. * @TDLS_CMD_CONFIG_FORCE_PEER: config external peer
  159. * @TDLS_CMD_REMOVE_FORCE_PEER: remove external peer
  160. * @TDLS_CMD_STATS_UPDATE: update tdls stats
  161. * @TDLS_CMD_CONFIG_UPDATE: config tdls
  162. * @TDLS_CMD_SCAN_DONE: scon done event
  163. * @TDLS_CMD_SET_RESPONDER: responder event
  164. * @TDLS_NOTIFY_STA_CONNECTION: notify sta connection
  165. * @TDLS_NOTIFY_STA_DISCONNECTION: notify sta disconnection
  166. * @TDLS_CMD_SET_TDLS_MODE: set the tdls mode
  167. * @TDLS_CMD_SESSION_INCREMENT: notify session increment
  168. * @TDLS_CMD_SESSION_DECREMENT: notify session decrement
  169. * @TDLS_CMD_TEARDOWN_LINKS: notify teardown
  170. * @TDLS_NOTIFY_RESET_ADAPTERS: notify adapter reset
  171. * @TDLS_CMD_GET_ALL_PEERS: get all the tdls peers from the list
  172. * @TDLS_CMD_ANTENNA_SWITCH: dynamic tdls antenna switch
  173. */
  174. enum tdls_command_type {
  175. TDLS_CMD_TX_ACTION = 1,
  176. TDLS_CMD_ADD_STA,
  177. TDLS_CMD_CHANGE_STA,
  178. TDLS_CMD_ENABLE_LINK,
  179. TDLS_CMD_DISABLE_LINK,
  180. TDLS_CMD_CONFIG_FORCE_PEER,
  181. TDLS_CMD_REMOVE_FORCE_PEER,
  182. TDLS_CMD_STATS_UPDATE,
  183. TDLS_CMD_CONFIG_UPDATE,
  184. TDLS_CMD_SCAN_DONE,
  185. TDLS_CMD_SET_RESPONDER,
  186. TDLS_NOTIFY_STA_CONNECTION,
  187. TDLS_NOTIFY_STA_DISCONNECTION,
  188. TDLS_CMD_SET_TDLS_MODE,
  189. TDLS_CMD_SESSION_INCREMENT,
  190. TDLS_CMD_SESSION_DECREMENT,
  191. TDLS_CMD_TEARDOWN_LINKS,
  192. TDLS_NOTIFY_RESET_ADAPTERS,
  193. TDLS_CMD_GET_ALL_PEERS,
  194. TDLS_CMD_ANTENNA_SWITCH
  195. };
  196. /**
  197. * enum tdls_event_type - TDLS event type
  198. * @TDLS_EVENT_VDEV_STATE_CHANGE: umac connect/disconnect event
  199. * @TDLS_EVENT_MGMT_TX_ACK_CNF: tx tdls frame ack event
  200. * @TDLS_EVENT_RX_MGMT: rx discovery response frame
  201. * @TDLS_EVENT_ADD_PEER: add peer or update peer
  202. * @TDLS_EVENT_DEL_PEER: delete peer
  203. * @TDLS_EVENT_DISCOVERY_REQ: dicovery request
  204. * @TDLS_EVENT_TEARDOWN_REQ: teardown request
  205. * @TDLS_EVENT_SETUP_REQ: setup request
  206. * @TDLS_EVENT_TEARDOWN_LINKS_DONE: teardown completion event
  207. * @TDLS_EVENT_USER_CMD: tdls user command
  208. * @TDLS_EVENT_ANTENNA_SWITCH: antenna switch event
  209. */
  210. enum tdls_event_type {
  211. TDLS_EVENT_VDEV_STATE_CHANGE = 0,
  212. TDLS_EVENT_MGMT_TX_ACK_CNF,
  213. TDLS_EVENT_RX_MGMT,
  214. TDLS_EVENT_ADD_PEER,
  215. TDLS_EVENT_DEL_PEER,
  216. TDLS_EVENT_DISCOVERY_REQ,
  217. TDLS_EVENT_TEARDOWN_REQ,
  218. TDLS_EVENT_SETUP_REQ,
  219. TDLS_EVENT_TEARDOWN_LINKS_DONE,
  220. TDLS_EVENT_USER_CMD,
  221. TDLS_EVENT_ANTENNA_SWITCH,
  222. };
  223. /**
  224. * enum tdls_state_t - tdls state
  225. * @QCA_WIFI_HAL_TDLS_DISABLED: TDLS is not enabled, or is disabled now
  226. * @QCA_WIFI_HAL_TDLS_ENABLED: TDLS is enabled, but not yet tried
  227. * @QCA_WIFI_HAL_TDLS_ESTABLISHED: Direct link is established
  228. * @QCA_WIFI_HAL_TDLS_ESTABLISHED_OFF_CHANNEL: Direct link established using MCC
  229. * @QCA_WIFI_HAL_TDLS_DROPPED: Direct link was established, but is now dropped
  230. * @QCA_WIFI_HAL_TDLS_FAILED: Direct link failed
  231. */
  232. enum tdls_state_t {
  233. QCA_WIFI_HAL_TDLS_S_DISABLED = 1,
  234. QCA_WIFI_HAL_TDLS_S_ENABLED,
  235. QCA_WIFI_HAL_TDLS_S_ESTABLISHED,
  236. QCA_WIFI_HAL_TDLS_S_ESTABLISHED_OFF_CHANNEL,
  237. QCA_WIFI_HAL_TDLS_S_DROPPED,
  238. QCA_WIFI_HAL_TDLS_S_FAILED,
  239. };
  240. /**
  241. * enum tdls_off_chan_mode - mode for WMI_TDLS_SET_OFFCHAN_MODE_CMDID
  242. * @TDLS_ENABLE_OFFCHANNEL: enable off channel
  243. * @TDLS_DISABLE_OFFCHANNEL: disable off channel
  244. */
  245. enum tdls_off_chan_mode {
  246. TDLS_ENABLE_OFFCHANNEL,
  247. TDLS_DISABLE_OFFCHANNEL
  248. };
  249. /**
  250. * enum tdls_event_msg_type - TDLS event message type
  251. * @TDLS_SHOULD_DISCOVER: should do discover for peer (based on tx bytes per
  252. * second > tx_discover threshold)
  253. * @TDLS_SHOULD_TEARDOWN: recommend teardown the link for peer due to tx bytes
  254. * per second below tx_teardown_threshold
  255. * @TDLS_PEER_DISCONNECTED: tdls peer disconnected
  256. * @TDLS_CONNECTION_TRACKER_NOTIFY: TDLS/BT role change notification for
  257. * connection tracker
  258. */
  259. enum tdls_event_msg_type {
  260. TDLS_SHOULD_DISCOVER = 0,
  261. TDLS_SHOULD_TEARDOWN,
  262. TDLS_PEER_DISCONNECTED,
  263. TDLS_CONNECTION_TRACKER_NOTIFY
  264. };
  265. /**
  266. * enum tdls_event_reason - TDLS event reason
  267. * @TDLS_TEARDOWN_TX: tdls teardown recommended due to low transmits
  268. * @TDLS_TEARDOWN_RSSI: tdls link tear down recommended due to poor RSSI
  269. * @TDLS_TEARDOWN_SCAN: tdls link tear down recommended due to offchannel scan
  270. * @TDLS_TEARDOWN_PTR_TIMEOUT: tdls peer disconnected due to PTR timeout
  271. * @TDLS_TEARDOWN_BAD_PTR: tdls peer disconnected due wrong PTR format
  272. * @TDLS_TEARDOWN_NO_RSP: tdls peer not responding
  273. * @TDLS_DISCONNECTED_PEER_DELETE: tdls peer disconnected due to peer deletion
  274. * @TDLS_PEER_ENTER_BUF_STA: tdls entered buffer STA role, TDLS connection
  275. * tracker needs to handle this
  276. * @TDLS_PEER_EXIT_BUF_STA: tdls exited buffer STA role, TDLS connection tracker
  277. * needs to handle this
  278. * @TDLS_ENTER_BT_BUSY: BT entered busy mode, TDLS connection tracker needs to
  279. * handle this
  280. * @TDLS_EXIT_BT_BUSY: BT exited busy mode, TDLS connection tracker needs to
  281. * handle this
  282. * @DLS_SCAN_STARTED: TDLS module received a scan start event, TDLS connection
  283. * tracker needs to handle this
  284. * @TDLS_SCAN_COMPLETED: TDLS module received a scan complete event, TDLS
  285. * connection tracker needs to handle this
  286. */
  287. enum tdls_event_reason {
  288. TDLS_TEARDOWN_TX,
  289. TDLS_TEARDOWN_RSSI,
  290. TDLS_TEARDOWN_SCAN,
  291. TDLS_TEARDOWN_PTR_TIMEOUT,
  292. TDLS_TEARDOWN_BAD_PTR,
  293. TDLS_TEARDOWN_NO_RSP,
  294. TDLS_DISCONNECTED_PEER_DELETE,
  295. TDLS_PEER_ENTER_BUF_STA,
  296. TDLS_PEER_EXIT_BUF_STA,
  297. TDLS_ENTER_BT_BUSY,
  298. TDLS_EXIT_BT_BUSY,
  299. TDLS_SCAN_STARTED,
  300. TDLS_SCAN_COMPLETED,
  301. };
  302. /**
  303. * enum tdls_disable_sources - TDLS disable sources
  304. * @TDLS_SET_MODE_SOURCE_USER: disable from user
  305. * @TDLS_SET_MODE_SOURCE_SCAN: disable during scan
  306. * @TDLS_SET_MODE_SOURCE_OFFCHANNEL: disable during offchannel
  307. * @TDLS_SET_MODE_SOURCE_BTC: disable during bluetooth
  308. * @TDLS_SET_MODE_SOURCE_P2P: disable during p2p
  309. */
  310. enum tdls_disable_sources {
  311. TDLS_SET_MODE_SOURCE_USER = 0,
  312. TDLS_SET_MODE_SOURCE_SCAN,
  313. TDLS_SET_MODE_SOURCE_OFFCHANNEL,
  314. TDLS_SET_MODE_SOURCE_BTC,
  315. TDLS_SET_MODE_SOURCE_P2P,
  316. };
  317. /**
  318. * struct tdls_osif_indication - tdls indication to os if layer
  319. * @vdev: vdev object
  320. * @reason: used with teardown indication
  321. * @peer_mac: MAC address of the TDLS peer
  322. */
  323. struct tdls_osif_indication {
  324. struct wlan_objmgr_vdev *vdev;
  325. uint16_t reason;
  326. uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
  327. QDF_STATUS status;
  328. };
  329. /**
  330. * struct tx_frame - tx frame
  331. * @buf: frame buffer
  332. * @buf_len: buffer length
  333. * @tx_timer: tx send timer
  334. */
  335. struct tx_frame {
  336. uint8_t *buf;
  337. size_t buf_len;
  338. qdf_timer_t tx_timer;
  339. };
  340. /**
  341. * enum tdls_feature_bit
  342. * @TDLS_FEATURE_OFF_CHANNEL: tdls off channel
  343. * @TDLS_FEATURE_WMM: tdls wmm
  344. * @TDLS_FEATURE_BUFFER_STA: tdls buffer sta
  345. * @TDLS_FEATURE_SLEEP_STA: tdls sleep sta feature
  346. * @TDLS_FEATURE_SCAN: tdls scan
  347. * @TDLS_FEATURE_ENABLE: tdls enabled
  348. * @TDLS_FEAUTRE_IMPLICIT_TRIGGER: tdls implicit trigger
  349. * @TDLS_FEATURE_EXTERNAL_CONTROL: tdls external control
  350. */
  351. enum tdls_feature_bit {
  352. TDLS_FEATURE_OFF_CHANNEL,
  353. TDLS_FEATURE_WMM,
  354. TDLS_FEATURE_BUFFER_STA,
  355. TDLS_FEATURE_SLEEP_STA,
  356. TDLS_FEATURE_SCAN,
  357. TDLS_FEATURE_ENABLE,
  358. TDLS_FEAUTRE_IMPLICIT_TRIGGER,
  359. TDLS_FEATURE_EXTERNAL_CONTROL
  360. };
  361. #define TDLS_IS_OFF_CHANNEL_ENABLED(flags) \
  362. CHECK_BIT(flags, TDLS_FEATURE_OFF_CHANNEL)
  363. #define TDLS_IS_WMM_ENABLED(flags) \
  364. CHECK_BIT(flags, TDLS_FEATURE_WMM)
  365. #define TDLS_IS_BUFFER_STA_ENABLED(flags) \
  366. CHECK_BIT(flags, TDLS_FEATURE_BUFFER_STA)
  367. #define TDLS_IS_SLEEP_STA_ENABLED(flags) \
  368. CHECK_BIT(flags, TDLS_FEATURE_SLEEP_STA)
  369. #define TDLS_IS_SCAN_ENABLED(flags) \
  370. CHECK_BIT(flags, TDLS_FEATURE_SCAN)
  371. #define TDLS_IS_ENABLED(flags) \
  372. CHECK_BIT(flags, TDLS_FEATURE_ENABLE)
  373. #define TDLS_IS_IMPLICIT_TRIG_ENABLED(flags) \
  374. CHECK_BIT(flags, TDLS_FEAUTRE_IMPLICIT_TRIGGER)
  375. #define TDLS_IS_EXTERNAL_CONTROL_ENABLED(flags) \
  376. CHECK_BIT(flags, TDLS_FEATURE_EXTERNAL_CONTROL)
  377. /**
  378. * struct tdls_user_config - TDLS user configuration
  379. * @tdls_tx_states_period: tdls tx states period
  380. * @tdls_tx_pkt_threshold: tdls tx packets threshold
  381. * @tdls_rx_pkt_threshold: tdls rx packets threshold
  382. * @tdls_max_discovery_attempt: tdls discovery max times
  383. * @tdls_idle_timeout: tdls idle timeout
  384. * @tdls_idle_pkt_threshold: tdls idle packets threshold
  385. * @tdls_rssi_trigger_threshold: tdls rssi trigger threshold
  386. * @tdls_rssi_teardown_threshold: tdls rssi tear down threshold
  387. * @tdls_rssi_delta: tdls rssi delta
  388. * @tdls_uapsd_mask: tdls uapsd mask
  389. * @tdls_uapsd_inactivity_time: tdls uapsd inactivity time
  390. * @tdls_uapsd_pti_window: tdls peer traffic indication window
  391. * @tdls_uapsd_ptr_timeout: tdls peer response timeout
  392. * @tdls_feature_flags: tdls feature flags
  393. * @tdls_pre_off_chan_num: tdls off channel number
  394. * @tdls_pre_off_chan_bw: tdls off channel bandwidth
  395. * @tdls_peer_kickout_threshold: sta kickout threshold for tdls peer
  396. * @delayed_trig_framint: delayed trigger frame interval
  397. * @tdls_vdev_nss_2g: tdls NSS setting for 2G band
  398. * @tdls_vdev_nss_5g: tdls NSS setting for 5G band
  399. */
  400. struct tdls_user_config {
  401. uint32_t tdls_tx_states_period;
  402. uint32_t tdls_tx_pkt_threshold;
  403. uint32_t tdls_rx_pkt_threshold;
  404. uint32_t tdls_max_discovery_attempt;
  405. uint32_t tdls_idle_timeout;
  406. uint32_t tdls_idle_pkt_threshold;
  407. uint32_t tdls_rssi_trigger_threshold;
  408. uint32_t tdls_rssi_teardown_threshold;
  409. uint32_t tdls_rssi_delta;
  410. uint32_t tdls_uapsd_mask;
  411. uint32_t tdls_uapsd_inactivity_time;
  412. uint32_t tdls_uapsd_pti_window;
  413. uint32_t tdls_uapsd_ptr_timeout;
  414. uint32_t tdls_feature_flags;
  415. uint32_t tdls_pre_off_chan_num;
  416. uint32_t tdls_pre_off_chan_bw;
  417. uint32_t tdls_peer_kickout_threshold;
  418. uint32_t delayed_trig_framint;
  419. uint8_t tdls_vdev_nss_2g;
  420. uint8_t tdls_vdev_nss_5g;
  421. };
  422. /**
  423. * struct tdls_config_params - tdls configure paramets
  424. * @tdls: tdls support mode
  425. * @tx_period_t: tdls tx stats period
  426. * @tx_packet_n: tdls tx packets number threshold
  427. * @discovery_tries_n: tdls max discovery attempt count
  428. * @idle_timeout_t: tdls idle time timeout
  429. * @idle_packet_n: tdls idle pkt threshold
  430. * @rssi_trigger_threshold: tdls rssi trigger threshold, checked before setup
  431. * @rssi_teardown_threshold: tdls rssi teardown threshold
  432. * @rssi_delta: rssi delta
  433. */
  434. struct tdls_config_params {
  435. uint32_t tdls;
  436. uint32_t tx_period_t;
  437. uint32_t tx_packet_n;
  438. uint32_t discovery_tries_n;
  439. uint32_t idle_timeout_t;
  440. uint32_t idle_packet_n;
  441. int32_t rssi_trigger_threshold;
  442. int32_t rssi_teardown_threshold;
  443. int32_t rssi_delta;
  444. };
  445. /**
  446. * struct tdls_tx_cnf: tdls tx ack
  447. * @vdev_id: vdev id
  448. * @action_cookie: frame cookie
  449. * @buf: frame buf
  450. * @buf_len: buffer length
  451. * @status: tx send status
  452. */
  453. struct tdls_tx_cnf {
  454. int vdev_id;
  455. uint64_t action_cookie;
  456. void *buf;
  457. size_t buf_len;
  458. int status;
  459. };
  460. /**
  461. * struct tdls_rx_mgmt_frame - rx mgmt frame structure
  462. * @frame_len: frame length
  463. * @rx_chan: rx channel
  464. * @vdev_id: vdev id
  465. * @frm_type: frame type
  466. * @rx_rssi: rx rssi
  467. * @buf: buffer address
  468. */
  469. struct tdls_rx_mgmt_frame {
  470. uint32_t frame_len;
  471. uint32_t rx_chan;
  472. uint32_t vdev_id;
  473. uint32_t frm_type;
  474. uint32_t rx_rssi;
  475. uint8_t buf[1];
  476. };
  477. /**
  478. * tdls_rx_callback() - Callback for rx mgmt frame
  479. * @user_data: user data associated to this rx mgmt frame.
  480. * @rx_frame: RX mgmt frame
  481. *
  482. * This callback will be used to give rx frames to hdd.
  483. *
  484. * Return: None
  485. */
  486. typedef void (*tdls_rx_callback)(void *user_data,
  487. struct tdls_rx_mgmt_frame *rx_frame);
  488. /**
  489. * tdls_wmm_check() - Callback for wmm info
  490. * @psoc: psoc object
  491. *
  492. * This callback will be used to check wmm information
  493. *
  494. * Return: true or false
  495. */
  496. typedef bool (*tdls_wmm_check)(struct wlan_objmgr_vdev **vdev);
  497. /* This callback is used to report state change of peer to wpa_supplicant */
  498. typedef int (*tdls_state_change_callback)(const uint8_t *mac,
  499. uint32_t opclass,
  500. uint32_t channel,
  501. uint32_t state,
  502. int32_t reason, void *ctx);
  503. /* This callback is used to report events to os_if layer */
  504. typedef void (*tdls_evt_callback) (void *data,
  505. enum tdls_event_type ev_type,
  506. struct tdls_osif_indication *event);
  507. /* This callback is used to register TDLS peer with the datapath */
  508. typedef QDF_STATUS (*tdls_register_peer_callback)(void *userdata,
  509. uint32_t vdev_id,
  510. const uint8_t *mac,
  511. uint16_t stat_id,
  512. uint8_t qos);
  513. /* This callback is used to deregister TDLS peer from the datapath */
  514. typedef QDF_STATUS (*tdls_deregister_peer_callback)(void *userdata,
  515. uint32_t vdev_id,
  516. uint8_t sta_id);
  517. /* This callback is used to update datapath vdev flags */
  518. typedef QDF_STATUS
  519. (*tdls_dp_vdev_update_flags_callback)(void *cbk_data,
  520. uint8_t sta_id,
  521. uint32_t vdev_param,
  522. bool is_link_up);
  523. /**
  524. * struct tdls_start_params - tdls start params
  525. * @config: tdls user config
  526. * @tdls_send_mgmt_req: pass eWNI_SME_TDLS_SEND_MGMT_REQ value
  527. * @tdls_add_sta_req: pass eWNI_SME_TDLS_ADD_STA_REQ value
  528. * @tdls_del_sta_req: pass eWNI_SME_TDLS_DEL_STA_REQ value
  529. * @tdls_update_peer_state: pass WMA_UPDATE_TDLS_PEER_STATE value
  530. * @tdls_del_all_peers: pass eWNI_SME_DEL_ALL_TDLS_PEERS
  531. * @tdls_update_dp_vdev_flags: pass CDP_UPDATE_TDLS_FLAGS
  532. * @tdls_event_cb: tdls event callback
  533. * @tdls_evt_cb_data: tdls event data
  534. * @tdls_peer_context: userdata for register/deregister TDLS peer
  535. * @tdls_reg_peer: register tdls peer with datapath
  536. * @tdls_dereg_peer: deregister tdls peer from datapath
  537. * @tdls_dp_vdev_update: update vdev flags in datapath
  538. */
  539. struct tdls_start_params {
  540. struct tdls_user_config config;
  541. uint16_t tdls_send_mgmt_req;
  542. uint16_t tdls_add_sta_req;
  543. uint16_t tdls_del_sta_req;
  544. uint16_t tdls_update_peer_state;
  545. uint16_t tdls_del_all_peers;
  546. uint32_t tdls_update_dp_vdev_flags;
  547. tdls_rx_callback tdls_rx_cb;
  548. void *tdls_rx_cb_data;
  549. tdls_wmm_check tdls_wmm_cb;
  550. void *tdls_wmm_cb_data;
  551. tdls_evt_callback tdls_event_cb;
  552. void *tdls_evt_cb_data;
  553. void *tdls_peer_context;
  554. tdls_register_peer_callback tdls_reg_peer;
  555. tdls_deregister_peer_callback tdls_dereg_peer;
  556. tdls_dp_vdev_update_flags_callback tdls_dp_vdev_update;
  557. };
  558. /**
  559. * struct tdls_add_peer_params - add peer request parameter
  560. * @peer_addr: peer mac addr
  561. * @peer_type: peer type
  562. * @vdev_id: vdev id
  563. */
  564. struct tdls_add_peer_params {
  565. uint8_t peer_addr[QDF_MAC_ADDR_SIZE];
  566. uint32_t peer_type;
  567. uint32_t vdev_id;
  568. };
  569. /**
  570. * struct tdls_add_peer_request - peer add request
  571. * @vdev: vdev
  572. * @add_peer_req: add peer request parameters
  573. */
  574. struct tdls_add_peer_request {
  575. struct wlan_objmgr_vdev *vdev;
  576. struct tdls_add_peer_params add_peer_req;
  577. };
  578. /**
  579. * struct tdls_del_peer_params - delete peer request parameter
  580. * @peer_addr: peer mac addr
  581. * @peer_type: peer type
  582. * @vdev_id: vdev id
  583. */
  584. struct tdls_del_peer_params {
  585. const uint8_t *peer_addr;
  586. uint32_t peer_type;
  587. uint32_t vdev_id;
  588. };
  589. /**
  590. * struct tdls_del_peer_request - peer delete request
  591. * @vdev: vdev
  592. * @del_peer_req: delete peer request parameters
  593. */
  594. struct tdls_del_peer_request {
  595. struct wlan_objmgr_vdev *vdev;
  596. struct tdls_del_peer_params del_peer_req;
  597. };
  598. /**
  599. * struct vhgmcsinfo - VHT MCS information
  600. * @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams
  601. * @rx_highest: Indicates highest long GI VHT PPDU data rate
  602. * STA can receive. Rate expressed in units of 1 Mbps.
  603. * If this field is 0 this value should not be used to
  604. * consider the highest RX data rate supported.
  605. * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams
  606. * @tx_highest: Indicates highest long GI VHT PPDU data rate
  607. * STA can transmit. Rate expressed in units of 1 Mbps.
  608. * If this field is 0 this value should not be used to
  609. * consider the highest TX data rate supported.
  610. */
  611. struct vhtmcsinfo {
  612. uint16_t rx_mcs_map;
  613. uint16_t rx_highest;
  614. uint16_t tx_mcs_map;
  615. uint16_t tx_highest;
  616. };
  617. /**
  618. * struct vhtcap - VHT capabilities
  619. *
  620. * This structure is the "VHT capabilities element" as
  621. * described in 802.11ac D3.0 8.4.2.160
  622. * @vht_cap_info: VHT capability info
  623. * @supp_mcs: VHT MCS supported rates
  624. */
  625. struct vhtcap {
  626. uint32_t vht_capinfo;
  627. struct vhtmcsinfo supp_mcs;
  628. };
  629. struct tdls_update_peer_params {
  630. uint8_t peer_addr[QDF_MAC_ADDR_SIZE];
  631. uint32_t peer_type;
  632. uint32_t vdev_id;
  633. uint16_t capability;
  634. uint8_t extn_capability[WLAN_MAC_MAX_EXTN_CAP];
  635. uint8_t supported_rates_len;
  636. uint8_t supported_rates[WLAN_MAC_MAX_SUPP_RATES];
  637. uint8_t htcap_present;
  638. struct htcap_cmn_ie ht_cap;
  639. uint8_t vhtcap_present;
  640. struct vhtcap vht_cap;
  641. uint8_t uapsd_queues;
  642. uint8_t max_sp;
  643. uint8_t supported_channels_len;
  644. uint8_t supported_channels[WLAN_MAC_MAX_SUPP_CHANNELS];
  645. uint8_t supported_oper_classes_len;
  646. uint8_t supported_oper_classes[WLAN_MAX_SUPP_OPER_CLASSES];
  647. bool is_qos_wmm_sta;
  648. };
  649. struct tdls_update_peer_request {
  650. struct wlan_objmgr_vdev *vdev;
  651. struct tdls_update_peer_params update_peer_req;
  652. };
  653. /**
  654. * struct tdls_oper_request - tdls operation request
  655. * @vdev: vdev object
  656. * @peer_addr: MAC address of the TDLS peer
  657. */
  658. struct tdls_oper_request {
  659. struct wlan_objmgr_vdev *vdev;
  660. uint8_t peer_addr[QDF_MAC_ADDR_SIZE];
  661. };
  662. /**
  663. * struct tdls_oper_config_force_peer_request - tdls enable force peer request
  664. * @vdev: vdev object
  665. * @peer_addr: MAC address of the TDLS peer
  666. * @chan: channel
  667. * @max_latency: maximum latency
  668. * @op_class: operation class
  669. * @min_bandwidth: minimal bandwidth
  670. * @callback: state change callback
  671. */
  672. struct tdls_oper_config_force_peer_request {
  673. struct wlan_objmgr_vdev *vdev;
  674. uint8_t peer_addr[QDF_MAC_ADDR_SIZE];
  675. uint32_t chan;
  676. uint32_t max_latency;
  677. uint32_t op_class;
  678. uint32_t min_bandwidth;
  679. tdls_state_change_callback callback;
  680. };
  681. /**
  682. * struct tdls_info - tdls info
  683. *
  684. * @vdev_id: vdev id
  685. * @tdls_state: tdls state
  686. * @notification_interval_ms: notification interval in ms
  687. * @tx_discovery_threshold: tx discovery threshold
  688. * @tx_teardown_threshold: tx teardown threshold
  689. * @rssi_teardown_threshold: rx teardown threshold
  690. * @rssi_delta: rssi delta
  691. * @tdls_options: tdls options
  692. * @peer_traffic_ind_window: peer traffic indication window
  693. * @peer_traffic_response_timeout: peer traffic response timeout
  694. * @puapsd_mask: puapsd mask
  695. * @puapsd_inactivity_time: puapsd inactivity time
  696. * @puapsd_rx_frame_threshold: puapsd rx frame threshold
  697. * @teardown_notification_ms: tdls teardown notification interval
  698. * @tdls_peer_kickout_threshold: tdls packets threshold
  699. * for peer kickout operation
  700. */
  701. struct tdls_info {
  702. uint32_t vdev_id;
  703. uint32_t tdls_state;
  704. uint32_t notification_interval_ms;
  705. uint32_t tx_discovery_threshold;
  706. uint32_t tx_teardown_threshold;
  707. int32_t rssi_teardown_threshold;
  708. int32_t rssi_delta;
  709. uint32_t tdls_options;
  710. uint32_t peer_traffic_ind_window;
  711. uint32_t peer_traffic_response_timeout;
  712. uint32_t puapsd_mask;
  713. uint32_t puapsd_inactivity_time;
  714. uint32_t puapsd_rx_frame_threshold;
  715. uint32_t teardown_notification_ms;
  716. uint32_t tdls_peer_kickout_threshold;
  717. };
  718. /**
  719. * struct tdls_ch_params - channel parameters
  720. * @chan_id: ID of the channel
  721. * @pwr: power level
  722. * @dfs_set: is dfs supported or not
  723. * @half_rate: is the channel operating at 10MHz
  724. * @quarter_rate: is the channel operating at 5MHz
  725. */
  726. struct tdls_ch_params {
  727. uint8_t chan_id;
  728. uint8_t pwr;
  729. bool dfs_set;
  730. bool half_rate;
  731. bool quarter_rate;
  732. };
  733. /**
  734. * struct tdls_peer_params - TDLS peer capablities parameters
  735. * @is_peer_responder: is peer responder or not
  736. * @peer_uapsd_queue: peer uapsd queue
  737. * @peer_max_sp: peer max SP value
  738. * @peer_buff_sta_support: peer buffer sta supported or not
  739. * @peer_off_chan_support: peer offchannel support
  740. * @peer_curr_operclass: peer current operating class
  741. * @self_curr_operclass: self current operating class
  742. * @peer_chanlen: peer channel length
  743. * @peer_chan: peer channel list
  744. * @peer_oper_classlen: peer operating class length
  745. * @peer_oper_class: peer operating class
  746. * @pref_off_channum: peer offchannel number
  747. * @pref_off_chan_bandwidth: peer offchannel bandwidth
  748. * @opclass_for_prefoffchan: operating class for offchannel
  749. */
  750. struct tdls_peer_params {
  751. uint8_t is_peer_responder;
  752. uint8_t peer_uapsd_queue;
  753. uint8_t peer_max_sp;
  754. uint8_t peer_buff_sta_support;
  755. uint8_t peer_off_chan_support;
  756. uint8_t peer_curr_operclass;
  757. uint8_t self_curr_operclass;
  758. uint8_t peer_chanlen;
  759. struct tdls_ch_params peer_chan[WLAN_MAC_WMI_MAX_SUPP_CHANNELS];
  760. uint8_t peer_oper_classlen;
  761. uint8_t peer_oper_class[WLAN_MAX_SUPP_OPER_CLASSES];
  762. uint8_t pref_off_channum;
  763. uint8_t pref_off_chan_bandwidth;
  764. uint8_t opclass_for_prefoffchan;
  765. };
  766. /**
  767. * struct tdls_peer_update_state - TDLS peer state parameters
  768. * @vdev_id: vdev id
  769. * @peer_macaddr: peer mac address
  770. * @peer_cap: peer capabality
  771. * @resp_reqd: response needed
  772. */
  773. struct tdls_peer_update_state {
  774. uint32_t vdev_id;
  775. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  776. uint32_t peer_state;
  777. struct tdls_peer_params peer_cap;
  778. bool resp_reqd;
  779. };
  780. /**
  781. * struct tdls_channel_switch_params - channel switch parameter structure
  782. * @vdev_id: vdev ID
  783. * @peer_mac_addr: Peer mac address
  784. * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset
  785. * @tdls_off_ch: Target Off Channel
  786. * @oper_class: Operating class for target channel
  787. * @is_responder: Responder or initiator
  788. */
  789. struct tdls_channel_switch_params {
  790. uint32_t vdev_id;
  791. uint8_t peer_mac_addr[QDF_MAC_ADDR_SIZE];
  792. uint16_t tdls_off_ch_bw_offset;
  793. uint8_t tdls_off_ch;
  794. uint8_t tdls_sw_mode;
  795. uint8_t oper_class;
  796. uint8_t is_responder;
  797. };
  798. /**
  799. * enum uapsd_access_cat - U-APSD Access Categories
  800. * @UAPSD_AC_BE: best effort
  801. * @UAPSD_AC_BK: back ground
  802. * @UAPSD_AC_VI: video
  803. * @UAPSD_AC_VO: voice
  804. */
  805. enum uapsd_access_cat {
  806. UAPSD_AC_BE,
  807. UAPSD_AC_BK,
  808. UAPSD_AC_VI,
  809. UAPSD_AC_VO
  810. };
  811. /**
  812. * enum tspec_dir_type - TSPEC Direction type
  813. * @TX_DIR: uplink
  814. * @RX_DIR: downlink
  815. * @BI_DIR: bidirectional
  816. */
  817. enum tspec_dir_type {
  818. TX_DIR = 0,
  819. RX_DIR = 1,
  820. BI_DIR = 2,
  821. };
  822. /**
  823. * struct sta_uapsd_params - uapsd auto trig params
  824. * @wmm_ac: WMM access category from 0 to 3
  825. * @user_priority: User priority to use in trigger frames
  826. * @service_interval: service interval
  827. * @suspend_interval: suspend interval
  828. * @delay_interval: delay interval
  829. */
  830. struct sta_uapsd_params {
  831. uint32_t wmm_ac;
  832. uint32_t user_priority;
  833. uint32_t service_interval;
  834. uint32_t suspend_interval;
  835. uint32_t delay_interval;
  836. };
  837. /**
  838. * struct sta_uapsd_trig_params - uapsd trigger parameter
  839. * @vdevid: vdev id
  840. * @peer_addr: peer address
  841. * @auto_triggerparam: trigger parameters
  842. * @num_ac: no of access category
  843. */
  844. struct sta_uapsd_trig_params {
  845. uint32_t vdevid;
  846. uint8_t peer_addr[QDF_MAC_ADDR_SIZE];
  847. struct sta_uapsd_params *auto_triggerparam;
  848. uint32_t num_ac;
  849. };
  850. /**
  851. * struct tdls_event_info - firmware tdls event
  852. * @vdev_id: vdev id
  853. * @peermac: peer mac address
  854. * @message_type: message type
  855. * @peer_reason: reason
  856. */
  857. struct tdls_event_info {
  858. uint8_t vdev_id;
  859. struct qdf_mac_addr peermac;
  860. uint16_t message_type;
  861. uint32_t peer_reason;
  862. };
  863. /**
  864. * struct tdls_event_notify - tdls event notify
  865. * @vdev: vdev object
  866. * @event: tdls event
  867. */
  868. struct tdls_event_notify {
  869. struct wlan_objmgr_vdev *vdev;
  870. struct tdls_event_info event;
  871. };
  872. /**
  873. * struct tdls_event_notify - tdls event notify
  874. * @peer_mac: peer's mac address
  875. * @frame_type: Type of TDLS mgmt frame to be sent
  876. * @dialog: dialog token used in the frame.
  877. * @status_code: status to be incuded in the frame
  878. * @responder: Tdls request type
  879. * @peer_capability: peer cpabilities
  880. * @len: length of additional Ies
  881. * @buf: additional IEs to be included
  882. */
  883. struct tdls_send_mgmt {
  884. struct qdf_mac_addr peer_mac;
  885. uint8_t frame_type;
  886. uint8_t dialog;
  887. uint16_t status_code;
  888. uint8_t responder;
  889. uint32_t peer_capability;
  890. uint8_t len;
  891. /* Variable length, do not add anything after this */
  892. uint8_t buf[];
  893. };
  894. /**
  895. * struct tdls_validate_action_req - tdls validate mgmt request
  896. * @vdev: vdev object
  897. * @action_code: action code
  898. * @peer_mac: peer mac address
  899. * @dialog_token: dialog code
  900. * @status_code: status code to add
  901. * @len: len of the frame
  902. * @responder: whether to respond or not
  903. * @max_sta_failed: mgmt failure reason
  904. */
  905. struct tdls_validate_action_req {
  906. struct wlan_objmgr_vdev *vdev;
  907. uint8_t action_code;
  908. uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
  909. uint8_t dialog_token;
  910. uint8_t status_code;
  911. size_t len;
  912. int responder;
  913. int max_sta_failed;
  914. };
  915. /**
  916. * struct tdls_get_all_peers - get all peers from the list
  917. * @vdev: vdev object
  918. * @buf: output string buffer to hold the peer info
  919. * @buf_len: the size of output string buffer
  920. */
  921. struct tdls_get_all_peers {
  922. struct wlan_objmgr_vdev *vdev;
  923. char *buf;
  924. int buf_len;
  925. };
  926. /**
  927. * struct tdls_send_action_frame_request - tdls send mgmt request
  928. * @vdev: vdev object
  929. * @chk_frame: frame validation structure
  930. * @session_id: session id
  931. * @vdev_id: vdev id
  932. * @cmd_buf: cmd buffer
  933. * @len: length of the frame
  934. * @use_default_ac: access category
  935. * @tdls_mgmt: tdls management
  936. */
  937. struct tdls_action_frame_request {
  938. struct wlan_objmgr_vdev *vdev;
  939. struct tdls_validate_action_req *chk_frame;
  940. uint8_t session_id;
  941. uint8_t vdev_id;
  942. const uint8_t *cmd_buf;
  943. uint8_t len;
  944. bool use_default_ac;
  945. /* Variable length, do not add anything after this */
  946. struct tdls_send_mgmt tdls_mgmt;
  947. };
  948. /**
  949. * struct tdls_set_responder_req - tdls set responder in peer
  950. * @vdev: vdev object
  951. * @peer_mac: peer mac address
  952. * @responder: whether to respond or not
  953. */
  954. struct tdls_set_responder_req {
  955. struct wlan_objmgr_vdev *vdev;
  956. uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
  957. uint8_t responder;
  958. };
  959. /**
  960. * struct tdls_sta_notify_params - STA connection notify info
  961. * @vdev: vdev object
  962. * @tdls_prohibited: peer mac addr
  963. * @tdls_chan_swit_prohibited: peer type
  964. * @lfr_roam: is trigger due to lfr
  965. * @session_id: session id
  966. */
  967. struct tdls_sta_notify_params {
  968. struct wlan_objmgr_vdev *vdev;
  969. bool tdls_prohibited;
  970. bool tdls_chan_swit_prohibited;
  971. bool lfr_roam;
  972. bool user_disconnect;
  973. uint8_t session_id;
  974. };
  975. /**
  976. * struct tdls_set_mode_params - TDLS set mode params
  977. * @vdev: vdev object
  978. * @tdls_mode: tdls mode to set
  979. * @update_last: inform to update last tdls mode
  980. * @source: mode change requester
  981. */
  982. struct tdls_set_mode_params {
  983. struct wlan_objmgr_vdev *vdev;
  984. enum tdls_feature_mode tdls_mode;
  985. bool update_last;
  986. enum tdls_disable_sources source;
  987. };
  988. /**
  989. * struct tdls_del_all_tdls_peers - delete all tdls peers
  990. * @msg_type: type of message
  991. * @msg_len: length of message
  992. * @bssid: bssid of peer device
  993. */
  994. struct tdls_del_all_tdls_peers {
  995. uint16_t msg_type;
  996. uint16_t msg_len;
  997. struct qdf_mac_addr bssid;
  998. };
  999. /**
  1000. * struct tdls_antenna_switch_request - TDLS antenna switch request
  1001. * @vdev: vdev object
  1002. * @mode: antenna mode, 1x1 or 2x2
  1003. */
  1004. struct tdls_antenna_switch_request {
  1005. struct wlan_objmgr_vdev *vdev;
  1006. uint32_t mode;
  1007. };
  1008. #endif