Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 654d5aa2 authored by spuligil's avatar spuligil
Browse files

fw-api: CL 18291512 - update fw common interface files

Change-Id: I493d9aa4a2d24ea00ed0a6c1ba162c1a419dddda
WMI: add WOW_COAP msg defs
CRs-Fixed: 2262693
parent 4dbe9910
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -591,6 +591,7 @@ typedef enum {
    WMI_SERVICE_TDLS_6GHZ_SUPPORT = 338, /* FW supports 6GHz TDLS both on base channel and offchannel */
    WMI_SERVICE_LINKSPEED_ROAM_TRIGGER_SUPPORT = 339, /* FW supports linkspeed trigger roam */
    WMI_SERVICE_UMAC_HANG_RECOVERY_SUPPORT = 340, /* FW supports recovering system from UMAC hang condition */
    WMI_SERVICE_COAP_OFFLOAD_SUPPORT = 341, /* FW supports CoAP (the Constrained Application Protocol) offload */

    WMI_MAX_EXT2_SERVICE

+58 −0
Original line number Diff line number Diff line
@@ -1275,6 +1275,13 @@ typedef enum {
    WMITLV_TAG_STRUC_wmi_request_halphy_ctrl_path_stats_cmd_fixed_param,
    WMITLV_TAG_STRUC_wmi_halphy_ctrl_path_stats_event_fixed_param,
    WMITLV_TAG_STRUC_wmi_peer_flush_policy_cmd_fixed_param,
    WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param,
    WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param,
    WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param,
    WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param,
    WMITLV_TAG_STRUC_WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param,
    WMITLV_TAG_STRUC_WMI_WOW_COAP_BUF_INFO_EVENT_fixed_param,
    WMITLV_TAG_STRUC_wmi_coap_tuple,
} WMITLV_TAG_ID;

/*
@@ -1773,6 +1780,11 @@ typedef enum {
    OP(WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID) \
    OP(WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID) \
    OP(WMI_PEER_FLUSH_POLICY_CMDID) \
    OP(WMI_WOW_COAP_ADD_PATTERN_CMDID) \
    OP(WMI_WOW_COAP_DEL_PATTERN_CMDID) \
    OP(WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID) \
    OP(WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID) \
    OP(WMI_WOW_COAP_GET_BUF_INFO_CMDID) \
    /* add new CMD_LIST elements above this line */


@@ -2061,6 +2073,7 @@ typedef enum {
    OP(WMI_VDEV_LATENCY_LEVEL_EVENTID) \
    OP(WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID) \
    OP(WMI_HALPHY_CTRL_PATH_STATS_EVENTID) \
    OP(WMI_WOW_COAP_BUF_INFO_EVENTID) \
    /* add new EVT_LIST elements above this line */


@@ -5056,6 +5069,43 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID);
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_flush_policy_cmd_fixed_param, wmi_peer_flush_policy_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_PEER_FLUSH_POLICY_CMDID);

/** COAP Add Pattern Cmd
 * TLV (tag length value ) parameters follow the coap_add_pattern
 * structure. The TLV's are:
 * A_UINT8 verify_string[];
 * A_UINT8 coapmsg[];
 */
#define WMITLV_TABLE_WMI_WOW_COAP_ADD_PATTERN_CMDID(id,op,buf,len) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param, WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, verify_string, WMITLV_SIZE_VAR) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, coapmsg, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_WOW_COAP_ADD_PATTERN_CMDID);

/* COAP Del Pattern Cmd */
#define WMITLV_TABLE_WMI_WOW_COAP_DEL_PATTERN_CMDID(id,op,buf,len) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param, WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_WOW_COAP_DEL_PATTERN_CMDID);

/** COAP Add Keepalive Pattern Cmd
 * TLV (tag length value ) parameters follow the coap_add_keepalive_pattern
 * structure. The TLV's are:
 * A_UINT8 coapmsg[];
 */
#define WMITLV_TABLE_WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID(id,op,buf,len) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param, WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, coapmsg, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID);

/* COAP Del Keepalive Pattern Cmd */
#define WMITLV_TABLE_WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID(id,op,buf,len) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param, WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID);

/* COAP Get Buffer Info Cmd */
#define WMITLV_TABLE_WMI_WOW_COAP_GET_BUF_INFO_CMDID(id,op,buf,len) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param, WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_WOW_COAP_GET_BUF_INFO_CMDID);



/************************** TLV definitions of WMI events *******************************/
@@ -6855,6 +6905,14 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PMM_AVAILABLE_SCRATCH_REG_EVENTID);
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_complete_event_fixed_param, wmi_pmm_scratch_reg_allocation_complete_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_PMM_SCRATCH_REG_ALLOCATION_COMPLETE_EVENTID);

/* COAP buffer info event */
#define WMITLV_TABLE_WMI_WOW_COAP_BUF_INFO_EVENTID(id,op,buf,len) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_WOW_COAP_BUF_INFO_EVENT_fixed_param, WMI_WOW_COAP_BUF_INFO_EVENT_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_coap_tuple, coap_tuple, WMITLV_SIZE_VAR) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, payloads, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_WOW_COAP_BUF_INFO_EVENTID);



