Skip to content

Commit 0e3c08f

Browse files
committed
Johannes Berg says: ==================== Quite a few more updates: - cfg80211/mac80211: - various security(-ish) fixes - fix A-MSDU subframe handling - fix multi-link element parsing - ath10: avoid sending commands to dead device - ath11k: - fix WMI buffer leaks on error conditions - fix UAF in RX MSDU coalesce path - allow peer ID 0 on RX path (legal for mobile devices) - reinitialize shared SRNG pointers on restart - ath12k: - fix 20 MHz-only parsing of EHT-MCS map - iwlwifi: - fix TSO segmentation explosion - don't TX to dead device - fix warning in WoWLAN - fix TX rates on old devices - disconnect on beacon loss only if also no other traffic - fill NULL-ptr deref - fix STEP_URM hardware access * tag 'wireless-2026-05-21' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (24 commits) wifi: cfg80211: wext: validate chandef in monitor mode wifi: mac80211: consume only present negotiated TTLM maps wifi: wilc1000: fix dma_buffer leak on bus acquire failure wifi: mac80211: capture fast-RX rate before mesh reuses skb->cb wifi: mac80211: fix multi-link element inheritance wifi: mac80211: fix MLE defragmentation wifi: mac80211: don't override max_amsdu_subframes wifi: mac80211: bounds-check link_id in ieee80211_ml_epcs wifi: ath12k: fix EHT TX MCS limitation due to wrong 20 MHz-only parsing wifi: ath11k: clear shared SRNG pointer state on restart wifi: ath11k: fix use after free in ath11k_dp_rx_msdu_coalesce() wifi: ath11k: fix peer resolution on rx path when peer_id=0 wifi: iwlwifi: mld: disconnect only after 6 beacons without Rx wifi: iwlwifi: mld: don't WARN on WoWLAN suspend w/o BSS vif wifi: iwlwifi: use correct function to read STEP_URM register wifi: iwlwifi: mvm: fix driver-set TX rates on old devices wifi: iwlwifi: mld: don't dereference a pointer before NULL checking it wifi: iwlwifi: mld: stop TX during firmware restart wifi: iwlwifi: mld: fix TSO segmentation explosion when AMSDU is disabled wifi: ath10k: skip WMI and beacon transmission when device is wedged ... ==================== Link: https://patch.msgid.link/20260521152903.374070-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents c33f944 + dc14686 commit 0e3c08f

21 files changed

Lines changed: 274 additions & 122 deletions

File tree

drivers/net/wireless/ath/ath10k/wmi.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright (c) 2005-2011 Atheros Communications Inc.
44
* Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
55
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
6-
* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
76
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
87
*/
98

@@ -1947,15 +1946,15 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id)
19471946
ret = -ESHUTDOWN;
19481947
ath10k_dbg(ar, ATH10K_DBG_WMI,
19491948
"drop wmi command %d, hardware is wedged\n", cmd_id);
1950-
}
1951-
/* try to send pending beacons first. they take priority */
1952-
ath10k_wmi_tx_beacons_nowait(ar);
1949+
} else {
1950+
/* try to send pending beacons first. they take priority */
1951+
ath10k_wmi_tx_beacons_nowait(ar);
19531952

1954-
ret = ath10k_wmi_cmd_send_nowait(ar, skb, cmd_id);
1955-
1956-
if (ret && test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags))
1957-
ret = -ESHUTDOWN;
1953+
ret = ath10k_wmi_cmd_send_nowait(ar, skb, cmd_id);
19581954

1955+
if (ret && test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags))
1956+
ret = -ESHUTDOWN;
1957+
}
19591958
(ret != -EAGAIN);
19601959
}), 3 * HZ);
19611960

