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

Commit 8db32fa4 authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-next-for-kalle-2019-03-22' of...

Merge tag 'iwlwifi-next-for-kalle-2019-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

First batch of patches intended for v5.2

* Send NO_DATA events so they can be captured in radiotap;
* Some channel-switch changes;
* Support for multiple BSSID;
* Continued work and bugfixes for the new debugging infra;
* Support for some new FW API versions;
* Some work to support new hardware;
* General bugfixes;
* Other cleanups;
parents 35f861e3 fe63f21b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@
#define IWL_22000_SO_A_HR_B_FW_PRE      "iwlwifi-so-a0-hr-b0-"
#define IWL_22000_SO_A_GF_A_FW_PRE      "iwlwifi-so-a0-gf-a0-"
#define IWL_22000_TY_A_GF_A_FW_PRE      "iwlwifi-ty-a0-gf-a0-"
#define IWL_22000_SO_A_GF4_A_FW_PRE     "iwlwifi-so-a0-gf4-a0-"

#define IWL_22000_HR_MODULE_FIRMWARE(api) \
	IWL_22000_HR_FW_PRE __stringify(api) ".ucode"
@@ -427,12 +428,20 @@ const struct iwl_cfg iwlax210_2ax_cfg_so_hr_a0 = {
const struct iwl_cfg iwlax210_2ax_cfg_so_gf_a0 = {
	.name = "Intel(R) Wi-Fi 7 AX211 160MHz",
	.fw_name_pre = IWL_22000_SO_A_GF_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_AX210,
};

const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = {
	.name = "Intel(R) Wi-Fi 7 AX210 160MHz",
	.fw_name_pre = IWL_22000_TY_A_GF_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_AX210,
};

const struct iwl_cfg iwlax210_2ax_cfg_so_gf4_a0 = {
	.name = "Intel(R) Wi-Fi 7 AX210 160MHz",
	.fw_name_pre = IWL_22000_SO_A_GF4_A_FW_PRE,
	IWL_DEVICE_AX210,
};

+118 −59
Original line number Diff line number Diff line
@@ -60,12 +60,13 @@

#include <linux/bitops.h>

/*
/**
 * struct iwl_fw_ini_header: Common Header for all debug group TLV's structures
 *
 * @tlv_version: version info
 * @apply_point: &enum iwl_fw_ini_apply_point
 * @data: TLV data followed
 **/
 */
struct iwl_fw_ini_header {
	__le32 tlv_version;
	__le32 apply_point;
@@ -73,7 +74,7 @@ struct iwl_fw_ini_header {
} __packed; /* FW_DEBUG_TLV_HEADER_S */

/**
 * struct iwl_fw_ini_allocation_tlv - (IWL_FW_INI_TLV_TYPE_BUFFER_ALLOCATION)
 * struct iwl_fw_ini_allocation_tlv - (IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION)
 * buffer allocation TLV - for debug
 *
 * @iwl_fw_ini_header: header
@@ -95,33 +96,52 @@ struct iwl_fw_ini_allocation_tlv {
} __packed; /* FW_DEBUG_TLV_BUFFER_ALLOCATION_TLV_S_VER_1 */

/**
 * struct iwl_fw_ini_hcmd (IWL_FW_INI_TLV_TYPE_HCMD)
 * Generic Host command pass through TLV
 * enum iwl_fw_ini_dbg_domain - debug domains
 * allows to send host cmd or collect memory region if a given domain is enabled
 *
 * @IWL_FW_INI_DBG_DOMAIN_ALWAYS_ON: the default domain, always on
 * @IWL_FW_INI_DBG_DOMAIN_REPORT_PS: power save domain
 */
enum iwl_fw_ini_dbg_domain {
	IWL_FW_INI_DBG_DOMAIN_ALWAYS_ON = 0,
	IWL_FW_INI_DBG_DOMAIN_REPORT_PS,
}; /* FW_DEBUG_TLV_DOMAIN_API_E_VER_1 */

/**
 * struct iwl_fw_ini_hcmd
 *
 * @id: the debug configuration command type for instance: 0xf6 / 0xf5 / DHC
 * @group: the desired cmd group
 * @padding: all zeros for dword alignment
 * @data: all of the relevant command (0xf6/0xf5) to be sent
 * @reserved: to align to FW struct
 * @data: all of the relevant command data to be sent
 */
struct iwl_fw_ini_hcmd {
	u8 id;
	u8 group;
	__le16 padding;
	__le16 reserved;
	u8 data[0];
} __packed; /* FW_DEBUG_TLV_HCMD_DATA_S */
} __packed; /* FW_DEBUG_TLV_HCMD_DATA_API_S_VER_1 */

/**
 * struct iwl_fw_ini_hcmd_tlv
 * struct iwl_fw_ini_hcmd_tlv - (IWL_UCODE_TLV_TYPE_HCMD)
 * Generic Host command pass through TLV
 *
 * @header: header
 * @domain: send command only if the specific domain is enabled
 *	&enum iwl_fw_ini_dbg_domain
 * @period_msec: period in which the hcmd will be sent to FW. Measured in msec
 *	(0 = one time command).
 * @hcmd: a variable length host-command to be sent to apply the configuration.
 */
struct iwl_fw_ini_hcmd_tlv {
	struct iwl_fw_ini_header header;
	__le32 domain;
	__le32 period_msec;
	struct iwl_fw_ini_hcmd hcmd;
} __packed; /* FW_DEBUG_TLV_HCMD_S_VER_1 */
} __packed; /* FW_DEBUG_TLV_HCMD_API_S_VER_1 */

