wmi_unified_roam_api.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. /*
  2. * Copyright (c) 2013-2018 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_hdl: 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 wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
  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_hdl: 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 wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
  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_hdl: 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(void *wmi_hdl,
  66. struct roam_offload_scan_rssi_params *roam_req);
  67. /**
  68. * wmi_unified_roam_mawc_params_cmd() - configure roaming MAWC parameters
  69. * @wmi_hdl: wmi handle
  70. * @params: Parameters to be configured
  71. *
  72. * Pass the MAWC(Motion Aided wireless connectivity) related roaming
  73. * parameters from the host to the target
  74. *
  75. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  76. */
  77. QDF_STATUS wmi_unified_roam_mawc_params_cmd(void *wmi_hdl,
  78. struct wmi_mawc_roam_params *params);
  79. /**
  80. * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
  81. * blacklist and preferred list
  82. * @wmi_hdl: wmi handle
  83. * @roam_req: roam scan lists related parameters
  84. *
  85. * This function reads the incoming @roam_req and fill in the destination
  86. * WMI structure and send down the different roam scan lists down to the fw
  87. *
  88. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  89. */
  90. QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
  91. struct roam_scan_filter_params *roam_req);
  92. #ifdef FEATURE_WLAN_ESE
  93. /**
  94. * wmi_unified_plm_stop_cmd() - plm stop request
  95. * @wmi_hdl: wmi handle
  96. * @plm: plm request parameters
  97. *
  98. * This function request FW to stop PLM.
  99. *
  100. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  101. */
  102. QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
  103. const struct plm_req_params *plm);
  104. /**
  105. * wmi_unified_plm_start_cmd() - plm start request
  106. * @wmi_hdl: wmi handle
  107. * @plm: plm request parameters
  108. *
  109. * This function request FW to start PLM.
  110. *
  111. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  112. */
  113. QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
  114. const struct plm_req_params *plm,
  115. uint32_t *gchannel_list);
  116. #endif /* FEATURE_WLAN_ESE */
  117. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  118. /* wmi_unified_set_ric_req_cmd() - set ric request element
  119. * @wmi_hdl: wmi handle
  120. * @msg: message
  121. * @is_add_ts: is addts required
  122. *
  123. * This function sets ric request element for 11r roaming.
  124. *
  125. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  126. */
  127. QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
  128. uint8_t is_add_ts);
  129. /**
  130. * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
  131. * @wmi_hdl: wmi handle
  132. * @vdev_id: vdev id
  133. *
  134. * This function sends roam synch complete event to fw.
  135. *
  136. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  137. */
  138. QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
  139. uint8_t vdev_id);
  140. /**
  141. * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
  142. * @wmi_hdl: wmi handle
  143. * @roaminvoke: roam invoke command
  144. *
  145. * Send roam invoke command to fw for fastreassoc.
  146. *
  147. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  148. */
  149. QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
  150. struct wmi_roam_invoke_cmd *roaminvoke,
  151. uint32_t ch_hz);
  152. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  153. /**
  154. * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
  155. * @wmi_hdl: wmi handle
  156. * @scan_cmd_fp: scan related parameters
  157. * @roam_req: roam related parameters
  158. *
  159. * This function reads the incoming @roam_req and fill in the destination
  160. * WMI structure and send down the roam scan configs down to the firmware
  161. *
  162. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  163. */
  164. QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
  165. wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
  166. struct roam_offload_scan_params *roam_req);
  167. /**
  168. * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
  169. * @wmi_hdl: wmi handle
  170. * @ap_profile: ap profile params
  171. *
  172. * Send WMI_ROAM_AP_PROFILE to firmware
  173. *
  174. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  175. */
  176. QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
  177. struct ap_profile_params *ap_profile);
  178. /**
  179. * wmi_unified_roam_scan_offload_cmd() - set roam offload command
  180. * @wmi_hdl: wmi handle
  181. * @command: command
  182. * @vdev_id: vdev id
  183. *
  184. * This function set roam offload command to fw.
  185. *
  186. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  187. */
  188. QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
  189. uint32_t command,
  190. uint32_t vdev_id);
  191. /**
  192. * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
  193. * @wmi_handle: wmi handle
  194. * @scan_period: scan period
  195. * @scan_age: scan age
  196. * @vdev_id: vdev id
  197. *
  198. * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
  199. *
  200. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  201. */
  202. QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
  203. uint32_t scan_period,
  204. uint32_t scan_age,
  205. uint32_t vdev_id);
  206. /**
  207. * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
  208. * @wmi_handle: wmi handle
  209. * @chan_count: channel count
  210. * @chan_list: channel list
  211. * @list_type: list type
  212. * @vdev_id: vdev id
  213. *
  214. * Set roam offload channel list.
  215. *
  216. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  217. */
  218. QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
  219. uint8_t chan_count,
  220. uint32_t *chan_list,
  221. uint8_t list_type,
  222. uint32_t vdev_id);
  223. /**
  224. * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
  225. * @wmi_hdl: wmi handle
  226. * @rssi_change_thresh: RSSI Change threshold
  227. * @bcn_rssi_weight: beacon RSSI weight
  228. * @vdev_id: vdev id
  229. *
  230. * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
  231. *
  232. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  233. */
  234. QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
  235. uint32_t vdev_id,
  236. int32_t rssi_change_thresh,
  237. uint32_t bcn_rssi_weight,
  238. uint32_t hirssi_delay_btw_scans);
  239. /**
  240. * wmi_unified_set_per_roam_config() - set PER roam config in FW
  241. * @wmi_hdl: wmi handle
  242. * @req_buf: per roam config request buffer
  243. *
  244. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  245. */
  246. QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
  247. struct wmi_per_roam_config_req *req_buf);
  248. /**
  249. * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
  250. * configuration params
  251. * @wmi_hdl: wmi handler
  252. * @limit_off_chan_param: pointer to wmi_limit_off_chan_param
  253. *
  254. * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
  255. */
  256. QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
  257. struct wmi_limit_off_chan_param *wmi_param);
  258. #ifdef WLAN_FEATURE_FILS_SK
  259. /*
  260. * wmi_unified_roam_send_hlp_cmd() -send HLP command info
  261. * @wmi_hdl: wma handle
  262. * @req_buf: Pointer to HLP params
  263. *
  264. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  265. */
  266. QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
  267. struct hlp_params *req_buf);
  268. #endif /* WLAN_FEATURE_FILS_SK */
  269. /**
  270. * wmi_unified_send_btm_config() - Send BTM config to fw
  271. * @wmi_hdl: wmi handle
  272. * @params: pointer to wmi_btm_config
  273. *
  274. * Return: QDF_STATUS
  275. */
  276. QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
  277. struct wmi_btm_config *params);
  278. /**
  279. * wmi_unified_send_bss_load_config() - Send bss load trigger params to fw
  280. * @wmi_hdl: wmi handle
  281. * @params: pointer to wmi_bss_load_config
  282. *
  283. * Return: QDF_STATUS
  284. */
  285. QDF_STATUS wmi_unified_send_bss_load_config(void *wmi_hdl,
  286. struct wmi_bss_load_config *params);
  287. /**
  288. * wmi_unified_offload_11k_cmd() - send 11k offload command
  289. * @wmi_hdl: wmi handle
  290. * @params: 11k offload params
  291. *
  292. * This function passes the 11k offload command params to FW
  293. *
  294. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  295. */
  296. QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
  297. struct wmi_11k_offload_params *params);
  298. /**
  299. * wmi_unified_invoke_neighbor_report_cmd() - send invoke neighbor report cmd
  300. * @wmi_hdl: wmi handle
  301. * @params: invoke neighbor report params
  302. *
  303. * This function passes the invoke neighbor report command to fw
  304. *
  305. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  306. */
  307. QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
  308. struct wmi_invoke_neighbor_report_params *params);
  309. #endif /* _WMI_UNIFIED_ROAM_API_H_ */