Commit e7e40cc6 authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'iwlwifi-next-for-kalle-2022-11-06-v2' of...

Merge tag 'iwlwifi-next-for-kalle-2022-11-06-v2' of http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

iwlwifi patches intended for v6.2

* iwlmei fixes
* Debug mechanism update for new devices (BZ)
* Checksum offload fix for the new devices (BZ)
* A few rate scale fixes and cleanups
* A fix for iwlwifi debug mechanism
* Start of MLO preparations - supporting new key API
parents a1d0b953 b0b9b805
Loading
Loading
Loading
Loading
+32 −4
Original line number Diff line number Diff line
@@ -172,6 +172,13 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
		      BIT(NL80211_BAND_6GHZ),
};

static const struct iwl_ht_params iwl_gl_a_ht_params = {
	.stbc = false, /* we explicitly disable STBC for GL step A */
	.ldpc = true,
	.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) |
		      BIT(NL80211_BAND_6GHZ),
};

#define IWL_DEVICE_22000_COMMON						\
	.ucode_api_max = IWL_22000_UCODE_API_MAX,			\
	.ucode_api_min = IWL_22000_UCODE_API_MIN,			\
@@ -249,7 +256,7 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
		},							\
	}

#define IWL_DEVICE_BZ							\
#define IWL_DEVICE_BZ_COMMON						\
	.ucode_api_max = IWL_22000_UCODE_API_MAX,			\
	.ucode_api_min = IWL_22000_UCODE_API_MIN,			\
	.led_mode = IWL_LED_RF_STATE,					\
@@ -261,12 +268,10 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
	.dccm2_len = IWL_22000_DCCM2_LEN,				\
	.smem_offset = IWL_22000_SMEM_OFFSET,				\
	.smem_len = IWL_22000_SMEM_LEN,					\
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,	\
	.apmg_not_supported = true,					\
	.trans.mq_rx_supported = true,					\
	.vht_mu_mimo_supported = true,					\
	.mac_addr_from_csr = 0x30,					\
	.ht_params = &iwl_22000_ht_params,				\
	.nvm_ver = IWL_22000_NVM_VERSION,				\
	.trans.use_tfh = true,						\
	.trans.rf_id = true,						\
@@ -313,6 +318,14 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
		},							\
	}

#define IWL_DEVICE_BZ							\
	IWL_DEVICE_BZ_COMMON,						\
	.ht_params = &iwl_22000_ht_params

#define IWL_DEVICE_GL_A							\
	IWL_DEVICE_BZ_COMMON,						\
	.ht_params = &iwl_gl_a_ht_params

