mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
wifi: iwlwifi: fixes - 2026-05-16
Contains: wifi: iwlwifi: mld: fix TSO segmentation explosion when AMSDU is disabled wifi: iwlwifi: mld: stop TX during firmware restart wifi: iwlwifi: mld: don't WARN on WoWLAN suspend w/o BSS vif wifi: iwlwifi: mvm: fix driver-set TX rates on old devices wifi: iwlwifi: mld: disconnect only after 6 beacons without Rx wifi: iwlwifi: mld: don't dereference a pointer before NULL checking it wifi: iwlwifi: use correct function to read STEP_URM register -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQM3A3Pv7vbm9vtjWbacY7uyt+OfQUCagjVPgAKCRDacY7uyt+O fS41AQD+cfR+9XfZCPCwyCJEH3bEIB9bwYHJJVo9onru/EZynwEAmSDIrjN20iFE ZHUS63l7uHI33y0lZHojBvp6sRr87wM= =uIbS -----END PGP SIGNATURE----- Merge tag 'iwlwifi-fixes-2026-05-16' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Miri Korenblit says: ==================== wifi: iwlwifi: fixes - 2026-05-16 Contains: wifi: iwlwifi: mld: fix TSO segmentation explosion when AMSDU is disabled wifi: iwlwifi: mld: stop TX during firmware restart wifi: iwlwifi: mld: don't WARN on WoWLAN suspend w/o BSS vif wifi: iwlwifi: mvm: fix driver-set TX rates on old devices wifi: iwlwifi: mld: disconnect only after 6 beacons without Rx wifi: iwlwifi: mld: don't dereference a pointer before NULL checking it wifi: iwlwifi: use correct function to read STEP_URM register ==================== Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
commit
2248db6dc6
|
|
@ -1,11 +1,11 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2024-2026 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_mld_constants_h__
|
||||
#define __iwl_mld_constants_h__
|
||||
|
||||
#define IWL_MLD_MISSED_BEACONS_SINCE_RX_THOLD 4
|
||||
#define IWL_MLD_MISSED_BEACONS_SINCE_RX_THOLD 6
|
||||
#define IWL_MLD_MISSED_BEACONS_THRESHOLD 8
|
||||
#define IWL_MLD_MISSED_BEACONS_THRESHOLD_LONG 19
|
||||
#define IWL_MLD_BCN_LOSS_EXIT_ESR_THRESH_2_LINKS 5
|
||||
|
|
|
|||
|
|
@ -1930,12 +1930,12 @@ int iwl_mld_wowlan_suspend(struct iwl_mld *mld, struct cfg80211_wowlan *wowlan)
|
|||
if (WARN_ON(!wowlan))
|
||||
return 1;
|
||||
|
||||
IWL_DEBUG_WOWLAN(mld, "Starting the wowlan suspend flow\n");
|
||||
|
||||
bss_vif = iwl_mld_get_bss_vif(mld);
|
||||
if (WARN_ON(!bss_vif))
|
||||
if (!bss_vif)
|
||||
return 1;
|
||||
|
||||
IWL_DEBUG_WOWLAN(mld, "Starting the wowlan suspend flow\n");
|
||||
|
||||
if (!bss_vif->cfg.assoc) {
|
||||
int ret;
|
||||
/* If we're not associated, this must be netdetect */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2024-2026 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "constants.h"
|
||||
|
|
@ -504,7 +504,6 @@ void iwl_mld_remove_link(struct iwl_mld *mld,
|
|||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(bss_conf->vif);
|
||||
struct iwl_mld_link *link = iwl_mld_link_from_mac80211(bss_conf);
|
||||
bool is_deflink = link == &mld_vif->deflink;
|
||||
u8 fw_id = link->fw_id;
|
||||
|
||||
if (WARN_ON(!link || link->active))
|
||||
return;
|
||||
|
|
@ -512,15 +511,15 @@ void iwl_mld_remove_link(struct iwl_mld *mld,
|
|||
iwl_mld_rm_link_from_fw(mld, bss_conf);
|
||||
/* Continue cleanup on failure */
|
||||
|
||||
if (!is_deflink)
|
||||
kfree_rcu(link, rcu_head);
|
||||
|
||||
RCU_INIT_POINTER(mld_vif->link[bss_conf->link_id], NULL);
|
||||
|
||||
if (WARN_ON(fw_id >= mld->fw->ucode_capa.num_links))
|
||||
if (WARN_ON(link->fw_id >= mld->fw->ucode_capa.num_links))
|
||||
return;
|
||||
|
||||
RCU_INIT_POINTER(mld->fw_id_to_bss_conf[fw_id], NULL);
|
||||
RCU_INIT_POINTER(mld->fw_id_to_bss_conf[link->fw_id], NULL);
|
||||
|
||||
if (!is_deflink)
|
||||
kfree_rcu(link, rcu_head);
|
||||
}
|
||||
|
||||
void iwl_mld_handle_missed_beacon_notif(struct iwl_mld *mld,
|
||||
|
|
|
|||
|
|
@ -834,7 +834,7 @@ static int iwl_mld_tx_tso_segment(struct iwl_mld *mld, struct sk_buff *skb,
|
|||
return -EINVAL;
|
||||
|
||||
max_tid_amsdu_len = sta->cur->max_tid_amsdu_len[tid];
|
||||
if (!max_tid_amsdu_len)
|
||||
if (!max_tid_amsdu_len || max_tid_amsdu_len == 1)
|
||||
return iwl_tx_tso_segment(skb, 1, netdev_flags, mpdus_skbs);
|
||||
|
||||
/* Sub frame header + SNAP + IP header + TCP header + MSS */
|
||||
|
|
@ -846,6 +846,9 @@ static int iwl_mld_tx_tso_segment(struct iwl_mld *mld, struct sk_buff *skb,
|
|||
*/
|
||||
num_subframes = (max_tid_amsdu_len + pad) / (subf_len + pad);
|
||||
|
||||
if (WARN_ON_ONCE(!num_subframes))
|
||||
return iwl_tx_tso_segment(skb, 1, netdev_flags, mpdus_skbs);
|
||||
|
||||
if (sta->max_amsdu_subframes &&
|
||||
num_subframes > sta->max_amsdu_subframes)
|
||||
num_subframes = sta->max_amsdu_subframes;
|
||||
|
|
@ -970,6 +973,16 @@ void iwl_mld_tx_from_txq(struct iwl_mld *mld, struct ieee80211_txq *txq)
|
|||
struct sk_buff *skb = NULL;
|
||||
u8 zero_addr[ETH_ALEN] = {};
|
||||
|
||||
/*
|
||||
* Don't transmit during firmware restart. The firmware is dead,
|
||||
* so iwl_trans_tx() would return -EIO for each frame. Avoid the
|
||||
* overhead of dequeuing from mac80211 only to immediately free
|
||||
* the skbs, and the potential memory pressure from rapid skb
|
||||
* allocation churn during high-throughput restart scenarios.
|
||||
*/
|
||||
if (unlikely(mld->fw_status.in_hw_restart))
|
||||
return;
|
||||
|
||||
/*
|
||||
* No need for threads to be pending here, they can leave the first
|
||||
* taker all the work.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2026 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -927,13 +927,18 @@ u8 iwl_mvm_mac_ctxt_get_lowest_rate(struct iwl_mvm *mvm,
|
|||
|
||||
u16 iwl_mvm_mac_ctxt_get_beacon_flags(const struct iwl_fw *fw, u8 rate_idx)
|
||||
{
|
||||
u16 flags = iwl_mvm_mac80211_idx_to_hwrate(fw, rate_idx);
|
||||
bool is_new_rate = iwl_fw_lookup_cmd_ver(fw, BEACON_TEMPLATE_CMD, 0) > 10;
|
||||
u16 flags = 0;
|
||||
|
||||
if (rate_idx <= IWL_LAST_CCK_RATE)
|
||||
flags |= is_new_rate ? IWL_MAC_BEACON_CCK
|
||||
: IWL_MAC_BEACON_CCK_V1;
|
||||
|
||||
if (iwl_fw_lookup_cmd_ver(fw, TX_CMD, 0) > 8)
|
||||
flags |= iwl_mvm_mac80211_idx_to_hwrate(fw, rate_idx);
|
||||
else
|
||||
flags |= iwl_fw_rate_idx_to_plcp(rate_idx);
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
|
@ -962,6 +967,7 @@ static void iwl_mvm_mac_ctxt_set_tx(struct iwl_mvm *mvm,
|
|||
{
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
struct ieee80211_tx_info *info;
|
||||
u32 rate_n_flags = 0;
|
||||
u8 rate;
|
||||
u32 tx_flags;
|
||||
|
||||
|
|
@ -981,18 +987,21 @@ static void iwl_mvm_mac_ctxt_set_tx(struct iwl_mvm *mvm,
|
|||
IWL_UCODE_TLV_CAPA_BEACON_ANT_SELECTION)) {
|
||||
iwl_mvm_toggle_tx_ant(mvm, &mvm->mgmt_last_antenna_idx);
|
||||
|
||||
tx_params->rate_n_flags =
|
||||
cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) <<
|
||||
RATE_MCS_ANT_POS);
|
||||
rate_n_flags |= BIT(mvm->mgmt_last_antenna_idx) <<
|
||||
RATE_MCS_ANT_POS;
|
||||
}
|
||||
|
||||
rate = iwl_mvm_mac_ctxt_get_beacon_rate(mvm, info, vif);
|
||||
|
||||
tx_params->rate_n_flags |=
|
||||
cpu_to_le32(iwl_mvm_mac80211_idx_to_hwrate(mvm->fw, rate));
|
||||
if (rate == IWL_FIRST_CCK_RATE)
|
||||
tx_params->rate_n_flags |= cpu_to_le32(RATE_MCS_CCK_MSK_V1);
|
||||
if (rate < IWL_FIRST_OFDM_RATE)
|
||||
rate_n_flags |= RATE_MCS_MOD_TYPE_CCK;
|
||||
else
|
||||
rate_n_flags |= RATE_MCS_MOD_TYPE_LEGACY_OFDM;
|
||||
|
||||
rate_n_flags |= iwl_mvm_mac80211_idx_to_hwrate(mvm->fw, rate);
|
||||
|
||||
tx_params->rate_n_flags = iwl_mvm_v3_rate_to_fw(rate_n_flags,
|
||||
mvm->fw_rates_ver);
|
||||
}
|
||||
|
||||
int iwl_mvm_mac_ctxt_send_beacon_cmd(struct iwl_mvm *mvm,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2026 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
|
@ -159,15 +159,9 @@ int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags,
|
|||
|
||||
u8 iwl_mvm_mac80211_idx_to_hwrate(const struct iwl_fw *fw, int rate_idx)
|
||||
{
|
||||
if (iwl_fw_lookup_cmd_ver(fw, TX_CMD, 0) > 8)
|
||||
/* In the new rate legacy rates are indexed:
|
||||
* 0 - 3 for CCK and 0 - 7 for OFDM.
|
||||
*/
|
||||
return (rate_idx >= IWL_FIRST_OFDM_RATE ?
|
||||
rate_idx - IWL_FIRST_OFDM_RATE :
|
||||
rate_idx);
|
||||
|
||||
return iwl_fw_rate_idx_to_plcp(rate_idx);
|
||||
return rate_idx >= IWL_FIRST_OFDM_RATE ?
|
||||
rate_idx - IWL_FIRST_OFDM_RATE :
|
||||
rate_idx;
|
||||
}
|
||||
|
||||
u8 iwl_mvm_mac80211_ac_to_ucode_ac(enum ieee80211_ac_numbers ac)
|
||||
|
|
|
|||
|
|
@ -398,9 +398,9 @@ void iwl_trans_pcie_gen2_fw_alive(struct iwl_trans *trans)
|
|||
mutex_unlock(&trans_pcie->mutex);
|
||||
|
||||
if (trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_BZ)
|
||||
trans->step_urm = !!(iwl_read_umac_prph(trans,
|
||||
CNVI_PMU_STEP_FLOW) &
|
||||
CNVI_PMU_STEP_FLOW_FORCE_URM);
|
||||
trans->step_urm = !!(iwl_read_prph(trans,
|
||||
CNVI_PMU_STEP_FLOW) &
|
||||
CNVI_PMU_STEP_FLOW_FORCE_URM);
|
||||
}
|
||||
|
||||
static bool iwl_pcie_set_ltr(struct iwl_trans *trans)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user