1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * 4*5113495bSYour Name * Previously licensed under the ISC license by Qualcomm Atheros, Inc. 5*5113495bSYour Name * 6*5113495bSYour Name * 7*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 8*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 9*5113495bSYour Name * above copyright notice and this permission notice appear in all 10*5113495bSYour Name * copies. 11*5113495bSYour Name * 12*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 13*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 14*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 15*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 16*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 17*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 18*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 19*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 20*5113495bSYour Name */ 21*5113495bSYour Name 22*5113495bSYour Name /* 23*5113495bSYour Name * This file was originally distributed by Qualcomm Atheros, Inc. 24*5113495bSYour Name * under proprietary terms before Copyright ownership was assigned 25*5113495bSYour Name * to the Linux Foundation. 26*5113495bSYour Name */ 27*5113495bSYour Name 28*5113495bSYour Name /* 29*5113495bSYour Name * This file contains extensions of the WMI protocol specified in the 30*5113495bSYour Name * Wireless Module Interface (WMI). It includes definitions of all 31*5113495bSYour Name * extended commands and events. Extensions include useful commands 32*5113495bSYour Name * that are not directly related to wireless activities. They may 33*5113495bSYour Name * be hardware-specific, and they might not be supported on all 34*5113495bSYour Name * implementations. 35*5113495bSYour Name * 36*5113495bSYour Name * Extended WMIX commands are encapsulated in a WMI message with 37*5113495bSYour Name * cmd=WMI_EXTENSION_CMD. 38*5113495bSYour Name */ 39*5113495bSYour Name 40*5113495bSYour Name #ifndef _WMIX_H_ 41*5113495bSYour Name #define _WMIX_H_ 42*5113495bSYour Name 43*5113495bSYour Name #ifdef __cplusplus 44*5113495bSYour Name extern "C" { 45*5113495bSYour Name #endif 46*5113495bSYour Name 47*5113495bSYour Name /* 48*5113495bSYour Name * Extended WMI commands are those that are needed during wireless 49*5113495bSYour Name * operation, but which are not really wireless commands. This allows, 50*5113495bSYour Name * for instance, platform-specific commands. Extended WMI commands are 51*5113495bSYour Name * embedded in a WMI command message with WMI_COMMAND_ID=WMI_EXTENSION_CMDID. 52*5113495bSYour Name * Extended WMI events are similarly embedded in a WMI event message with 53*5113495bSYour Name * WMI_EVENT_ID=WMI_EXTENSION_EVENTID. 54*5113495bSYour Name */ 55*5113495bSYour Name typedef struct { 56*5113495bSYour Name A_UINT32 commandId; 57*5113495bSYour Name } POSTPACK WMIX_CMD_HDR; 58*5113495bSYour Name 59*5113495bSYour Name typedef enum { 60*5113495bSYour Name WMIX_DSETOPEN_REPLY_CMDID = 0x2001, 61*5113495bSYour Name WMIX_DSETDATA_REPLY_CMDID, 62*5113495bSYour Name WMIX_HB_CHALLENGE_RESP_CMDID, 63*5113495bSYour Name WMIX_DBGLOG_CFG_MODULE_CMDID, 64*5113495bSYour Name WMIX_PROF_CFG_CMDID, /* 0x200a */ 65*5113495bSYour Name WMIX_PROF_ADDR_SET_CMDID, 66*5113495bSYour Name WMIX_PROF_START_CMDID, 67*5113495bSYour Name WMIX_PROF_STOP_CMDID, 68*5113495bSYour Name WMIX_PROF_COUNT_GET_CMDID, 69*5113495bSYour Name } WMIX_COMMAND_ID; 70*5113495bSYour Name 71*5113495bSYour Name typedef enum { 72*5113495bSYour Name WMIX_DSETOPENREQ_EVENTID = 0x3001, 73*5113495bSYour Name WMIX_DSETCLOSE_EVENTID, 74*5113495bSYour Name WMIX_DSETDATAREQ_EVENTID, 75*5113495bSYour Name WMIX_HB_CHALLENGE_RESP_EVENTID, 76*5113495bSYour Name WMIX_DBGLOG_EVENTID, 77*5113495bSYour Name WMIX_PROF_COUNT_EVENTID, 78*5113495bSYour Name WMIX_PKTLOG_EVENTID, 79*5113495bSYour Name } WMIX_EVENT_ID; 80*5113495bSYour Name 81*5113495bSYour Name /* 82*5113495bSYour Name * =============DataSet support================= 83*5113495bSYour Name */ 84*5113495bSYour Name 85*5113495bSYour Name /* 86*5113495bSYour Name * WMIX_DSETOPENREQ_EVENTID 87*5113495bSYour Name * DataSet Open Request Event 88*5113495bSYour Name */ 89*5113495bSYour Name typedef struct { 90*5113495bSYour Name A_UINT32 dset_id; 91*5113495bSYour Name A_UINT32 targ_dset_handle; /* echo'ed, not used by Host, */ 92*5113495bSYour Name A_UINT32 targ_reply_fn; /* echo'ed, not used by Host, */ 93*5113495bSYour Name A_UINT32 targ_reply_arg; /* echo'ed, not used by Host, */ 94*5113495bSYour Name } POSTPACK WMIX_DSETOPENREQ_EVENT; 95*5113495bSYour Name 96*5113495bSYour Name /* 97*5113495bSYour Name * WMIX_DSETCLOSE_EVENTID 98*5113495bSYour Name * DataSet Close Event 99*5113495bSYour Name */ 100*5113495bSYour Name typedef struct { 101*5113495bSYour Name A_UINT32 access_cookie; 102*5113495bSYour Name } POSTPACK WMIX_DSETCLOSE_EVENT; 103*5113495bSYour Name 104*5113495bSYour Name /* 105*5113495bSYour Name * WMIX_DSETDATAREQ_EVENTID 106*5113495bSYour Name * DataSet Data Request Event 107*5113495bSYour Name */ 108*5113495bSYour Name typedef struct { 109*5113495bSYour Name A_UINT32 access_cookie; 110*5113495bSYour Name A_UINT32 offset; 111*5113495bSYour Name A_UINT32 length; 112*5113495bSYour Name A_UINT32 targ_buf; /* echo'ed, not used by Host, */ 113*5113495bSYour Name A_UINT32 targ_reply_fn; /* echo'ed, not used by Host, */ 114*5113495bSYour Name A_UINT32 targ_reply_arg; /* echo'ed, not used by Host, */ 115*5113495bSYour Name } WMIX_DSETDATAREQ_EVENT; 116*5113495bSYour Name 117*5113495bSYour Name typedef struct { 118*5113495bSYour Name A_UINT32 status; 119*5113495bSYour Name A_UINT32 targ_dset_handle; 120*5113495bSYour Name A_UINT32 targ_reply_fn; 121*5113495bSYour Name A_UINT32 targ_reply_arg; 122*5113495bSYour Name A_UINT32 access_cookie; 123*5113495bSYour Name A_UINT32 size; 124*5113495bSYour Name A_UINT32 version; 125*5113495bSYour Name } WMIX_DSETOPEN_REPLY_CMD; 126*5113495bSYour Name 127*5113495bSYour Name typedef struct { 128*5113495bSYour Name A_UINT32 status; 129*5113495bSYour Name A_UINT32 targ_buf; 130*5113495bSYour Name A_UINT32 targ_reply_fn; 131*5113495bSYour Name A_UINT32 targ_reply_arg; 132*5113495bSYour Name A_UINT32 length; 133*5113495bSYour Name A_UINT8 buf[1]; 134*5113495bSYour Name } WMIX_DSETDATA_REPLY_CMD; 135*5113495bSYour Name 136*5113495bSYour Name 137*5113495bSYour Name /* 138*5113495bSYour Name * =============Error Detection support================= 139*5113495bSYour Name */ 140*5113495bSYour Name 141*5113495bSYour Name /* 142*5113495bSYour Name * WMIX_HB_CHALLENGE_RESP_CMDID 143*5113495bSYour Name * Heartbeat Challenge Response command 144*5113495bSYour Name */ 145*5113495bSYour Name typedef struct { 146*5113495bSYour Name A_UINT32 cookie; 147*5113495bSYour Name A_UINT32 source; 148*5113495bSYour Name } WMIX_HB_CHALLENGE_RESP_CMD; 149*5113495bSYour Name 150*5113495bSYour Name /* 151*5113495bSYour Name * WMIX_HB_CHALLENGE_RESP_EVENTID 152*5113495bSYour Name * Heartbeat Challenge Response Event 153*5113495bSYour Name */ 154*5113495bSYour Name #define WMIX_HB_CHALLENGE_RESP_EVENT WMIX_HB_CHALLENGE_RESP_CMD 155*5113495bSYour Name 156*5113495bSYour Name /* 157*5113495bSYour Name * =============Target Profiling support================= 158*5113495bSYour Name */ 159*5113495bSYour Name 160*5113495bSYour Name typedef struct { 161*5113495bSYour Name A_UINT32 period; /* Time (in 30.5us ticks) between samples */ 162*5113495bSYour Name A_UINT32 nbins; 163*5113495bSYour Name } WMIX_PROF_CFG_CMD; 164*5113495bSYour Name 165*5113495bSYour Name typedef struct { 166*5113495bSYour Name A_UINT32 addr; 167*5113495bSYour Name } WMIX_PROF_ADDR_SET_CMD; 168*5113495bSYour Name 169*5113495bSYour Name /* 170*5113495bSYour Name * Target responds to Hosts's earlier WMIX_PROF_COUNT_GET_CMDID request 171*5113495bSYour Name * using a WMIX_PROF_COUNT_EVENT with 172*5113495bSYour Name * addr set to the next address 173*5113495bSYour Name * count set to the corresponding count 174*5113495bSYour Name */ 175*5113495bSYour Name typedef struct { 176*5113495bSYour Name A_UINT32 addr; 177*5113495bSYour Name A_UINT32 count; 178*5113495bSYour Name } WMIX_PROF_COUNT_EVENT; 179*5113495bSYour Name 180*5113495bSYour Name 181*5113495bSYour Name #ifdef __cplusplus 182*5113495bSYour Name } 183*5113495bSYour Name #endif 184*5113495bSYour Name 185*5113495bSYour Name #endif /* _WMIX_H_ */ 186