Skip to content

Commit bc11517

Browse files
author
Kalle Valo
committed
Merge tag 'iwlwifi-next-for-kalle-2021-12-21-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
wlwifi patches for v5.17 v2 * Support for Time-Aware-SAR (TAS) as read from the BIOS; * Fix scan timeout issue when 6GHz is enabled; * Work continues for new HW family Bz; * Support for Optimized Connectivity Experience (OCE) scan; * A bunch of FW debugging improvements and fixes; * Fix one 32-bit compilation issue; * Some RX changes for new HW family * Some fixes for 6 GHz scan; * Fix SAR table fixes with newer platforms; * Fix early restart crash; * Small fix in the debugging code; * Add new Killer device IDs; * Datapath updates for Bz family continues; * A couple of important fixes in iwlmei; * Some other small fixes, clean-ups and improvements.
2 parents 8b144de + bcbddc4 commit bc11517

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1086
-485
lines changed

drivers/net/wireless/intel/iwlwifi/cfg/22000.c

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "iwl-prph.h"
1010

1111
/* Highest firmware API version supported */
12-
#define IWL_22000_UCODE_API_MAX 68
12+
#define IWL_22000_UCODE_API_MAX 69
1313

1414
/* Lowest firmware API version supported */
1515
#define IWL_22000_UCODE_API_MIN 39
@@ -56,6 +56,11 @@
5656
#define IWL_BZ_A_FM_A_FW_PRE "iwlwifi-bz-a0-fm-a0-"
5757
#define IWL_GL_A_FM_A_FW_PRE "iwlwifi-gl-a0-fm-a0-"
5858
#define IWL_BZ_Z_GF_A_FW_PRE "iwlwifi-bz-z0-gf-a0-"
59+
#define IWL_BNJ_A_FM_A_FW_PRE "iwlwifi-BzBnj-a0-fm-a0-"
60+
#define IWL_BNJ_A_FM4_A_FW_PRE "iwlwifi-BzBnj-a0-fm4-a0-"
61+
#define IWL_BNJ_A_GF_A_FW_PRE "iwlwifi-BzBnj-a0-gf-a0-"
62+
#define IWL_BNJ_A_GF4_A_FW_PRE "iwlwifi-BzBnj-a0-gf4-a0-"
63+
#define IWL_BNJ_A_HR_B_FW_PRE "iwlwifi-BzBnj-a0-hr-b0-"
5964

6065

6166
#define IWL_QU_B_HR_B_MODULE_FIRMWARE(api) \
@@ -116,6 +121,16 @@
116121
IWL_GL_A_FM_A_FW_PRE __stringify(api) ".ucode"
117122
#define IWL_BZ_Z_GF_A_MODULE_FIRMWARE(api) \
118123
IWL_BZ_Z_GF_A_FW_PRE __stringify(api) ".ucode"
124+
#define IWL_BNJ_A_FM_A_MODULE_FIRMWARE(api) \
125+
IWL_BNJ_A_FM_A_FW_PRE __stringify(api) ".ucode"
126+
#define IWL_BNJ_A_FM4_A_MODULE_FIRMWARE(api) \
127+
IWL_BNJ_A_FM4_A_FW_PRE __stringify(api) ".ucode"
128+
#define IWL_BNJ_A_GF_A_MODULE_FIRMWARE(api) \
129+
IWL_BNJ_A_GF_A_FW_PRE __stringify(api) ".ucode"
130+
#define IWL_BNJ_A_GF4_A_MODULE_FIRMWARE(api) \
131+
IWL_BNJ_A_GF4_A_FW_PRE __stringify(api) ".ucode"
132+
#define IWL_BNJ_A_HR_B_MODULE_FIRMWARE(api) \
133+
IWL_BNJ_A_HR_B_FW_PRE __stringify(api) ".ucode"
119134

