2023-06-14 09:55:32

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 00/20] wifi: iwlwifi: updates intended for v6.5 2023-06-14

From: Gregory Greenman <[email protected]>

Hi,

This patch set includes iwlwifi patches intended for v6.5.

It contains normal developement, cleanups and bugfixes.
It depends on the previous patch sets I've sent.

Thanks,
Gregory

Anjaneyulu (4):
wifi: iwlwifi: pcie: fix NULL pointer dereference in iwl_pcie_irq_rx_msix_handler()
wifi: iwlwifi: mvm: Validate tid is in valid range before using it
wifi: iwlwifi: Validate slots_num before allocating memory
wifi: iwlwifi: add a few rate index validity checks

Ariel Malamud (1):
wifi: iwlwifi: fw: Add new FSEQ defines to fw dump

Ilan Peer (1):
wifi: iwlwifi: Correctly indicate support for VHT TX STBC

Johannes Berg (14):
wifi: iwlwifi: mvm: correctly access HE/EHT sband capa
wifi: iwlwifi: fw: make some ACPI functions static
wifi: iwlwifi: mvm: use iwl_mvm_is_vendor_in_approved_list()
wifi: iwlwifi: pull from TXQs with softirqs disabled
wifi: iwlwifi: pcie: double-check ACK interrupt after timeout
wifi: iwlwifi: mvm: add a few NULL pointer checks
wifi: iwlwifi: mvm: check link during TX
wifi: iwlwifi: mvm: disable new TX csum mode completely
wifi: iwlwifi: mvm: store WMM params per link
wifi: iwlwifi: use array as array argument
wifi: iwlwifi: mvm: always send spec link ID in link commands
wifi: iwlwifi: add some FW misbehaviour check infrastructure
wifi: iwlwifi: implement WPFC ACPI table loading
wifi: iwlwifi: mvm: track u-APSD misbehaving AP by AP address

drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 9 ++-
drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 64 ++++++++++++++++---
drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 41 ++++--------
.../wireless/intel/iwlwifi/fw/api/config.h | 15 ++---
drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 16 ++++-
drivers/net/wireless/intel/iwlwifi/fw/dump.c | 6 +-
.../wireless/intel/iwlwifi/iwl-nvm-parse.c | 4 +-
drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 6 +-
.../wireless/intel/iwlwifi/mvm/constants.h | 6 +-
.../wireless/intel/iwlwifi/mvm/debugfs-vif.c | 6 +-
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 45 +++----------
drivers/net/wireless/intel/iwlwifi/mvm/link.c | 4 +-
.../net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 21 ++++--
.../wireless/intel/iwlwifi/mvm/mld-mac80211.c | 8 ++-
.../net/wireless/intel/iwlwifi/mvm/mld-sta.c | 8 ++-
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 16 ++---
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 9 ++-
.../net/wireless/intel/iwlwifi/mvm/power.c | 35 ++++++----
.../net/wireless/intel/iwlwifi/mvm/rs-fw.c | 46 +++++++------
drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 11 ++--
drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 10 ++-
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 19 ++++--
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 19 ++++--
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 5 +-
.../wireless/intel/iwlwifi/pcie/trans-gen2.c | 13 ++--
drivers/net/wireless/intel/iwlwifi/queue/tx.c | 5 +-
26 files changed, 265 insertions(+), 182 deletions(-)

--
2.38.1



2023-06-14 09:55:39

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 18/20] wifi: iwlwifi: mvm: Validate tid is in valid range before using it

From: Anjaneyulu <[email protected]>

Validate tid is less then MAX TID when it is used to access
corresponding arrays.

Signed-off-by: Anjaneyulu <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 10 +++++++---
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 9 ++++++---
2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
index b38b24246675..542c192698a4 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
- * Copyright (C) 2012-2014, 2018-2022 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2023 Intel Corporation
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
* Copyright (C) 2016-2017 Intel Deutschland GmbH
*/
@@ -213,8 +213,12 @@ static void iwl_mvm_rx_handle_tcm(struct iwl_mvm *mvm,
};
u16 thr;

- if (ieee80211_is_data_qos(hdr->frame_control))
- ac = tid_to_mac80211_ac[ieee80211_get_tid(hdr)];
+ if (ieee80211_is_data_qos(hdr->frame_control)) {
+ u8 tid = ieee80211_get_tid(hdr);
+
+ if (tid < IWL_MAX_TID_COUNT)
+ ac = tid_to_mac80211_ac[tid];
+ }

