wmi_unified_roam_api.h 13 KB

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