qcacmn: Add support to send/receive ani level command

Currently the driver doesnot support the sending and receiving of the
ani level from the firmware.

Add WMI and driver framework support to fetch the ani level.

Change-Id: Ib8271a2b7f62bafb22429113fbfb405cc81379ed
CRs-Fixed: 2554677
This commit is contained in:
Sourav Mohapatra
2019-10-23 10:01:18 +05:30
committed by nshrivas
szülő 337cb1cb88
commit 328db7c79c
5 fájl változott, egészen pontosan 176 új sor hozzáadva és 0 régi sor törölve

Fájl megtekintése

@@ -3649,4 +3649,31 @@ wmi_extract_oem_response_param(wmi_unified_t wmi_hdl, void *resp_buf,
*/
uint32_t wmi_critical_events_in_flight(struct wmi_unified *wmi);
#ifdef FEATURE_ANI_LEVEL_REQUEST
/**
* wmi_unified_ani_level_cmd_send() - WMI function to send get ani level cmd
* @wmi_hdl: WMI handle
* @freqs: pointer to list of freqs for which ANI levels are to be fetched
* @num_freqs: number of freqs in the above parameter
*
* Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
*/
QDF_STATUS wmi_unified_ani_level_cmd_send(wmi_unified_t wmi_handle,
uint32_t *freqs,
uint8_t num_freqs);
/**
* wmi_unified_extract_ani_level() - WMI function to receive ani level cmd
* @wmi_hdl: WMI handle
* @info: pointer to ANI data received from the FW and stored in HOST
* @num_freqs: number of freqs in the above parameter
*
* Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
*/
QDF_STATUS wmi_unified_extract_ani_level(wmi_unified_t wmi_handle,
uint8_t *data,
struct wmi_host_ani_level_event **info,
uint32_t *num_freqs);
#endif /* FEATURE_ANI_LEVEL_REQUEST */
#endif /* _WMI_UNIFIED_API_H_ */

Fájl megtekintése

@@ -4543,6 +4543,7 @@ typedef enum {
wmi_get_elna_bypass_event_id,
wmi_motion_det_host_eventid,
wmi_motion_det_base_line_host_eventid,
wmi_get_ani_level_event_id,
wmi_events_max,
} wmi_conv_event_id;
@@ -7846,4 +7847,17 @@ struct wmi_rx_pkt_protocol_routing_info {
uint32_t meta_data;
};
#endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
#ifdef FEATURE_ANI_LEVEL_REQUEST
/* Maximum number of freqs for which ANI level can be requested */
#define MAX_NUM_FREQS_FOR_ANI_LEVEL 20
/* A valid ANI level lies between 0 to 9 */
#define MAX_ANI_LEVEL 9
struct wmi_host_ani_level_event {
uint32_t chan_freq;
uint32_t ani_level;
};
#endif /* FEATURE_ANI_LEVEL_REQUEST */
#endif /* _WMI_UNIFIED_PARAM_H_ */

Fájl megtekintése

@@ -2046,6 +2046,15 @@ QDF_STATUS (*extract_get_elna_bypass_resp)(wmi_unified_t wmi_handle,
void *resp_buf,
struct get_elna_bypass_response *resp);
#endif /* WLAN_FEATURE_ELNA */
#ifdef FEATURE_ANI_LEVEL_REQUEST
QDF_STATUS (*send_ani_level_cmd)(wmi_unified_t wmi_handle, uint32_t *freqs,
uint8_t num_freqs);
QDF_STATUS (*extract_ani_level)(uint8_t *evt_buf,
struct wmi_host_ani_level_event **info,
uint32_t *num_freqs);
#endif /* FEATURE_ANI_LEVEL_REQUEST */
};
/* Forward declartion for psoc*/