|
@@ -113,17 +113,137 @@ struct wlan_afc_host_partial_request {
|
|
|
} qdf_packed;
|
|
|
|
|
|
/**
|
|
|
- * struct wlan_afc_host_response - Structure for AFC Host response to FW
|
|
|
+ * The following is the layout of the AFC response.
|
|
|
*
|
|
|
+ * struct wlan_afc_host_resp {
|
|
|
+ * header;
|
|
|
+ * status;
|
|
|
+ * time_to_live;
|
|
|
+ * length;
|
|
|
+ * resp_format;
|
|
|
+ * afc_resp {
|
|
|
+ * struct wlan_afc_bin_resp_data fixed_params;
|
|
|
+ * struct wlan_afc_resp_freq_psd_info obj[0];
|
|
|
+ * ....
|
|
|
+ * struct wlan_afc_resp_freq_psd_info obj[num_frequency_obj - 1];
|
|
|
+ * struct wlan_afc_resp_opclass_info opclass[0];
|
|
|
+ * {
|
|
|
+ * struct wlan_afc_resp_eirp_info eirp[0];
|
|
|
+ * ....
|
|
|
+ * struct wlan_afc_resp_eirp_info eirp[num_channels - 1];
|
|
|
+ * }
|
|
|
+ * .
|
|
|
+ * .
|
|
|
+ * struct wlan_afc_resp_opclass_info opclass[num_channel_obj - 1];
|
|
|
+ * {
|
|
|
+ * struct wlan_afc_resp_eirp_info eirp[0];
|
|
|
+ * ....
|
|
|
+ * struct wlan_afc_resp_eirp_info eirp[num_channels - 1];
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ *
|
|
|
+ * struct wlan_afc_host_resp - Structure for AFC Host response to FW
|
|
|
+ *
|
|
|
+ * @header: Header for compatibility.
|
|
|
+ * Valid value: 0
|
|
|
* @status: Flag to indicate validity of data. To be updated by TZ
|
|
|
+ * 1: Success
|
|
|
+ * -1: Failure
|
|
|
* @time_to_live: Period(in seconds) the data is valid for
|
|
|
* @length: Length of the response message
|
|
|
+ * @resp_format: AFC response format.
|
|
|
+ * 0: JSON format
|
|
|
+ * 1: Binary data format
|
|
|
* @afc_resp: Response message from the AFC server for queried parameters
|
|
|
*/
|
|
|
struct wlan_afc_host_resp {
|
|
|
- int32_t status;
|
|
|
- int32_t time_to_live;
|
|
|
- int32_t length;
|
|
|
- uint8_t afc_resp[0];
|
|
|
+ uint32_t header;
|
|
|
+ int32_t status;
|
|
|
+ uint32_t time_to_live;
|
|
|
+ uint32_t length;
|
|
|
+ uint32_t resp_format;
|
|
|
+ uint8_t afc_resp[0];
|
|
|
+} qdf_packed;
|
|
|
+
|
|
|
+/**
|
|
|
+ * struct wlan_afc_resp_opclass_info - Structure to populate operating class
|
|
|
+ * and channel information from AFC
|
|
|
+ * response.
|
|
|
+ *
|
|
|
+ * @opclass: Operating class
|
|
|
+ * @num_channels: Number of channels received in AFC response
|
|
|
+ */
|
|
|
+struct wlan_afc_resp_opclass_info {
|
|
|
+ uint32_t opclass;
|
|
|
+ uint32_t num_channels;
|
|
|
+} qdf_packed;
|
|
|
+
|
|
|
+/**
|
|
|
+ * struct wlan_afc_eirp_info - Structure to update EIRP values for channels
|
|
|
+ *
|
|
|
+ * @channel_cfi: Channel center frequency index
|
|
|
+ * @max_eirp_pwr: Maximum permissible EIRP(in dBm) for the Channel
|
|
|
+ */
|
|
|
+struct wlan_afc_resp_eirp_info {
|
|
|
+ uint32_t channel_cfi;
|
|
|
+ uint32_t max_eirp_pwr;
|
|
|
+} qdf_packed;
|
|
|
+
|
|
|
+/**
|
|
|
+ * struct wlan_afc_freq_info - Structure to update PSD values for queried
|
|
|
+ * frequency ranges
|
|
|
+ *
|
|
|
+ * @freq_info: Frequency range in MHz:- bits 15:0 = u16 start_freq,
|
|
|
+ * bits 31:16 = u16 end_freq
|
|
|
+ * @max_psd: Maximum PSD in dbm/MHz
|
|
|
+ */
|
|
|
+struct wlan_afc_resp_freq_psd_info {
|
|
|
+ uint32_t freq_info;
|
|
|
+ uint32_t max_psd;
|
|
|
+} qdf_packed;
|
|
|
+
|
|
|
+/**
|
|
|
+ * struct wlan_afc_bin_resp_data - Structure to populate AFC binary response
|
|
|
+ *
|
|
|
+ * @local_err_code: Internal error code between AFC app and FW
|
|
|
+ * 0 - Success
|
|
|
+ * 1 - General failure
|
|
|
+ * @version: Internal version between AFC app and FW
|
|
|
+ * Current version: 1
|
|
|
+ * @afc_wfa_version: AFC spec version info. Bits 15:0 - Minor version
|
|
|
+ * Bits 31:16 - Major version
|
|
|
+ * @request_id: AFC unique request ID
|
|
|
+ * @avail_exp_time_d: Availability expiry date in UTC.
|
|
|
+ * Date format: bits 7:0 - DD (Day 1-31)
|
|
|
+ * bits 15:8 - MM (Month 1-12)
|
|
|
+ * bits 31:16 - YYYY (Year)
|
|
|
+ * @avail_exp_time_t: Availability expiry time in UTC.
|
|
|
+ * Time format: bits 7:0 - SS (Seconds 0-59)
|
|
|
+ * bits 15:8 - MM (Minutes 0-59)
|
|
|
+ * bits 23:16 - HH (Hours 0-23)
|
|
|
+ * bits 31:24 - Reserved
|
|
|
+ * @afc_serv_resp_code: AFC server response code. The AFC server response codes
|
|
|
+ * are defined in the WiFi Spec doc for AFC as follows:
|
|
|
+ * 0: Success.
|
|
|
+ * 100 - 199: General errors related to protocol.
|
|
|
+ * 300 - 399: Error events specific to message exchange
|
|
|
+ * for the available Spectrum Inquiry.
|
|
|
+ * @num_frequency_obj: Number of frequency objects
|
|
|
+ * @num_channel_obj: Number of channel objects
|
|
|
+ * @shortdesc: Short description corresponding to resp_code field
|
|
|
+ */
|
|
|
+struct wlan_afc_bin_resp_data {
|
|
|
+ uint32_t local_err_code;
|
|
|
+ uint32_t version;
|
|
|
+ uint32_t afc_wfa_version;
|
|
|
+ uint32_t request_id;
|
|
|
+ uint32_t avail_exp_time_d;
|
|
|
+ uint32_t avail_exp_time_t;
|
|
|
+ uint32_t afc_serv_resp_code;
|
|
|
+ uint32_t num_frequency_obj;
|
|
|
+ uint32_t num_channel_obj;
|
|
|
+ uint8_t shortdesc[64];
|
|
|
+ uint32_t reserved[2];
|
|
|
} qdf_packed;
|
|
|
#endif
|