/*
 * struct iwl_fw_ini_debug_flow_tlv (IWL_FW_INI_TLV_TYPE_DEBUG_FLOW)
/**
 * struct iwl_fw_ini_debug_flow_tlv - (IWL_UCODE_TLV_TYPE_DEBUG_FLOW)
 *
 * @header: header
 * @debug_flow_cfg: &enum iwl_fw_ini_debug_flow
@@ -134,8 +154,20 @@ struct iwl_fw_ini_debug_flow_tlv {
#define IWL_FW_INI_MAX_REGION_ID	64
#define IWL_FW_INI_MAX_NAME		32

/**
 * struct iwl_fw_ini_region_cfg_dhc - defines dhc response to dump.
 *
 * @id_and_grp: id and group of dhc response.
 * @desc: dhc response descriptor.
 */
struct iwl_fw_ini_region_cfg_dhc {
	__le32 id_and_grp;
	__le32 desc;
} __packed; /* FW_DEBUG_TLV_REGION_DHC_API_S_VER_1 */

/**
 * struct iwl_fw_ini_region_cfg_internal - meta data of internal memory region
 *
 * @num_of_range: the amount of ranges in the region
 * @range_data_size: size of the data to read per range, in bytes.
 */
@@ -146,6 +178,7 @@ struct iwl_fw_ini_region_cfg_internal {

/**
 * struct iwl_fw_ini_region_cfg_fifos - meta data of fifos region
 *
 * @fid1: fifo id 1 - bitmap of lmac tx/rx fifos to include in the region
 * @fid2: fifo id 2 - bitmap of umac rx fifos to include in the region.
 *	It is unused for tx.
@@ -163,34 +196,43 @@ struct iwl_fw_ini_region_cfg_fifos {

/**
 * struct iwl_fw_ini_region_cfg
 *
 * @region_id: ID of this dump configuration
 * @region_type: &enum iwl_fw_ini_region_type
 * @num_regions: amount of regions in the address array.
 * @domain: dump this region only if the specific domain is enabled
 *	&enum iwl_fw_ini_dbg_domain
 * @name_len: name length
 * @name: file name to use for this region
 * @internal: used in case the region uses internal memory.
 * @allocation_id: For DRAM type field substitutes for allocation_id
 * @fifos: used in case of fifos region.
 * @dhc_desc: dhc response descriptor.
 * @notif_id_and_grp: dump this region only if the specific notification
 *	occurred.
 * @offset: offset to use for each memory base address
 * @start_addr: array of addresses.
 */
struct iwl_fw_ini_region_cfg {
	__le32 region_id;
	__le32 region_type;
	__le32 domain;
	__le32 name_len;
	u8 name[IWL_FW_INI_MAX_NAME];
	union {
		struct iwl_fw_ini_region_cfg_internal internal;
		__le32 allocation_id;
		struct iwl_fw_ini_region_cfg_fifos fifos;
	};
		struct iwl_fw_ini_region_cfg_dhc dhc_desc;
		__le32 notif_id_and_grp;
	}; /* FW_DEBUG_TLV_REGION_EXT_INT_PARAMS_API_U_VER_1 */
	__le32 offset;
	__le32 start_addr[];
} __packed; /* FW_DEBUG_TLV_REGION_CONFIG_S */
} __packed; /* FW_DEBUG_TLV_REGION_CONFIG_API_S_VER_1 */

