wmi_unified_roam_api.h 13 KB

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