const struct iwl_cfg_trans_params iwl_qnj_trans_cfg = {
	.mq_rx_supported = true,
	.use_tfh = true,
@@ -901,6 +914,7 @@ const struct iwl_cfg iwl_cfg_bz_a0_hr_b0 = {
	.fw_name_pre = IWL_BZ_A_HR_B_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -908,6 +922,7 @@ const struct iwl_cfg iwl_cfg_bz_a0_gf_a0 = {
	.fw_name_pre = IWL_BZ_A_GF_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -915,6 +930,7 @@ const struct iwl_cfg iwl_cfg_bz_a0_gf4_a0 = {
	.fw_name_pre = IWL_BZ_A_GF4_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -922,6 +938,7 @@ const struct iwl_cfg iwl_cfg_bz_a0_mr_a0 = {
	.fw_name_pre = IWL_BZ_A_MR_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -929,6 +946,7 @@ const struct iwl_cfg iwl_cfg_bz_a0_fm_a0 = {
	.fw_name_pre = IWL_BZ_A_FM_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -936,13 +954,15 @@ const struct iwl_cfg iwl_cfg_bz_a0_fm4_a0 = {
	.fw_name_pre = IWL_BZ_A_FM4_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

const struct iwl_cfg iwl_cfg_gl_a0_fm_a0 = {
	.fw_name_pre = IWL_GL_A_FM_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	IWL_DEVICE_GL_A,
	.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -950,6 +970,7 @@ const struct iwl_cfg iwl_cfg_gl_b0_fm_b0 = {
	.fw_name_pre = IWL_GL_B_FM_B_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -957,6 +978,7 @@ const struct iwl_cfg iwl_cfg_bz_z0_gf_a0 = {
	.fw_name_pre = IWL_BZ_Z_GF_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -964,6 +986,7 @@ const struct iwl_cfg iwl_cfg_bnj_a0_fm_a0 = {
	.fw_name_pre = IWL_BNJ_A_FM_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -971,6 +994,7 @@ const struct iwl_cfg iwl_cfg_bnj_a0_fm4_a0 = {
	.fw_name_pre = IWL_BNJ_A_FM4_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -978,6 +1002,7 @@ const struct iwl_cfg iwl_cfg_bnj_a0_gf_a0 = {
	.fw_name_pre = IWL_BNJ_A_GF_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -985,6 +1010,7 @@ const struct iwl_cfg iwl_cfg_bnj_a0_gf4_a0 = {
	.fw_name_pre = IWL_BNJ_A_GF4_A_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -992,6 +1018,7 @@ const struct iwl_cfg iwl_cfg_bnj_a0_hr_b0 = {
	.fw_name_pre = IWL_BNJ_A_HR_B_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};

@@ -999,6 +1026,7 @@ const struct iwl_cfg iwl_cfg_bnj_b0_fm_b0 = {
	.fw_name_pre = IWL_BNJ_B_FM_B_FW_PRE,
	.uhb_supported = true,
	IWL_DEVICE_BZ,
	.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
	.num_rbds = IWL_NUM_RBDS_AX210_HE,
};
MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
+79 −0
Original line number Diff line number Diff line
@@ -71,6 +71,11 @@ enum iwl_data_path_subcmd_ids {
	 */
	SCD_QUEUE_CONFIG_CMD = 0x17,

	/**
	 * @SEC_KEY_CMD: security key command, uses &struct iwl_sec_key_cmd
	 */
	SEC_KEY_CMD = 0x18,

	/**
	 * @MONITOR_NOTIF: Datapath monitoring notification, using
	 *	&struct iwl_datapath_monitor_notif
@@ -403,4 +408,78 @@ struct iwl_scd_queue_cfg_cmd {
	} __packed u; /* TX_QUEUE_CFG_CMD_OPERATION_API_U_VER_1 */
} __packed; /* TX_QUEUE_CFG_CMD_API_S_VER_3 */

/**
 * enum iwl_sec_key_flags - security key command key flags
 * @IWL_SEC_KEY_FLAG_CIPHER_MASK: cipher mask
 * @IWL_SEC_KEY_FLAG_CIPHER_WEP: WEP cipher
 * @IWL_SEC_KEY_FLAG_CIPHER_CCMP: CCMP/CMAC cipher
 * @IWL_SEC_KEY_FLAG_CIPHER_TKIP: TKIP cipher
 * @IWL_SEC_KEY_FLAG_CIPHER_GCMP: GCMP/GMAC cipher
 * @IWL_SEC_KEY_FLAG_NO_TX: don't install for TX
 * @IWL_SEC_KEY_FLAG_KEY_SIZE: large key size (WEP-104, GCMP-256, GMAC-256)
 * @IWL_SEC_KEY_FLAG_MFP: MFP is in used for this key
 * @IWL_SEC_KEY_FLAG_MCAST_KEY: this is a multicast key
 * @IWL_SEC_KEY_FLAG_SPP_AMSDU: SPP A-MSDU should be used
 */
enum iwl_sec_key_flags {
	IWL_SEC_KEY_FLAG_CIPHER_MASK	= 0x07,
	IWL_SEC_KEY_FLAG_CIPHER_WEP	= 0x01,
	IWL_SEC_KEY_FLAG_CIPHER_CCMP	= 0x02,
	IWL_SEC_KEY_FLAG_CIPHER_TKIP	= 0x03,
	IWL_SEC_KEY_FLAG_CIPHER_GCMP	= 0x05,
	IWL_SEC_KEY_FLAG_NO_TX		= 0x08,
	IWL_SEC_KEY_FLAG_KEY_SIZE	= 0x10,
	IWL_SEC_KEY_FLAG_MFP		= 0x20,
	IWL_SEC_KEY_FLAG_MCAST_KEY	= 0x40,
	IWL_SEC_KEY_FLAG_SPP_AMSDU	= 0x80,
};

#define IWL_SEC_WEP_KEY_OFFSET	3

/**
 * struct iwl_sec_key_cmd - security key command
 * @action: action from &enum iwl_ctxt_action
 * @u.add.sta_mask: station mask for the new key
 * @u.add.key_id: key ID (0-7) for the new key
 * @u.add.key_flags: key flags per &enum iwl_sec_key_flags
 * @u.add.key: key material. WEP keys should start from &IWL_SEC_WEP_KEY_OFFSET.
 * @u.add.tkip_mic_rx_key: TKIP MIC RX key
 * @u.add.tkip_mic_tx_key: TKIP MIC TX key
 * @u.add.rx_seq: RX sequence counter value
 * @u.add.tx_seq: TX sequence counter value
 * @u.modify.old_sta_mask: old station mask
 * @u.modify.new_sta_mask: new station mask
 * @u.modify.key_id: key ID
 * @u.modify.key_flags: new key flags
 * @u.remove.sta_mask: station mask
 * @u.remove.key_id: key ID
 * @u.remove.key_flags: key flags
 */
struct iwl_sec_key_cmd {
	__le32 action;
	union {
		struct {
			__le32 sta_mask;
			__le32 key_id;
			__le32 key_flags;
			u8 key[32];
			u8 tkip_mic_rx_key[8];
			u8 tkip_mic_tx_key[8];
			__le64 rx_seq;
			__le64 tx_seq;
		} __packed add; /* SEC_KEY_ADD_CMD_API_S_VER_1 */
		struct {
			__le32 old_sta_mask;
			__le32 new_sta_mask;
			__le32 key_id;
			__le32 key_flags;
		} __packed modify; /* SEC_KEY_MODIFY_CMD_API_S_VER_1 */
		struct {
			__le32 sta_mask;
			__le32 key_id;
			__le32 key_flags;
		} __packed remove; /* SEC_KEY_REMOVE_CMD_API_S_VER_1 */
	} __packed u; /* SEC_KEY_OPERATION_API_U_VER_1 */
} __packed; /* SEC_KEY_CMD_API_S_VER_1 */

#endif /* __iwl_fw_api_datapath_h__ */
+5 −2
Original line number Diff line number Diff line
@@ -590,6 +590,9 @@ static int iwl_dbg_tlv_alloc_fragments(struct iwl_fw_runtime *fwrt,
		if (alloc_id != IWL_FW_INI_ALLOCATION_ID_DBGC1)
			return -EIO;
		num_frags = 1;
	} else if (fwrt->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ &&
			   alloc_id > IWL_FW_INI_ALLOCATION_ID_DBGC3) {
		return -EIO;
	}

	remain_pages = DIV_ROUND_UP(le32_to_cpu(fw_mon_cfg->req_size),
@@ -789,7 +792,7 @@ static void iwl_dbg_tlv_update_drams(struct iwl_fw_runtime *fwrt)
	dram_info->second_word = cpu_to_le32(DRAM_INFO_SECOND_MAGIC_WORD);

	for (i = IWL_FW_INI_ALLOCATION_ID_DBGC1;
	     i <= IWL_FW_INI_ALLOCATION_ID_DBGC3; i++) {
	     i < IWL_FW_INI_ALLOCATION_NUM; i++) {
		ret = iwl_dbg_tlv_update_dram(fwrt, i, dram_info);
		if (!ret)
			dram_alloc = true;
@@ -1324,7 +1327,7 @@ static void iwl_dbg_tlv_init_cfg(struct iwl_fw_runtime *fwrt)
			     "WRT: removing allocation id %d from region id %d\n",
			     le32_to_cpu(reg->dram_alloc_id), i);

		failed_alloc &= ~le32_to_cpu(reg->dram_alloc_id);
		failed_alloc &= ~BIT(le32_to_cpu(reg->dram_alloc_id));
		fwrt->trans->dbg.unsupported_region_msk |= BIT(i);

		kfree(*active_reg);
+4 −0
Original line number Diff line number Diff line
@@ -377,6 +377,7 @@ enum {
#define PREG_PRPH_WPROT_22000		0xA04D00

#define SB_MODIFY_CFG_FLAG		0xA03088
#define SB_CFG_RESIDES_IN_OTP_MASK	0x10
#define SB_CPU_1_STATUS			0xA01E30
#define SB_CPU_2_STATUS			0xA01E34
#define UMAG_SB_CPU_1_STATUS		0xA038C0
@@ -500,4 +501,7 @@ enum {

#define REG_OTP_MINOR 0xA0333C

#define WFPM_LMAC2_PD_NOTIFICATION 0xA033CC
#define WFPM_LMAC2_PD_RE_READ BIT(31)

#endif				/* __iwl_prph_h__ */
+27 −3
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ struct iwl_mei_nvm {
/**
 * enum iwl_mei_pairwise_cipher - cipher for UCAST key
 * @IWL_MEI_CIPHER_NONE: none
 * @IWL_MEI_CIPHER_TKIP: tkip
 * @IWL_MEI_CIPHER_CCMP: ccmp
 * @IWL_MEI_CIPHER_GCMP: gcmp
 * @IWL_MEI_CIPHER_GCMP_256: gcmp 256
@@ -228,6 +229,7 @@ struct iwl_mei_nvm {
 */
enum iwl_mei_pairwise_cipher {
	IWL_MEI_CIPHER_NONE	= 0,
	IWL_MEI_CIPHER_TKIP	= 2,
	IWL_MEI_CIPHER_CCMP	= 4,
	IWL_MEI_CIPHER_GCMP	= 8,
	IWL_MEI_CIPHER_GCMP_256 = 9,
@@ -446,9 +448,25 @@ void iwl_mei_host_associated(const struct iwl_mei_conn_info *conn_info,
void iwl_mei_host_disassociated(void);

/**
 * iwl_mei_device_down() - must be called when the device is down
 * iwl_mei_device_state() - must be called when the device changes up/down state
 * @up: true if the device is up, false otherwise.
 */
void iwl_mei_device_down(void);
void iwl_mei_device_state(bool up);

/**
 * iwl_mei_pldr_req() - must be called before loading the fw
 *
 * Return: 0 if the PLDR flow was successful and the fw can be loaded, negative
 *	value otherwise.
 */
int iwl_mei_pldr_req(void);

/**
 * iwl_mei_alive_notif() - must be called when alive notificaiton is received
 * @success: true if received alive notification, false if waiting for the
 *	notificaiton timed out.
 */
void iwl_mei_alive_notif(bool success);

#else

@@ -497,7 +515,13 @@ static inline void iwl_mei_host_associated(const struct iwl_mei_conn_info *conn_
static inline void iwl_mei_host_disassociated(void)
{}

static inline void iwl_mei_device_down(void)
static inline void iwl_mei_device_state(bool up)
{}

static inline int iwl_mei_pldr_req(void)
{ return 0; }

static inline void iwl_mei_alive_notif(bool success)
{}

#endif /* CONFIG_IWLMEI */
Loading