/**
 * struct iwl_fw_ini_region_tlv - (IWL_FW_INI_TLV_TYPE_REGION_CFG)
 * DUMP sections define IDs and triggers that use those IDs TLV
 * struct iwl_fw_ini_region_tlv - (IWL_UCODE_TLV_TYPE_REGIONS)
 * defines memory regions to dump
 *
 * @header: header
 * @num_regions: how many different region section and IDs are coming next
 * @region_config: list of dump configurations
@@ -199,13 +241,12 @@ struct iwl_fw_ini_region_tlv {
	struct iwl_fw_ini_header header;
	__le32 num_regions;
	struct iwl_fw_ini_region_cfg region_config[];
} __packed; /* FW_DEBUG_TLV_REGIONS_S_VER_1 */
} __packed; /* FW_DEBUG_TLV_REGIONS_API_S_VER_1 */

/**
 * struct iwl_fw_ini_trigger - (IWL_FW_INI_TLV_TYPE_DUMP_CFG)
 * Region sections define IDs and triggers that use those IDs TLV
 * struct iwl_fw_ini_trigger
 *
 * @trigger_id: enum &iwl_fw_ini_tigger_id
 * @trigger_id: &enum iwl_fw_ini_trigger_id
 * @override_trig: determines how apply trigger in case a trigger with the
 *	same id is already in use. Using the first 2 bytes:
 *	Byte 0: if 0, override trigger configuration, otherwise use the
@@ -214,6 +255,7 @@ struct iwl_fw_ini_region_tlv {
 *	existing trigger.
 * @dump_delay: delay from trigger fire to dump, in usec
 * @occurrences: max amount of times to be fired
 * @reserved: to align to FW struct
 * @ignore_consec: ignore consecutive triggers, in usec
 * @force_restart: force FW restart
 * @multi_dut: initiate debug dump data on several DUTs
@@ -226,17 +268,18 @@ struct iwl_fw_ini_trigger {
	__le32 override_trig;
	__le32 dump_delay;
	__le32 occurrences;
	__le32 reserved;
	__le32 ignore_consec;
	__le32 force_restart;
	__le32 multi_dut;
	__le32 trigger_data;
	__le32 num_regions;
	__le32 data[];
} __packed; /* FW_TLV_DEBUG_TRIGGER_CONFIG_S */
} __packed; /* FW_TLV_DEBUG_TRIGGER_CONFIG_API_S_VER_1 */

/**
 * struct iwl_fw_ini_trigger_tlv - (IWL_FW_INI_TLV_TYPE_TRIGGERS_CFG)
 * DUMP sections define IDs and triggers that use those IDs TLV
 * struct iwl_fw_ini_trigger_tlv - (IWL_UCODE_TLV_TYPE_TRIGGERS)
 * Triggers that hold memory regions to dump in case a trigger fires
 *
 * @header: header
 * @num_triggers: how many different triggers section and IDs are coming next
@@ -246,16 +289,18 @@ struct iwl_fw_ini_trigger_tlv {
	struct iwl_fw_ini_header header;
	__le32 num_triggers;
	struct iwl_fw_ini_trigger trigger_config[];
} __packed; /* FW_TLV_DEBUG_TRIGGERS_S_VER_1 */
} __packed; /* FW_TLV_DEBUG_TRIGGERS_API_S_VER_1 */

