wmi.h (0163b03199006a6ba0d2c991c311e8ac93fcb208) | wmi.h (08989f9640a03939ec170916f80d371a8e3504b0) |
---|---|
1/* 2 * Copyright (c) 2012-2016 Qualcomm Atheros, Inc. 3 * Copyright (c) 2006-2012 Wilocity 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 32 unchanged lines hidden (view full) --- 41 */ 42enum wmi_mid { 43 MID_DEFAULT = 0x00, 44 FIRST_DBG_MID_ID = 0x10, 45 LAST_DBG_MID_ID = 0xFE, 46 MID_BROADCAST = 0xFF, 47}; 48 | 1/* 2 * Copyright (c) 2012-2016 Qualcomm Atheros, Inc. 3 * Copyright (c) 2006-2012 Wilocity 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 32 unchanged lines hidden (view full) --- 41 */ 42enum wmi_mid { 43 MID_DEFAULT = 0x00, 44 FIRST_DBG_MID_ID = 0x10, 45 LAST_DBG_MID_ID = 0xFE, 46 MID_BROADCAST = 0xFF, 47}; 48 |
49/* FW capability IDs 50 * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to 51 * the host 52 */ 53enum wmi_fw_capability { 54 WMI_FW_CAPABILITY_FTM = 0, 55 WMI_FW_CAPABILITY_PS_CONFIG = 1, 56 WMI_FW_CAPABILITY_MAX, 57}; 58 |
|
49/* WMI_CMD_HDR */ 50struct wmi_cmd_hdr { 51 u8 mid; 52 u8 reserved; 53 __le16 command_id; 54 __le32 fw_timestamp; 55} __packed; 56 --- 108 unchanged lines hidden (view full) --- 165 WMI_PS_DEV_CFG_READ_CMDID = 0x91E, 166 /* Per MAC Power Save Configuration commands 167 * Not supported yet 168 */ 169 WMI_PS_MID_CFG_CMDID = 0x91F, 170 /* Not supported yet */ 171 WMI_PS_MID_CFG_READ_CMDID = 0x920, 172 WMI_RS_CFG_CMDID = 0x921, | 59/* WMI_CMD_HDR */ 60struct wmi_cmd_hdr { 61 u8 mid; 62 u8 reserved; 63 __le16 command_id; 64 __le32 fw_timestamp; 65} __packed; 66 --- 108 unchanged lines hidden (view full) --- 175 WMI_PS_DEV_CFG_READ_CMDID = 0x91E, 176 /* Per MAC Power Save Configuration commands 177 * Not supported yet 178 */ 179 WMI_PS_MID_CFG_CMDID = 0x91F, 180 /* Not supported yet */ 181 WMI_PS_MID_CFG_READ_CMDID = 0x920, 182 WMI_RS_CFG_CMDID = 0x921, |
183 WMI_GET_DETAILED_RS_RES_CMDID = 0x922, 184 WMI_AOA_MEAS_CMDID = 0x923, 185 WMI_TOF_SESSION_START_CMDID = 0x991, 186 WMI_TOF_GET_CAPABILITIES_CMDID = 0x992, 187 WMI_TOF_SET_LCR_CMDID = 0x993, 188 WMI_TOF_SET_LCI_CMDID = 0x994, 189 WMI_TOF_CHANNEL_INFO_CMDID = 0x995, |
|
173 WMI_SET_MAC_ADDRESS_CMDID = 0xF003, 174 WMI_ABORT_SCAN_CMDID = 0xF007, 175 WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041, 176 WMI_GET_PMK_CMDID = 0xF048, 177 WMI_SET_PASSPHRASE_CMDID = 0xF049, 178 WMI_SEND_ASSOC_RES_CMDID = 0xF04A, 179 WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B, 180 WMI_MAC_ADDR_REQ_CMDID = 0xF04D, --- 657 unchanged lines hidden (view full) --- 838struct wmi_pmc_cmd { 839 /* enum wmi_pmc_cmd_op_type */ 840 u8 op; 841 u8 reserved; 842 __le16 ring_size; 843 __le64 mem_base; 844} __packed; 845 | 190 WMI_SET_MAC_ADDRESS_CMDID = 0xF003, 191 WMI_ABORT_SCAN_CMDID = 0xF007, 192 WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041, 193 WMI_GET_PMK_CMDID = 0xF048, 194 WMI_SET_PASSPHRASE_CMDID = 0xF049, 195 WMI_SEND_ASSOC_RES_CMDID = 0xF04A, 196 WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B, 197 WMI_MAC_ADDR_REQ_CMDID = 0xF04D, --- 657 unchanged lines hidden (view full) --- 855struct wmi_pmc_cmd { 856 /* enum wmi_pmc_cmd_op_type */ 857 u8 op; 858 u8 reserved; 859 __le16 ring_size; 860 __le64 mem_base; 861} __packed; 862 |
863enum wmi_aoa_meas_type { 864 WMI_AOA_PHASE_MEAS = 0x00, 865 WMI_AOA_PHASE_AMP_MEAS = 0x01, 866}; 867 868/* WMI_AOA_MEAS_CMDID */ 869struct wmi_aoa_meas_cmd { 870 u8 mac_addr[WMI_MAC_LEN]; 871 /* channels IDs: 872 * 0 - 58320 MHz 873 * 1 - 60480 MHz 874 * 2 - 62640 MHz 875 */ 876 u8 channel; 877 /* enum wmi_aoa_meas_type */ 878 u8 aoa_meas_type; 879 __le32 meas_rf_mask; 880} __packed; 881 882enum wmi_tof_burst_duration { 883 WMI_TOF_BURST_DURATION_250_USEC = 2, 884 WMI_TOF_BURST_DURATION_500_USEC = 3, 885 WMI_TOF_BURST_DURATION_1_MSEC = 4, 886 WMI_TOF_BURST_DURATION_2_MSEC = 5, 887 WMI_TOF_BURST_DURATION_4_MSEC = 6, 888 WMI_TOF_BURST_DURATION_8_MSEC = 7, 889 WMI_TOF_BURST_DURATION_16_MSEC = 8, 890 WMI_TOF_BURST_DURATION_32_MSEC = 9, 891 WMI_TOF_BURST_DURATION_64_MSEC = 10, 892 WMI_TOF_BURST_DURATION_128_MSEC = 11, 893 WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15, 894}; 895 896enum wmi_tof_session_start_flags { 897 WMI_TOF_SESSION_START_FLAG_SECURED = 0x1, 898 WMI_TOF_SESSION_START_FLAG_ASAP = 0x2, 899 WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4, 900 WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8, 901}; 902 903/* WMI_TOF_SESSION_START_CMDID */ 904struct wmi_ftm_dest_info { 905 u8 channel; 906 /* wmi_tof_session_start_flags_e */ 907 u8 flags; 908 u8 initial_token; 909 u8 num_of_ftm_per_burst; 910 u8 num_of_bursts_exp; 911 /* wmi_tof_burst_duration_e */ 912 u8 burst_duration; 913 /* Burst Period indicate interval between two consecutive burst 914 * instances, in units of 100 ms 915 */ 916 __le16 burst_period; 917 u8 dst_mac[WMI_MAC_LEN]; 918 __le16 reserved; 919} __packed; 920 921/* WMI_TOF_SESSION_START_CMDID */ 922struct wmi_tof_session_start_cmd { 923 __le32 session_id; 924 u8 num_of_aoa_measures; 925 u8 aoa_type; 926 __le16 num_of_dest; 927 u8 reserved[4]; 928 struct wmi_ftm_dest_info ftm_dest_info[0]; 929} __packed; 930 931enum wmi_tof_channel_info_report_type { 932 WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1, 933 WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2, 934 WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4, 935 WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8, 936 WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10, 937}; 938 939/* WMI_TOF_CHANNEL_INFO_CMDID */ 940struct wmi_tof_channel_info_cmd { 941 /* wmi_tof_channel_info_report_type_e */ 942 __le32 channel_info_report_request; 943} __packed; 944 |
|
846/* WMI Events 847 * List of Events (target to host) 848 */ 849enum wmi_event_id { 850 WMI_READY_EVENTID = 0x1001, 851 WMI_CONNECT_EVENTID = 0x1002, 852 WMI_DISCONNECT_EVENTID = 0x1003, 853 WMI_SCAN_COMPLETE_EVENTID = 0x100A, --- 75 unchanged lines hidden (view full) --- 929 WMI_PS_DEV_CFG_EVENTID = 0x191D, 930 /* Not supported yet */ 931 WMI_PS_DEV_CFG_READ_EVENTID = 0x191E, 932 /* Not supported yet */ 933 WMI_PS_MID_CFG_EVENTID = 0x191F, 934 /* Not supported yet */ 935 WMI_PS_MID_CFG_READ_EVENTID = 0x1920, 936 WMI_RS_CFG_DONE_EVENTID = 0x1921, | 945/* WMI Events 946 * List of Events (target to host) 947 */ 948enum wmi_event_id { 949 WMI_READY_EVENTID = 0x1001, 950 WMI_CONNECT_EVENTID = 0x1002, 951 WMI_DISCONNECT_EVENTID = 0x1003, 952 WMI_SCAN_COMPLETE_EVENTID = 0x100A, --- 75 unchanged lines hidden (view full) --- 1028 WMI_PS_DEV_CFG_EVENTID = 0x191D, 1029 /* Not supported yet */ 1030 WMI_PS_DEV_CFG_READ_EVENTID = 0x191E, 1031 /* Not supported yet */ 1032 WMI_PS_MID_CFG_EVENTID = 0x191F, 1033 /* Not supported yet */ 1034 WMI_PS_MID_CFG_READ_EVENTID = 0x1920, 1035 WMI_RS_CFG_DONE_EVENTID = 0x1921, |
1036 WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922, 1037 WMI_AOA_MEAS_EVENTID = 0x1923, 1038 WMI_TOF_SESSION_END_EVENTID = 0x1991, 1039 WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992, 1040 WMI_TOF_SET_LCR_EVENTID = 0x1993, 1041 WMI_TOF_SET_LCI_EVENTID = 0x1994, 1042 WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995, 1043 WMI_TOF_CHANNEL_INFO_EVENTID = 0x1996, |
|
937 WMI_SET_CHANNEL_EVENTID = 0x9000, 938 WMI_ASSOC_REQ_EVENTID = 0x9001, 939 WMI_EAPOL_RX_EVENTID = 0x9002, 940 WMI_MAC_ADDR_RESP_EVENTID = 0x9003, 941 WMI_FW_VER_EVENTID = 0x9004, 942 WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005, 943}; 944 --- 53 unchanged lines hidden (view full) --- 998 __le32 day; 999 __le32 month; 1000 __le32 year; 1001 /* Boot Loader image version */ 1002 __le32 bl_major; 1003 __le32 bl_minor; 1004 __le32 bl_subminor; 1005 __le32 bl_build; | 1044 WMI_SET_CHANNEL_EVENTID = 0x9000, 1045 WMI_ASSOC_REQ_EVENTID = 0x9001, 1046 WMI_EAPOL_RX_EVENTID = 0x9002, 1047 WMI_MAC_ADDR_RESP_EVENTID = 0x9003, 1048 WMI_FW_VER_EVENTID = 0x9004, 1049 WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005, 1050}; 1051 --- 53 unchanged lines hidden (view full) --- 1105 __le32 day; 1106 __le32 month; 1107 __le32 year; 1108 /* Boot Loader image version */ 1109 __le32 bl_major; 1110 __le32 bl_minor; 1111 __le32 bl_subminor; 1112 __le32 bl_build; |
1113 /* The number of entries in the FW capabilies array */ 1114 u8 fw_capabilities_len; 1115 u8 reserved[3]; 1116 /* FW capabilities info 1117 * Must be the last member of the struct 1118 */ 1119 __le32 fw_capabilities[0]; |
|
1006} __packed; 1007 1008/* WMI_GET_RF_STATUS_EVENTID */ 1009enum rf_type { 1010 RF_UNKNOWN = 0x00, 1011 RF_MARLON = 0x01, 1012 RF_SPARROW = 0x02, 1013}; --- 546 unchanged lines hidden (view full) --- 1560/* WMI_RS_CFG_DONE_EVENTID */ 1561struct wmi_rs_cfg_done_event { 1562 u8 cid; 1563 /* enum wmi_fw_status */ 1564 u8 status; 1565 u8 reserved[2]; 1566} __packed; 1567 | 1120} __packed; 1121 1122/* WMI_GET_RF_STATUS_EVENTID */ 1123enum rf_type { 1124 RF_UNKNOWN = 0x00, 1125 RF_MARLON = 0x01, 1126 RF_SPARROW = 0x02, 1127}; --- 546 unchanged lines hidden (view full) --- 1674/* WMI_RS_CFG_DONE_EVENTID */ 1675struct wmi_rs_cfg_done_event { 1676 u8 cid; 1677 /* enum wmi_fw_status */ 1678 u8 status; 1679 u8 reserved[2]; 1680} __packed; 1681 |
1682/* WMI_GET_DETAILED_RS_RES_CMDID */ 1683struct wmi_get_detailed_rs_res_cmd { 1684 /* connection id */ 1685 u8 cid; 1686 u8 reserved[3]; 1687} __packed; 1688 1689/* RS results status */ 1690enum wmi_rs_results_status { 1691 WMI_RS_RES_VALID = 0x00, 1692 WMI_RS_RES_INVALID = 0x01, 1693}; 1694 1695/* Rate search results */ 1696struct wmi_rs_results { 1697 /* number of sent MPDUs */ 1698 u8 num_of_tx_pkt[WMI_NUM_MCS]; 1699 /* number of non-acked MPDUs */ 1700 u8 num_of_non_acked_pkt[WMI_NUM_MCS]; 1701 /* RS timestamp */ 1702 __le32 tsf; 1703 /* RS selected MCS */ 1704 u8 mcs; 1705} __packed; 1706 1707/* WMI_GET_DETAILED_RS_RES_EVENTID */ 1708struct wmi_get_detailed_rs_res_event { 1709 u8 cid; 1710 /* enum wmi_rs_results_status */ 1711 u8 status; 1712 /* detailed rs results */ 1713 struct wmi_rs_results rs_results; 1714 u8 reserved[3]; 1715} __packed; 1716 |
|
1568/* broadcast connection ID */ 1569#define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF) 1570 1571/* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */ 1572enum wmi_link_maintain_cfg_type { 1573 /* AP/PCP default normal (non-FST) configuration settings */ 1574 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00, 1575 /* AP/PCP default FST configuration settings */ --- 311 unchanged lines hidden (view full) --- 1887 /* MAC ID */ 1888 u8 mid; 1889 /* Retrieved MID Power Save configuration(WMI_PS_MID_CFG_CMD params) */ 1890 struct wmi_ps_mid_cfg mid_ps_cfg; 1891 /* wmi_ps_cfg_cmd_status_e */ 1892 __le32 status; 1893} __packed; 1894 | 1717/* broadcast connection ID */ 1718#define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF) 1719 1720/* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */ 1721enum wmi_link_maintain_cfg_type { 1722 /* AP/PCP default normal (non-FST) configuration settings */ 1723 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00, 1724 /* AP/PCP default FST configuration settings */ --- 311 unchanged lines hidden (view full) --- 2036 /* MAC ID */ 2037 u8 mid; 2038 /* Retrieved MID Power Save configuration(WMI_PS_MID_CFG_CMD params) */ 2039 struct wmi_ps_mid_cfg mid_ps_cfg; 2040 /* wmi_ps_cfg_cmd_status_e */ 2041 __le32 status; 2042} __packed; 2043 |
2044#define WMI_AOA_MAX_DATA_SIZE (128) 2045 2046enum wmi_aoa_meas_status { 2047 WMI_AOA_MEAS_SUCCESS = 0x00, 2048 WMI_AOA_MEAS_PEER_INCAPABLE = 0x01, 2049 WMI_AOA_MEAS_FAILURE = 0x02, 2050}; 2051 2052/* WMI_AOA_MEAS_EVENTID */ 2053struct wmi_aoa_meas_event { 2054 u8 mac_addr[WMI_MAC_LEN]; 2055 /* channels IDs: 2056 * 0 - 58320 MHz 2057 * 1 - 60480 MHz 2058 * 2 - 62640 MHz 2059 */ 2060 u8 channel; 2061 /* enum wmi_aoa_meas_type */ 2062 u8 aoa_meas_type; 2063 /* Measurments are from RFs, defined by the mask */ 2064 __le32 meas_rf_mask; 2065 /* enum wmi_aoa_meas_status */ 2066 u8 meas_status; 2067 u8 reserved; 2068 /* Length of meas_data in bytes */ 2069 __le16 length; 2070 u8 meas_data[WMI_AOA_MAX_DATA_SIZE]; 2071} __packed; 2072 2073/* WMI_TOF_GET_CAPABILITIES_EVENTID */ 2074struct wmi_tof_get_capabilities_event { 2075 u8 ftm_capability; 2076 /* maximum supported number of destination to start TOF */ 2077 u8 max_num_of_dest; 2078 /* maximum supported number of measurements per burst */ 2079 u8 max_num_of_meas_per_burst; 2080 u8 reserved; 2081 /* maximum supported multi bursts */ 2082 __le16 max_multi_bursts_sessions; 2083 /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */ 2084 __le16 max_ftm_burst_duration; 2085 /* AOA supported types */ 2086 __le32 aoa_supported_types; 2087} __packed; 2088 2089enum wmi_tof_session_end_status { 2090 WMI_TOF_SESSION_END_NO_ERROR = 0x00, 2091 WMI_TOF_SESSION_END_FAIL = 0x01, 2092 WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02, 2093 WMI_TOF_SESSION_END_ABORTED = 0x03, 2094}; 2095 2096/* WMI_TOF_SESSION_END_EVENTID */ 2097struct wmi_tof_session_end_event { 2098 /* FTM session ID */ 2099 __le32 session_id; 2100 /* wmi_tof_session_end_status_e */ 2101 u8 status; 2102 u8 reserved[3]; 2103} __packed; 2104 2105/* Responder FTM Results */ 2106struct wmi_responder_ftm_res { 2107 u8 t1[6]; 2108 u8 t2[6]; 2109 u8 t3[6]; 2110 u8 t4[6]; 2111 __le16 tod_err; 2112 __le16 toa_err; 2113 __le16 tod_err_initiator; 2114 __le16 toa_err_initiator; 2115} __packed; 2116 2117enum wmi_tof_ftm_per_dest_res_status { 2118 WMI_PER_DEST_RES_NO_ERROR = 0x00, 2119 WMI_PER_DEST_RES_TX_RX_FAIL = 0x01, 2120 WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02, 2121}; 2122 2123enum wmi_tof_ftm_per_dest_res_flags { 2124 WMI_PER_DEST_RES_REQ_START = 0x01, 2125 WMI_PER_DEST_RES_BURST_REPORT_END = 0x02, 2126 WMI_PER_DEST_RES_REQ_END = 0x04, 2127 WMI_PER_DEST_RES_PARAM_UPDATE = 0x08, 2128}; 2129 2130/* WMI_TOF_FTM_PER_DEST_RES_EVENTID */ 2131struct wmi_tof_ftm_per_dest_res_event { 2132 /* FTM session ID */ 2133 __le32 session_id; 2134 /* destination MAC address */ 2135 u8 dst_mac[WMI_MAC_LEN]; 2136 /* wmi_tof_ftm_per_dest_res_flags_e */ 2137 u8 flags; 2138 /* wmi_tof_ftm_per_dest_res_status_e */ 2139 u8 status; 2140 /* responder ASAP */ 2141 u8 responder_asap; 2142 /* responder number of FTM per burst */ 2143 u8 responder_num_ftm_per_burst; 2144 /* responder number of FTM burst exponent */ 2145 u8 responder_num_ftm_bursts_exp; 2146 /* responder burst duration ,wmi_tof_burst_duration_e */ 2147 u8 responder_burst_duration; 2148 /* responder burst period, indicate interval between two consecutive 2149 * burst instances, in units of 100 ms 2150 */ 2151 __le16 responder_burst_period; 2152 /* receive burst counter */ 2153 __le16 bursts_cnt; 2154 /* tsf of responder start burst */ 2155 __le32 tsf_sync; 2156 /* actual received ftm per burst */ 2157 u8 actual_ftm_per_burst; 2158 u8 reserved0[7]; 2159 struct wmi_responder_ftm_res responder_ftm_res[0]; 2160} __packed; 2161 2162enum wmi_tof_channel_info_type { 2163 WMI_TOF_CHANNEL_INFO_AOA = 0x00, 2164 WMI_TOF_CHANNEL_INFO_LCI = 0x01, 2165 WMI_TOF_CHANNEL_INFO_LCR = 0x02, 2166 WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03, 2167 WMI_TOF_CHANNEL_INFO_CIR = 0x04, 2168 WMI_TOF_CHANNEL_INFO_RSSI = 0x05, 2169 WMI_TOF_CHANNEL_INFO_SNR = 0x06, 2170 WMI_TOF_CHANNEL_INFO_DEBUG = 0x07, 2171}; 2172 2173/* WMI_TOF_CHANNEL_INFO_EVENTID */ 2174struct wmi_tof_channel_info_event { 2175 /* FTM session ID */ 2176 __le32 session_id; 2177 /* destination MAC address */ 2178 u8 dst_mac[WMI_MAC_LEN]; 2179 /* wmi_tof_channel_info_type_e */ 2180 u8 type; 2181 /* data report length */ 2182 u8 len; 2183 /* data report payload */ 2184 u8 report[0]; 2185} __packed; 2186 |
|
1895#endif /* __WILOCITY_WMI_H__ */ | 2187#endif /* __WILOCITY_WMI_H__ */ |