wmi_unified_roam_param.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. * This file contains the API definitions for the ROAMING WMI APIs.
  18. */
  19. #ifndef _WMI_UNIFIED_ROAM_PARAM_H_
  20. #define _WMI_UNIFIED_ROAM_PARAM_H_
  21. #include <wlan_blm_public_struct.h>
  22. #include <wlan_cm_bss_score_param.h>
  23. /**
  24. * struct gateway_update_req_param - gateway parameter update request
  25. * @request_id: request id
  26. * @vdev_id: vdev id
  27. * @max_retries: Max ARP/NS retry attempts
  28. * @timeout: Retry interval
  29. * @ipv4_addr_type: on ipv4 network
  30. * @ipv6_addr_type: on ipv6 network
  31. * @gw_mac_addr: gateway mac addr
  32. * @ipv4_addr: ipv4 addr
  33. * @ipv6_addr: ipv6 addr
  34. */
  35. struct gateway_update_req_param {
  36. uint32_t request_id;
  37. uint32_t vdev_id;
  38. uint32_t max_retries;
  39. uint32_t timeout;
  40. uint32_t ipv4_addr_type;
  41. uint32_t ipv6_addr_type;
  42. struct qdf_mac_addr gw_mac_addr;
  43. uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE];
  44. uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE];
  45. };
  46. /**
  47. * struct rssi_monitor_param - rssi monitoring
  48. * @request_id: request id
  49. * @vdev_id: vdev id
  50. * @min_rssi: minimum rssi
  51. * @max_rssi: maximum rssi
  52. * @control: flag to indicate start or stop
  53. */
  54. struct rssi_monitor_param {
  55. uint32_t request_id;
  56. uint32_t vdev_id;
  57. int8_t min_rssi;
  58. int8_t max_rssi;
  59. bool control;
  60. };
  61. #define WMI_CFG_VALID_CHANNEL_LIST_LEN 100
  62. /* Occupied channel list remains static */
  63. #define WMI_CHANNEL_LIST_STATIC 1
  64. /* Occupied channel list can be learnt after init */
  65. #define WMI_CHANNEL_LIST_DYNAMIC_INIT 2
  66. /* Occupied channel list can be learnt after flush */
  67. #define WMI_CHANNEL_LIST_DYNAMIC_FLUSH 3
  68. /* Occupied channel list can be learnt after update */
  69. #define WMI_CHANNEL_LIST_DYNAMIC_UPDATE 4
  70. /**
  71. * struct plm_req_params - plm req parameter
  72. * @diag_token: Dialog token
  73. * @meas_token: measurement token
  74. * @num_bursts: total number of bursts
  75. * @burst_int: burst interval in seconds
  76. * @meas_duration:in TU's,STA goes off-ch
  77. * @burst_len: no of times the STA should cycle through PLM ch list
  78. * @desired_tx_pwr: desired tx power
  79. * @mac_addr: MC dest addr
  80. * @plm_num_ch: channel numbers
  81. * @plm_ch_freq_list: channel frequency list
  82. * @vdev_id: vdev id
  83. * @enable: enable/disable
  84. */
  85. struct plm_req_params {
  86. uint16_t diag_token;
  87. uint16_t meas_token;
  88. uint16_t num_bursts;
  89. uint16_t burst_int;
  90. uint16_t meas_duration;
  91. /* no of times the STA should cycle through PLM ch list */
  92. uint8_t burst_len;
  93. int8_t desired_tx_pwr;
  94. struct qdf_mac_addr mac_addr;
  95. /* no of channels */
  96. uint8_t plm_num_ch;
  97. /* channel frequency list */
  98. uint32_t plm_ch_freq_list[WMI_CFG_VALID_CHANNEL_LIST_LEN];
  99. uint8_t vdev_id;
  100. bool enable;
  101. };
  102. /**
  103. * struct wmi_roam_invoke_cmd - roam invoke command
  104. * @vdev_id: vdev id
  105. * @bssid: mac address
  106. * @channel: channel
  107. * @frame_len: frame length, includs mac header, fixed params and ies
  108. * @frame_buf: buffer contaning probe response or beacon
  109. * @is_same_bssid: flag to indicate if roaming is requested for same bssid
  110. * @forced_roaming: Roam to any bssid in any ch (here bssid & ch is not given)
  111. */
  112. struct wmi_roam_invoke_cmd {
  113. uint32_t vdev_id;
  114. uint8_t bssid[QDF_MAC_ADDR_SIZE];
  115. uint32_t channel;
  116. uint32_t frame_len;
  117. uint8_t *frame_buf;
  118. uint8_t is_same_bssid;
  119. bool forced_roaming;
  120. };
  121. /**
  122. * struct wmi_limit_off_chan_param - limit off channel parameters
  123. * @vdev_id: vdev id
  124. * @status: status of the command (enable/disable)
  125. * @max_offchan_time: max off channel time
  126. * @rest_time: home channel time
  127. * @skip_dfs_chans: skip dfs channels during scan
  128. */
  129. struct wmi_limit_off_chan_param {
  130. uint32_t vdev_id;
  131. bool status;
  132. uint32_t max_offchan_time;
  133. uint32_t rest_time;
  134. bool skip_dfs_chans;
  135. };
  136. #define WMI_MAX_HLP_IE_LEN 2048
  137. /**
  138. * struct hlp_params - HLP info params
  139. * @vdev_id: vdev id
  140. * @hlp_ie_len: HLP IE length
  141. * @hlp_ie: HLP IE
  142. */
  143. struct hlp_params {
  144. uint8_t vdev_id;
  145. uint32_t hlp_ie_len;
  146. uint8_t hlp_ie[WMI_MAX_HLP_IE_LEN];
  147. };
  148. /**
  149. * struct wmi_roam_auth_status_params - WPA3 roam auth response status
  150. * parameters
  151. * @vdev_id: Vdev on which roam preauth is happening
  152. * @preauth_status: Status of the Auth response.
  153. * IEEE80211_STATUS_SUCCESS(0) for success. Corresponding
  154. * IEEE80211 failure status code for failure.
  155. *
  156. * @bssid: Candidate BSSID
  157. * @pmkid: PMKID derived for the auth
  158. */
  159. struct wmi_roam_auth_status_params {
  160. uint32_t vdev_id;
  161. uint32_t preauth_status;
  162. struct qdf_mac_addr bssid;
  163. uint8_t pmkid[PMKID_LEN];
  164. };
  165. /**
  166. * struct wmi_invoke_neighbor_report_params - Invoke neighbor report request
  167. * from IW to FW
  168. * @vdev_id: vdev id
  169. * @send_resp_to_host: bool to send response to host or not
  170. * @ssid: ssid given from the IW command
  171. */
  172. struct wmi_invoke_neighbor_report_params {
  173. uint32_t vdev_id;
  174. uint32_t send_resp_to_host;
  175. struct wlan_ssid ssid;
  176. };
  177. /**
  178. * set_pcl_cmd_params - Set PCL command params
  179. * @vdev_id: Vdev id
  180. * @weight: PCL weight
  181. */
  182. struct set_pcl_cmd_params {
  183. uint8_t vdev_id;
  184. struct wmi_pcl_chan_weights *weights;
  185. };
  186. #endif /* _WMI_UNIFIED_ROAM_PARAM_H_ */