#ifdef __cplusplus
}
+112 −1
Original line number Diff line number Diff line
@@ -960,6 +960,29 @@ typedef enum {
    /* Set which action category should wake the host from suspend */
    WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
    /*
     * Set a pattern to match broadcast CoAP packet in WoW mode.
     * If match and verify pass, cache the packet and then reply
     * a unicast response in local with pre-configured packet.
     */
    WMI_WOW_COAP_ADD_PATTERN_CMDID,
    /* Delete a pattern match broadcast CoAP packet */
    WMI_WOW_COAP_DEL_PATTERN_CMDID,
    /*
     * Add a CoAP keepalive pattern to send a CoAP broadcast packet
     * when configured timeout occured.
     */
    WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID,
    /* Delete a CoAP keepalive pattern */
    WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID,
    /* Host read the cached CoAP packets after resume */
    WMI_WOW_COAP_GET_BUF_INFO_CMDID,
    /* RTT measurement related cmd */
    /** request to make an RTT measurement */
    WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
@@ -1886,6 +1909,7 @@ typedef enum {
    WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
    WMI_D0_WOW_DISABLE_ACK_EVENTID,
    WMI_WOW_INITIAL_WAKEUP_EVENTID,
    WMI_WOW_COAP_BUF_INFO_EVENTID,
    /* RTT related event ID */
    /** RTT measurement report */
@@ -19230,6 +19254,88 @@ typedef struct {
     */
} WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
typedef struct {
    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param */
    A_UINT32 vdev_id;
    A_UINT32 pattern_id;
    A_UINT32 cache_timeout; /* the cached packet expire timeout in ms */
    A_UINT32 dest_udp_port; /* dest UDP port to match recived CoAP messsage */
    A_UINT32 verify_offset; /* UDP payload offset to verify */
    A_UINT32 verify_len;    /* UDP payload length to verofy*/
    A_UINT32 coapmsg_len;   /* CoAP reply message length */
/* The below TLV (tag length value) parameters follow this fixed_param TLV:
 *     A_UINT8 verify_string[];  verify content,
 *         length identified by verify_len;
 *     A_UINT8 coapmsg[];        CoAP reply message,
 *         length identified by coapmsg_len;
 */
} WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param;
typedef struct {
    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param */
    A_UINT32 vdev_id;
    A_UINT32 pattern_id;
} WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param;
typedef struct {
    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param */
    A_UINT32 vdev_id;
    A_UINT32 pattern_id;
    A_UINT32 ipv4_addr;       /* vdev IPv4 address */
    A_UINT32 remote_udp_port; /* remote UDP port to send keepalive broadcast CoAP message */
    A_UINT32 timeout;         /* the period to send keepalive message in ms */
    A_UINT32 coapmsg_len;     /* keeplive CoAP message length */
/* The below TLV (tag length value) parameters follow this fixed_param TLV:
 *     A_UINT8 coapmsg[];  CoAP keepalive message,
 *          length specifed by coapmsg_len field
 */
} WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param;
typedef struct {
    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param */
    A_UINT32 vdev_id;
    A_UINT32 pattern_id;
} WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param;
typedef struct {
    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param */
    A_UINT32 vdev_id;
    A_UINT32 pattern_id;
} WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param;
typedef struct {
    A_UINT32 tlv_hdr; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coap_tuple */
    A_UINT64 tsf;     /* host and firmware sync tsf */
    A_UINT32 src_ip;
    A_UINT32 payload_len;
} wmi_coap_tuple;
typedef struct {
    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_BUF_INFO_fixed_param */
    A_UINT32 vdev_id;
    A_UINT32 pattern_id;
    /** more_data will be set depending on the number of tuples need transmit */
    A_UINT32 more_tuples;
/* The below TLV (tag length value) parameters follow this fixed_param TLV:
 *     wmi_coap_tuple coap_tuple[]; <-- Array of coap_tuple.
 *     A_UINT32 payloads[] <-- the cached received CoAP messages.
 *         The number of message payloads combined into the payloads[]
 *         array matches the number of coap tuples.
 *         The length of each message payload is specified by the
 *         "payload_len" field in the corresponding coap_tuple.
 *         The subsequent message payload starts at the next 4-byte aligned
 *         position within payloads[].
 *         For example, if there are 3 coap_tuples, with
 *             coap_tuples[0].payload_len = 12
 *             coap_tuples[1].payload_len = 23
 *             coap_tuples[2].payload_len = 34
 *         then msg 0 payload will be stored in payloads[0] - payloads[11]
 *         message  1 payload will be stored in payloads[12] - payloads[34]
 *         message  2 payload will be stored in payloads[36] - payloads[69]
 */
} WMI_WOW_COAP_BUF_INFO_EVENT_fixed_param;
typedef struct wow_event_info_s {
    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param  */
    A_UINT32 vdev_id;
@@ -31505,6 +31611,11 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
        WMI_RETURN_STRING(WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID);
        WMI_RETURN_STRING(WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID);
        WMI_RETURN_STRING(WMI_PEER_FLUSH_POLICY_CMDID);
        WMI_RETURN_STRING(WMI_WOW_COAP_ADD_PATTERN_CMDID);
        WMI_RETURN_STRING(WMI_WOW_COAP_DEL_PATTERN_CMDID);
        WMI_RETURN_STRING(WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID);
        WMI_RETURN_STRING(WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID);
        WMI_RETURN_STRING(WMI_WOW_COAP_GET_BUF_INFO_CMDID);
    }
    return (A_UINT8 *) "Invalid WMI cmd";
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,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_ 1158
#define __WMI_REVISION_ 1159

/** The Version Namespace should not be normally changed. Only
 *  host and firmware of the same WMI namespace will work