wlan_tdls_public_structs.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  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_PEER_LIST_SIZE 256
  32. #define WLAN_TDLS_CT_TABLE_SIZE 8
  33. #define WLAN_TDLS_PEER_SUB_LIST_SIZE 10
  34. #define WLAN_MAC_MAX_EXTN_CAP 8
  35. #define WLAN_MAC_MAX_SUPP_CHANNELS 100
  36. #define WLAN_MAX_SUPP_OPER_CLASSES 32
  37. #define WLAN_MAC_MAX_SUPP_RATES 32
  38. #define ENABLE_CHANSWITCH 1
  39. #define TDLS_STA_INDEX_CHECK(sta_id) \
  40. (((sta_id) >= 1) && ((sta_id) < 0xFF))
  41. /**
  42. * enum tdls_conc_cap - tdls concurrency support
  43. * @TDLS_SUPPORTED_ONLY_ON_STA: only support sta tdls
  44. * @TDLS_SUPPORTED_ONLY_ON_P2P_CLIENT: only support p2p client tdls
  45. */
  46. enum tdls_conc_cap {
  47. TDLS_SUPPORTED_ONLY_ON_STA = 0,
  48. TDLS_SUPPORTED_ONLY_ON_P2P_CLIENT,
  49. };
  50. /**
  51. * enum tdls_peer_capab - tdls capability type
  52. * @TDLS_CAP_NOT_SUPPORTED: tdls not supported
  53. * @TDLS_CAP_UNKNOWN: unknown capability
  54. * @TDLS_CAP_SUPPORTED: tdls capability supported
  55. */
  56. enum tdls_peer_capab {
  57. TDLS_CAP_NOT_SUPPORTED = -1,
  58. TDLS_CAP_UNKNOWN = 0,
  59. TDLS_CAP_SUPPORTED = 1,
  60. };
  61. /**
  62. * enum tdls_link_status - tdls link status
  63. * @TDLS_LINK_IDLE: tdls link idle
  64. * @TDLS_LINK_DISCOVERING: tdls link discovering
  65. * @TDLS_LINK_DISCOVERED: tdls link discovered
  66. * @TDLS_LINK_CONNECTING: tdls link connecting
  67. * @TDLS_LINK_CONNECTED: tdls link connected
  68. * @TDLS_LINK_TEARING: tdls link tearing
  69. */
  70. enum tdls_link_status {
  71. TDLS_LINK_IDLE = 0,
  72. TDLS_LINK_DISCOVERING,
  73. TDLS_LINK_DISCOVERED,
  74. TDLS_LINK_CONNECTING,
  75. TDLS_LINK_CONNECTED,
  76. TDLS_LINK_TEARING,
  77. };
  78. /**
  79. * enum tdls_link_reason - tdls link reason
  80. * @TDLS_LINK_SUCCESS: Success
  81. * @TDLS_LINK_UNSPECIFIED: Unspecified reason
  82. * @TDLS_LINK_NOT_SUPPORTED: Remote side doesn't support TDLS
  83. * @TDLS_LINK_UNSUPPORTED_BAND: Remote side doesn't support this band
  84. * @TDLS_LINK_NOT_BENEFICIAL: Going to AP is better than direct
  85. * @TDLS_LINK_DROPPED_BY_REMOTE: Remote side doesn't want it anymore
  86. */
  87. enum tdls_link_reason {
  88. TDLS_LINK_SUCCESS,
  89. TDLS_LINK_UNSPECIFIED = -1,
  90. TDLS_LINK_NOT_SUPPORTED = -2,
  91. TDLS_LINK_UNSUPPORTED_BAND = -3,
  92. TDLS_LINK_NOT_BENEFICIAL = -4,
  93. TDLS_LINK_DROPPED_BY_REMOTE = -5,
  94. };
  95. /**
  96. * enum tdls_support_mode - TDLS support mode
  97. * @TDLS_SUPPORT_DISABLED: Disabled in ini or FW
  98. * @TDLS_SUPPORT_SUSPENDED: TDLS supported by ini and FW, but disabled
  99. * temporarily due to off-channel operations or due to other reasons
  100. * @TDLS_SUPPORT_EXP_TRIG_ONLY: Explicit trigger mode
  101. * @TDLS_SUPPORT_IMP_MODE: Implicit mode
  102. * @TDLS_SUPPORT_EXT_CONTROL: External control mode
  103. */
  104. enum tdls_support_mode {
  105. TDLS_SUPPORT_DISABLED = 0,
  106. TDLS_SUPPORT_SUSPENDED,
  107. TDLS_SUPPORT_EXP_TRIG_ONLY,
  108. TDLS_SUPPORT_IMP_MODE,
  109. TDLS_SUPPORT_EXT_CONTROL,
  110. };
  111. /**
  112. * enum tdls_event_type - TDLS event type
  113. * @TDLS_EVENT_VDEV_STATE_CHANGE: umac connect/disconnect event
  114. * @TDLS_EVENT_MGMT_TX_ACK_CNF: tx tdls frame ack event
  115. * @TDLS_EVENT_RX_MGMT: rx discovery response frame
  116. * @TDLS_EVENT_ADD_PEER: add peer or update peer
  117. * @TDLS_EVENT_DEL_PEER: delete peer
  118. */
  119. enum tdls_event_type {
  120. TDLS_EVENT_VDEV_STATE_CHANGE = 0,
  121. TDLS_EVENT_MGMT_TX_ACK_CNF,
  122. TDLS_EVENT_RX_MGMT,
  123. TDLS_EVENT_ADD_PEER,
  124. TDLS_EVENT_DEL_PEER,
  125. };
  126. /**
  127. * enum tdls_state_t - tdls state
  128. *
  129. * @QCA_WIFI_HAL_TDLS_DISABLED: TDLS is not enabled, or is disabled now
  130. * @QCA_WIFI_HAL_TDLS_ENABLED: TDLS is enabled, but not yet tried
  131. * @QCA_WIFI_HAL_TDLS_ESTABLISHED: Direct link is established
  132. * @QCA_WIFI_HAL_TDLS_ESTABLISHED_OFF_CHANNEL: Direct link established using MCC
  133. * @QCA_WIFI_HAL_TDLS_DROPPED: Direct link was established, but is now dropped
  134. * @QCA_WIFI_HAL_TDLS_FAILED: Direct link failed
  135. */
  136. enum tdls_state_t {
  137. QCA_WIFI_HAL_TDLS_S_DISABLED = 1,
  138. QCA_WIFI_HAL_TDLS_S_ENABLED,
  139. QCA_WIFI_HAL_TDLS_S_ESTABLISHED,
  140. QCA_WIFI_HAL_TDLS_S_ESTABLISHED_OFF_CHANNEL,
  141. QCA_WIFI_HAL_TDLS_S_DROPPED,
  142. QCA_WIFI_HAL_TDLS_S_FAILED,
  143. };
  144. /**
  145. * enum tdls_event_msg_type - TDLS event message type
  146. * @TDLS_SHOULD_DISCOVER: should do discover
  147. * @TDLS_SHOULD_TEARDOWN: notify teardown the link
  148. * @TDLS_PEER_DISCONNECTED: tdls peer disconnected
  149. * @TDLS_CONNECTION_TRACKER_NOTIFY: connection tracker notify
  150. */
  151. enum tdls_event_msg_type {
  152. TDLS_SHOULD_DISCOVER = 0,
  153. TDLS_SHOULD_TEARDOWN,
  154. TDLS_PEER_DISCONNECTED,
  155. TDLS_CONNECTION_TRACKER_NOTIFY,
  156. };
  157. /**
  158. * enum tdls_event_reason - TDLS event reason
  159. * @TDLS_TEARDOWN_TX:
  160. * @TDLS_TEARDOWN_RSSI:
  161. * @TDLS_TEARDOWN_SCAN:
  162. * @TDLS_TEARDOWN_PTR_TIMEOUT:
  163. * @TDLS_TEARDOWN_BAD_PTR:
  164. * @TDLS_TEARDOWN_NO_RSP:
  165. * @TDLS_DISCONNECTED_PEER_DELETE:
  166. * @TDLS_PEER_ENTER_BUF_STA:
  167. * @TDLS_PEER_EXIT_BUF_STA:
  168. * @TDLS_ENTER_BT_BUSY:
  169. * @TDLS_EXIT_BT_BUSY:
  170. * @DLS_SCAN_STARTED:
  171. * @TDLS_SCAN_COMPLETED:
  172. */
  173. enum tdls_event_reason {
  174. TDLS_TEARDOWN_TX,
  175. TDLS_TEARDOWN_RSSI,
  176. TDLS_TEARDOWN_SCAN,
  177. TDLS_TEARDOWN_PTR_TIMEOUT,
  178. TDLS_TEARDOWN_BAD_PTR,
  179. TDLS_TEARDOWN_NO_RSP,
  180. TDLS_DISCONNECTED_PEER_DELETE,
  181. TDLS_PEER_ENTER_BUF_STA,
  182. TDLS_PEER_EXIT_BUF_STA,
  183. TDLS_ENTER_BT_BUSY,
  184. TDLS_EXIT_BT_BUSY,
  185. TDLS_SCAN_STARTED,
  186. TDLS_SCAN_COMPLETED,
  187. };
  188. /**
  189. * struct tx_frame - tx frame
  190. * @buf: frame buffer
  191. * @buf_len: buffer length
  192. * @tx_timer: tx send timer
  193. */
  194. struct tx_frame {
  195. uint8_t *buf;
  196. size_t buf_len;
  197. qdf_timer_t tx_timer;
  198. };
  199. /**
  200. * enum tdls_feature_bit
  201. * @TDLS_FEATURE_OFF_CHANNEL: tdls off channel
  202. * @TDLS_FEATURE_WMM: tdls wmm
  203. * @TDLS_FEATURE_BUFFER_STA: tdls buffer sta
  204. * @TDLS_FEATURE_SLEEP_STA: tdls sleep sta feature
  205. * @TDLS_FEATURE_SCAN: tdls scan
  206. * @TDLS_FEATURE_ENABLE: tdls enabled
  207. * @TDLS_FEAUTRE_IMPLICIT_TRIGGER: tdls implicit trigger
  208. * @TDLS_FEATURE_EXTERNAL_CONTROL: tdls external control
  209. */
  210. enum tdls_feature_bit {
  211. TDLS_FEATURE_OFF_CHANNEL,
  212. TDLS_FEATURE_WMM,
  213. TDLS_FEATURE_BUFFER_STA,
  214. TDLS_FEATURE_SLEEP_STA,
  215. TDLS_FEATURE_SCAN,
  216. TDLS_FEATURE_ENABLE,
  217. TDLS_FEAUTRE_IMPLICIT_TRIGGER,
  218. TDLS_FEATURE_EXTERNAL_CONTROL
  219. };
  220. #define TDLS_IS_OFF_CHANNEL_ENABLED(flags) \
  221. CHECK_BIT(TDLS_FEATURE_OFF_CHANNEL, flags)
  222. #define TDLS_IS_WMM_ENABLED(flags) \
  223. CHECK_BIT(TDLS_FEATURE_WMM, flags)
  224. #define TDLS_IS_BUFFER_STA_ENABLED(flags) \
  225. CHECK_BIT(TDLS_FEATURE_BUFFER_STA, flags)
  226. #define TDLS_IS_SLEEP_STA_ENABLED(flags) \
  227. CHECK_BIT(TDLS_FEATURE_SLEEP_STA, flags)
  228. #define TDLS_IS_SCAN_ENABLED(flags) \
  229. CHECK_BIT(TDLS_FEATURE_SCAN, flags)
  230. #define TDLS_IS_ENABLED(flags) \
  231. CHECK_BIT(TDLS_FEATURE_ENABLE, flags)
  232. #define TDLS_IS_IMPLICIT_TRIG_ENABLED(flags) \
  233. CHECK_BIT(TDLS_FEAUTRE_IMPLICIT_TRIGGER, flags)
  234. #define TDLS_IS_EXTERNAL_CONTROL_ENABLED(flags) \
  235. CHECK_BIT(TDLS_FEATURE_EXTERNAL_CONTROL, flags)
  236. /**
  237. * struct tdls_user_config - TDLS user configuration
  238. * @tdls_tx_states_period: tdls tx states period
  239. * @tdls_tx_pkt_threshold: tdls tx packets threshold
  240. * @tdls_rx_pkt_threshold: tdls rx packets threshold
  241. * @tdls_max_discovery_attempt: tdls discovery max times
  242. * @tdls_idle_timeout: tdls idle timeout
  243. * @tdls_idle_pkt_threshold: tdls idle packets threshold
  244. * @tdls_rssi_trigger_threshold: tdls rssi trigger threshold
  245. * @tdls_rssi_teardown_threshold: tdls rssi tear down threshold
  246. * @tdls_rssi_delta: tdls rssi delta
  247. * @tdls_uapsd_mask: tdls uapsd mask
  248. * @tdls_uapsd_inactivity_time: tdls uapsd inactivity time
  249. * @tdls_uapsd_pti_window: tdls peer traffic indication window
  250. * @tdls_uapsd_ptr_timeout: tdls peer response timeout
  251. * @tdls_feature_flags: tdls feature flags
  252. * @tdls_pre_off_chan_num: tdls off channel number
  253. * @tdls_pre_off_chan_bw: tdls off channel bandwidth
  254. * @tdls_peer_kickout_threshold: sta kickout threshold for tdls peer
  255. */
  256. struct tdls_user_config {
  257. uint32_t tdls_tx_states_period;
  258. uint32_t tdls_tx_pkt_threshold;
  259. uint32_t tdls_rx_pkt_threshold;
  260. uint32_t tdls_max_discovery_attempt;
  261. uint32_t tdls_idle_timeoute;
  262. uint32_t tdls_idle_pkt_threshold;
  263. uint32_t tdls_rssi_trigger_threshold;
  264. uint32_t tdls_rssi_teardown_threshold;
  265. uint32_t tdls_rssi_delta;
  266. uint32_t tdls_uapsd_mask;
  267. uint32_t tdls_uapsd_inactivity_time;
  268. uint32_t tdls_uapsd_pti_window;
  269. uint32_t tdls_uapsd_ptr_timeout;
  270. uint32_t tdls_feature_flags;
  271. uint32_t tdls_pre_off_chan_num;
  272. uint32_t tdls_pre_off_chan_bw;
  273. uint32_t tdls_peer_kickout_threshold;
  274. };
  275. /**
  276. * struct tdls_config_params - tdls configure paramets
  277. * @tdls: tdls support mode
  278. * @tx_period_t: tdls tx stats period
  279. * @tx_packet_n: tdls tx packets number threshold
  280. * @discovery_tries_n: tdls max discovery attempt count
  281. * @idle_timeout_t: tdls idle time timeout
  282. * @idle_packet_n: tdls idle pkt threshold
  283. * @rssi_trigger_threshold: tdls rssi trigger threshold, checked before setup
  284. * @rssi_teardown_threshold: tdls rssi teardown threshold
  285. * @rssi_delta: rssi delta
  286. */
  287. struct tdls_config_params {
  288. uint32_t tdls;
  289. uint32_t tx_period_t;
  290. uint32_t tx_packet_n;
  291. uint32_t discovery_tries_n;
  292. uint32_t idle_timeout_t;
  293. uint32_t idle_packet_n;
  294. int32_t rssi_trigger_threshold;
  295. int32_t rssi_teardown_threshold;
  296. int32_t rssi_delta;
  297. };
  298. /**
  299. * struct tdls_tx_cnf: tdls tx ack
  300. * @vdev_id: vdev id
  301. * @action_cookie: frame cookie
  302. * @buf: frame buf
  303. * @buf_len: buffer length
  304. * @status: tx send status
  305. */
  306. struct tdls_tx_cnf {
  307. int vdev_id;
  308. uint64_t action_cookie;
  309. void *buf;
  310. size_t buf_len;
  311. int status;
  312. };
  313. /* This callback is used to report state change of peer to wpa_supplicant */
  314. typedef int (*tdls_state_change_callback)(const uint8_t *mac,
  315. uint32_t opclass,
  316. uint32_t channel,
  317. uint32_t state,
  318. int32_t reason, void *ctx);
  319. /* This callback is used to report events to os_if layer */
  320. typedef QDF_STATUS (*tdls_evt_callback) (void *data,
  321. enum tdls_event_type ev_type,
  322. void *event);
  323. /* prototype of callback registered by hdd to receive the ack cnf */
  324. typedef int (*tdls_tx_ack_cnf_callback)(void *user_data,
  325. struct tdls_tx_cnf *tx_ack_cnf_cb_data);
  326. /**
  327. * struct tdls_start_params - tdls start params
  328. * @tdls_event_cb: tdls event callback
  329. * @tdls_evt_cb_data: tdls event data
  330. * @ack_cnf_cb: tdls tx ack callback to indicate the tx status
  331. * @tx_ack_cnf_cb_data: tdls tx ack user data
  332. */
  333. struct tdls_start_params {
  334. tdls_evt_callback tdls_event_cb;
  335. void *tdls_evt_cb_data;
  336. tdls_tx_ack_cnf_callback ack_cnf_cb;
  337. void *tx_ack_cnf_cb_data;
  338. };
  339. /**
  340. * struct tdls_add_peer_params - add peer request parameter
  341. * @peer_addr: peer mac addr
  342. * @peer_type: peer type
  343. * @vdev_id: vdev id
  344. */
  345. struct tdls_add_peer_params {
  346. const uint8_t *peer_addr;
  347. uint32_t peer_type;
  348. uint32_t vdev_id;
  349. };
  350. /**
  351. * struct tdls_add_peer_request - peer add request
  352. * @vdev: vdev
  353. * @add_peer_req: add peer request parameters
  354. */
  355. struct tdls_add_peer_request {
  356. struct wlan_objmgr_vdev *vdev;
  357. struct tdls_add_peer_params add_peer_req;
  358. };
  359. /**
  360. * struct tdls_del_peer_params - delete peer request parameter
  361. * @peer_addr: peer mac addr
  362. * @peer_type: peer type
  363. * @vdev_id: vdev id
  364. */
  365. struct tdls_del_peer_params {
  366. const uint8_t *peer_addr;
  367. uint32_t peer_type;
  368. uint32_t vdev_id;
  369. };
  370. /**
  371. * struct tdls_del_peer_request - peer delete request
  372. * @vdev: vdev
  373. * @del_peer_req: delete peer request parameters
  374. */
  375. struct tdls_del_peer_request {
  376. struct wlan_objmgr_vdev *vdev;
  377. struct tdls_del_peer_params del_peer_req;
  378. };
  379. /**
  380. * struct vhgmcsinfo - VHT MCS information
  381. * @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams
  382. * @rx_highest: Indicates highest long GI VHT PPDU data rate
  383. * STA can receive. Rate expressed in units of 1 Mbps.
  384. * If this field is 0 this value should not be used to
  385. * consider the highest RX data rate supported.
  386. * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams
  387. * @tx_highest: Indicates highest long GI VHT PPDU data rate
  388. * STA can transmit. Rate expressed in units of 1 Mbps.
  389. * If this field is 0 this value should not be used to
  390. * consider the highest TX data rate supported.
  391. */
  392. struct vhtmcsinfo {
  393. uint16_t rx_mcs_map;
  394. uint16_t rx_highest;
  395. uint16_t tx_mcs_map;
  396. uint16_t tx_highest;
  397. };
  398. /**
  399. * struct vhtcap - VHT capabilities
  400. *
  401. * This structure is the "VHT capabilities element" as
  402. * described in 802.11ac D3.0 8.4.2.160
  403. * @vht_cap_info: VHT capability info
  404. * @supp_mcs: VHT MCS supported rates
  405. */
  406. struct vhtcap {
  407. uint32_t vht_capinfo;
  408. struct vhtmcsinfo supp_mcs;
  409. };
  410. struct tdls_update_peer_params {
  411. const uint8_t *peer_addr;
  412. uint32_t peer_type;
  413. uint32_t vdev_id;
  414. uint16_t capability;
  415. uint8_t extn_capability[WLAN_MAC_MAX_EXTN_CAP];
  416. uint8_t supported_rates_len;
  417. uint8_t supported_rates[WLAN_MAC_MAX_SUPP_RATES];
  418. uint8_t htcap_present;
  419. struct htcap_cmn_ie ht_cap;
  420. uint8_t vhtcap_present;
  421. struct vhtcap vht_cap;
  422. uint8_t uapsd_queues;
  423. uint8_t max_sp;
  424. uint8_t supported_channels_len;
  425. uint8_t supported_channels[WLAN_MAC_MAX_SUPP_CHANNELS];
  426. uint8_t supported_oper_classes_len;
  427. uint8_t supported_oper_classes[WLAN_MAX_SUPP_OPER_CLASSES];
  428. };
  429. struct tdls_update_peer_request {
  430. struct wlan_objmgr_vdev *vdev;
  431. struct tdls_update_peer_params update_peer_req;
  432. };
  433. /**
  434. * struct tdls_info - tdls info
  435. *
  436. * @vdev_id: vdev id
  437. * @tdls_state: tdls state
  438. * @notification_interval_ms: notification interval in ms
  439. * @tx_discovery_threshold: tx discovery threshold
  440. * @tx_teardown_threshold: tx teardown threshold
  441. * @rssi_teardown_threshold: rx teardown threshold
  442. * @rssi_delta: rssi delta
  443. * @tdls_options: tdls options
  444. * @peer_traffic_ind_window: peer traffic indication window
  445. * @peer_traffic_response_timeout: peer traffic response timeout
  446. * @puapsd_mask: puapsd mask
  447. * @puapsd_inactivity_time: puapsd inactivity time
  448. * @puapsd_rx_frame_threshold: puapsd rx frame threshold
  449. * @teardown_notification_ms: tdls teardown notification interval
  450. * @tdls_peer_kickout_threshold: tdls packets threshold
  451. * for peer kickout operation
  452. */
  453. struct tdls_info {
  454. uint32_t vdev_id;
  455. uint32_t tdls_state;
  456. uint32_t notification_interval_ms;
  457. uint32_t tx_discovery_threshold;
  458. uint32_t tx_teardown_threshold;
  459. int32_t rssi_teardown_threshold;
  460. int32_t rssi_delta;
  461. uint32_t tdls_options;
  462. uint32_t peer_traffic_ind_window;
  463. uint32_t peer_traffic_response_timeout;
  464. uint32_t puapsd_mask;
  465. uint32_t puapsd_inactivity_time;
  466. uint32_t puapsd_rx_frame_threshold;
  467. uint32_t teardown_notification_ms;
  468. uint32_t tdls_peer_kickout_threshold;
  469. };
  470. /**
  471. * struct tdls_ch_params - channel parameters
  472. * @chan_id: ID of the channel
  473. * @pwr: power level
  474. * @dfs_set: is dfs supported or not
  475. * @half_rate: is the channel operating at 10MHz
  476. * @quarter_rate: is the channel operating at 5MHz
  477. */
  478. struct tdls_ch_params {
  479. uint8_t chan_id;
  480. uint8_t pwr;
  481. bool dfs_set;
  482. bool half_rate;
  483. bool quarter_rate;
  484. };
  485. /**
  486. * struct tdls_peer_params - TDLS peer capablities parameters
  487. * @is_peer_responder: is peer responder or not
  488. * @peer_uapsd_queue: peer uapsd queue
  489. * @peer_max_sp: peer max SP value
  490. * @peer_buff_sta_support: peer buffer sta supported or not
  491. * @peer_off_chan_support: peer offchannel support
  492. * @peer_curr_operclass: peer current operating class
  493. * @self_curr_operclass: self current operating class
  494. * @peer_chanlen: peer channel length
  495. * @peer_chan: peer channel list
  496. * @peer_oper_classlen: peer operating class length
  497. * @peer_oper_class: peer operating class
  498. * @pref_off_channum: peer offchannel number
  499. * @pref_off_chan_bandwidth: peer offchannel bandwidth
  500. * @opclass_for_prefoffchan: operating class for offchannel
  501. */
  502. struct tdls_peer_params {
  503. uint8_t is_peer_responder;
  504. uint8_t peer_uapsd_queue;
  505. uint8_t peer_max_sp;
  506. uint8_t peer_buff_sta_support;
  507. uint8_t peer_off_chan_support;
  508. uint8_t peer_curr_operclass;
  509. uint8_t self_curr_operclass;
  510. uint8_t peer_chanlen;
  511. struct tdls_ch_params peer_chan[WLAN_MAC_MAX_SUPP_CHANNELS];
  512. uint8_t peer_oper_classlen;
  513. uint8_t peer_oper_class[WLAN_MAX_SUPP_OPER_CLASSES];
  514. uint8_t pref_off_channum;
  515. uint8_t pref_off_chan_bandwidth;
  516. uint8_t opclass_for_prefoffchan;
  517. };
  518. /**
  519. * struct tdls_peer_update_params - TDLS peer state parameters
  520. * @vdev_id: vdev id
  521. * @peer_macaddr: peer mac address
  522. * @peer_cap: peer capabality
  523. */
  524. struct tdls_peer_update_params {
  525. uint32_t vdev_id;
  526. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  527. uint32_t peer_state;
  528. struct tdls_peer_params peer_cap;
  529. };
  530. /**
  531. * struct tdls_chan_switch_params - channel switch parameter structure
  532. * @vdev_id: vdev ID
  533. * @peer_mac_addr: Peer mac address
  534. * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset
  535. * @tdls_off_ch: Target Off Channel
  536. * @oper_class: Operating class for target channel
  537. * @is_responder: Responder or initiator
  538. */
  539. struct tdls_chan_switch_params {
  540. uint32_t vdev_id;
  541. uint8_t peer_mac_addr[QDF_MAC_ADDR_SIZE];
  542. uint16_t tdls_off_ch_bw_offset;
  543. uint8_t tdls_off_ch;
  544. uint8_t tdls_sw_mode;
  545. uint8_t oper_class;
  546. uint8_t is_responder;
  547. };
  548. /**
  549. * struct tdls_event_info - firmware tdls event
  550. * @vdev_id: vdev id
  551. * @peermac: peer mac address
  552. * @message_type: message type
  553. * @peer_reason: reason
  554. */
  555. struct tdls_event_info {
  556. uint8_t vdev_id;
  557. struct qdf_mac_addr peermac;
  558. uint16_t message_type;
  559. uint32_t peer_reason;
  560. };
  561. /**
  562. * struct tdls_event_notify - tdls event notify
  563. * @vdev: vdev object
  564. * @event: tdls event
  565. */
  566. struct tdls_event_notify {
  567. struct wlan_objmgr_vdev *vdev;
  568. struct tdls_event_info event;
  569. };
  570. #endif