/**
 * enum iwl_fw_ini_trigger_id
 *
 * @IWL_FW_TRIGGER_ID_FW_ASSERT: FW assert
 * @IWL_FW_TRIGGER_ID_FW_HW_ERROR: HW assert
 * @IWL_FW_TRIGGER_ID_FW_TFD_Q_HANG: TFD queue hang
 * @IWL_FW_TRIGGER_ID_FW_DEBUG_HOST_TRIGGER: FW debug notification
 * @IWL_FW_TRIGGER_ID_FW_GENERIC_NOTIFOCATION: FW generic notification
 * @IWL_FW_TRIGGER_ID_FW_GENERIC_NOTIFICATION: FW generic notification
 * @IWL_FW_TRIGGER_ID_USER_TRIGGER: User trigger
 * @IWL_FW_TRIGGER_ID_PERIODIC_TRIGGER: triggers periodically
 * @IWL_FW_TRIGGER_ID_HOST_PEER_CLIENT_INACTIVITY: peer inactivity
 * @IWL_FW_TRIGGER_ID_HOST_TX_LATENCY_THRESHOLD_CROSSED: TX latency
 *	threshold was crossed
@@ -299,47 +344,51 @@ enum iwl_fw_ini_trigger_id {

	/* FW triggers */
	IWL_FW_TRIGGER_ID_FW_DEBUG_HOST_TRIGGER			= 4,
	IWL_FW_TRIGGER_ID_FW_GENERIC_NOTIFOCATION		= 5,
	IWL_FW_TRIGGER_ID_FW_GENERIC_NOTIFICATION		= 5,

	/* User trigger */
	IWL_FW_TRIGGER_ID_USER_TRIGGER				= 6,

	/* periodic uses the data field for the interval time */
	IWL_FW_TRIGGER_ID_PERIODIC_TRIGGER			= 7,

	/* Host triggers */
	IWL_FW_TRIGGER_ID_HOST_PEER_CLIENT_INACTIVITY		= 7,
	IWL_FW_TRIGGER_ID_HOST_TX_LATENCY_THRESHOLD_CROSSED	= 8,
	IWL_FW_TRIGGER_ID_HOST_TX_RESPONSE_STATUS_FAILED	= 9,
	IWL_FW_TRIGGER_ID_HOST_OS_REQ_DEAUTH_PEER		= 10,
	IWL_FW_TRIGGER_ID_HOST_STOP_GO_REQUEST			= 11,
	IWL_FW_TRIGGER_ID_HOST_START_GO_REQUEST			= 12,
	IWL_FW_TRIGGER_ID_HOST_JOIN_GROUP_REQUEST		= 13,
	IWL_FW_TRIGGER_ID_HOST_SCAN_START			= 14,
	IWL_FW_TRIGGER_ID_HOST_SCAN_SUBMITTED			= 15,
	IWL_FW_TRIGGER_ID_HOST_SCAN_PARAMS			= 16,
	IWL_FW_TRIGGER_ID_HOST_CHECK_FOR_HANG			= 17,
	IWL_FW_TRIGGER_ID_HOST_BAR_RECEIVED			= 18,
	IWL_FW_TRIGGER_ID_HOST_AGG_TX_RESPONSE_STATUS_FAILED	= 19,
	IWL_FW_TRIGGER_ID_HOST_EAPOL_TX_RESPONSE_FAILED		= 20,
	IWL_FW_TRIGGER_ID_HOST_FAKE_TX_RESPONSE_SUSPECTED	= 21,
	IWL_FW_TRIGGER_ID_HOST_AUTH_REQ_FROM_ASSOC_CLIENT	= 22,
	IWL_FW_TRIGGER_ID_HOST_ROAM_COMPLETE			= 23,
	IWL_FW_TRIGGER_ID_HOST_AUTH_ASSOC_FAST_FAILED		= 24,
	IWL_FW_TRIGGER_ID_HOST_D3_START				= 25,
	IWL_FW_TRIGGER_ID_HOST_D3_END				= 26,
	IWL_FW_TRIGGER_ID_HOST_BSS_MISSED_BEACONS		= 27,
	IWL_FW_TRIGGER_ID_HOST_P2P_CLIENT_MISSED_BEACONS	= 28,
	IWL_FW_TRIGGER_ID_HOST_PEER_CLIENT_TX_FAILURES		= 29,
	IWL_FW_TRIGGER_ID_HOST_TX_WFD_ACTION_FRAME_FAILED	= 30,
	IWL_FW_TRIGGER_ID_HOST_AUTH_ASSOC_FAILED		= 31,
	IWL_FW_TRIGGER_ID_HOST_SCAN_COMPLETE			= 32,
	IWL_FW_TRIGGER_ID_HOST_SCAN_ABORT			= 33,
	IWL_FW_TRIGGER_ID_HOST_NIC_ALIVE			= 34,
	IWL_FW_TRIGGER_ID_HOST_CHANNEL_SWITCH_COMPLETE		= 35,
	IWL_FW_TRIGGER_ID_HOST_PEER_CLIENT_INACTIVITY		= 8,
	IWL_FW_TRIGGER_ID_HOST_TX_LATENCY_THRESHOLD_CROSSED	= 9,
	IWL_FW_TRIGGER_ID_HOST_TX_RESPONSE_STATUS_FAILED	= 10,
	IWL_FW_TRIGGER_ID_HOST_OS_REQ_DEAUTH_PEER		= 11,
	IWL_FW_TRIGGER_ID_HOST_STOP_GO_REQUEST			= 12,
	IWL_FW_TRIGGER_ID_HOST_START_GO_REQUEST			= 13,
	IWL_FW_TRIGGER_ID_HOST_JOIN_GROUP_REQUEST		= 14,
	IWL_FW_TRIGGER_ID_HOST_SCAN_START			= 15,
	IWL_FW_TRIGGER_ID_HOST_SCAN_SUBMITTED			= 16,
	IWL_FW_TRIGGER_ID_HOST_SCAN_PARAMS			= 17,
	IWL_FW_TRIGGER_ID_HOST_CHECK_FOR_HANG			= 18,
	IWL_FW_TRIGGER_ID_HOST_BAR_RECEIVED			= 19,
	IWL_FW_TRIGGER_ID_HOST_AGG_TX_RESPONSE_STATUS_FAILED	= 20,
	IWL_FW_TRIGGER_ID_HOST_EAPOL_TX_RESPONSE_FAILED		= 21,
	IWL_FW_TRIGGER_ID_HOST_FAKE_TX_RESPONSE_SUSPECTED	= 22,
	IWL_FW_TRIGGER_ID_HOST_AUTH_REQ_FROM_ASSOC_CLIENT	= 23,
	IWL_FW_TRIGGER_ID_HOST_ROAM_COMPLETE			= 24,
	IWL_FW_TRIGGER_ID_HOST_AUTH_ASSOC_FAST_FAILED		= 25,
	IWL_FW_TRIGGER_ID_HOST_D3_START				= 26,
	IWL_FW_TRIGGER_ID_HOST_D3_END				= 27,
	IWL_FW_TRIGGER_ID_HOST_BSS_MISSED_BEACONS		= 28,
	IWL_FW_TRIGGER_ID_HOST_P2P_CLIENT_MISSED_BEACONS	= 29,
	IWL_FW_TRIGGER_ID_HOST_PEER_CLIENT_TX_FAILURES		= 30,
	IWL_FW_TRIGGER_ID_HOST_TX_WFD_ACTION_FRAME_FAILED	= 31,
	IWL_FW_TRIGGER_ID_HOST_AUTH_ASSOC_FAILED		= 32,
	IWL_FW_TRIGGER_ID_HOST_SCAN_COMPLETE			= 33,
	IWL_FW_TRIGGER_ID_HOST_SCAN_ABORT			= 34,
	IWL_FW_TRIGGER_ID_HOST_NIC_ALIVE			= 35,
	IWL_FW_TRIGGER_ID_HOST_CHANNEL_SWITCH_COMPLETE		= 36,

	IWL_FW_TRIGGER_ID_NUM,
}; /* FW_DEBUG_TLV_TRIGGER_ID_E_VER_1 */

