From 941bd5e5be328689a519320d7e7ae15fdb63c66c Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Thu, 4 Feb 2016 17:15:25 +0530 Subject: [PATCH] qcacld-3.0: CL 1453185 update fw common interface files NAN data WMI changes. Change-Id: I9292af24d92c9e522b7889a02194e54b2f113917 CRs-Fixed: 865207 --- core/wmi/wmi_unified.c | 4 + target/inc/wmi_services.h | 2 + target/inc/wmi_tlv_defs.h | 167 +++++++++++- target/inc/wmi_unified.h | 549 +++++++++++++++++++++++++++++++++++++- target/inc/wmi_version.h | 2 +- 5 files changed, 715 insertions(+), 9 deletions(-) diff --git a/core/wmi/wmi_unified.c b/core/wmi/wmi_unified.c index 4f102c4de48b..da4b6d1d1e3c 100644 --- a/core/wmi/wmi_unified.c +++ b/core/wmi/wmi_unified.c @@ -747,6 +747,10 @@ static uint8_t *get_wmi_cmd_string(WMI_CMD_ID wmi_command) CASE_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID); CASE_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID); CASE_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID); + CASE_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID); + CASE_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID); + CASE_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID); + CASE_RETURN_STRING(WMI_NDP_END_REQ_CMDID); CASE_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID); CASE_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID); CASE_RETURN_STRING(WMI_PDEV_FIPS_CMDID); diff --git a/target/inc/wmi_services.h b/target/inc/wmi_services.h index 6874f8945019..9e76ddb2099c 100644 --- a/target/inc/wmi_services.h +++ b/target/inc/wmi_services.h @@ -145,6 +145,8 @@ typedef enum { WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, /* allow per-peer tx MCS min/max limits by host */ WMI_SERVICE_RATECTRL_LIMIT_MAX_MIN_RATES, + WMI_SERVICE_NAN_DATA, /* FW supports NAN data */ + WMI_SERVICE_NAN_RTT, /* FW supports NAN RTT */ WMI_MAX_SERVICE = 128 /* max service */ } WMI_SERVICE; diff --git a/target/inc/wmi_tlv_defs.h b/target/inc/wmi_tlv_defs.h index c4ecf9213d47..b8a3f3d67d60 100644 --- a/target/inc/wmi_tlv_defs.h +++ b/target/inc/wmi_tlv_defs.h @@ -659,7 +659,21 @@ typedef enum { WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param, WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param, - + WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param, + WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param, + WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param, + WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param, + WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param, + WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param, + WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param, + WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param, + WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param, + WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param, + WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param, + WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param, + WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param, + WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param, + WMITLV_TAG_STRUC_wmi_ndp_end_indication_event_fixed_param, } WMITLV_TAG_ID; /* @@ -926,7 +940,12 @@ typedef enum { OP(WMI_FWTEST_CMDID) \ OP(WMI_QBOOST_CFG_CMDID) \ OP(WMI_ROAM_SET_MBO_PARAM_CMDID) \ - OP(WMI_MIB_STATS_ENABLE_CMDID) + OP(WMI_MIB_STATS_ENABLE_CMDID) \ + OP(WMI_NDI_GET_CAP_REQ_CMDID) \ + OP(WMI_NDP_INITIATOR_REQ_CMDID) \ + OP(WMI_NDP_RESPONDER_REQ_CMDID) \ + OP(WMI_NDP_END_REQ_CMDID) + /* * IMPORTANT: Please add _ALL_ WMI Events Here. * Otherwise, these WMI TLV Functions will be process them. @@ -1059,8 +1078,18 @@ typedef enum { OP(WMI_PEER_RATECODE_LIST_EVENTID) \ OP(WMI_WDS_PEER_EVENTID) \ OP(WMI_PEER_STA_PS_STATECHG_EVENTID) \ - OP(WMI_INST_RSSI_STATS_EVENTID) - + OP(WMI_INST_RSSI_STATS_EVENTID) \ + OP(WMI_NAN_DISC_IFACE_CREATED_EVENTID) \ + OP(WMI_NAN_DISC_IFACE_DELETED_EVENTID) \ + OP(WMI_NAN_STARTED_CLUSTER_EVENTID) \ + OP(WMI_NAN_JOINED_CLUSTER_EVENTID) \ + OP(WMI_NDI_CAP_RSP_EVENTID) \ + OP(WMI_NDP_INITIATOR_RSP_EVENTID) \ + OP(WMI_NDP_RESPONDER_RSP_EVENTID) \ + OP(WMI_NDP_END_RSP_EVENTID) \ + OP(WMI_NDP_INDICATION_EVENTID) \ + OP(WMI_NDP_CONFIRM_EVENTID) \ + OP(WMI_NDP_END_INDICATION_EVENTID) /* TLV definitions of WMI commands */ @@ -2250,6 +2279,50 @@ WMITLV_CREATE_PARAM_STRUC(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_NAN_CMDID); +/* NAN Data Get Capabilities Cmd */ +#define WMITLV_TABLE_WMI_NDI_GET_CAP_REQ_CMDID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param, wmi_ndi_get_cap_req_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_NDI_GET_CAP_REQ_CMDID); + +/* + * NAN Data Initiator Request Cmd + * + * TLV (tag length value ) parameters follow the ndp_initiator_req + * structure. The TLV's are: + * wmi_ndp_cfg ndp_cfg[]; + * wmi_ndp_app_info ndp_app_info[]; + */ +#define WMITLV_TABLE_WMI_NDP_INITIATOR_REQ_CMDID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param, wmi_ndp_initiator_req_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ndp_cfg, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ndp_app_info, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_NDP_INITIATOR_REQ_CMDID); + +/* + * NAN Data Responder Request Cmd + * TLV (tag length value ) parameters follow the ndp_responder_req + * structure. The TLV's are: + * wmi_ndp_cfg ndp_cfg[]; + * wmi_ndp_app_info ndp_app_info[]; + */ +#define WMITLV_TABLE_WMI_NDP_RESPONDER_REQ_CMDID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param, wmi_ndp_responder_req_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ndp_cfg, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ndp_app_info, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_NDP_RESPONDER_REQ_CMDID); + +/* + * NAN Data End Request Cmd + * + * TLV (tag length value ) parameters follow the ndp_end_req + * structure. The TLV's are: + * wmi_ndp_end_req wmi_ndp_end_req_list[]; + */ +#define WMITLV_TABLE_WMI_NDP_END_REQ_CMDID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param, wmi_ndp_end_req_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_ndp_end_req, ndp_end_req_list, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_NDP_END_REQ_CMDID); + /* Modem power state cmd */ #define WMITLV_TABLE_WMI_MODEM_POWER_STATE_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param, wmi_modem_power_state_cmd_param, fixed_param, WMITLV_SIZE_FIX) @@ -3136,6 +3209,92 @@ WMITLV_CREATE_PARAM_STRUC(WMI_THERMAL_MGMT_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_NAN_EVENTID); +/* NAN discovery interface created event */ +#define WMITLV_TABLE_WMI_NAN_DISC_IFACE_CREATED_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param, wmi_nan_disc_iface_created_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_NAN_DISC_IFACE_CREATED_EVENTID); + +/* NAN discovery interface deleted event */ +#define WMITLV_TABLE_WMI_NAN_DISC_IFACE_DELETED_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param, wmi_nan_disc_iface_deleted_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_NAN_DISC_IFACE_DELETED_EVENTID); + +/* NAN device started new cluster event */ +#define WMITLV_TABLE_WMI_NAN_STARTED_CLUSTER_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param, wmi_nan_started_cluster_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_NAN_STARTED_CLUSTER_EVENTID); + +/* NAN device joined to cluster event */ +#define WMITLV_TABLE_WMI_NAN_JOINED_CLUSTER_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param, wmi_nan_joined_cluster_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_NAN_JOINED_CLUSTER_EVENTID); + +/* NDP capabilities response event */ +#define WMITLV_TABLE_WMI_NDI_CAP_RSP_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param, wmi_ndi_cap_rsp_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_NDI_CAP_RSP_EVENTID); + +/* NDP initiator response event */ +#define WMITLV_TABLE_WMI_NDP_INITIATOR_RSP_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param, wmi_ndp_initiator_rsp_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_NDP_INITIATOR_RSP_EVENTID); + +/* NDP responder response event */ +#define WMITLV_TABLE_WMI_NDP_RESPONDER_RSP_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param, wmi_ndp_responder_rsp_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_NDP_RESPONDER_RSP_EVENTID); + +/** + * NDP end response event + * + * TLV (tag length value ) parameters follow the ndp_end_rsp + * structure. The TLV's are: + * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndi_list[]; + */ +#define WMITLV_TABLE_WMI_NDP_END_RSP_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param, wmi_ndp_end_rsp_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_ndp_end_rsp_per_ndi, ndp_end_rsp_per_ndi_list, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_NDP_END_RSP_EVENTID); + +/** + * NDP indication event + * + * TLV (tag length value ) parameters follow the ndp_indication + * structure. The TLV's are: + * wmi_ndp_cfg ndp_cfg[]; + * wmi_ndp_app_info ndp_app_info[]; + */ +#define WMITLV_TABLE_WMI_NDP_INDICATION_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param, wmi_ndp_indication_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ndp_cfg, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ndp_app_info, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_NDP_INDICATION_EVENTID); + +/** + * NDP confirm event + * TLV (tag length value ) parameters follow the ndp_confirm + * structure. The TLV's are: + * wmi_ndp_cfg ndp_cfg[]; + * wmi_ndp_app_info ndp_app_info[]; + */ +#define WMITLV_TABLE_WMI_NDP_CONFIRM_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param, wmi_ndp_confirm_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ndp_cfg, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ndp_app_info, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_NDP_CONFIRM_EVENTID); + +/** + * NDP end indication event + * + * TLV (tag length value ) parameters follow the ndp_end_indication + * structure. The TLV's are: + * wmi_ndp_end_indication ndp_end_indication_list[]; + */ +#define WMITLV_TABLE_WMI_NDP_END_INDICATION_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_ndp_end_indication_event_fixed_param, wmi_ndp_end_indication_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_ndp_end_indication, ndp_end_indication_list, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_NDP_END_INDICATION_EVENTID); + /* L1SS track Event */ #define WMITLV_TABLE_WMI_PDEV_L1SS_TRACK_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param, wmi_pdev_l1ss_track_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) diff --git a/target/inc/wmi_unified.h b/target/inc/wmi_unified.h index 23166041056e..d72831c89862 100644 --- a/target/inc/wmi_unified.h +++ b/target/inc/wmi_unified.h @@ -232,6 +232,7 @@ typedef enum { WMI_GRP_MAWC, WMI_GRP_PMF_OFFLOAD, WMI_GRP_BPF_OFFLOAD, /* Berkeley Packet Filter */ + WMI_GRP_NAN_DATA, } WMI_GRP_ID; #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) @@ -926,6 +927,15 @@ typedef enum { WMI_BPF_GET_VDEV_STATS_CMDID, WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID, WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID, + /** + * Nan Data commands + * NDI - NAN Data Interface + * NDP - NAN Data Path + */ + WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN_DATA), + WMI_NDP_INITIATOR_REQ_CMDID, + WMI_NDP_RESPONDER_REQ_CMDID, + WMI_NDP_END_REQ_CMDID, } WMI_CMD_ID; typedef enum { @@ -1253,6 +1263,10 @@ typedef enum { /* NAN Event */ WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN), + WMI_NAN_DISC_IFACE_CREATED_EVENTID, + WMI_NAN_DISC_IFACE_DELETED_EVENTID, + WMI_NAN_STARTED_CLUSTER_EVENTID, + WMI_NAN_JOINED_CLUSTER_EVENTID, /* LPI Event */ WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI), @@ -1294,6 +1308,15 @@ typedef enum { WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD), WMI_BPF_VDEV_STATS_INFO_EVENTID, + + /** NAN Data Events */ + WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN_DATA), + WMI_NDP_INITIATOR_RSP_EVENTID, + WMI_NDP_RESPONDER_RSP_EVENTID, + WMI_NDP_END_RSP_EVENTID, + WMI_NDP_INDICATION_EVENTID, + WMI_NDP_CONFIRM_EVENTID, + WMI_NDP_END_INDICATION_EVENTID, } WMI_EVT_ID; /* defines for OEM message sub-types */ @@ -1313,10 +1336,16 @@ typedef enum { */ #define WMI_OEM_INTERNAL_RSP 0xdeadbeef -#define WMI_CHAN_LIST_TAG 0x1 -#define WMI_SSID_LIST_TAG 0x2 -#define WMI_BSSID_LIST_TAG 0x3 -#define WMI_IE_TAG 0x4 +#define WMI_CHAN_LIST_TAG 0x1 +#define WMI_SSID_LIST_TAG 0x2 +#define WMI_BSSID_LIST_TAG 0x3 +#define WMI_IE_TAG 0x4 +#define WMI_NDP_CFG_TAG 0x5 +#define WMI_NDP_QOS_CFG_TAG 0x6 +#define WMI_NDP_APP_INFO_TAG 0x7 +#define WMI_NDP_END_REQ_LIST_TAG 0x8 +#define WMI_NDP_END_RSP_PER_NDI_LIST_TAG 0x9 +#define WMI_NDP_END_INDICATION_LIST_TAG 0xA typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */ @@ -3636,8 +3665,12 @@ enum { VDEV_TYPE_AP = 2, /** Monitor */ VDEV_TYPE_MONITOR = 3, + /** Reserved for NAN - See WMI_VDEV_TYPE_NAN */ + VDEV_TYPE_RSVD_1 = 5, /** OCB */ VDEV_TYPE_OCB = 6, + /** Reserved for NAN Data Interface - See WMI_VDEV_TYPE_NDI */ + VDEV_TYPE_RSVD_2 = 7, }; enum { @@ -4576,6 +4609,9 @@ typedef struct { #define WMI_VDEV_TYPE_OCB 0x6 +/* NAN Data Interface */ +#define WMI_VDEV_TYPE_NDI 0x7 + /** values for vdev_subtype */ #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1 #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2 @@ -5854,6 +5890,7 @@ enum wmi_peer_type { WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */ WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */ WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */ + WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */ WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type * is assigned up to 127 */ /* Reserved from 128 - 255 for @@ -7551,6 +7588,8 @@ typedef enum event_type_e { WOW_IOAC_REV_KA_FAIL_EVENT, WOW_IOAC_SOCK_EVENT, WOW_NLO_SCAN_COMPLETE_EVENT, + WOW_NAN_DATA_EVENT, + WOW_NAN_RTT_EVENT, } WOW_WAKE_EVENT_TYPE; typedef enum wake_reason_e { @@ -7595,6 +7634,8 @@ typedef enum wake_reason_e { WOW_REASON_REASSOC_RES_RECV, WOW_REASON_ACTION_FRAME_RECV, WOW_REASON_BPF_ALLOW, + WOW_REASON_NAN_DATA, + WOW_REASON_NAN_RTT, WOW_REASON_DEBUG_TEST = 0xFF, } WOW_WAKE_REASON_TYPE; @@ -10400,6 +10441,506 @@ typedef struct { */ } wmi_nan_event_hdr; +/** + * Event to indicate NAN discovery interface created + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** NAN interface MAC address */ + wmi_mac_addr nan_interface_macaddr; +} wmi_nan_disc_iface_created_event_fixed_param; + +/** + * Event to indicate NAN discovery interface deleted + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; +} wmi_nan_disc_iface_deleted_event_fixed_param; + +/** + * Event to indicate NAN device started new cluster + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** NAN Cluster ID */ + A_UINT32 nan_cluster_id; +} wmi_nan_started_cluster_event_fixed_param; + +/** + * Event to indicate NAN device joined to cluster + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** NAN Cluster ID */ + A_UINT32 nan_cluster_id; +} wmi_nan_joined_cluster_event_fixed_param; + +/** NAN DATA CMD's */ + +/** + * NAN Data get capabilities req + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param + */ + A_UINT32 tlv_header; + /** unique id generated in upper layer for the transaction */ + A_UINT32 transaction_id; +} wmi_ndi_get_cap_req_fixed_param; + +/** + * NDP configuration (Security and/or QOS) + */ +typedef struct { + A_UINT32 tag; /** WMI_NDP_CFG_TAG */ + A_UINT32 ndp_cfg_len; /** ndp_cfg length in byte */ + A_UINT32 ndp_cfg[1]; /** Security/QoS configuration */ +} wmi_ndp_cfg; + +/** + * NDP QOS configuration + */ +typedef struct { + A_UINT32 tag; /** WMI_NDP_QOS_CFG_TAG */ + A_UINT32 ndp_qos_cfg_len; /** ndp_qos_cfg length in byte */ + A_UINT32 ndp_qos_cfg[1]; /** QoS configuration */ +} wmi_ndp_qos_cfg; + +/** + * NDP application information + */ +typedef struct { + A_UINT32 tag; /** WMI_NDP_APP_INFO_TAG */ + A_UINT32 ndp_app_info_len; /** ndp_app_info length in byte */ + A_UINT32 ndp_app_info[1]; /** App/Service information */ +} wmi_ndp_app_info; + +/** + * NDP Response code + */ +typedef enum { + NDP_RSP_CODE_REQUEST_ACCEPT = 0x00, + NDP_RSP_CODE_REQUEST_REJECT = 0x01, + NDP_RSP_CODE_REQUEST_DEFER = 0x02, +} wmi_ndp_rsp_code; + +/** + * NDP Initiator requesting a data session + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** unique id generated in upper layer for the transaction */ + A_UINT32 transaction_id; + /** Unique Instance Id identifying the Responder's service */ + A_UINT32 service_instance_id; + /** Discovery MAC addr of the publisher/peer */ + wmi_mac_addr peer_discovery_mac_addr; + /** Number of bytes in TLV wmi_ndp_cfg */ + A_UINT32 ndp_cfg_len; + /** Number of bytes in TLV wmi_ndp_app_info */ + A_UINT32 ndp_app_info_len; + /** + * TLV (tag length value ) parameters follow the ndp_initiator_req + * structure. The TLV's are: + * wmi_ndp_cfg ndp_cfg[]; + * wmi_ndp_app_info ndp_app_info[]; + */ +} wmi_ndp_initiator_req_fixed_param; + +/** + * Initiate a data response on the responder side + * for data request indication from the peer + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** unique id generated in upper layer for the transaction */ + A_UINT32 transaction_id; + /** + * Unique token Id generated on the initiator/responder + * side used for a NDP session between two NAN devices + */ + A_UINT32 ndp_instance_id; + /** Response Code defined in wmi_ndp_rsp_code */ + A_UINT32 rsp_code; + /** Number of bytes in TLV wmi_ndp_cfg */ + A_UINT32 ndp_cfg_len; + /** Number of bytes in TLV wmi_ndp_app_info */ + A_UINT32 ndp_app_info_len; + /** + * TLV (tag length value ) parameters follow the ndp_responder_req + * structure. The TLV's are: + * wmi_ndp_cfg ndp_cfg[]; + * wmi_ndp_app_info ndp_app_info[]; + */ +} wmi_ndp_responder_req_fixed_param; + +/** + * NDP end type + */ +typedef enum { + NDP_END_TYPE_UNSPECIFIED = 0x00, + NDP_END_TYPE_PEER_UNAVAILABLE = 0x01, + NDP_END_TYPE_OTA_FRAME = 0x02, +} wmi_ndp_end_type; + +/** + * NDP end reason code + */ +typedef enum { + NDP_END_REASON_UNSPECIFIED = 0x00, + NDP_END_REASON_INACTIVITY = 0x01, + NDP_END_REASON_PEER_DATA_END = 0x02, +} wmi_ndp_end_reason_code; + +/** + * NDP end request + */ +typedef struct { + /** reason_code defined in wmi_ndp_end_reason_code */ + A_UINT32 reason_code; + /** NDP instance id */ + A_UINT32 ndp_instance_id; +} wmi_ndp_end_req; + +/** + * NDP end request list + */ +typedef struct { + A_UINT32 tag;/** WMI_NDP_END_REQ_LIST_TAG */ + A_UINT32 num_ndp_end_reqs; /** number of wmi_ndp_end_req */ + wmi_ndp_end_req ndp_end_reqs[1]; +} wmi_ndp_end_req_list; + +/** + * NDP End request + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param + */ + A_UINT32 tlv_header; + /** unique id generated in upper layer for the transaction */ + A_UINT32 transaction_id; + /** Number of ndp instances in wmi_ndp_end_req_list */ + A_UINT32 num_ndp_instances; + /** Number of bytes in TLV wmi_ndp_end_req_list */ + A_UINT32 ndp_end_req_len; + /** + * TLV (tag length value ) parameters follow the ndp_end_req + * structure. The TLV's are: + * wmi_ndp_end_req wmi_ndp_end_req_list[]; + */ +} wmi_ndp_end_req_fixed_param; + +/* NAN DATA RSP EVENTS */ + +/** + * Event to indicate NAN Data Interface capabilities cmd + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param + */ + A_UINT32 tlv_header; + /** Copy of transaction_id received in wmi_ndi_get_cap_req */ + A_UINT32 transaction_id; + /** Max ndi interface support */ + A_UINT32 max_ndi_interfaces; + /** Max ndp per ndi support */ + A_UINT32 max_ndp_per_ndi; + /** Max number of peer's per ndi */ + A_UINT32 max_peers_per_ndi; +} wmi_ndi_cap_rsp_event_fixed_param; + +/** + * NDP command response code + */ +typedef enum { + NDP_CMD_RSP_STATUS_SUCCESS = 0x00, + NDP_CMD_RSP_STATUS_ERROR = 0x01, +} wmi_ndp_cmd_rsp_status; + +/** + * NDP command reason code + */ +typedef enum { + NDP_INVALID_VDEV_ID_PARAM = 0x00, + NDP_INVALID_SERVICE_INSTANCE_ID_PARAM = 0x01, + NDP_INVALID_PEER_DISC_MAC_ADDR_PARAM = 0x02, + NDP_INVALID_NDP_CFG_SECURITY_PARAM = 0x03, + NDP_INVALID_NDP_CFG_QOS_PARAM = 0x04, + NDP_INVALID_APP_INFO_LEN_PARAM = 0x05, + NDP_INVALID_NDP_INSTANCE_ID_PARAM = 0x06, + NDP_INVALID_RSP_CODE_PARAM = 0x07, +} wmi_ndp_cmd_reason_code; + +/** + * Event response for wmi_ndp_initiator_req + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** Copy of transaction_id received in wmi_ndp_initiator_req */ + A_UINT32 transaction_id; + /** Response status defined in wmi_ndp_cmd_rsp_status*/ + A_UINT32 rsp_status; + /** Reason code defined in wmi_ndp_cmd_reason_code */ + A_UINT32 reason_code; +} wmi_ndp_initiator_rsp_event_fixed_param; + +/** + * Event response for wmi_ndp_responder_req cmd + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** Copy of transaction_id received in wmi_ndp_responder_req */ + A_UINT32 transaction_id; + /** Response status defined in wmi_ndp_cmd_rsp_status*/ + A_UINT32 rsp_status; + /** Reason code defined in wmi_ndp_cmd_reason_code */ + A_UINT32 reason_code; +} wmi_ndp_responder_rsp_event_fixed_param; + +/** + * NDP end response per ndi + */ +typedef struct { + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** Peer MAC addr */ + wmi_mac_addr peer_mac_addr; + /** Number of active ndps on this ndi */ + A_UINT32 num_active_ndps_on_ndi; +} wmi_ndp_end_rsp_per_ndi; + +/** + * NDP end response per ndi list + */ +typedef struct { + /** WMI_NDP_END_RSP_PER_NDI_LIST_TAG */ + A_UINT32 tag; + /** Number of ndp_end_rsp_per_ndi */ + A_UINT32 num_ndp_end_rsp_per_ndis; + wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[1]; +} wmi_ndp_end_rsp_per_ndi_list; + +/** + * Event response for wmi_ndp_end_req cmd + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param + */ + A_UINT32 tlv_header; + /** Copy of transaction_id received in wmi_ndp_end_req */ + A_UINT32 transaction_id; + /** Response status defined in wmi_ndp_cmd_rsp_status*/ + A_UINT32 rsp_status; + /** Reason code defined in wmi_ndp_cmd_reason_code */ + A_UINT32 reason_code; + /** Number of bytes in TLV wmi_ndp_end_rsp_per_ndi */ + A_UINT32 data_end_req_rsp_len; + /** + * TLV (tag length value ) parameters follow the ndp_end_rsp + * structure. The TLV's are: + * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[]; + */ +} wmi_ndp_end_rsp_event_fixed_param; + +/** NAN DATA EVENTS */ + +/** + * NDP self role + */ +typedef enum { + WMI_NDP_INITIATOR_ROLE, + WMI_NDP_RESPONDER_ROLE, +} wmi_ndp_self_role; + +/** + * NDP accept policy + */ +typedef enum { + WMI_NDP_ACCEPT_POLICY_NONE, + WMI_NDP_ACCEPT_POLICY_ALL, +} wmi_ndp_accept_policy; + +/** + * Event indication received on the responder side when a NDP Initiator request/ + * NDP session is initiated on the Initiator side + * (self role will be NDP_RESPONDER_ROLE) + * + * Event indication received on the initiator side when a + * NDP responder request on the Initiator side + * (self role will be NDP_INITIATOR_ROLE) + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** Self NDP Role defined in wmi_ndp_self_role */ + A_UINT32 self_ndp_role; + /** Accept policy defined in wmi_ndp_accept_policy */ + A_UINT32 accept_policy; + /** Unique Instance Id corresponding to a service/session. */ + A_UINT32 service_instance_id; + /** Discovery MAC addr of the peer/initiator */ + wmi_mac_addr peer_disc_mac_addr; + /** + * Unique token Id generated on the initiator/responder + * side used for a NDP session between two NAN devices + */ + A_UINT32 ndp_instance_id; + /** Number of bytes in TLV wmi_ndp_cfg */ + A_UINT32 ndp_cfg_len; + /** Number of bytes in TLV wmi_ndp_app_info */ + A_UINT32 ndp_app_info_len; + /** + * TLV (tag length value ) parameters follow the ndp_indication + * structure. The TLV's are: + * wmi_ndp_cfg ndp_cfg[]; + * wmi_ndp_app_info ndp_app_info[]; + */ +} wmi_ndp_indication_event_fixed_param; + +/** + * Event indication of data confirm is received on both + * initiator and responder side confirming a NDP session + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** + * Unique token Id generated on the initiator/responder + * side used for a NDP session between two NAN devices + */ + A_UINT32 ndp_instance_id; + /* + * NDI mac address of the peer + * (required to derive target ipv6 address) + */ + wmi_mac_addr peer_ndi_mac_addr; + /** Response Code defined in wmi_ndp_rsp_code */ + A_UINT32 rsp_code; + /** Number of bytes in TLV wmi_ndp_cfg */ + A_UINT32 ndp_cfg_len; + /** Number of bytes in TLV wmi_ndp_app_info */ + A_UINT32 ndp_app_info_len; + /** + * TLV (tag length value ) parameters follow the ndp_confirm + * structure. The TLV's are: + * wmi_ndp_cfg ndp_cfg[]; + * wmi_ndp_app_info ndp_app_info[]; + */ +} wmi_ndp_confirm_event_fixed_param; + +/** + * NDP end indication + */ +typedef struct { + /** type defined in wmi_ndp_end_type */ + A_UINT32 type; + /** reason_code defined in wmi_ndp_end_reason_code */ + A_UINT32 reason_code; + /** NDP instance id */ + A_UINT32 ndp_instance_id; +} wmi_ndp_end_indication; + +/** + * NDP end indication list + */ +typedef struct { + /** WMI_NDP_END_INDICATION_LIST_TAG */ + A_UINT32 tag; + /** Number of ndp_end_rsp_per_ndi */ + A_UINT32 num_ndp_end_indications; + wmi_ndp_end_indication ndp_end_indications[1]; +} wmi_ndp_end_indication_list; + +/** + * Event indication received on the initiator/responder side + * terminating a NDP session + */ +typedef struct { + /* + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_ndp_end_indication_event_fixed_param + */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** Number of ndp instances in wmi_ndp_end_indication */ + A_UINT32 num_ndp_instances; + /** Number of bytes in TLV wmi_ndp_end_indication */ + A_UINT32 data_end_event_len; + /** + * TLV (tag length value ) parameters follow the ndp_end_indication + * structure. The TLV's are: + * wmi_ndp_end_indication ndp_end_indications[]; + */ +} wmi_ndp_end_indication_event_fixed_param; + typedef struct { A_UINT32 tlv_header; A_UINT32 num_data; diff --git a/target/inc/wmi_version.h b/target/inc/wmi_version.h index d8768f399ba2..c103cf6de9a9 100644 --- a/target/inc/wmi_version.h +++ b/target/inc/wmi_version.h @@ -36,7 +36,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility */ -#define __WMI_REVISION_ 205 +#define __WMI_REVISION_ 206 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work