diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/fw-api.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api.h | 134 |
1 files changed, 125 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api.h b/drivers/net/wireless/iwlwifi/mvm/fw-api.h index 989d7dbdca6c..6e75b52588de 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api.h | |||
@@ -70,7 +70,7 @@ | |||
70 | #include "fw-api-mac.h" | 70 | #include "fw-api-mac.h" |
71 | #include "fw-api-power.h" | 71 | #include "fw-api-power.h" |
72 | #include "fw-api-d3.h" | 72 | #include "fw-api-d3.h" |
73 | #include "fw-api-bt-coex.h" | 73 | #include "fw-api-coex.h" |
74 | 74 | ||
75 | /* maximal number of Tx queues in any platform */ | 75 | /* maximal number of Tx queues in any platform */ |
76 | #define IWL_MVM_MAX_QUEUES 20 | 76 | #define IWL_MVM_MAX_QUEUES 20 |
@@ -95,6 +95,7 @@ enum { | |||
95 | /* PHY context commands */ | 95 | /* PHY context commands */ |
96 | PHY_CONTEXT_CMD = 0x8, | 96 | PHY_CONTEXT_CMD = 0x8, |
97 | DBG_CFG = 0x9, | 97 | DBG_CFG = 0x9, |
98 | ANTENNA_COUPLING_NOTIFICATION = 0xa, | ||
98 | 99 | ||
99 | /* station table */ | 100 | /* station table */ |
100 | ADD_STA_KEY = 0x17, | 101 | ADD_STA_KEY = 0x17, |
@@ -163,6 +164,7 @@ enum { | |||
163 | TX_ANT_CONFIGURATION_CMD = 0x98, | 164 | TX_ANT_CONFIGURATION_CMD = 0x98, |
164 | BT_CONFIG = 0x9b, | 165 | BT_CONFIG = 0x9b, |
165 | STATISTICS_NOTIFICATION = 0x9d, | 166 | STATISTICS_NOTIFICATION = 0x9d, |
167 | EOSP_NOTIFICATION = 0x9e, | ||
166 | REDUCE_TX_POWER_CMD = 0x9f, | 168 | REDUCE_TX_POWER_CMD = 0x9f, |
167 | 169 | ||
168 | /* RF-KILL commands and notifications */ | 170 | /* RF-KILL commands and notifications */ |
@@ -190,6 +192,7 @@ enum { | |||
190 | REPLY_DEBUG_CMD = 0xf0, | 192 | REPLY_DEBUG_CMD = 0xf0, |
191 | DEBUG_LOG_MSG = 0xf7, | 193 | DEBUG_LOG_MSG = 0xf7, |
192 | 194 | ||
195 | BCAST_FILTER_CMD = 0xcf, | ||
193 | MCAST_FILTER_CMD = 0xd0, | 196 | MCAST_FILTER_CMD = 0xd0, |
194 | 197 | ||
195 | /* D3 commands/notifications */ | 198 | /* D3 commands/notifications */ |
@@ -197,6 +200,7 @@ enum { | |||
197 | PROT_OFFLOAD_CONFIG_CMD = 0xd4, | 200 | PROT_OFFLOAD_CONFIG_CMD = 0xd4, |
198 | OFFLOADS_QUERY_CMD = 0xd5, | 201 | OFFLOADS_QUERY_CMD = 0xd5, |
199 | REMOTE_WAKE_CONFIG_CMD = 0xd6, | 202 | REMOTE_WAKE_CONFIG_CMD = 0xd6, |
203 | D0I3_END_CMD = 0xed, | ||
200 | 204 | ||
201 | /* for WoWLAN in particular */ | 205 | /* for WoWLAN in particular */ |
202 | WOWLAN_PATTERNS = 0xe0, | 206 | WOWLAN_PATTERNS = 0xe0, |
@@ -313,14 +317,12 @@ enum { | |||
313 | 317 | ||
314 | /* Section types for NVM_ACCESS_CMD */ | 318 | /* Section types for NVM_ACCESS_CMD */ |
315 | enum { | 319 | enum { |
316 | NVM_SECTION_TYPE_HW = 0, | 320 | NVM_SECTION_TYPE_SW = 1, |
317 | NVM_SECTION_TYPE_SW, | 321 | NVM_SECTION_TYPE_REGULATORY = 3, |
318 | NVM_SECTION_TYPE_PAPD, | 322 | NVM_SECTION_TYPE_CALIBRATION = 4, |
319 | NVM_SECTION_TYPE_BT, | 323 | NVM_SECTION_TYPE_PRODUCTION = 5, |
320 | NVM_SECTION_TYPE_CALIBRATION, | 324 | NVM_SECTION_TYPE_MAC_OVERRIDE = 11, |
321 | NVM_SECTION_TYPE_PRODUCTION, | 325 | NVM_MAX_NUM_SECTIONS = 12, |
322 | NVM_SECTION_TYPE_POST_FCS_CALIB, | ||
323 | NVM_NUM_OF_SECTIONS, | ||
324 | }; | 326 | }; |
325 | 327 | ||
326 | /** | 328 | /** |
@@ -412,6 +414,35 @@ struct mvm_alive_resp { | |||
412 | __le32 scd_base_ptr; /* SRAM address for SCD */ | 414 | __le32 scd_base_ptr; /* SRAM address for SCD */ |
413 | } __packed; /* ALIVE_RES_API_S_VER_1 */ | 415 | } __packed; /* ALIVE_RES_API_S_VER_1 */ |
414 | 416 | ||
417 | struct mvm_alive_resp_ver2 { | ||
418 | __le16 status; | ||
419 | __le16 flags; | ||
420 | u8 ucode_minor; | ||
421 | u8 ucode_major; | ||
422 | __le16 id; | ||
423 | u8 api_minor; | ||
424 | u8 api_major; | ||
425 | u8 ver_subtype; | ||
426 | u8 ver_type; | ||
427 | u8 mac; | ||
428 | u8 opt; | ||
429 | __le16 reserved2; | ||
430 | __le32 timestamp; | ||
431 | __le32 error_event_table_ptr; /* SRAM address for error log */ | ||
432 | __le32 log_event_table_ptr; /* SRAM address for LMAC event log */ | ||
433 | __le32 cpu_register_ptr; | ||
434 | __le32 dbgm_config_ptr; | ||
435 | __le32 alive_counter_ptr; | ||
436 | __le32 scd_base_ptr; /* SRAM address for SCD */ | ||
437 | __le32 st_fwrd_addr; /* pointer to Store and forward */ | ||
438 | __le32 st_fwrd_size; | ||
439 | u8 umac_minor; /* UMAC version: minor */ | ||
440 | u8 umac_major; /* UMAC version: major */ | ||
441 | __le16 umac_id; /* UMAC version: id */ | ||
442 | __le32 error_info_addr; /* SRAM address for UMAC error log */ | ||
443 | __le32 dbg_print_buff_addr; | ||
444 | } __packed; /* ALIVE_RES_API_S_VER_2 */ | ||
445 | |||
415 | /* Error response/notification */ | 446 | /* Error response/notification */ |
416 | enum { | 447 | enum { |
417 | FW_ERR_UNKNOWN_CMD = 0x0, | 448 | FW_ERR_UNKNOWN_CMD = 0x0, |
@@ -682,6 +713,7 @@ enum { | |||
682 | TE_V2_NOTIF_HOST_FRAG_END = BIT(5), | 713 | TE_V2_NOTIF_HOST_FRAG_END = BIT(5), |
683 | TE_V2_NOTIF_INTERNAL_FRAG_START = BIT(6), | 714 | TE_V2_NOTIF_INTERNAL_FRAG_START = BIT(6), |
684 | TE_V2_NOTIF_INTERNAL_FRAG_END = BIT(7), | 715 | TE_V2_NOTIF_INTERNAL_FRAG_END = BIT(7), |
716 | T2_V2_START_IMMEDIATELY = BIT(11), | ||
685 | 717 | ||
686 | TE_V2_NOTIF_MSK = 0xff, | 718 | TE_V2_NOTIF_MSK = 0xff, |
687 | 719 | ||
@@ -1159,6 +1191,90 @@ struct iwl_mcast_filter_cmd { | |||
1159 | u8 addr_list[0]; | 1191 | u8 addr_list[0]; |
1160 | } __packed; /* MCAST_FILTERING_CMD_API_S_VER_1 */ | 1192 | } __packed; /* MCAST_FILTERING_CMD_API_S_VER_1 */ |
1161 | 1193 | ||
1194 | #define MAX_BCAST_FILTERS 8 | ||
1195 | #define MAX_BCAST_FILTER_ATTRS 2 | ||
1196 | |||
1197 | /** | ||
1198 | * enum iwl_mvm_bcast_filter_attr_offset - written by fw for each Rx packet | ||
1199 | * @BCAST_FILTER_OFFSET_PAYLOAD_START: offset is from payload start. | ||
1200 | * @BCAST_FILTER_OFFSET_IP_END: offset is from ip header end (i.e. | ||
1201 | * start of ip payload). | ||
1202 | */ | ||
1203 | enum iwl_mvm_bcast_filter_attr_offset { | ||
1204 | BCAST_FILTER_OFFSET_PAYLOAD_START = 0, | ||
1205 | BCAST_FILTER_OFFSET_IP_END = 1, | ||
1206 | }; | ||
1207 | |||
1208 | /** | ||
1209 | * struct iwl_fw_bcast_filter_attr - broadcast filter attribute | ||
1210 | * @offset_type: &enum iwl_mvm_bcast_filter_attr_offset. | ||
1211 | * @offset: starting offset of this pattern. | ||
1212 | * @val: value to match - big endian (MSB is the first | ||
1213 | * byte to match from offset pos). | ||
1214 | * @mask: mask to match (big endian). | ||
1215 | */ | ||
1216 | struct iwl_fw_bcast_filter_attr { | ||
1217 | u8 offset_type; | ||
1218 | u8 offset; | ||
1219 | __le16 reserved1; | ||
1220 | __be32 val; | ||
1221 | __be32 mask; | ||
1222 | } __packed; /* BCAST_FILTER_ATT_S_VER_1 */ | ||
1223 | |||
1224 | /** | ||
1225 | * enum iwl_mvm_bcast_filter_frame_type - filter frame type | ||
1226 | * @BCAST_FILTER_FRAME_TYPE_ALL: consider all frames. | ||
1227 | * @BCAST_FILTER_FRAME_TYPE_IPV4: consider only ipv4 frames | ||
1228 | */ | ||
1229 | enum iwl_mvm_bcast_filter_frame_type { | ||
1230 | BCAST_FILTER_FRAME_TYPE_ALL = 0, | ||
1231 | BCAST_FILTER_FRAME_TYPE_IPV4 = 1, | ||
1232 | }; | ||
1233 | |||
1234 | /** | ||
1235 | * struct iwl_fw_bcast_filter - broadcast filter | ||
1236 | * @discard: discard frame (1) or let it pass (0). | ||
1237 | * @frame_type: &enum iwl_mvm_bcast_filter_frame_type. | ||
1238 | * @num_attrs: number of valid attributes in this filter. | ||
1239 | * @attrs: attributes of this filter. a filter is considered matched | ||
1240 | * only when all its attributes are matched (i.e. AND relationship) | ||
1241 | */ | ||
1242 | struct iwl_fw_bcast_filter { | ||
1243 | u8 discard; | ||
1244 | u8 frame_type; | ||
1245 | u8 num_attrs; | ||
1246 | u8 reserved1; | ||
1247 | struct iwl_fw_bcast_filter_attr attrs[MAX_BCAST_FILTER_ATTRS]; | ||
1248 | } __packed; /* BCAST_FILTER_S_VER_1 */ | ||
1249 | |||
1250 | /** | ||
1251 | * struct iwl_fw_bcast_mac - per-mac broadcast filtering configuration. | ||
1252 | * @default_discard: default action for this mac (discard (1) / pass (0)). | ||
1253 | * @attached_filters: bitmap of relevant filters for this mac. | ||
1254 | */ | ||
1255 | struct iwl_fw_bcast_mac { | ||
1256 | u8 default_discard; | ||
1257 | u8 reserved1; | ||
1258 | __le16 attached_filters; | ||
1259 | } __packed; /* BCAST_MAC_CONTEXT_S_VER_1 */ | ||
1260 | |||
1261 | /** | ||
1262 | * struct iwl_bcast_filter_cmd - broadcast filtering configuration | ||
1263 | * @disable: enable (0) / disable (1) | ||
1264 | * @max_bcast_filters: max number of filters (MAX_BCAST_FILTERS) | ||
1265 | * @max_macs: max number of macs (NUM_MAC_INDEX_DRIVER) | ||
1266 | * @filters: broadcast filters | ||
1267 | * @macs: broadcast filtering configuration per-mac | ||
1268 | */ | ||
1269 | struct iwl_bcast_filter_cmd { | ||
1270 | u8 disable; | ||
1271 | u8 max_bcast_filters; | ||
1272 | u8 max_macs; | ||
1273 | u8 reserved1; | ||
1274 | struct iwl_fw_bcast_filter filters[MAX_BCAST_FILTERS]; | ||
1275 | struct iwl_fw_bcast_mac macs[NUM_MAC_INDEX_DRIVER]; | ||
1276 | } __packed; /* BCAST_FILTERING_HCMD_API_S_VER_1 */ | ||
1277 | |||
1162 | struct mvm_statistics_dbg { | 1278 | struct mvm_statistics_dbg { |
1163 | __le32 burst_check; | 1279 | __le32 burst_check; |
1164 | __le32 burst_count; | 1280 | __le32 burst_count; |