mvmsta = iwl_mvm_sta_from_mac80211(sta);
mac = mvmsta->mac_id_n_color & FW_CTXT_ID_MSK;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index 5c06839b87c2..9dbe71d299ae 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -484,7 +484,7 @@ static void iwl_mvm_rx_csum(struct iwl_mvm *mvm,
}

/*
- * returns true if a packet is a duplicate and should be dropped.
+ * returns true if a packet is a duplicate or invalid tid and should be dropped.
* Updates AMSDU PN tracking info
*/
static bool iwl_mvm_is_dup(struct ieee80211_sta *sta, int queue,
@@ -513,11 +513,14 @@ static bool iwl_mvm_is_dup(struct ieee80211_sta *sta, int queue,
return false;
}

- if (ieee80211_is_data_qos(hdr->frame_control))
+ if (ieee80211_is_data_qos(hdr->frame_control)) {
/* frame has qos control */
tid = ieee80211_get_tid(hdr);
- else
+ if (tid >= IWL_MAX_TID_COUNT)
+ return true;
+ } else {
tid = IWL_MAX_TID_COUNT;
+ }

/* If this wasn't a part of an A-MSDU the sub-frame index will be 0 */
sub_frame_idx = desc->amsdu_info &
--
2.38.1


2023-06-14 09:55:44

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 02/20] wifi: iwlwifi: Correctly indicate support for VHT TX STBC

From: Ilan Peer <[email protected]>

If HT STBC is not supported, do not indicate support for VHT TX
STBC.

Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index fad71f490313..d79d5453c2dc 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
- * Copyright (C) 2005-2014, 2018-2022 Intel Corporation
+ * Copyright (C) 2005-2014, 2018-2023 Intel Corporation
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
* Copyright (C) 2016-2017 Intel Deutschland GmbH
*/
@@ -516,7 +516,7 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
num_tx_ants = 1;
}

- if (num_tx_ants > 1)
+ if (trans->cfg->ht_params->stbc && num_tx_ants > 1)
vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC;
else
vht_cap->cap |= IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN;
--
2.38.1


2023-06-14 09:55:56

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 05/20] wifi: iwlwifi: pull from TXQs with softirqs disabled

From: Johannes Berg <[email protected]>

In mac80211, it's required that we pull from TXQs by calling
ieee80211_tx_dequeue() only with softirqs disabled. However,
in iwl_mvm_queue_state_change() we're often called with them
enabled, e.g. from flush if anything was flushed, triggering
a mac80211 warning.

Fix that by disabling the softirqs across the TX call.

Fixes: cfbc6c4c5b91 ("iwlwifi: mvm: support mac80211 TXQs model")
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 430642576f5d..cc04d7cad715 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -1740,8 +1740,11 @@ static void iwl_mvm_queue_state_change(struct iwl_op_mode *op_mode,
else
set_bit(IWL_MVM_TXQ_STATE_STOP_FULL, &mvmtxq->state);

- if (start && mvmsta->sta_state != IEEE80211_STA_NOTEXIST)
+ if (start && mvmsta->sta_state != IEEE80211_STA_NOTEXIST) {
+ local_bh_disable();
iwl_mvm_mac_itxq_xmit(mvm->hw, txq);
+ local_bh_enable();
+ }
}

out:
--
2.38.1


2023-06-14 09:55:58

by Greenman, Gregory

[permalink] [raw]
Subject: [PATCH 13/20] wifi: iwlwifi: mvm: always send spec link ID in link commands

From: Johannes Berg <[email protected]>

The firmware technically only needs this when the link is
newly added, but it's much easier for debugging if it's
always available, so include it.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/mvm/link.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
index af9ace787ec5..563396dfd3cd 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
@@ -245,6 +245,7 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
cmd.modify_mask = cpu_to_le32(changes);
cmd.flags = cpu_to_le32(flags);
cmd.flags_mask = cpu_to_le32(flags_mask);
+ cmd.spec_link_id = link_conf->link_id;

ret = iwl_mvm_link_cmd_send(mvm, &cmd, FW_CTXT_ACTION_MODIFY);
if (!ret && (changes & LINK_CONTEXT_MODIFY_ACTIVE))
@@ -271,6 +272,7 @@ int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
cmd.link_id = cpu_to_le32(link_info->fw_link_id);
iwl_mvm_release_fw_link_id(mvm, link_info->fw_link_id);
link_info->fw_link_id = IWL_MVM_FW_LINK_ID_INVALID;
+ cmd.spec_link_id = link_conf->link_id;

ret = iwl_mvm_link_cmd_send(mvm, &cmd, FW_CTXT_ACTION_REMOVE);

--
2.38.1