From 25c47029980db71a49594e92c8546077d9f5398d Mon Sep 17 00:00:00 2001 From: Kiran Venkatappa Date: Sun, 19 Mar 2017 22:58:09 +0530 Subject: [PATCH] qcacmn: Add WMI APIs to send and extract offchan data tx Add API to send offchan data TX command and extract API to get offchan data tx completion params. Change-Id: I1e04d50810e43cec2c700476581e518b394db582 --- wmi_unified_api.h | 6 ++++++ wmi_unified_param.h | 39 ++++++++++++++++++++++++++++++++++++--- wmi_unified_priv.h | 7 +++++++ 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/wmi_unified_api.h b/wmi_unified_api.h index a57e6e6ed7..7e285e6b5e 100644 --- a/wmi_unified_api.h +++ b/wmi_unified_api.h @@ -479,6 +479,9 @@ QDF_STATUS wmi_unified_dbglog_cmd_send(void *wmi_hdl, QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl, struct wmi_mgmt_params *param); +QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl, + struct wmi_offchan_data_tx_params *param); + QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl, uint32_t param_value); @@ -1255,6 +1258,9 @@ QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl, QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf, wmi_host_mgmt_tx_compl_event *param); +QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf, + struct wmi_host_offchan_data_tx_compl_event *param); + QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl, void *evt_buf, struct pdev_csa_switch_count_status *param); diff --git a/wmi_unified_param.h b/wmi_unified_param.h index 84d83b73cf..9abe79bffa 100644 --- a/wmi_unified_param.h +++ b/wmi_unified_param.h @@ -1291,13 +1291,11 @@ struct seg_hdr_info { * @tx_frame: management tx frame * @frm_len: frame length * @vdev_id: vdev id - * @tx_complete_cb: tx download callback handler - * @tx_ota_post_proc_cb: OTA complition handler * @chanfreq: channel frequency * @pdata: frame data - * @wmi_desc: command descriptor * @desc_id: descriptor id relyaed back by target * @macaddr - macaddr of peer + * @qdf_ctx: qdf context for qdf_nbuf_map */ struct wmi_mgmt_params { void *tx_frame; @@ -1310,6 +1308,28 @@ struct wmi_mgmt_params { void *qdf_ctx; }; +/** + * struct wmi_offchan_data_tx_params - wmi offchan data tx cmd paramters + * @tx_frame: management tx frame + * @frm_len: frame length + * @vdev_id: vdev id + * @chanfreq: channel frequency + * @pdata: frame data + * @desc_id: descriptor id relyaed back by target + * @macaddr: macaddr of peer + * @qdf_ctx: qdf context for qdf_nbuf_map + */ +struct wmi_offchan_data_tx_params { + void *tx_frame; + uint16_t frm_len; + uint8_t vdev_id; + uint16_t chanfreq; + void *pdata; + uint16_t desc_id; + uint8_t *macaddr; + void *qdf_ctx; +}; + /** * struct p2p_ps_params - P2P powersave related params * @opp_ps: opportunistic power save @@ -4981,6 +5001,7 @@ typedef enum { wmi_peer_delete_response_event_id, wmi_pdev_csa_switch_count_status_event_id, wmi_reg_chan_list_cc_event_id, + wmi_offchan_data_tx_completion_event, wmi_events_max, } wmi_conv_event_id; @@ -5833,6 +5854,18 @@ typedef struct { uint32_t pdev_id; } wmi_host_mgmt_tx_compl_event; +/** + * struct wmi_host_offchan_data_tx_compl_event - TX completion event + * @desc_id: from tx_send_cmd + * @status: VWMI_MGMT_TX_COMP_STATUS_TYPE + * @pdev_id: pdev_id + */ +struct wmi_host_offchan_data_tx_compl_event { + uint32_t desc_id; + uint32_t status; + uint32_t pdev_id; +}; + #define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17 /** diff --git a/wmi_unified_priv.h b/wmi_unified_priv.h index c58664d7c4..a38524ae6b 100644 --- a/wmi_unified_priv.h +++ b/wmi_unified_priv.h @@ -293,6 +293,9 @@ QDF_STATUS (*send_scan_chan_list_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle, struct wmi_mgmt_params *param); +QDF_STATUS (*send_offchan_data_tx_cmd)(wmi_unified_t wmi_handle, + struct wmi_offchan_data_tx_params *param); + QDF_STATUS (*send_modem_power_state_cmd)(wmi_unified_t wmi_handle, uint32_t param_value); @@ -1098,6 +1101,10 @@ QDF_STATUS (*extract_pdev_generic_buffer_ev_param)(wmi_unified_t wmi_handle, QDF_STATUS (*extract_mgmt_tx_compl_param)(wmi_unified_t wmi_handle, void *evt_buf, wmi_host_mgmt_tx_compl_event *param); +QDF_STATUS (*extract_offchan_data_tx_compl_param)(wmi_unified_t wmi_handle, + void *evt_buf, + struct wmi_host_offchan_data_tx_compl_event *param); + QDF_STATUS (*extract_pdev_csa_switch_count_status)(wmi_unified_t wmi_handle, void *evt_buf, struct pdev_csa_switch_count_status *param);