From: Luca Coelho <redacted>
Hi,
Here's the sixth set of patches intended for v5.15. It's the usual
development, new features, cleanups and bugfixes.
The changes are:
* Support for new FW API version;
* Fixes in SAR ACPI tables handling;
* Some debugging improvements;
* Fix in ROC;
* Some other small fixes, clean-ups and improvements.
As usual, I'm pushing this to a pending branch, for kbuild bot, and
will send a pull-request later.
Please review.
Cheers,
Luca.
Avraham Stern (1):
iwlwifi: mvm: don't schedule the roc_done_wk if it is already running
Johannes Berg (5):
iwlwifi: pcie: avoid dma unmap/remap in crash dump
iwlwifi: fix __percpu annotation
iwlwifi: api: remove datamember from struct
iwlwifi: fw: fix debug dump data declarations
iwlwifi: allow debug init in RF-kill
Luca Coelho (3):
iwlwifi: bump FW API to 65 for AX devices
iwlwifi: acpi: fill in WGDS table with defaults
iwlwifi: acpi: fill in SAR tables with defaults
Mukesh Sisodiya (1):
iwlwifi: yoyo: support for new DBGI_SRAM region
Shaul Triebitz (1):
iwlwifi: add 'Rx control frame to MBSSID' HE capability
.../net/wireless/intel/iwlwifi/cfg/22000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 67 ++++++++++++-------
.../wireless/intel/iwlwifi/fw/api/dbg-tlv.h | 6 +-
drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 45 +++++++++++--
.../wireless/intel/iwlwifi/fw/error-dump.h | 22 +++---
.../net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 1 +
.../wireless/intel/iwlwifi/iwl-nvm-parse.c | 3 +-
drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 7 ++
.../net/wireless/intel/iwlwifi/iwl-trans.h | 2 +-
.../wireless/intel/iwlwifi/mvm/time-event.c | 31 +++++----
.../net/wireless/intel/iwlwifi/pcie/trans.c | 8 +--
11 files changed, 135 insertions(+), 59 deletions(-)
--
2.33.0
From: Luca Coelho <redacted>
Start supporting API version 65 for AX devices.
Signed-off-by: Luca Coelho <redacted>
11 patches applied to iwlwifi-next.git, thanks.
a6a39ab2645c iwlwifi: bump FW API to 65 for AX devices
c5b42c674ad8 iwlwifi: acpi: fill in WGDS table with defaults
40063f602868 iwlwifi: acpi: fill in SAR tables with defaults
59a6ee97e0d4 iwlwifi: pcie: avoid dma unmap/remap in crash dump
4246465edb16 iwlwifi: fix __percpu annotation
394f41929672 iwlwifi: api: remove datamember from struct
8a433cb64ec5 iwlwifi: fw: fix debug dump data declarations
4e110e799cb5 iwlwifi: add 'Rx control frame to MBSSID' HE capability
89639e06d0f3 iwlwifi: yoyo: support for new DBGI_SRAM region
a76b57311b1a iwlwifi: mvm: don't schedule the roc_done_wk if it is already running
7e47f41648b2 iwlwifi: allow debug init in RF-kill
From: Luca Coelho <redacted>
The tables we store are the larger of all the revisions, so we need to
fill in the values that we don't get from ACPI when using older
revisions.
Signed-off-by: Luca Coelho <redacted>
---
drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 42 ++++++++++++++------
1 file changed, 29 insertions(+), 13 deletions(-)
@@ -745,20 +745,18 @@ int iwl_sar_get_wgds_table(struct iwl_fw_runtime *fwrt)read_table:fwrt->geo_rev=tbl_rev;for(i=0;i<ACPI_NUM_GEO_PROFILES;i++){-for(j=0;j<num_bands;j++){+for(j=0;j<ACPI_GEO_NUM_BANDS_REV2;j++){unionacpi_object*entry;-entry=&wifi_pkg->package.elements[idx++];-if(entry->type!=ACPI_TYPE_INTEGER||-entry->integer.value>U8_MAX){-ret=-EINVAL;-gotoout_free;-}--fwrt->geo_profiles[i].bands[j].max=-entry->integer.value;--for(k=0;k<ACPI_GEO_NUM_CHAINS;k++){+/*+*num_bandsiseither2or3,ifit'sonly2then+*fillthethirdband(6GHz)withthevaluesfrom+*5GHz(secondband)+*/+if(j>=num_bands){+fwrt->geo_profiles[i].bands[j].max=+fwrt->geo_profiles[i].bands[1].max;+}else{entry=&wifi_pkg->package.elements[idx++];if(entry->type!=ACPI_TYPE_INTEGER||entry->integer.value>U8_MAX){
@@ -766,9 +764,27 @@ int iwl_sar_get_wgds_table(struct iwl_fw_runtime *fwrt)gotoout_free;}-fwrt->geo_profiles[i].bands[j].chains[k]=+fwrt->geo_profiles[i].bands[j].max=entry->integer.value;}++for(k=0;k<ACPI_GEO_NUM_CHAINS;k++){+/* same here as above */+if(j>=num_bands){+fwrt->geo_profiles[i].bands[j].chains[k]=+fwrt->geo_profiles[i].bands[1].chains[k];+}else{+entry=&wifi_pkg->package.elements[idx++];+if(entry->type!=ACPI_TYPE_INTEGER||+entry->integer.value>U8_MAX){+ret=-EINVAL;+gotoout_free;+}++fwrt->geo_profiles[i].bands[j].chains[k]=+entry->integer.value;+}+}}}
From: Luca Coelho <redacted>
If the tables we get in the iwl_sar_set_profile() is smaller than the
revision we support, we need to fill the values with 0. Make sure
that's the case.
Signed-off-by: Luca Coelho <redacted>
---
drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 21 ++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
@@ -420,16 +420,21 @@ static int iwl_sar_set_profile(union acpi_object *table,*ThetablefromACPIisflat,butwestoreitina*structuredarray.*/-for(i=0;i<num_chains;i++){-for(j=0;j<num_sub_bands;j++){-if(table[idx].type!=ACPI_TYPE_INTEGER||-table[idx].integer.value>U8_MAX)-return-EINVAL;+for(i=0;i<ACPI_SAR_NUM_CHAINS_REV2;i++){+for(j=0;j<ACPI_SAR_NUM_SUB_BANDS_REV2;j++){+/* if we don't have the values, use the default */+if(i>=num_chains||j>=num_sub_bands){+profile->chains[i].subbands[j]=0;+}else{+if(table[idx].type!=ACPI_TYPE_INTEGER||+table[idx].integer.value>U8_MAX)+return-EINVAL;-profile->chains[i].subbands[j]=-table[idx].integer.value;+profile->chains[i].subbands[j]=+table[idx].integer.value;-idx++;+idx++;+}}}
From: Johannes Berg <redacted>
DMA-API debug code pointed out that in this code path we
never check the return value of dma_map_page(), which could
fail.
However, we don't really even want to unmap/remap, we just
want to ensure that we can actually access the last version
of the data that the (now-dead) device may have written, so
only need to dma_sync_single_for_cpu() instead.
Signed-off-by: Johannes Berg <redacted>
Signed-off-by: Luca Coelho <redacted>
---
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
From: Johannes Berg <redacted>
Sparse warns about some type mismatches, which really is just
because of the strangely placed __percpu annotation. Put it
into the correct place.
Signed-off-by: Johannes Berg <redacted>
Signed-off-by: Luca Coelho <redacted>
---
drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Johannes Berg <redacted>
We don't use this, but we embed this struct elsewhere and
having structs with flexible arrays embedded isn't quite
right, with sparse (for example) complaining. Remove the
data[] member in this case.
Signed-off-by: Johannes Berg <redacted>
Signed-off-by: Luca Coelho <redacted>
---
drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
@@ -33,12 +33,11 @@ struct iwl_fw_ini_hcmd {**@version:TLVversion*@domain:domainoftheTLV.Oneof&enumiwl_fw_ini_dbg_domain-*@data:TLVdata*/structiwl_fw_ini_header{__le32version;__le32domain;-u8data[];+/* followed by the data */}__packed;/* FW_TLV_DEBUG_HEADER_S_VER_1 *//**
From: Johannes Berg <redacted>
The debug dump ranges aren't just an array of such ranges
since each range has a variable size. Therefore, the use
of a struct array is misleading at best.
Change it to be a u8 data[] instead of the struct array,
the code doesn't significantly change since it's actually
doing things correctly now.
Signed-off-by: Johannes Berg <redacted>
Signed-off-by: Luca Coelho <redacted>
---
drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 8 +++----
.../wireless/intel/iwlwifi/fw/error-dump.h | 22 +++++++++++--------
2 files changed, 17 insertions(+), 13 deletions(-)
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause *//*-*Copyright(C)2014,2018-2020IntelCorporation+*Copyright(C)2014,2018-2021IntelCorporation*Copyright(C)2014-2015IntelMobileCommunicationsGmbH*Copyright(C)2016-2017IntelDeutschlandGmbH*/
@@ -305,11 +305,12 @@ struct iwl_fw_ini_error_dump_header {/***structiwl_fw_ini_error_dump-iniregiondump*@header:theheaderofthisregion-*@ranges:thememoryrangesofthisregion+*@data:dataofmemoryrangesinthisregion,+*see&structiwl_fw_ini_error_dump_range*/structiwl_fw_ini_error_dump{structiwl_fw_ini_error_dump_headerheader;-structiwl_fw_ini_error_dump_rangeranges[];+u8data[];}__packed;/* This bit is used to differentiate between lmac and umac rxf */
From: Shaul Triebitz <redacted>
'Rx control frame to MBSSID' is supported by HW and FW.
Add the capability to the HE mac capabilities.
Signed-off-by: Shaul Triebitz <redacted>
Signed-off-by: Luca Coelho <redacted>
---
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From: Avraham Stern <redacted>
When P2P roc is removed, the IWL_MVM_STATUS_NEED_FLUSH_P2P bit is set
to indicate to iwl_mvm_roc_done_wk() that the removed roc is a P2P
one, so it will flush the broadcast station and not the aux station.
However, since setting this bit and scheduling the worker is done
in roc ended flow as well as in case the roc is removed, there is
a race where the worker has already started running (but did not
test this bit yet) and then it is scheduled again. In this case,
the first run of the worker will clear this bit, and thus the second
run will find it already cleared and will try to flush and remove
the aux station by mistake.
Fix it by scheduling the worker only if this bit is not yet set. In
case this bit is already set, the worker is either running or
scheduled, so there is no need to re-schedule it.
Signed-off-by: Avraham Stern <redacted>
Signed-off-by: Luca Coelho <redacted>
---
.../wireless/intel/iwlwifi/mvm/time-event.c | 31 ++++++++++++-------
1 file changed, 19 insertions(+), 12 deletions(-)
From: Johannes Berg <redacted>
We can send this even if initializing in RF-kill, thus
suppressing a bunch of error messages about it. In fact,
we _want_ to, since we might still want to debug the
firmware even if in RF-kill.
Signed-off-by: Johannes Berg <redacted>
Signed-off-by: Luca Coelho <redacted>
---
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 1 +
1 file changed, 1 insertion(+)