wlan_tdls_public_structs.h 32 KB

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