drivers/net/wireless/ath/ath11k/dp_rx.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,7 @@ static int ath11k_dp_rx_msdu_coalesce(struct ath11k *ar,
17611761
int buf_first_hdr_len, buf_first_len;
17621762
struct hal_rx_desc *ldesc;
17631763
int space_extra, rem_len, buf_len;
1764+
bool is_continuation;
17641765
u32 hal_rx_desc_sz = ar->ab->hw_params.hal_desc_sz;
17651766

17661767
/* As the msdu is spread across multiple rx buffers,
@@ -1810,7 +1811,8 @@ static int ath11k_dp_rx_msdu_coalesce(struct ath11k *ar,
18101811
rem_len = msdu_len - buf_first_len;
18111812
while ((skb = __skb_dequeue(msdu_list)) != NULL && rem_len > 0) {
18121813
rxcb = ATH11K_SKB_RXCB(skb);
1813-
if (rxcb->is_continuation)
1814+
is_continuation = rxcb->is_continuation;
1815+
if (is_continuation)
18141816
buf_len = DP_RX_BUFFER_SIZE - hal_rx_desc_sz;
18151817
else
18161818
buf_len = rem_len;
@@ -1828,7 +1830,7 @@ static int ath11k_dp_rx_msdu_coalesce(struct ath11k *ar,
18281830
dev_kfree_skb_any(skb);
18291831

18301832
rem_len -= buf_len;
1831-
if (!rxcb->is_continuation)
1833+
if (!is_continuation)
18321834
break;
18331835
}
18341836

@@ -2214,8 +2216,7 @@ ath11k_dp_rx_h_find_peer(struct ath11k_base *ab, struct sk_buff *msdu)
22142216

22152217
lockdep_assert_held(&ab->base_lock);
22162218

2217-
if (rxcb->peer_id)
2218-
peer = ath11k_peer_find_by_id(ab, rxcb->peer_id);
2219+
peer = ath11k_peer_find_by_id(ab, rxcb->peer_id);
22192220

22202221
if (peer)
22212222
return peer;

drivers/net/wireless/ath/ath11k/hal.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,14 +1387,22 @@ EXPORT_SYMBOL(ath11k_hal_srng_deinit);
13871387

13881388
void ath11k_hal_srng_clear(struct ath11k_base *ab)
13891389
{
1390-
/* No need to memset rdp and wrp memory since each individual
1391-
* segment would get cleared in ath11k_hal_srng_src_hw_init()
1392-
* and ath11k_hal_srng_dst_hw_init().
1390+
/*
1391+
* Preserve the shared pointer buffers, but clear the previous
1392+
* firmware instance's hp/tp state before handing them back to FW.
1393+
* LMAC rings reuse this shared memory without going through the
1394+
* normal SRNG hw-init path that zeros non-LMAC ring pointers.
13931395
*/
13941396
memset(ab->hal.srng_list, 0,
13951397
sizeof(ab->hal.srng_list));
13961398
memset(ab->hal.shadow_reg_addr, 0,
13971399
sizeof(ab->hal.shadow_reg_addr));
1400+
if (ab->hal.rdp.vaddr)
1401+
memset(ab->hal.rdp.vaddr, 0,
1402+
sizeof(*ab->hal.rdp.vaddr) * HAL_SRNG_RING_ID_MAX);
1403+
if (ab->hal.wrp.vaddr)
1404+
memset(ab->hal.wrp.vaddr, 0,
1405+
sizeof(*ab->hal.wrp.vaddr) * HAL_SRNG_NUM_LMAC_RINGS);
13981406
ab->hal.avail_blk_resource = 0;
13991407
ab->hal.current_blk_index = 0;
14001408
ab->hal.num_shadow_reg_configured = 0;

drivers/net/wireless/ath/ath11k/hal_rx.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,11 +1467,8 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
14671467
case HAL_RX_MPDU_START: {
14681468
struct hal_rx_mpdu_info *mpdu_info =
14691469
(struct hal_rx_mpdu_info *)tlv_data;
1470-
u16 peer_id;
14711470

1472-
peer_id = ath11k_hal_rx_mpduinfo_get_peerid(ab, mpdu_info);
1473-
if (peer_id)
1474-
ppdu_info->peer_id = peer_id;
1471+
ppdu_info->peer_id = ath11k_hal_rx_mpduinfo_get_peerid(ab, mpdu_info);
14751472
break;
14761473
}
14771474
case HAL_RXPCU_PPDU_END_INFO: {

drivers/net/wireless/ath/ath11k/testmode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ static int ath11k_tm_cmd_wmi_ftm(struct ath11k *ar, struct nlattr *tb[])
457457
ret = ath11k_wmi_cmd_send(wmi, skb, cmd_id);
458458
if (ret) {
459459
ath11k_warn(ar->ab, "failed to send wmi ftm command: %d\n", ret);
460+
dev_kfree_skb(skb);
460461
goto out;
461462
}
462463

0 commit comments

Comments
 (0)