Skip to content

Commit 855f69f

Browse files
author
Kalle Valo
committed
Merge tag 'iwlwifi-next-for-kalle-2020-09-30-2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
iwlwifi patches intended for v5.10 * Protected TWT implementation; * Support disabling 5.8GHz channels via ACPI; * Support VHT extended NSS capability; * A few fixes in the datapath; * Enable TWT by default; * Support new PPAG FW command version * Move some trans code around for better abstraction; * Some clean-ups in the ACPI code; * A fix for AP mode; * Updates in the ACPI code to support new tables and FW versions; * FTM updates; * A bit of reorganiztion in the queue code; * A few debugging infra improvements; * Add support for new GTK rekeying; * A fix in the scanning code; * Support for some new cards; * Some updates for new or changed FW APIs; * Some new FW API command version implementations; * Some other small fixes and clean-ups; # gpg: Signature made Thu 01 Oct 2020 10:04:00 PM EEST using RSA key ID 1A3CC5FA # gpg: Good signature from "Luciano Roth Coelho (Luca) <[email protected]>" # gpg: aka "Luciano Roth Coelho (Intel) <[email protected]>"
2 parents 44492e7 + 870f39b commit 855f69f

Some content is hidden

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

59 files changed

+4358
-2494
lines changed

drivers/net/wireless/intel/iwlwifi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ iwlwifi-$(CONFIG_IWLDVM) += cfg/1000.o cfg/2000.o cfg/5000.o cfg/6000.o
1313
iwlwifi-$(CONFIG_IWLMVM) += cfg/7000.o cfg/8000.o cfg/9000.o cfg/22000.o
1414
iwlwifi-objs += iwl-dbg-tlv.o
1515
iwlwifi-objs += iwl-trans.o
16+
iwlwifi-objs += queue/tx.o
1617

1718
iwlwifi-objs += fw/img.o fw/notif-wait.o
1819
iwlwifi-objs += fw/dbg.o

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

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#include "iwl-prph.h"
5858

5959
/* Highest firmware API version supported */
60-
#define IWL_22000_UCODE_API_MAX 56
60+
#define IWL_22000_UCODE_API_MAX 57
6161

6262
/* Lowest firmware API version supported */
6363
#define IWL_22000_UCODE_API_MIN 39
@@ -89,6 +89,9 @@
8989
#define IWL_SO_A_GF4_A_FW_PRE "iwlwifi-so-a0-gf4-a0-"
9090
#define IWL_SNJ_A_GF4_A_FW_PRE "iwlwifi-SoSnj-a0-gf4-a0-"
9191
#define IWL_SNJ_A_GF_A_FW_PRE "iwlwifi-SoSnj-a0-gf-a0-"
92+
#define IWL_SNJ_A_HR_B_FW_PRE "iwlwifi-SoSnj-a0-hr-b0-"
93+
#define IWL_MA_A_GF_A_FW_PRE "iwlwifi-ma-a0-gf-a0-"
94+
#define IWL_MA_A_MR_A_FW_PRE "iwlwifi-ma-a0-mr-a0-"
9295

9396
#define IWL_QU_B_HR_B_MODULE_FIRMWARE(api) \
9497
IWL_QU_B_HR_B_FW_PRE __stringify(api) ".ucode"
@@ -118,6 +121,12 @@
118121
IWL_SNJ_A_GF4_A_FW_PRE __stringify(api) ".ucode"
119122
#define IWL_SNJ_A_GF_A_MODULE_FIRMWARE(api) \
120123
IWL_SNJ_A_GF_A_FW_PRE __stringify(api) ".ucode"
124+
#define IWL_SNJ_A_HR_B_MODULE_FIRMWARE(api) \
125+
IWL_SNJ_A_HR_B_FW_PRE __stringify(api) ".ucode"
126+
#define IWL_MA_A_GF_A_FW_MODULE_FIRMWARE(api) \
127+
IWL_MA_A_GF_A_FW_PRE __stringify(api) ".ucode"
128+
#define IWL_MA_A_MR_A_FW_MODULE_FIRMWARE(api) \
129+
IWL_MA_A_MR_A_FW_PRE __stringify(api) ".ucode"
121130