/**
 * enum iwl_fw_ini_apply_point
 *
 * @IWL_FW_INI_APPLY_INVALID: invalid
 * @IWL_FW_INI_APPLY_EARLY: pre loading FW
 * @IWL_FW_INI_APPLY_AFTER_ALIVE: first cmd from host after alive
@@ -360,6 +409,7 @@ enum iwl_fw_ini_apply_point {

/**
 * enum iwl_fw_ini_allocation_id
 *
 * @IWL_FW_INI_ALLOCATION_INVALID: invalid
 * @IWL_FW_INI_ALLOCATION_ID_DBGC1: allocation meant for DBGC1 configuration
 * @IWL_FW_INI_ALLOCATION_ID_DBGC2: allocation meant for DBGC2 configuration
@@ -380,18 +430,22 @@ enum iwl_fw_ini_allocation_id {

/**
 * enum iwl_fw_ini_buffer_location
 *
 * @IWL_FW_INI_LOCATION_INVALID: invalid
 * @IWL_FW_INI_LOCATION_SRAM_PATH: SRAM location
 * @IWL_FW_INI_LOCATION_DRAM_PATH: DRAM location
 * @IWL_FW_INI_LOCATION_NPK_PATH: NPK location
 */
enum iwl_fw_ini_buffer_location {
	IWL_FW_INI_LOCATION_INVALID,
	IWL_FW_INI_LOCATION_SRAM_PATH,
	IWL_FW_INI_LOCATION_DRAM_PATH,
	IWL_FW_INI_LOCATION_NPK_PATH,
}; /* FW_DEBUG_TLV_BUFFER_LOCATION_E_VER_1 */