120135
static const struct iwl_base_params iwl_22000_base_params = {
121136
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
@@ -237,7 +252,7 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
237252
.dccm2_len = IWL_22000_DCCM2_LEN, \
238253
.smem_offset = IWL_22000_SMEM_OFFSET, \
239254
.smem_len = IWL_22000_SMEM_LEN, \
240-
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
255+
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM, \
241256
.apmg_not_supported = true, \
242257
.trans.mq_rx_supported = true, \
243258
.vht_mu_mimo_supported = true, \
@@ -882,6 +897,40 @@ const struct iwl_cfg iwl_cfg_bz_z0_gf_a0 = {
882897
.num_rbds = IWL_NUM_RBDS_AX210_HE,
883898
};
884899

900+
const struct iwl_cfg iwl_cfg_bnj_a0_fm_a0 = {
901+
.fw_name_pre = IWL_BNJ_A_FM_A_FW_PRE,
902+
.uhb_supported = true,
903+
IWL_DEVICE_BZ,
904+
.num_rbds = IWL_NUM_RBDS_AX210_HE,
905+
};
906+
907+
const struct iwl_cfg iwl_cfg_bnj_a0_fm4_a0 = {
908+
.fw_name_pre = IWL_BNJ_A_FM4_A_FW_PRE,
909+
.uhb_supported = true,
910+
IWL_DEVICE_BZ,
911+
.num_rbds = IWL_NUM_RBDS_AX210_HE,
912+
};
913+
914+
const struct iwl_cfg iwl_cfg_bnj_a0_gf_a0 = {
915+
.fw_name_pre = IWL_BNJ_A_GF_A_FW_PRE,
916+
.uhb_supported = true,
917+
IWL_DEVICE_BZ,
918+
.num_rbds = IWL_NUM_RBDS_AX210_HE,
919+
};
920+
921+
const struct iwl_cfg iwl_cfg_bnj_a0_gf4_a0 = {
922+
.fw_name_pre = IWL_BNJ_A_GF4_A_FW_PRE,
923+
.uhb_supported = true,
924+
IWL_DEVICE_BZ,
925+
.num_rbds = IWL_NUM_RBDS_AX210_HE,
926+
};
927+
928+
const struct iwl_cfg iwl_cfg_bnj_a0_hr_b0 = {
929+
.fw_name_pre = IWL_BNJ_A_HR_B_FW_PRE,
930+
.uhb_supported = true,
931+
IWL_DEVICE_BZ,
932+
.num_rbds = IWL_NUM_RBDS_AX210_HE,
933+
};
885934
MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
886935
MODULE_FIRMWARE(IWL_QNJ_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
887936
MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
@@ -910,3 +959,8 @@ MODULE_FIRMWARE(IWL_BZ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
910959
MODULE_FIRMWARE(IWL_BZ_A_MR_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
911960
MODULE_FIRMWARE(IWL_BZ_A_FM_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
912961
MODULE_FIRMWARE(IWL_GL_A_FM_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
962+
MODULE_FIRMWARE(IWL_BNJ_A_FM_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
963+
MODULE_FIRMWARE(IWL_BNJ_A_FM4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
964+
MODULE_FIRMWARE(IWL_BNJ_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
965+
MODULE_FIRMWARE(IWL_BNJ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
966+
MODULE_FIRMWARE(IWL_BNJ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));

drivers/net/wireless/intel/iwlwifi/fw/acpi.c

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -242,17 +242,16 @@ union acpi_object *iwl_acpi_get_wifi_pkg_range(struct device *dev,
242242
IWL_EXPORT_SYMBOL(iwl_acpi_get_wifi_pkg_range);
243243

244244
int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
245-
__le32 *block_list_array,
246-
int *block_list_size)
245+
struct iwl_tas_config_cmd_v3 *cmd)
247246
{
248247
union acpi_object *wifi_pkg, *data;
249-
int ret, tbl_rev, i;
250-
bool enabled;
248+
int ret, tbl_rev, i, block_list_size, enabled;
251249

252250
data = iwl_acpi_get_object(fwrt->dev, ACPI_WTAS_METHOD);
253251
if (IS_ERR(data))
254252
return PTR_ERR(data);
255253

254+
/* try to read wtas table revision 1 or revision 0*/
256255
wifi_pkg = iwl_acpi_get_wifi_pkg(fwrt->dev, data,
257256
ACPI_WTAS_WIFI_DATA_SIZE,
258257
&tbl_rev);
@@ -261,40 +260,54 @@ int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
261260
goto out_free;
262261
}
263262

264-
if (wifi_pkg->package.elements[0].type != ACPI_TYPE_INTEGER ||
265-
tbl_rev != 0) {
263+
if (tbl_rev == 1 && wifi_pkg->package.elements[1].type ==
264+
ACPI_TYPE_INTEGER) {
265+
u32 tas_selection =
266+
(u32)wifi_pkg->package.elements[1].integer.value;
267+
u16 override_iec =
268+
(tas_selection & ACPI_WTAS_OVERRIDE_IEC_MSK) >> ACPI_WTAS_OVERRIDE_IEC_POS;
269+
u16 enabled_iec = (tas_selection & ACPI_WTAS_ENABLE_IEC_MSK) >>
270+
ACPI_WTAS_ENABLE_IEC_POS;
271+
272+
enabled = tas_selection & ACPI_WTAS_ENABLED_MSK;
273+
cmd->override_tas_iec = cpu_to_le16(override_iec);
274+
cmd->enable_tas_iec = cpu_to_le16(enabled_iec);
275+
276+
} else if (tbl_rev == 0 &&
277+
wifi_pkg->package.elements[1].type == ACPI_TYPE_INTEGER) {
278+
enabled = !!wifi_pkg->package.elements[1].integer.value;
279+
} else {
266280
ret = -EINVAL;
267281
goto out_free;
268282
}
269283

270-
enabled = !!wifi_pkg->package.elements[1].integer.value;
271-
272284
if (!enabled) {
273-
*block_list_size = -1;
274285
IWL_DEBUG_RADIO(fwrt, "TAS not enabled\n");
275286
ret = 0;
276287
goto out_free;
277288
}
278289

290+
IWL_DEBUG_RADIO(fwrt, "Reading TAS table revision %d\n", tbl_rev);
279291
if (wifi_pkg->package.elements[2].type != ACPI_TYPE_INTEGER ||
280292
wifi_pkg->package.elements[2].integer.value >
281293
APCI_WTAS_BLACK_LIST_MAX) {
282294
IWL_DEBUG_RADIO(fwrt, "TAS invalid array size %llu\n",
283-
wifi_pkg->package.elements[1].integer.value);
295+
wifi_pkg->package.elements[2].integer.value);
284296
ret = -EINVAL;
285297
goto out_free;
286298
}
287-
*block_list_size = wifi_pkg->package.elements[2].integer.value;
299+
block_list_size = wifi_pkg->package.elements[2].integer.value;
300+
cmd->block_list_size = cpu_to_le32(block_list_size);
288301

289-
IWL_DEBUG_RADIO(fwrt, "TAS array size %d\n", *block_list_size);
290-
if (*block_list_size > APCI_WTAS_BLACK_LIST_MAX) {
302+
IWL_DEBUG_RADIO(fwrt, "TAS array size %u\n", block_list_size);
303+
if (block_list_size > APCI_WTAS_BLACK_LIST_MAX) {
291304
IWL_DEBUG_RADIO(fwrt, "TAS invalid array size value %u\n",
292-
*block_list_size);
305+
block_list_size);
293306
ret = -EINVAL;
294307
goto out_free;
295308
}
296309

297-
for (i = 0; i < *block_list_size; i++) {
310+
for (i = 0; i < block_list_size; i++) {
298311
u32 country;
299312

300313
if (wifi_pkg->package.elements[3 + i].type !=
@@ -306,11 +319,11 @@ int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
306319
}
307320

308321
country = wifi_pkg->package.elements[3 + i].integer.value;
309-
block_list_array[i] = cpu_to_le32(country);
322+
cmd->block_list_array[i] = cpu_to_le32(country);
310323
IWL_DEBUG_RADIO(fwrt, "TAS block list country %d\n", country);
311324
}
312325

313-
ret = 0;
326+
ret = 1;
314327
out_free:
315328
kfree(data);
316329
return ret;

drivers/net/wireless/intel/iwlwifi/fw/acpi.h

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,19 @@
6565
#define ACPI_ECKV_WIFI_DATA_SIZE 2
6666

6767
/*
68-
* 1 type, 1 enabled, 1 block list size, 16 block list array
68+
* TAS size: 1 elelment for type,
69+
* 1 element for enabled field,
70+
* 1 element for block list size,
71+
* 16 elements for block list array
6972
*/
7073
#define APCI_WTAS_BLACK_LIST_MAX 16
7174
#define ACPI_WTAS_WIFI_DATA_SIZE (3 + APCI_WTAS_BLACK_LIST_MAX)
75+
#define ACPI_WTAS_ENABLED_MSK 0x1
76+
#define ACPI_WTAS_OVERRIDE_IEC_MSK 0x2
77+
#define ACPI_WTAS_ENABLE_IEC_MSK 0x4
78+
#define ACPI_WTAS_OVERRIDE_IEC_POS 0x1
79+
#define ACPI_WTAS_ENABLE_IEC_POS 0x2
80+
7281

7382
#define ACPI_PPAG_WIFI_DATA_SIZE_V1 ((IWL_NUM_CHAIN_LIMITS * \
7483
IWL_NUM_SUB_BANDS_V1) + 2)
@@ -105,6 +114,11 @@ struct iwl_geo_profile {
105114
struct iwl_geo_profile_band bands[ACPI_GEO_NUM_BANDS_REV2];
106115
};
107116

117+
/* Same thing as with SAR, all revisions fit in revision 2 */
118+
struct iwl_ppag_chain {
119+
s8 subbands[ACPI_SAR_NUM_SUB_BANDS_REV2];
120+
};
121+
108122
enum iwl_dsm_funcs_rev_0 {
109123
DSM_FUNC_QUERY = 0,
110124
DSM_FUNC_DISABLE_SRD = 1,
@@ -198,8 +212,8 @@ int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
198212
struct iwl_per_chain_offset *table,
199213
u32 n_bands, u32 n_profiles);
200214

201-
int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt, __le32 *block_list_array,
202-
int *block_list_size);
215+
int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
216+
struct iwl_tas_config_cmd_v3 *cmd);
203217

204218
__le32 iwl_acpi_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt);
205219

@@ -280,8 +294,7 @@ static inline bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt)
280294
}
281295

282296
static inline int iwl_acpi_get_tas(struct iwl_fw_runtime *fwrt,
283-
__le32 *block_list_array,
284-
int *block_list_size)
297+
struct iwl_tas_config_cmd_v3 *cmd)
285298
{
286299
return -ENOENT;
287300
}

drivers/net/wireless/intel/iwlwifi/fw/api/alive.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,6 @@ enum iwl_card_state_flags {
157157
CARD_IS_RX_ON = 0x10,
158158
};
159159

160-
/**
161-
* struct iwl_radio_version_notif - information on the card state
162-
* ( CARD_STATE_NOTIFICATION = 0xa1 )
163-
* @flags: &enum iwl_card_state_flags
164-
*/
165-
struct iwl_card_state_notif {
166-
__le32 flags;
167-
} __packed; /* CARD_STATE_NTFY_API_S_VER_1 */
168-
169160
/**
170161
* enum iwl_error_recovery_flags - flags for error recovery cmd
171162
* @ERROR_RECOVERY_UPDATE_DB: update db from blob sent

drivers/net/wireless/intel/iwlwifi/fw/api/commands.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ enum iwl_legacy_cmds {
9191

9292
/**
9393
* @SCAN_CFG_CMD:
94-
* uses &struct iwl_scan_config_v1 or &struct iwl_scan_config
94+
* uses &struct iwl_scan_config_v1, &struct iwl_scan_config_v2
95+
* or &struct iwl_scan_config
9596
*/
9697
SCAN_CFG_CMD = 0xc,
9798

@@ -384,13 +385,6 @@ enum iwl_legacy_cmds {
384385
*/
385386
REDUCE_TX_POWER_CMD = 0x9f,
386387

387-
/**
388-
* @CARD_STATE_NOTIFICATION:
389-
* Card state (RF/CT kill) notification,
390-
* uses &struct iwl_card_state_notif
391-
*/
392-
CARD_STATE_NOTIFICATION = 0xa1,
393-
394388
/**
395389
* @MISSED_BEACONS_NOTIFICATION: &struct iwl_missed_beacons_notif
396390
*/

drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ struct iwl_fw_ini_region_internal_buffer {
124124
* @id: region id. Max id is &IWL_FW_INI_MAX_REGION_ID
125125
* @type: region type. One of &enum iwl_fw_ini_region_type
126126
* @sub_type: region sub type
127-
* @sub_type_ver: region sub type
127+
* @sub_type_ver: region sub type version
128128
* @reserved: not in use
129129
* @name: region name
130130
* @dev_addr: device address configuration. Used by
@@ -386,7 +386,16 @@ enum iwl_fw_ini_region_type {
386386
IWL_FW_INI_REGION_NUM
387387
}; /* FW_TLV_DEBUG_REGION_TYPE_API_E */
388388

389-
#define IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_HW_SMEM 1
389+
enum iwl_fw_ini_region_device_memory_subtype {
390+
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_HW_SMEM = 1,
391+
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_UMAC_ERROR_TABLE = 5,
392+
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_1_ERROR_TABLE = 7,
393+
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_2_ERROR_TABLE = 10,
394+
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_1_ERROR_TABLE = 14,
395+
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_2_ERROR_TABLE = 16,
396+
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_1_ERROR_TABLE = 18,
397+
IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_2_ERROR_TABLE = 20,
398+
}; /* FW_TLV_DEBUG_REGION_DEVICE_MEMORY_SUBTYPE_API_E */
390399

391400
/**
392401
* enum iwl_fw_ini_time_point
@@ -474,4 +483,17 @@ enum iwl_fw_ini_trigger_apply_policy {
474483
IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG = BIT(9),
475484
IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA = BIT(10),
476485
};
486+
487+
/**
488+
* enum iwl_fw_ini_trigger_reset_fw_policy - Determines how to handle reset
489+
*
490+
* @IWL_FW_INI_RESET_FW_MODE_NOTHING: do not stop FW and reload (default)
491+
* @IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY: stop FW without reload FW
492+
* @IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW: stop FW with reload FW
493+
*/
494+
enum iwl_fw_ini_trigger_reset_fw_policy {
495+
IWL_FW_INI_RESET_FW_MODE_NOTHING = 0,
496+
IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY,
497+
IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW
498+
};
477499
#endif

drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,17 +393,32 @@ enum iwl_mcc_source {
393393
MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11,
394394
};
395395

396-
#define IWL_TAS_BLACK_LIST_MAX 16
396+
#define IWL_TAS_BLOCK_LIST_MAX 16
397397
/**
398-
* struct iwl_tas_config_cmd - configures the TAS
398+
* struct iwl_tas_config_cmd_v2 - configures the TAS
399399
* @block_list_size: size of relevant field in block_list_array
400-
* @block_list_array: block list countries (without TAS)
400+
* @block_list_array: list of countries where TAS must be disabled
401401
*/
402-
struct iwl_tas_config_cmd {
402+
struct iwl_tas_config_cmd_v2 {
403403
__le32 block_list_size;
404-
__le32 block_list_array[IWL_TAS_BLACK_LIST_MAX];
404+
__le32 block_list_array[IWL_TAS_BLOCK_LIST_MAX];
405405
} __packed; /* TAS_CONFIG_CMD_API_S_VER_2 */
406406

407+
/**
408+
* struct iwl_tas_config_cmd_v3 - configures the TAS
409+
* @block_list_size: size of relevant field in block_list_array
410+
* @block_list_array: list of countries where TAS must be disabled
411+
* @override_tas_iec: indicates whether to override default value of IEC regulatory
412+
* @enable_tas_iec: in case override_tas_iec is set -
413+
* indicates whether IEC regulatory is enabled or disabled
414+
*/
415+
struct iwl_tas_config_cmd_v3 {
416+
__le32 block_list_size;
417+
__le32 block_list_array[IWL_TAS_BLOCK_LIST_MAX];
418+
__le16 override_tas_iec;
419+
__le16 enable_tas_iec;
420+
} __packed; /* TAS_CONFIG_CMD_API_S_VER_3 */
421+
407422
/**
408423
* enum iwl_lari_configs - bit masks for the various LARI config operations
409424
* @LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK: disable 11ac in ukraine

0 commit comments

Comments
 (0)