qcacmn: Add tlv implementation of common unified API

Add common unified API and tlv/non-tlv callback wrappers.
Add tlv implementation of common MCL/WIN API.

CRs-Fixed: 978603
Change-Id: I7e70b48ef5e1df0c0f81c639579e6eb1a6685dc3
This commit is contained in:
Govind Singh
2016-03-09 11:34:12 +05:30
parent 6ad6adac26
commit 3ddda1ff37
5 changed files with 1025 additions and 6 deletions

View File

@@ -38,6 +38,7 @@
#include "ol_defines.h"
#include "wmi.h"
#include "htc_api.h"
#include "wmi_unified_param.h"
typedef cdf_nbuf_t wmi_buf_t;
#define wmi_buf_data(_buf) cdf_nbuf_data(_buf)
@@ -49,7 +50,7 @@ typedef cdf_nbuf_t wmi_buf_t;
* @ready_cbk: ready calback
* @wma_process_fw_event_handler_cbk: generic event handler callback
*/
struct wmi_ops {
struct wmi_rx_ops {
void (*service_ready_cbk)(void *ctx, void *ev);
void (*service_ready_ext_cbk)(void *ctx, void *ev);
void (*ready_cbk)(void *ctx, void *ev);
@@ -76,7 +77,7 @@ enum wmi_target_type {
*/
void *wmi_unified_attach(void *scn_handle,
osdev_t osdev, enum wmi_target_type target_type,
bool use_cookie, struct wmi_ops *ops);
bool use_cookie, struct wmi_rx_ops *ops);
/**
* detach for unified WMI
@@ -202,4 +203,117 @@ static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)
*/
void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle);
int32_t wmi_unified_vdev_create_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct vdev_create_params *param);
int32_t wmi_unified_vdev_delete_send(void *wmi_hdl,
uint8_t if_id);
int32_t wmi_unified_vdev_start_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct vdev_start_params *param);
int32_t wmi_unified_vdev_restart_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct vdev_start_params *param);
int32_t wmi_unified_vdev_stop_send(void *wmi_hdl,
uint8_t vdev_id);
int32_t wmi_unified_vdev_up_send(void *wmi_hdl,
uint8_t bssid[IEEE80211_ADDR_LEN],
struct vdev_up_params *params);
int32_t wmi_unified_vdev_down_send(void *wmi_hdl,
uint8_t vdev_id);
int32_t wmi_unified_vdev_set_param_send(void *wmi_hdl,
struct vdev_set_params *param);
int32_t wmi_unified_peer_delete_send(void *wmi_hdl,
uint8_t
peer_addr[IEEE80211_ADDR_LEN],
uint8_t vdev_id);
int32_t wmi_unified_peer_flush_tids_send(void *wmi_hdl,
uint8_t peer_addr[IEEE80211_ADDR_LEN],
struct peer_flush_params *param);
int32_t wmi_set_peer_param_send(void *wmi_hdl,
uint8_t peer_addr[IEEE80211_ADDR_LEN],
struct peer_set_params *param);
int32_t wmi_unified_peer_create_send(void *wmi_hdl,
struct peer_create_params *param);
int32_t wmi_unified_stats_request_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct stats_request_params *param);
int32_t wmi_unified_green_ap_ps_send(void *wmi_hdl,
uint32_t value, uint8_t mac_id);
int32_t wmi_unified_wow_enable_send(void *wmi_hdl,
struct wow_cmd_params *param,
uint8_t mac_id);
int32_t wmi_unified_packet_log_enable_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct packet_enable_params *param);
int32_t wmi_unified_suspend_send(void *wmi_hdl,
struct suspend_params *param,
uint8_t mac_id);
int32_t wmi_unified_resume_send(void *wmi_hdl,
uint8_t mac_id);
int32_t
wmi_unified_pdev_param_send(void *wmi_hdl,
struct pdev_params *param,
uint8_t mac_id);
int32_t wmi_unified_beacon_send_cmd(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct beacon_params *param);
int32_t wmi_unified_peer_assoc_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct peer_assoc_params *param);
int32_t wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
struct sta_ps_params *param);
int32_t wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct ap_ps_params *param);
int32_t wmi_unified_scan_start_cmd_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct scan_start_params *param);
int32_t wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct scan_stop_params *param);
int32_t wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
uint8_t macaddr[IEEE80211_ADDR_LEN],
struct scan_chan_list_params *param);
int32_t wmi_crash_inject(void *wmi_hdl,
struct crash_inject *param);
int32_t wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
struct pdev_utf_params *param,
uint8_t mac_id);
int32_t wmi_unified_dbglog_cmd_send(void *wmi_hdl,
struct dbglog_params *param);
#endif /* _WMI_UNIFIED_API_H_ */