/**
 * enum iwl_fw_ini_debug_flow
 *
 * @IWL_FW_INI_DEBUG_INVALID: invalid
 * @IWL_FW_INI_DEBUG_DBTR_FLOW: undefined
 * @IWL_FW_INI_DEBUG_TB2DTF_FLOW: undefined
@@ -404,6 +458,7 @@ enum iwl_fw_ini_debug_flow {

/**
 * enum iwl_fw_ini_region_type
 *
 * @IWL_FW_INI_REGION_INVALID: invalid
 * @IWL_FW_INI_REGION_DEVICE_MEMORY: device internal memory
 * @IWL_FW_INI_REGION_PERIPHERY_MAC: periphery registers of MAC
@@ -416,6 +471,8 @@ enum iwl_fw_ini_debug_flow {
 * @IWL_FW_INI_REGION_RXF: RX fifo
 * @IWL_FW_INI_REGION_PAGING: paging memory
 * @IWL_FW_INI_REGION_CSR: CSR registers
 * @IWL_FW_INI_REGION_NOTIFICATION: FW notification data
 * @IWL_FW_INI_REGION_DHC: dhc response to dump
 * @IWL_FW_INI_REGION_NUM: number of region types
 */
enum iwl_fw_ini_region_type {
@@ -431,6 +488,8 @@ enum iwl_fw_ini_region_type {
	IWL_FW_INI_REGION_RXF,
	IWL_FW_INI_REGION_PAGING,
	IWL_FW_INI_REGION_CSR,
	IWL_FW_INI_REGION_NOTIFICATION,
	IWL_FW_INI_REGION_DHC,
	IWL_FW_INI_REGION_NUM
}; /* FW_DEBUG_TLV_REGION_TYPE_E_VER_1 */

+33 −6
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
 * Copyright (C) 2018 Intel Corporation
 * Copyright(C) 2018 - 2019 Intel Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
@@ -31,7 +31,7 @@
 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
 * Copyright (C) 2018 Intel Corporation
 * Copyright(C) 2018 - 2019 Intel Corporation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
@@ -233,7 +233,8 @@ struct iwl_nvm_get_info_phy {
	__le32 rx_chains;
} __packed; /* REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */

#define IWL_NUM_CHANNELS (51)
#define IWL_NUM_CHANNELS_V1	51
#define IWL_NUM_CHANNELS	110

/**
 * struct iwl_nvm_get_info_regulatory - regulatory information
@@ -241,12 +242,38 @@ struct iwl_nvm_get_info_phy {
 * @channel_profile: regulatory data of this channel
 * @reserved: reserved
 */
struct iwl_nvm_get_info_regulatory {
struct iwl_nvm_get_info_regulatory_v1 {
	__le32 lar_enabled;
	__le16 channel_profile[IWL_NUM_CHANNELS];
	__le16 channel_profile[IWL_NUM_CHANNELS_V1];
	__le16 reserved;
} __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */

/**
 * struct iwl_nvm_get_info_regulatory - regulatory information
 * @lar_enabled: is LAR enabled
 * @n_channels: number of valid channels in the array
 * @channel_profile: regulatory data of this channel
 */
struct iwl_nvm_get_info_regulatory {
	__le32 lar_enabled;
	__le32 n_channels;
	__le32 channel_profile[IWL_NUM_CHANNELS];
} __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_2 */

/**
 * struct iwl_nvm_get_info_rsp_v3 - response to get NVM data
 * @general: general NVM data
 * @mac_sku: data relating to MAC sku
 * @phy_sku: data relating to PHY sku
 * @regulatory: regulatory data
 */
struct iwl_nvm_get_info_rsp_v3 {
	struct iwl_nvm_get_info_general general;
	struct iwl_nvm_get_info_sku mac_sku;
	struct iwl_nvm_get_info_phy phy_sku;
	struct iwl_nvm_get_info_regulatory_v1 regulatory;
} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_3 */

/**
 * struct iwl_nvm_get_info_rsp - response to get NVM data
 * @general: general NVM data
@@ -259,7 +286,7 @@ struct iwl_nvm_get_info_rsp {
	struct iwl_nvm_get_info_sku mac_sku;
	struct iwl_nvm_get_info_phy phy_sku;
	struct iwl_nvm_get_info_regulatory regulatory;
} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_3 */
} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_4 */

/**
 * struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed
+2 −65
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
 * Copyright(c) 2018 Intel Corporation
 * Copyright(c) 2018 - 2019 Intel Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
@@ -31,7 +31,7 @@
 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
 * Copyright(c) 2018 Intel Corporation
 * Copyright(c) 2018 - 2019 Intel Corporation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
@@ -688,13 +688,6 @@ struct iwl_rx_mpdu_desc {

#define IWL_RX_DESC_SIZE_V1 offsetofend(struct iwl_rx_mpdu_desc, v1)

#define IWL_CD_STTS_OPTIMIZED_POS	0
#define IWL_CD_STTS_OPTIMIZED_MSK	0x01
#define IWL_CD_STTS_TRANSFER_STATUS_POS	1
#define IWL_CD_STTS_TRANSFER_STATUS_MSK	0x0E
#define IWL_CD_STTS_WIFI_STATUS_POS	4
#define IWL_CD_STTS_WIFI_STATUS_MSK	0xF0

#define RX_NO_DATA_CHAIN_A_POS		0
#define RX_NO_DATA_CHAIN_A_MSK		(0xff << RX_NO_DATA_CHAIN_A_POS)
#define RX_NO_DATA_CHAIN_B_POS		8
@@ -747,62 +740,6 @@ struct iwl_rx_no_data {
	__le32 rx_vec[2];
} __packed; /* RX_NO_DATA_NTFY_API_S_VER_1 */

/**
 * enum iwl_completion_desc_transfer_status -  transfer status (bits 1-3)
 * @IWL_CD_STTS_UNUSED: unused
 * @IWL_CD_STTS_UNUSED_2: unused
 * @IWL_CD_STTS_END_TRANSFER: successful transfer complete.
 *	In sniffer mode, when split is used, set in last CD completion. (RX)
 * @IWL_CD_STTS_OVERFLOW: In sniffer mode, when using split - used for
 *	all CD completion. (RX)
 * @IWL_CD_STTS_ABORTED: CR abort / close flow. (RX)
 * @IWL_CD_STTS_ERROR: general error (RX)
 */
enum iwl_completion_desc_transfer_status {
	IWL_CD_STTS_UNUSED,
	IWL_CD_STTS_UNUSED_2,
	IWL_CD_STTS_END_TRANSFER,
	IWL_CD_STTS_OVERFLOW,
	IWL_CD_STTS_ABORTED,
	IWL_CD_STTS_ERROR,
};

/**
 * enum iwl_completion_desc_wifi_status - wifi status (bits 4-7)
 * @IWL_CD_STTS_VALID: the packet is valid (RX)
 * @IWL_CD_STTS_FCS_ERR: frame check sequence error (RX)
 * @IWL_CD_STTS_SEC_KEY_ERR: error handling the security key of rx (RX)
 * @IWL_CD_STTS_DECRYPTION_ERR: error decrypting the frame (RX)
 * @IWL_CD_STTS_DUP: duplicate packet (RX)
 * @IWL_CD_STTS_ICV_MIC_ERR: MIC error (RX)
 * @IWL_CD_STTS_INTERNAL_SNAP_ERR: problems removing the snap (RX)
 * @IWL_CD_STTS_SEC_PORT_FAIL: security port fail (RX)
 * @IWL_CD_STTS_BA_OLD_SN: block ack received old SN (RX)
 * @IWL_CD_STTS_QOS_NULL: QoS null packet (RX)
 * @IWL_CD_STTS_MAC_HDR_ERR: MAC header conversion error (RX)
 * @IWL_CD_STTS_MAX_RETRANS: reached max number of retransmissions (TX)
 * @IWL_CD_STTS_EX_LIFETIME: exceeded lifetime (TX)
 * @IWL_CD_STTS_NOT_USED: completed but not used (RX)
 * @IWL_CD_STTS_REPLAY_ERR: pn check failed, replay error (RX)
 */
enum iwl_completion_desc_wifi_status {
	IWL_CD_STTS_VALID,
	IWL_CD_STTS_FCS_ERR,
	IWL_CD_STTS_SEC_KEY_ERR,
	IWL_CD_STTS_DECRYPTION_ERR,
	IWL_CD_STTS_DUP,
	IWL_CD_STTS_ICV_MIC_ERR,
	IWL_CD_STTS_INTERNAL_SNAP_ERR,
	IWL_CD_STTS_SEC_PORT_FAIL,
	IWL_CD_STTS_BA_OLD_SN,
	IWL_CD_STTS_QOS_NULL,
	IWL_CD_STTS_MAC_HDR_ERR,
	IWL_CD_STTS_MAX_RETRANS,
	IWL_CD_STTS_EX_LIFETIME,
	IWL_CD_STTS_NOT_USED,
	IWL_CD_STTS_REPLAY_ERR,
};

struct iwl_frame_release {
	u8 baid;
	u8 reserved;
+50 −4
Original line number Diff line number Diff line
@@ -788,7 +788,53 @@ struct iwl_umac_scan_complete {
	__le32 reserved;
} __packed; /* SCAN_COMPLETE_NTF_UMAC_API_S_VER_1 */

#define SCAN_OFFLOAD_MATCHING_CHANNELS_LEN 5
#define SCAN_OFFLOAD_MATCHING_CHANNELS_LEN_V1 5
#define SCAN_OFFLOAD_MATCHING_CHANNELS_LEN    7

/**
 * struct iwl_scan_offload_profile_match_v1 - match information
 * @bssid: matched bssid
 * @reserved: reserved
 * @channel: channel where the match occurred
 * @energy: energy
 * @matching_feature: feature matches
 * @matching_channels: bitmap of channels that matched, referencing
 *	the channels passed in the scan offload request.
 */
struct iwl_scan_offload_profile_match_v1 {
	u8 bssid[ETH_ALEN];
	__le16 reserved;
	u8 channel;
	u8 energy;
	u8 matching_feature;
	u8 matching_channels[SCAN_OFFLOAD_MATCHING_CHANNELS_LEN_V1];
} __packed; /* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_1 */

/**
 * struct iwl_scan_offload_profiles_query_v1 - match results query response
 * @matched_profiles: bitmap of matched profiles, referencing the
 *	matches passed in the scan offload request
 * @last_scan_age: age of the last offloaded scan
 * @n_scans_done: number of offloaded scans done
 * @gp2_d0u: GP2 when D0U occurred
 * @gp2_invoked: GP2 when scan offload was invoked
 * @resume_while_scanning: not used
 * @self_recovery: obsolete
 * @reserved: reserved
 * @matches: array of match information, one for each match
 */
struct iwl_scan_offload_profiles_query_v1 {
	__le32 matched_profiles;
	__le32 last_scan_age;
	__le32 n_scans_done;
	__le32 gp2_d0u;
	__le32 gp2_invoked;
	u8 resume_while_scanning;
	u8 self_recovery;
	__le16 reserved;
	struct iwl_scan_offload_profile_match_v1 matches[IWL_SCAN_MAX_PROFILES];
} __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_2 */

/**
 * struct iwl_scan_offload_profile_match - match information
 * @bssid: matched bssid
@@ -797,7 +843,7 @@ struct iwl_umac_scan_complete {
 * @energy: energy
 * @matching_feature: feature matches
 * @matching_channels: bitmap of channels that matched, referencing
 *	the channels passed in tue scan offload request
 *	the channels passed in the scan offload request.
 */
struct iwl_scan_offload_profile_match {
	u8 bssid[ETH_ALEN];
@@ -806,7 +852,7 @@ struct iwl_scan_offload_profile_match {
	u8 energy;
	u8 matching_feature;
	u8 matching_channels[SCAN_OFFLOAD_MATCHING_CHANNELS_LEN];
} __packed; /* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_1 */
} __packed; /* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_2 */

/**
 * struct iwl_scan_offload_profiles_query - match results query response
@@ -831,7 +877,7 @@ struct iwl_scan_offload_profiles_query {
	u8 self_recovery;
	__le16 reserved;
	struct iwl_scan_offload_profile_match matches[IWL_SCAN_MAX_PROFILES];
} __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_2 */
} __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_3 */

/**
 * struct iwl_umac_scan_iter_complete_notif - notifies end of scanning iteration
Loading