wmi_unified_roam_api.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. /*
  2. * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /**
  17. * DOC: Implement API's specific to ROAMING component.
  18. */
  19. #ifndef _WMI_UNIFIED_ROAM_API_H_
  20. #define _WMI_UNIFIED_ROAM_API_H_
  21. #include <wmi_unified_roam_param.h>
  22. #include "wlan_cm_roam_public_struct.h"
  23. #ifdef FEATURE_LFR_SUBNET_DETECTION
  24. /**
  25. * wmi_unified_set_gateway_params_cmd() - set gateway parameters
  26. * @wmi_handle: wmi handle
  27. * @req: gateway parameter update request structure
  28. *
  29. * This function reads the incoming @req and fill in the destination
  30. * WMI structure and sends down the gateway configs down to the firmware
  31. *
  32. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
  33. * error number otherwise
  34. */
  35. QDF_STATUS
  36. wmi_unified_set_gateway_params_cmd(wmi_unified_t wmi_handle,
  37. struct gateway_update_req_param *req);
  38. #endif
  39. #ifdef FEATURE_RSSI_MONITOR
  40. /**
  41. * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring
  42. * @wmi_handle: wmi handle
  43. * @req: rssi monitoring request structure
  44. *
  45. * This function reads the incoming @req and fill in the destination
  46. * WMI structure and send down the rssi monitoring configs down to the firmware
  47. *
  48. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
  49. * error number otherwise
  50. */
  51. QDF_STATUS
  52. wmi_unified_set_rssi_monitoring_cmd(wmi_unified_t wmi_handle,
  53. struct rssi_monitor_param *req);
  54. #endif
  55. #ifdef ROAM_OFFLOAD_V1
  56. /**
  57. * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
  58. * parameters
  59. * @wmi_handle: wmi handle
  60. * @roam_req: roam rssi related parameters
  61. *
  62. * This function reads the incoming @roam_req and fill in the destination
  63. * WMI structure and send down the roam scan rssi configs down to the firmware
  64. *
  65. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  66. */
  67. QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
  68. wmi_unified_t wmi_handle,
  69. struct wlan_roam_offload_scan_rssi_params *roam_req);
  70. /**
  71. * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
  72. * @wmi_handle: wmi handle
  73. * @param: pointer to roam scan period params to be sent to fw
  74. *
  75. * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
  76. *
  77. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  78. */
  79. QDF_STATUS wmi_unified_roam_scan_offload_scan_period(
  80. wmi_unified_t wmi_handle, struct wlan_roam_scan_period_params *param);
  81. #else
  82. /**
  83. * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
  84. * parameters
  85. * @wmi_handle: wmi handle
  86. * @roam_req: roam rssi related parameters
  87. *
  88. * This function reads the incoming @roam_req and fill in the destination
  89. * WMI structure and send down the roam scan rssi configs down to the firmware
  90. *
  91. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  92. */
  93. QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
  94. wmi_unified_t wmi_handle,
  95. struct roam_offload_scan_rssi_params *roam_req);
  96. /**
  97. * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
  98. * @wmi_handle: wmi handle
  99. * @param: pointer to roam scan period params to be sent to fw
  100. *
  101. * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
  102. *
  103. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  104. */
  105. QDF_STATUS wmi_unified_roam_scan_offload_scan_period(
  106. wmi_unified_t wmi_handle, struct roam_scan_period_params *param);
  107. #endif
  108. /**
  109. * wmi_unified_roam_mawc_params_cmd() - configure roaming MAWC parameters
  110. * @wmi_handle: wmi handle
  111. * @params: Parameters to be configured
  112. *
  113. * Pass the MAWC(Motion Aided wireless connectivity) related roaming
  114. * parameters from the host to the target
  115. *
  116. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  117. */
  118. QDF_STATUS
  119. wmi_unified_roam_mawc_params_cmd(wmi_unified_t wmi_handle,
  120. struct wlan_roam_mawc_params *params);
  121. /**
  122. * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
  123. * blacklist and preferred list
  124. * @wmi_handle: wmi handle
  125. * @roam_req: roam scan lists related parameters
  126. *
  127. * This function reads the incoming @roam_req and fill in the destination
  128. * WMI structure and send down the different roam scan lists down to the fw
  129. *
  130. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  131. */
  132. QDF_STATUS
  133. wmi_unified_roam_scan_filter_cmd(wmi_unified_t wmi_handle,
  134. struct roam_scan_filter_params *roam_req);
  135. #ifdef FEATURE_WLAN_ESE
  136. /**
  137. * wmi_unified_plm_stop_cmd() - plm stop request
  138. * @wmi_handle: wmi handle
  139. * @plm: plm request parameters
  140. *
  141. * This function request FW to stop PLM.
  142. *
  143. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  144. */
  145. QDF_STATUS wmi_unified_plm_stop_cmd(wmi_unified_t wmi_handle,
  146. const struct plm_req_params *plm);
  147. /**
  148. * wmi_unified_plm_start_cmd() - plm start request
  149. * @wmi_handle: wmi handle
  150. * @plm: plm request parameters
  151. *
  152. * This function request FW to start PLM.
  153. *
  154. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  155. */
  156. QDF_STATUS wmi_unified_plm_start_cmd(wmi_unified_t wmi_handle,
  157. const struct plm_req_params *plm);
  158. #endif /* FEATURE_WLAN_ESE */
  159. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  160. /* wmi_unified_set_ric_req_cmd() - set ric request element
  161. * @wmi_handle: wmi handle
  162. * @msg: message
  163. * @is_add_ts: is addts required
  164. *
  165. * This function sets ric request element for 11r roaming.
  166. *
  167. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  168. */
  169. QDF_STATUS wmi_unified_set_ric_req_cmd(wmi_unified_t wmi_handle, void *msg,
  170. uint8_t is_add_ts);
  171. /**
  172. * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
  173. * @wmi_handle: wmi handle
  174. * @vdev_id: vdev id
  175. *
  176. * This function sends roam synch complete event to fw.
  177. *
  178. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  179. */
  180. QDF_STATUS wmi_unified_roam_synch_complete_cmd(wmi_unified_t wmi_handle,
  181. uint8_t vdev_id);
  182. /**
  183. * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
  184. * @wmi_handle: wmi handle
  185. * @roaminvoke: roam invoke command
  186. * @ch_hz: channel
  187. *
  188. * Send roam invoke command to fw for fastreassoc.
  189. *
  190. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  191. */
  192. QDF_STATUS
  193. wmi_unified_roam_invoke_cmd(wmi_unified_t wmi_handle,
  194. struct wmi_roam_invoke_cmd *roaminvoke,
  195. uint32_t ch_hz);
  196. /**
  197. * wmi_unified_set_roam_triggers() - send roam trigger bitmap
  198. * @wmi_handle: wmi handle
  199. * @triggers: Roam trigger bitmap params as defined @roam_control_trigger_reason
  200. *
  201. * This function passes the roam trigger bitmap to fw
  202. *
  203. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  204. */
  205. QDF_STATUS wmi_unified_set_roam_triggers(wmi_unified_t wmi_handle,
  206. struct wlan_roam_triggers *triggers);
  207. /**
  208. * wmi_unified_send_disconnect_roam_params() - Send disconnect roam trigger
  209. * parameters to firmware
  210. * @wmi_hdl: wmi handle
  211. * @params: pointer to wlan_roam_disconnect_params
  212. *
  213. * Return: QDF_STATUS
  214. */
  215. QDF_STATUS
  216. wmi_unified_send_disconnect_roam_params(wmi_unified_t wmi_handle,
  217. struct wlan_roam_disconnect_params *req);
  218. /**
  219. * wmi_unified_send_idle_roam_params() - Send idle roam trigger params to fw
  220. * @wmi_hdl: wmi handle
  221. * @params: pointer to wlan_roam_idle_params
  222. *
  223. * Return: QDF_STATUS
  224. */
  225. QDF_STATUS
  226. wmi_unified_send_idle_roam_params(wmi_unified_t wmi_handle,
  227. struct wlan_roam_idle_params *req);
  228. /**
  229. * wmi_unified_send_roam_preauth_status() - Send roam preauthentication status
  230. * to target.
  231. * @wmi_handle: wmi handle
  232. * @param: Roam auth status params
  233. *
  234. * This function passes preauth status of WPA3 SAE auth to firmware. It is
  235. * called when external_auth_status event is received from userspace.
  236. *
  237. * Return: QDF_STATUS
  238. */
  239. QDF_STATUS
  240. wmi_unified_send_roam_preauth_status(wmi_unified_t wmi_handle,
  241. struct wmi_roam_auth_status_params *param);
  242. /**
  243. * wmi_unified_vdev_set_pcl_cmd - Send Vdev PCL command to fw
  244. * @wmi_handle: WMI handle
  245. * @params: Set VDEV pcl parameters
  246. *
  247. * Return: QDF_STATUS
  248. */
  249. QDF_STATUS wmi_unified_vdev_set_pcl_cmd(wmi_unified_t wmi_handle,
  250. struct set_pcl_cmd_params *params);
  251. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  252. #ifndef ROAM_OFFLOAD_V1
  253. /**
  254. * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
  255. * @wmi_handle: wmi handle
  256. * @scan_cmd_fp: scan related parameters
  257. * @roam_req: roam related parameters
  258. *
  259. * This function reads the incoming @roam_req and fill in the destination
  260. * WMI structure and send down the roam scan configs down to the firmware
  261. *
  262. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  263. */
  264. QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(
  265. wmi_unified_t wmi_handle,
  266. wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
  267. struct roam_offload_scan_params *roam_req);
  268. #endif
  269. /**
  270. * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
  271. * @wmi_handle: wmi handle
  272. * @ap_profile: ap profile params
  273. *
  274. * Send WMI_ROAM_AP_PROFILE to firmware
  275. *
  276. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  277. */
  278. QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(
  279. wmi_unified_t wmi_handle,
  280. struct ap_profile_params *ap_profile);
  281. /**
  282. * wmi_unified_roam_scan_offload_cmd() - set roam offload command
  283. * @wmi_handle: wmi handle
  284. * @command: command
  285. * @vdev_id: vdev id
  286. *
  287. * This function set roam offload command to fw.
  288. *
  289. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  290. */
  291. QDF_STATUS wmi_unified_roam_scan_offload_cmd(wmi_unified_t wmi_handle,
  292. uint32_t command,
  293. uint32_t vdev_id);
  294. /**
  295. * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
  296. * @wmi_handle: wmi handle
  297. * @chan_count: channel count
  298. * @chan_list: channel list
  299. * @list_type: list type
  300. * @vdev_id: vdev id
  301. *
  302. * Set roam offload channel list.
  303. *
  304. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  305. */
  306. QDF_STATUS
  307. wmi_unified_roam_scan_offload_chan_list_cmd(wmi_unified_t wmi_handle,
  308. uint8_t chan_count,
  309. uint32_t *chan_list,
  310. uint8_t list_type,
  311. uint32_t vdev_id);
  312. #ifdef ROAM_OFFLOAD_V1
  313. /**
  314. * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI
  315. * threshold
  316. * @wmi_handle: wmi handle
  317. * @params: RSSI change params
  318. *
  319. * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
  320. *
  321. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  322. */
  323. QDF_STATUS
  324. wmi_unified_roam_scan_offload_rssi_change_cmd(
  325. wmi_unified_t wmi_handle,
  326. struct wlan_roam_rssi_change_params *params);
  327. #else
  328. /**
  329. * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
  330. * @wmi_handle: wmi handle
  331. * @rssi_change_thresh: RSSI Change threshold
  332. * @bcn_rssi_weight: beacon RSSI weight
  333. * @vdev_id: vdev id
  334. *
  335. * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
  336. *
  337. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  338. */
  339. QDF_STATUS
  340. wmi_unified_roam_scan_offload_rssi_change_cmd(wmi_unified_t wmi_handle,
  341. uint32_t vdev_id,
  342. int32_t rssi_change_thresh,
  343. uint32_t bcn_rssi_weight,
  344. uint32_t hirssi_delay_btw_scans);
  345. #endif
  346. /**
  347. * wmi_unified_set_per_roam_config() - set PER roam config in FW
  348. * @wmi_handle: wmi handle
  349. * @req_buf: per roam config request buffer
  350. *
  351. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  352. */
  353. QDF_STATUS
  354. wmi_unified_set_per_roam_config(wmi_unified_t wmi_handle,
  355. struct wlan_per_roam_config_req *req_buf);
  356. /**
  357. * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
  358. * configuration params
  359. * @wmi_handle: wmi handler
  360. * @wmi_param: pointer to wmi_limit_off_chan_param
  361. *
  362. * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
  363. */
  364. QDF_STATUS wmi_unified_send_limit_off_chan_cmd(
  365. wmi_unified_t wmi_handle,
  366. struct wmi_limit_off_chan_param *wmi_param);
  367. #ifdef WLAN_FEATURE_FILS_SK
  368. /*
  369. * wmi_unified_roam_send_hlp_cmd() -send HLP command info
  370. * @wmi_handle: wma handle
  371. * @req_buf: Pointer to HLP params
  372. *
  373. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  374. */
  375. QDF_STATUS wmi_unified_roam_send_hlp_cmd(wmi_unified_t wmi_handle,
  376. struct hlp_params *req_buf);
  377. #endif /* WLAN_FEATURE_FILS_SK */
  378. /**
  379. * wmi_unified_send_btm_config() - Send BTM config to fw
  380. * @wmi_handle: wmi handle
  381. * @params: pointer to wlan_roam_btm_config
  382. *
  383. * Return: QDF_STATUS
  384. */
  385. QDF_STATUS wmi_unified_send_btm_config(wmi_unified_t wmi_handle,
  386. struct wlan_roam_btm_config *params);
  387. /**
  388. * wmi_unified_send_bss_load_config() - Send bss load trigger params to fw
  389. * @wmi_handle: wmi handle
  390. * @params: pointer to wlan_roam_bss_load_config
  391. *
  392. * Return: QDF_STATUS
  393. */
  394. QDF_STATUS wmi_unified_send_bss_load_config(
  395. wmi_unified_t wmi_handle,
  396. struct wlan_roam_bss_load_config *params);
  397. /**
  398. * wmi_unified_offload_11k_cmd() - send 11k offload command
  399. * @wmi_handle: wmi handle
  400. * @params: 11k offload params
  401. *
  402. * This function passes the 11k offload command params to FW
  403. *
  404. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  405. */
  406. QDF_STATUS
  407. wmi_unified_offload_11k_cmd(wmi_unified_t wmi_handle,
  408. struct wlan_roam_11k_offload_params *params);
  409. /**
  410. * wmi_unified_invoke_neighbor_report_cmd() - send invoke neighbor report cmd
  411. * @wmi_handle: wmi handle
  412. * @params: invoke neighbor report params
  413. *
  414. * This function passes the invoke neighbor report command to fw
  415. *
  416. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  417. */
  418. QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(
  419. wmi_unified_t wmi_handle,
  420. struct wmi_invoke_neighbor_report_params *params);
  421. /**
  422. * wmi_unified_get_roam_scan_ch_list() - send roam scan channel list get cmd
  423. * @wmi_handle: wmi handle
  424. * @vdev_id: vdev id
  425. *
  426. * This function sends roam scan channel list get command to firmware.
  427. *
  428. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  429. */
  430. QDF_STATUS wmi_unified_get_roam_scan_ch_list(wmi_unified_t wmi_handle,
  431. uint8_t vdev_id);
  432. #endif /* _WMI_UNIFIED_ROAM_API_H_ */