wmi_unified_roam_api.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  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_srtuct.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. /**
  56. * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
  57. * parameters
  58. * @wmi_handle: wmi handle
  59. * @roam_req: roam rssi related parameters
  60. *
  61. * This function reads the incoming @roam_req and fill in the destination
  62. * WMI structure and send down the roam scan rssi configs down to the firmware
  63. *
  64. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  65. */
  66. QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
  67. wmi_unified_t wmi_handle,
  68. struct roam_offload_scan_rssi_params *roam_req);
  69. /**
  70. * wmi_unified_roam_mawc_params_cmd() - configure roaming MAWC parameters
  71. * @wmi_handle: wmi handle
  72. * @params: Parameters to be configured
  73. *
  74. * Pass the MAWC(Motion Aided wireless connectivity) related roaming
  75. * parameters from the host to the target
  76. *
  77. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  78. */
  79. QDF_STATUS
  80. wmi_unified_roam_mawc_params_cmd(wmi_unified_t wmi_handle,
  81. struct wmi_mawc_roam_params *params);
  82. /**
  83. * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
  84. * blacklist and preferred list
  85. * @wmi_handle: wmi handle
  86. * @roam_req: roam scan lists related parameters
  87. *
  88. * This function reads the incoming @roam_req and fill in the destination
  89. * WMI structure and send down the different roam scan lists down to the fw
  90. *
  91. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  92. */
  93. QDF_STATUS
  94. wmi_unified_roam_scan_filter_cmd(wmi_unified_t wmi_handle,
  95. struct roam_scan_filter_params *roam_req);
  96. #ifdef FEATURE_WLAN_ESE
  97. /**
  98. * wmi_unified_plm_stop_cmd() - plm stop request
  99. * @wmi_handle: wmi handle
  100. * @plm: plm request parameters
  101. *
  102. * This function request FW to stop PLM.
  103. *
  104. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  105. */
  106. QDF_STATUS wmi_unified_plm_stop_cmd(wmi_unified_t wmi_handle,
  107. const struct plm_req_params *plm);
  108. /**
  109. * wmi_unified_plm_start_cmd() - plm start request
  110. * @wmi_handle: wmi handle
  111. * @plm: plm request parameters
  112. *
  113. * This function request FW to start PLM.
  114. *
  115. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  116. */
  117. QDF_STATUS wmi_unified_plm_start_cmd(wmi_unified_t wmi_handle,
  118. const struct plm_req_params *plm);
  119. #endif /* FEATURE_WLAN_ESE */
  120. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  121. /* wmi_unified_set_ric_req_cmd() - set ric request element
  122. * @wmi_handle: wmi handle
  123. * @msg: message
  124. * @is_add_ts: is addts required
  125. *
  126. * This function sets ric request element for 11r roaming.
  127. *
  128. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  129. */
  130. QDF_STATUS wmi_unified_set_ric_req_cmd(wmi_unified_t wmi_handle, void *msg,
  131. uint8_t is_add_ts);
  132. /**
  133. * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
  134. * @wmi_handle: wmi handle
  135. * @vdev_id: vdev id
  136. *
  137. * This function sends roam synch complete event to fw.
  138. *
  139. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  140. */
  141. QDF_STATUS wmi_unified_roam_synch_complete_cmd(wmi_unified_t wmi_handle,
  142. uint8_t vdev_id);
  143. /**
  144. * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
  145. * @wmi_handle: wmi handle
  146. * @roaminvoke: roam invoke command
  147. * @ch_hz: channel
  148. *
  149. * Send roam invoke command to fw for fastreassoc.
  150. *
  151. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  152. */
  153. QDF_STATUS
  154. wmi_unified_roam_invoke_cmd(wmi_unified_t wmi_handle,
  155. struct wmi_roam_invoke_cmd *roaminvoke,
  156. uint32_t ch_hz);
  157. /**
  158. * wmi_unified_set_roam_triggers() - send roam trigger bitmap
  159. * @wmi_handle: wmi handle
  160. * @triggers: Roam trigger bitmap params as defined @roam_control_trigger_reason
  161. *
  162. * This function passes the roam trigger bitmap to fw
  163. *
  164. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  165. */
  166. QDF_STATUS wmi_unified_set_roam_triggers(wmi_unified_t wmi_handle,
  167. struct wlan_roam_triggers *triggers);
  168. /**
  169. * wmi_unified_send_disconnect_roam_params() - Send disconnect roam trigger
  170. * parameters to firmware
  171. * @wmi_hdl: wmi handle
  172. * @params: pointer to wmi_disconnect_roam_params
  173. *
  174. * Return: QDF_STATUS
  175. */
  176. QDF_STATUS
  177. wmi_unified_send_disconnect_roam_params(wmi_unified_t wmi_handle,
  178. struct wmi_disconnect_roam_params *req);
  179. /**
  180. * wmi_unified_send_idle_roam_params() - Send idle roam trigger params to fw
  181. * @wmi_hdl: wmi handle
  182. * @params: pointer to wmi_idle_roam_params
  183. *
  184. * Return: QDF_STATUS
  185. */
  186. QDF_STATUS
  187. wmi_unified_send_idle_roam_params(wmi_unified_t wmi_handle,
  188. struct wmi_idle_roam_params *req);
  189. /**
  190. * wmi_unified_send_roam_preauth_status() - Send roam preauthentication status
  191. * to target.
  192. * @wmi_handle: wmi handle
  193. * @param: Roam auth status params
  194. *
  195. * This function passes preauth status of WPA3 SAE auth to firmware. It is
  196. * called when external_auth_status event is received from userspace.
  197. *
  198. * Return: QDF_STATUS
  199. */
  200. QDF_STATUS
  201. wmi_unified_send_roam_preauth_status(wmi_unified_t wmi_handle,
  202. struct wmi_roam_auth_status_params *param);
  203. /**
  204. * wmi_unified_vdev_set_pcl_cmd - Send Vdev PCL command to fw
  205. * @wmi_handle: WMI handle
  206. * @params: Set VDEV pcl parameters
  207. *
  208. * Return: QDF_STATUS
  209. */
  210. QDF_STATUS wmi_unified_vdev_set_pcl_cmd(wmi_unified_t wmi_handle,
  211. struct set_pcl_cmd_params *params);
  212. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  213. /**
  214. * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
  215. * @wmi_handle: wmi handle
  216. * @scan_cmd_fp: scan related parameters
  217. * @roam_req: roam related parameters
  218. *
  219. * This function reads the incoming @roam_req and fill in the destination
  220. * WMI structure and send down the roam scan configs down to the firmware
  221. *
  222. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  223. */
  224. QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(
  225. wmi_unified_t wmi_handle,
  226. wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
  227. struct roam_offload_scan_params *roam_req);
  228. /**
  229. * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
  230. * @wmi_handle: wmi handle
  231. * @ap_profile: ap profile params
  232. *
  233. * Send WMI_ROAM_AP_PROFILE to firmware
  234. *
  235. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  236. */
  237. QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(
  238. wmi_unified_t wmi_handle,
  239. struct ap_profile_params *ap_profile);
  240. /**
  241. * wmi_unified_roam_scan_offload_cmd() - set roam offload command
  242. * @wmi_handle: wmi handle
  243. * @command: command
  244. * @vdev_id: vdev id
  245. *
  246. * This function set roam offload command to fw.
  247. *
  248. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  249. */
  250. QDF_STATUS wmi_unified_roam_scan_offload_cmd(wmi_unified_t wmi_handle,
  251. uint32_t command,
  252. uint32_t vdev_id);
  253. /**
  254. * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
  255. * @wmi_handle: wmi handle
  256. * @param: pointer to roam scan period params to be sent to fw
  257. *
  258. * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
  259. *
  260. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  261. */
  262. QDF_STATUS wmi_unified_roam_scan_offload_scan_period(
  263. wmi_unified_t wmi_handle, struct roam_scan_period_params *param);
  264. /**
  265. * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
  266. * @wmi_handle: wmi handle
  267. * @chan_count: channel count
  268. * @chan_list: channel list
  269. * @list_type: list type
  270. * @vdev_id: vdev id
  271. *
  272. * Set roam offload channel list.
  273. *
  274. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  275. */
  276. QDF_STATUS
  277. wmi_unified_roam_scan_offload_chan_list_cmd(wmi_unified_t wmi_handle,
  278. uint8_t chan_count,
  279. uint32_t *chan_list,
  280. uint8_t list_type,
  281. uint32_t vdev_id);
  282. /**
  283. * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
  284. * @wmi_handle: wmi handle
  285. * @rssi_change_thresh: RSSI Change threshold
  286. * @bcn_rssi_weight: beacon RSSI weight
  287. * @vdev_id: vdev id
  288. *
  289. * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
  290. *
  291. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  292. */
  293. QDF_STATUS
  294. wmi_unified_roam_scan_offload_rssi_change_cmd(wmi_unified_t wmi_handle,
  295. uint32_t vdev_id,
  296. int32_t rssi_change_thresh,
  297. uint32_t bcn_rssi_weight,
  298. uint32_t hirssi_delay_btw_scans);
  299. /**
  300. * wmi_unified_set_per_roam_config() - set PER roam config in FW
  301. * @wmi_handle: wmi handle
  302. * @req_buf: per roam config request buffer
  303. *
  304. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  305. */
  306. QDF_STATUS
  307. wmi_unified_set_per_roam_config(wmi_unified_t wmi_handle,
  308. struct wmi_per_roam_config_req *req_buf);
  309. /**
  310. * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
  311. * configuration params
  312. * @wmi_handle: wmi handler
  313. * @wmi_param: pointer to wmi_limit_off_chan_param
  314. *
  315. * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
  316. */
  317. QDF_STATUS wmi_unified_send_limit_off_chan_cmd(
  318. wmi_unified_t wmi_handle,
  319. struct wmi_limit_off_chan_param *wmi_param);
  320. #ifdef WLAN_FEATURE_FILS_SK
  321. /*
  322. * wmi_unified_roam_send_hlp_cmd() -send HLP command info
  323. * @wmi_handle: wma handle
  324. * @req_buf: Pointer to HLP params
  325. *
  326. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  327. */
  328. QDF_STATUS wmi_unified_roam_send_hlp_cmd(wmi_unified_t wmi_handle,
  329. struct hlp_params *req_buf);
  330. #endif /* WLAN_FEATURE_FILS_SK */
  331. /**
  332. * wmi_unified_send_btm_config() - Send BTM config to fw
  333. * @wmi_handle: wmi handle
  334. * @params: pointer to wmi_btm_config
  335. *
  336. * Return: QDF_STATUS
  337. */
  338. QDF_STATUS wmi_unified_send_btm_config(wmi_unified_t wmi_handle,
  339. struct wmi_btm_config *params);
  340. /**
  341. * wmi_unified_send_bss_load_config() - Send bss load trigger params to fw
  342. * @wmi_handle: wmi handle
  343. * @params: pointer to wmi_bss_load_config
  344. *
  345. * Return: QDF_STATUS
  346. */
  347. QDF_STATUS wmi_unified_send_bss_load_config(wmi_unified_t wmi_handle,
  348. struct wmi_bss_load_config *params);
  349. /**
  350. * wmi_unified_offload_11k_cmd() - send 11k offload command
  351. * @wmi_handle: wmi handle
  352. * @params: 11k offload params
  353. *
  354. * This function passes the 11k offload command params to FW
  355. *
  356. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  357. */
  358. QDF_STATUS wmi_unified_offload_11k_cmd(wmi_unified_t wmi_handle,
  359. struct wmi_11k_offload_params *params);
  360. /**
  361. * wmi_unified_invoke_neighbor_report_cmd() - send invoke neighbor report cmd
  362. * @wmi_handle: wmi handle
  363. * @params: invoke neighbor report params
  364. *
  365. * This function passes the invoke neighbor report command to fw
  366. *
  367. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  368. */
  369. QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(
  370. wmi_unified_t wmi_handle,
  371. struct wmi_invoke_neighbor_report_params *params);
  372. /**
  373. * wmi_unified_get_roam_scan_ch_list() - send roam scan channel list get cmd
  374. * @wmi_handle: wmi handle
  375. * @vdev_id: vdev id
  376. *
  377. * This function sends roam scan channel list get command to firmware.
  378. *
  379. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  380. */
  381. QDF_STATUS wmi_unified_get_roam_scan_ch_list(wmi_unified_t wmi_handle,
  382. uint8_t vdev_id);
  383. #endif /* _WMI_UNIFIED_ROAM_API_H_ */