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
  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. /**
  159. * wmi_unified_set_roam_triggers() - send roam trigger bitmap
  160. * @wmi_handle: wmi handle
  161. * @triggers: Roam trigger bitmap params as defined @roam_control_trigger_reason
  162. *
  163. * This function passes the roam trigger bitmap to fw
  164. *
  165. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  166. */
  167. QDF_STATUS wmi_unified_set_roam_triggers(wmi_unified_t wmi_handle,
  168. struct roam_triggers *triggers);
  169. /**
  170. * wmi_unified_send_disconnect_roam_params() - Send disconnect roam trigger
  171. * parameters to firmware
  172. * @wmi_hdl: wmi handle
  173. * @params: pointer to wmi_disconnect_roam_params
  174. *
  175. * Return: QDF_STATUS
  176. */
  177. QDF_STATUS
  178. wmi_unified_send_disconnect_roam_params(wmi_unified_t wmi_handle,
  179. struct wmi_disconnect_roam_params *req);
  180. /**
  181. * wmi_unified_send_idle_roam_params() - Send idle roam trigger params to fw
  182. * @wmi_hdl: wmi handle
  183. * @params: pointer to wmi_idle_roam_params
  184. *
  185. * Return: QDF_STATUS
  186. */
  187. QDF_STATUS
  188. wmi_unified_send_idle_roam_params(wmi_unified_t wmi_handle,
  189. struct wmi_idle_roam_params *req);
  190. /**
  191. * wmi_unified_send_roam_preauth_status() - Send roam preauthentication status
  192. * to target.
  193. * @wmi_handle: wmi handle
  194. * @param: Roam auth status params
  195. *
  196. * This function passes preauth status of WPA3 SAE auth to firmware. It is
  197. * called when external_auth_status event is received from userspace.
  198. *
  199. * Return: QDF_STATUS
  200. */
  201. QDF_STATUS
  202. wmi_unified_send_roam_preauth_status(wmi_unified_t wmi_handle,
  203. struct wmi_roam_auth_status_params *param);
  204. /**
  205. * wmi_unified_vdev_set_pcl_cmd - Send Vdev PCL command to fw
  206. * @wmi_handle: WMI handle
  207. * @params: Set VDEV pcl parameters
  208. *
  209. * Return: QDF_STATUS
  210. */
  211. QDF_STATUS wmi_unified_vdev_set_pcl_cmd(wmi_unified_t wmi_handle,
  212. struct set_pcl_cmd_params *params);
  213. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  214. /**
  215. * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
  216. * @wmi_handle: wmi handle
  217. * @scan_cmd_fp: scan related parameters
  218. * @roam_req: roam related parameters
  219. *
  220. * This function reads the incoming @roam_req and fill in the destination
  221. * WMI structure and send down the roam scan configs down to the firmware
  222. *
  223. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  224. */
  225. QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(
  226. wmi_unified_t wmi_handle,
  227. wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
  228. struct roam_offload_scan_params *roam_req);
  229. /**
  230. * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
  231. * @wmi_handle: wmi handle
  232. * @ap_profile: ap profile params
  233. *
  234. * Send WMI_ROAM_AP_PROFILE to firmware
  235. *
  236. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  237. */
  238. QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(
  239. wmi_unified_t wmi_handle,
  240. struct ap_profile_params *ap_profile);
  241. /**
  242. * wmi_unified_roam_scan_offload_cmd() - set roam offload command
  243. * @wmi_handle: wmi handle
  244. * @command: command
  245. * @vdev_id: vdev id
  246. *
  247. * This function set roam offload command to fw.
  248. *
  249. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  250. */
  251. QDF_STATUS wmi_unified_roam_scan_offload_cmd(wmi_unified_t wmi_handle,
  252. uint32_t command,
  253. uint32_t vdev_id);
  254. /**
  255. * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
  256. * @wmi_handle: wmi handle
  257. * @param: pointer to roam scan period params to be sent to fw
  258. *
  259. * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
  260. *
  261. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  262. */
  263. QDF_STATUS wmi_unified_roam_scan_offload_scan_period(
  264. wmi_unified_t wmi_handle, struct roam_scan_period_params *param);
  265. /**
  266. * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
  267. * @wmi_handle: wmi handle
  268. * @chan_count: channel count
  269. * @chan_list: channel list
  270. * @list_type: list type
  271. * @vdev_id: vdev id
  272. *
  273. * Set roam offload channel list.
  274. *
  275. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  276. */
  277. QDF_STATUS
  278. wmi_unified_roam_scan_offload_chan_list_cmd(wmi_unified_t wmi_handle,
  279. uint8_t chan_count,
  280. uint32_t *chan_list,
  281. uint8_t list_type,
  282. uint32_t vdev_id);
  283. /**
  284. * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
  285. * @wmi_handle: wmi handle
  286. * @rssi_change_thresh: RSSI Change threshold
  287. * @bcn_rssi_weight: beacon RSSI weight
  288. * @vdev_id: vdev id
  289. *
  290. * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
  291. *
  292. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  293. */
  294. QDF_STATUS
  295. wmi_unified_roam_scan_offload_rssi_change_cmd(wmi_unified_t wmi_handle,
  296. uint32_t vdev_id,
  297. int32_t rssi_change_thresh,
  298. uint32_t bcn_rssi_weight,
  299. uint32_t hirssi_delay_btw_scans);
  300. /**
  301. * wmi_unified_set_per_roam_config() - set PER roam config in FW
  302. * @wmi_handle: wmi handle
  303. * @req_buf: per roam config request buffer
  304. *
  305. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  306. */
  307. QDF_STATUS
  308. wmi_unified_set_per_roam_config(wmi_unified_t wmi_handle,
  309. struct wmi_per_roam_config_req *req_buf);
  310. /**
  311. * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
  312. * configuration params
  313. * @wmi_handle: wmi handler
  314. * @wmi_param: pointer to wmi_limit_off_chan_param
  315. *
  316. * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
  317. */
  318. QDF_STATUS wmi_unified_send_limit_off_chan_cmd(
  319. wmi_unified_t wmi_handle,
  320. struct wmi_limit_off_chan_param *wmi_param);
  321. #ifdef WLAN_FEATURE_FILS_SK
  322. /*
  323. * wmi_unified_roam_send_hlp_cmd() -send HLP command info
  324. * @wmi_handle: wma handle
  325. * @req_buf: Pointer to HLP params
  326. *
  327. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  328. */
  329. QDF_STATUS wmi_unified_roam_send_hlp_cmd(wmi_unified_t wmi_handle,
  330. struct hlp_params *req_buf);
  331. #endif /* WLAN_FEATURE_FILS_SK */
  332. /**
  333. * wmi_unified_send_btm_config() - Send BTM config to fw
  334. * @wmi_handle: wmi handle
  335. * @params: pointer to wmi_btm_config
  336. *
  337. * Return: QDF_STATUS
  338. */
  339. QDF_STATUS wmi_unified_send_btm_config(wmi_unified_t wmi_handle,
  340. struct wmi_btm_config *params);
  341. /**
  342. * wmi_unified_send_bss_load_config() - Send bss load trigger params to fw
  343. * @wmi_handle: wmi handle
  344. * @params: pointer to wmi_bss_load_config
  345. *
  346. * Return: QDF_STATUS
  347. */
  348. QDF_STATUS wmi_unified_send_bss_load_config(wmi_unified_t wmi_handle,
  349. struct wmi_bss_load_config *params);
  350. /**
  351. * wmi_unified_offload_11k_cmd() - send 11k offload command
  352. * @wmi_handle: wmi handle
  353. * @params: 11k offload params
  354. *
  355. * This function passes the 11k offload command params to FW
  356. *
  357. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  358. */
  359. QDF_STATUS wmi_unified_offload_11k_cmd(wmi_unified_t wmi_handle,
  360. struct wmi_11k_offload_params *params);
  361. /**
  362. * wmi_unified_invoke_neighbor_report_cmd() - send invoke neighbor report cmd
  363. * @wmi_handle: wmi handle
  364. * @params: invoke neighbor report params
  365. *
  366. * This function passes the invoke neighbor report command to fw
  367. *
  368. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  369. */
  370. QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(
  371. wmi_unified_t wmi_handle,
  372. struct wmi_invoke_neighbor_report_params *params);
  373. /**
  374. * wmi_unified_get_roam_scan_ch_list() - send roam scan channel list get cmd
  375. * @wmi_handle: wmi handle
  376. * @vdev_id: vdev id
  377. *
  378. * This function sends roam scan channel list get command to firmware.
  379. *
  380. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  381. */
  382. QDF_STATUS wmi_unified_get_roam_scan_ch_list(wmi_unified_t wmi_handle,
  383. uint8_t vdev_id);
  384. #endif /* _WMI_UNIFIED_ROAM_API_H_ */