122131
static const struct iwl_base_params iwl_22000_base_params = {
123132
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
@@ -335,14 +344,32 @@ const struct iwl_cfg_trans_params iwl_ax200_trans_cfg = {
335344
.bisr_workaround = 1,
336345
};
337346

347+
const struct iwl_cfg_trans_params iwl_ma_trans_cfg = {
348+
.device_family = IWL_DEVICE_FAMILY_AX210,
349+
.base_params = &iwl_ax210_base_params,
350+
.mq_rx_supported = true,
351+
.use_tfh = true,
352+
.rf_id = true,
353+
.gen2 = true,
354+
.integrated = true,
355+
.umac_prph_offset = 0x300000
356+
};
357+
358+
const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101";
338359
const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz";
339360
const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz";
340-
const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101";
361+
const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6 AX211 160MHz";
362+
const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6 AX411 160MHz";
363+
const char iwl_ma_name[] = "Intel(R) Wi-Fi 6";
341364

342365
const char iwl_ax200_killer_1650w_name[] =
343366
"Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)";
344367
const char iwl_ax200_killer_1650x_name[] =
345368
"Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW)";
369+
const char iwl_ax201_killer_1650s_name[] =
370+
"Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)";
371+
const char iwl_ax201_killer_1650i_name[] =
372+
"Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)";
346373

347374
const struct iwl_cfg iwl_qu_b0_hr1_b0 = {
348375
.fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
@@ -539,15 +566,15 @@ const struct iwl_cfg iwlax210_2ax_cfg_so_hr_a0 = {
539566
};
540567

541568
const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0 = {
542-
.name = "Intel(R) Wi-Fi 6 AX211 160MHz",
569+
.name = iwl_ax211_name,
543570
.fw_name_pre = IWL_SO_A_GF_A_FW_PRE,
544571
.uhb_supported = true,
545572
IWL_DEVICE_AX210,
546573
.num_rbds = IWL_NUM_RBDS_AX210_HE,
547574
};
548575

549576
const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long = {
550-
.name = "Intel(R) Wi-Fi 6 AX211 160MHz",
577+
.name = iwl_ax211_name,
551578
.fw_name_pre = IWL_SO_A_GF_A_FW_PRE,
552579
.uhb_supported = true,
553580
IWL_DEVICE_AX210,
@@ -565,15 +592,15 @@ const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = {
565592
};
566593

567594
const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = {
568-
.name = "Intel(R) Wi-Fi 6 AX411 160MHz",
595+
.name = iwl_ax411_name,
569596
.fw_name_pre = IWL_SO_A_GF4_A_FW_PRE,
570597
.uhb_supported = true,
571598
IWL_DEVICE_AX210,
572599
.num_rbds = IWL_NUM_RBDS_AX210_HE,
573600
};
574601

575602
const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long = {
576-
.name = "Intel(R) Wi-Fi 6 AX411 160MHz",
603+
.name = iwl_ax411_name,
577604
.fw_name_pre = IWL_SO_A_GF4_A_FW_PRE,
578605
.uhb_supported = true,
579606
IWL_DEVICE_AX210,
@@ -583,21 +610,43 @@ const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long = {
583610
};
584611

585612
const struct iwl_cfg iwlax411_2ax_cfg_sosnj_gf4_a0 = {
586-
.name = "Intel(R) Wi-Fi 6 AX411 160MHz",
613+
.name = iwl_ax411_name,
587614
.fw_name_pre = IWL_SNJ_A_GF4_A_FW_PRE,
588615
.uhb_supported = true,
589616
IWL_DEVICE_AX210,
590617
.num_rbds = IWL_NUM_RBDS_AX210_HE,
591618
};
592619

593620
const struct iwl_cfg iwlax211_cfg_snj_gf_a0 = {
594-
.name = "Intel(R) Wi-Fi 6 AX211 160MHz",
621+
.name = iwl_ax211_name,
595622
.fw_name_pre = IWL_SNJ_A_GF_A_FW_PRE,
596623
.uhb_supported = true,
597624
IWL_DEVICE_AX210,
598625
.num_rbds = IWL_NUM_RBDS_AX210_HE,
599626
};
600627

628+
const struct iwl_cfg iwlax201_cfg_snj_hr_b0 = {
629+
.name = iwl_ax201_name,
630+
.fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
631+
.uhb_supported = true,
632+
IWL_DEVICE_AX210,
633+
.num_rbds = IWL_NUM_RBDS_AX210_HE,
634+
};
635+
636+
const struct iwl_cfg iwl_cfg_ma_a0_gf_a0 = {
637+
.fw_name_pre = IWL_MA_A_GF_A_FW_PRE,
638+
.uhb_supported = true,
639+
IWL_DEVICE_AX210,
640+
.num_rbds = IWL_NUM_RBDS_AX210_HE,
641+
};
642+
643+
const struct iwl_cfg iwl_cfg_ma_a0_mr_a0 = {
644+
.fw_name_pre = IWL_MA_A_MR_A_FW_PRE,
645+
.uhb_supported = true,
646+
IWL_DEVICE_AX210,
647+
.num_rbds = IWL_NUM_RBDS_AX210_HE,
648+
};
649+
601650
MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
602651
MODULE_FIRMWARE(IWL_QNJ_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
603652
MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
@@ -612,3 +661,6 @@ MODULE_FIRMWARE(IWL_SO_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
612661
MODULE_FIRMWARE(IWL_TY_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
613662
MODULE_FIRMWARE(IWL_SNJ_A_GF4_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
614663
MODULE_FIRMWARE(IWL_SNJ_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
664+
MODULE_FIRMWARE(IWL_SNJ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
665+
MODULE_FIRMWARE(IWL_MA_A_GF_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
666+
MODULE_FIRMWARE(IWL_MA_A_MR_A_FW_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));

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

Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ IWL_EXPORT_SYMBOL(iwl_acpi_get_object);
118118
* method (DSM) interface. The returned acpi object must be freed by calling
119119
* function.
120120
*/
121-
void *iwl_acpi_get_dsm_object(struct device *dev, int rev, int func,
122-
union acpi_object *args)
121+
static void *iwl_acpi_get_dsm_object(struct device *dev, int rev, int func,
122+
union acpi_object *args)
123123
{
124124
union acpi_object *obj;
125125

@@ -400,9 +400,9 @@ int iwl_acpi_get_eckv(struct device *dev, u32 *extl_clk)
400400
}
401401
IWL_EXPORT_SYMBOL(iwl_acpi_get_eckv);
402402

403-
int iwl_sar_set_profile(union acpi_object *table,
404-
struct iwl_sar_profile *profile,
405-
bool enabled)
403+
static int iwl_sar_set_profile(union acpi_object *table,
404+
struct iwl_sar_profile *profile,
405+
bool enabled)
406406
{
407407
int i;
408408

@@ -418,18 +418,13 @@ int iwl_sar_set_profile(union acpi_object *table,
418418

419419
return 0;
420420
}
421-
IWL_EXPORT_SYMBOL(iwl_sar_set_profile);
422421

423-
int iwl_sar_select_profile(struct iwl_fw_runtime *fwrt,
424-
__le16 per_chain_restriction[][IWL_NUM_SUB_BANDS],
425-
int prof_a, int prof_b)
422+
static int iwl_sar_fill_table(struct iwl_fw_runtime *fwrt,
423+
__le16 *per_chain, u32 n_subbands,
424+
int prof_a, int prof_b)
426425
{
427-
int i, j, idx;
428426
int profs[ACPI_SAR_NUM_CHAIN_LIMITS] = { prof_a, prof_b };
429-
430-
BUILD_BUG_ON(ACPI_SAR_NUM_CHAIN_LIMITS < 2);
431-
BUILD_BUG_ON(ACPI_SAR_NUM_CHAIN_LIMITS * ACPI_SAR_NUM_SUB_BANDS !=
432-
ACPI_SAR_TABLE_SIZE);
427+
int i, j, idx;
433428

434429
for (i = 0; i < ACPI_SAR_NUM_CHAIN_LIMITS; i++) {
435430
struct iwl_sar_profile *prof;
@@ -461,9 +456,9 @@ int iwl_sar_select_profile(struct iwl_fw_runtime *fwrt,
461456
"SAR EWRD: chain %d profile index %d\n",
462457
i, profs[i]);
463458
IWL_DEBUG_RADIO(fwrt, " Chain[%d]:\n", i);
464-
for (j = 0; j < ACPI_SAR_NUM_SUB_BANDS; j++) {
465-
idx = (i * ACPI_SAR_NUM_SUB_BANDS) + j;
466-
per_chain_restriction[i][j] =
459+
for (j = 0; j < n_subbands; j++) {
460+
idx = i * ACPI_SAR_NUM_SUB_BANDS + j;
461+
per_chain[i * n_subbands + j] =
467462
cpu_to_le16(prof->table[idx]);
468463
IWL_DEBUG_RADIO(fwrt, " Band[%d] = %d * .125dBm\n",
469464
j, prof->table[idx]);
@@ -472,6 +467,23 @@ int iwl_sar_select_profile(struct iwl_fw_runtime *fwrt,
472467

473468
return 0;
474469
}
470+
471+
int iwl_sar_select_profile(struct iwl_fw_runtime *fwrt,
472+
__le16 *per_chain, u32 n_tables, u32 n_subbands,
473+
int prof_a, int prof_b)
474+
{
475+
int i, ret = 0;
476+
477+
for (i = 0; i < n_tables; i++) {
478+
ret = iwl_sar_fill_table(fwrt,
479+
&per_chain[i * n_subbands * ACPI_SAR_NUM_CHAIN_LIMITS],
480+
n_subbands, prof_a, prof_b);
481+
if (ret)
482+
break;
483+
}
484+
485+
return ret;
486+
}
475487
IWL_EXPORT_SYMBOL(iwl_sar_select_profile);
476488

477489
int iwl_sar_get_wrds_table(struct iwl_fw_runtime *fwrt)
@@ -632,25 +644,8 @@ bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt)
632644
}
633645
IWL_EXPORT_SYMBOL(iwl_sar_geo_support);
634646

635-
int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt,
636-
struct iwl_host_cmd *cmd)
637-
{
638-
struct iwl_geo_tx_power_profiles_resp *resp;
639-
int ret;
640-
641-
resp = (void *)cmd->resp_pkt->data;
642-
ret = le32_to_cpu(resp->profile_idx);
643-
if (WARN_ON(ret > ACPI_NUM_GEO_PROFILES)) {
644-
ret = -EIO;
645-
IWL_WARN(fwrt, "Invalid geographic profile idx (%d)\n", ret);
646-
}
647-
648-
return ret;
649-
}
650-
IWL_EXPORT_SYMBOL(iwl_validate_sar_geo_profile);
651-
652647
int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
653-
struct iwl_per_chain_offset_group *table)
648+
struct iwl_per_chain_offset *table, u32 n_bands)
654649
{
655650
int ret, i, j;
656651

@@ -666,16 +661,11 @@ int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt,
666661
return -ENOENT;
667662
}
668663

669-
BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS *
670-
ACPI_WGDS_TABLE_SIZE + 1 != ACPI_WGDS_WIFI_DATA_SIZE);
671-
672-
BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES > IWL_NUM_GEO_PROFILES);
673-
674664
for (i = 0; i < ACPI_NUM_GEO_PROFILES; i++) {
675665
struct iwl_per_chain_offset *chain =
676666
(struct iwl_per_chain_offset *)&table[i];
677667

678-
for (j = 0; j < ACPI_WGDS_NUM_BANDS; j++) {
668+
for (j = 0; j < n_bands; j++) {
679669
u8 *value;
680670

681671
value = &fwrt->geo_profiles[i].values[j *

0 commit comments

Comments
 (0)