* [PATCH ath-next v2 0/2] wifi: ath12k: correctly check RX multicast bit
@ 2025-04-11 6:15 Sarika Sharma
2025-04-11 6:15 ` [PATCH ath-next v2 1/2] wifi: ath12k: using msdu end descriptor to check for rx multicast packets Sarika Sharma
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Sarika Sharma @ 2025-04-11 6:15 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Sarika Sharma
Currently, the RX multicast broadcast bit is fetched from the MPDU
start descriptor. However, in some scenarios, the value is not
accurate. Therefore, changing the process to fetch the bit from the
MSDU end descriptor for improved reliability.
Sarika Sharma (2):
wifi: ath12k: using msdu end descriptor to check for rx multicast
packets
wifi: ath12k: correctly handle mcast packets for clients
drivers/net/wireless/ath/ath12k/dp_rx.c | 5 +++++
drivers/net/wireless/ath/ath12k/hal.c | 8 ++++----
drivers/net/wireless/ath/ath12k/peer.c | 5 ++++-
drivers/net/wireless/ath/ath12k/peer.h | 3 ++-
4 files changed, 15 insertions(+), 6 deletions(-)
base-commit: ac17b1211841c98a9b4c2900ba2a7f457c80cf90
--
2.34.1
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH ath-next v2 1/2] wifi: ath12k: using msdu end descriptor to check for rx multicast packets 2025-04-11 6:15 [PATCH ath-next v2 0/2] wifi: ath12k: correctly check RX multicast bit Sarika Sharma @ 2025-04-11 6:15 ` Sarika Sharma 2025-04-11 6:23 ` Vasanthakumar Thiagarajan 2025-04-11 6:15 ` [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients Sarika Sharma 2025-04-17 22:57 ` [PATCH ath-next v2 0/2] wifi: ath12k: correctly check RX multicast bit Jeff Johnson 2 siblings, 1 reply; 9+ messages in thread From: Sarika Sharma @ 2025-04-11 6:15 UTC (permalink / raw) To: ath12k; +Cc: linux-wireless, Sarika Sharma Currently, the RX multicast broadcast packet check is performed using bit 15 from the info6 field of the MPDU start descriptor. This check can also be done using bit 9 from the info5 field of the MSDU end descriptor. However, in some scenarios multicast bit is not set when fetched from MPDU start descriptor. Therefore, checking the RX multicast broadcast packet from the MSDU end descriptor is more reliable as it is per MSDU. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com> --- drivers/net/wireless/ath/ath12k/hal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c index d00869a33fea..12d0f991a47f 100644 --- a/drivers/net/wireless/ath/ath12k/hal.c +++ b/drivers/net/wireless/ath/ath12k/hal.c @@ -449,8 +449,8 @@ static u8 *ath12k_hw_qcn9274_rx_desc_mpdu_start_addr2(struct hal_rx_desc *desc) static bool ath12k_hw_qcn9274_rx_desc_is_da_mcbc(struct hal_rx_desc *desc) { - return __le32_to_cpu(desc->u.qcn9274.mpdu_start.info6) & - RX_MPDU_START_INFO6_MCAST_BCAST; + return __le16_to_cpu(desc->u.qcn9274.msdu_end.info5) & + RX_MSDU_END_INFO5_DA_IS_MCBC; } static void ath12k_hw_qcn9274_rx_desc_get_dot11_hdr(struct hal_rx_desc *desc, @@ -902,8 +902,8 @@ static u8 *ath12k_hw_qcn9274_compact_rx_desc_mpdu_start_addr2(struct hal_rx_desc static bool ath12k_hw_qcn9274_compact_rx_desc_is_da_mcbc(struct hal_rx_desc *desc) { - return __le32_to_cpu(desc->u.qcn9274_compact.mpdu_start.info6) & - RX_MPDU_START_INFO6_MCAST_BCAST; + return __le16_to_cpu(desc->u.qcn9274_compact.msdu_end.info5) & + RX_MSDU_END_INFO5_DA_IS_MCBC; } static void ath12k_hw_qcn9274_compact_rx_desc_get_dot11_hdr(struct hal_rx_desc *desc, -- 2.34.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH ath-next v2 1/2] wifi: ath12k: using msdu end descriptor to check for rx multicast packets 2025-04-11 6:15 ` [PATCH ath-next v2 1/2] wifi: ath12k: using msdu end descriptor to check for rx multicast packets Sarika Sharma @ 2025-04-11 6:23 ` Vasanthakumar Thiagarajan 0 siblings, 0 replies; 9+ messages in thread From: Vasanthakumar Thiagarajan @ 2025-04-11 6:23 UTC (permalink / raw) To: Sarika Sharma, ath12k; +Cc: linux-wireless On 4/11/2025 11:45 AM, Sarika Sharma wrote: > Currently, the RX multicast broadcast packet check is performed using > bit 15 from the info6 field of the MPDU start descriptor. This check > can also be done using bit 9 from the info5 field of the MSDU end > descriptor. However, in some scenarios multicast bit is not set when > fetched from MPDU start descriptor. > Therefore, checking the RX multicast broadcast packet from the MSDU > end descriptor is more reliable as it is per MSDU. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients 2025-04-11 6:15 [PATCH ath-next v2 0/2] wifi: ath12k: correctly check RX multicast bit Sarika Sharma 2025-04-11 6:15 ` [PATCH ath-next v2 1/2] wifi: ath12k: using msdu end descriptor to check for rx multicast packets Sarika Sharma @ 2025-04-11 6:15 ` Sarika Sharma 2025-04-11 6:25 ` Vasanthakumar Thiagarajan 2025-04-15 23:22 ` Jeff Johnson 2025-04-17 22:57 ` [PATCH ath-next v2 0/2] wifi: ath12k: correctly check RX multicast bit Jeff Johnson 2 siblings, 2 replies; 9+ messages in thread From: Sarika Sharma @ 2025-04-11 6:15 UTC (permalink / raw) To: ath12k; +Cc: linux-wireless, Sarika Sharma Currently, RX is_mcbc bit is set for packest send from client as destination address (DA) is multicast/broadcast address, but packets are actually unicast as receiver address (RA) is not multicast address. Hence, packets are not handled properly due to this is_mcbc bit. Therefore, reset the is_mcbc bit if interface type is AP. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com> --- drivers/net/wireless/ath/ath12k/dp_rx.c | 5 +++++ drivers/net/wireless/ath/ath12k/peer.c | 5 ++++- drivers/net/wireless/ath/ath12k/peer.h | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c index cffff66c5ec4..308d9656b57e 100644 --- a/drivers/net/wireless/ath/ath12k/dp_rx.c +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c @@ -2269,6 +2269,11 @@ static void ath12k_dp_rx_h_mpdu(struct ath12k *ar, spin_lock_bh(&ar->ab->base_lock); peer = ath12k_dp_rx_h_find_peer(ar->ab, msdu); if (peer) { + /* resetting mcbc bit because mcbc packets are unicast + * packets only for AP as STA sends unicast packets. + */ + rxcb->is_mcbc = rxcb->is_mcbc && !peer->ucast_ra_only; + if (rxcb->is_mcbc) enctype = peer->sec_type_grp; else diff --git a/drivers/net/wireless/ath/ath12k/peer.c b/drivers/net/wireless/ath/ath12k/peer.c index 792cca8a3fb1..ec7236bbccc0 100644 --- a/drivers/net/wireless/ath/ath12k/peer.c +++ b/drivers/net/wireless/ath/ath12k/peer.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022, 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include "core.h" @@ -383,6 +383,9 @@ int ath12k_peer_create(struct ath12k *ar, struct ath12k_link_vif *arvif, arvif->ast_idx = peer->hw_peer_id; } + if (vif->type == NL80211_IFTYPE_AP) + peer->ucast_ra_only = true; + if (sta) { ahsta = ath12k_sta_to_ahsta(sta); arsta = wiphy_dereference(ath12k_ar_to_hw(ar)->wiphy, diff --git a/drivers/net/wireless/ath/ath12k/peer.h b/drivers/net/wireless/ath/ath12k/peer.h index 5870ee11a8c7..f3a5e054d2b5 100644 --- a/drivers/net/wireless/ath/ath12k/peer.h +++ b/drivers/net/wireless/ath/ath12k/peer.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef ATH12K_PEER_H @@ -62,6 +62,7 @@ struct ath12k_peer { /* for reference to ath12k_link_sta */ u8 link_id; + bool ucast_ra_only; }; struct ath12k_ml_peer { -- 2.34.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients 2025-04-11 6:15 ` [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients Sarika Sharma @ 2025-04-11 6:25 ` Vasanthakumar Thiagarajan 2025-04-11 6:57 ` Sarika Sharma 2025-04-15 23:22 ` Jeff Johnson 1 sibling, 1 reply; 9+ messages in thread From: Vasanthakumar Thiagarajan @ 2025-04-11 6:25 UTC (permalink / raw) To: Sarika Sharma, ath12k; +Cc: linux-wireless On 4/11/2025 11:45 AM, Sarika Sharma wrote: > Currently, RX is_mcbc bit is set for packest send from client as > destination address (DA) is multicast/broadcast address, but packets > are actually unicast as receiver address (RA) is not multicast address. > Hence, packets are not handled properly due to this is_mcbc bit. > > Therefore, reset the is_mcbc bit if interface type is AP. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com> Should there be a fixes tag? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients 2025-04-11 6:25 ` Vasanthakumar Thiagarajan @ 2025-04-11 6:57 ` Sarika Sharma 2025-04-11 7:00 ` Vasanthakumar Thiagarajan 0 siblings, 1 reply; 9+ messages in thread From: Sarika Sharma @ 2025-04-11 6:57 UTC (permalink / raw) To: Vasanthakumar Thiagarajan, ath12k; +Cc: linux-wireless On 4/11/2025 11:55 AM, Vasanthakumar Thiagarajan wrote: > > > On 4/11/2025 11:45 AM, Sarika Sharma wrote: >> Currently, RX is_mcbc bit is set for packest send from client as >> destination address (DA) is multicast/broadcast address, but packets >> are actually unicast as receiver address (RA) is not multicast address. >> Hence, packets are not handled properly due to this is_mcbc bit. >> >> Therefore, reset the is_mcbc bit if interface type is AP. >> >> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 >> >> Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com> > > Should there be a fixes tag? This patch independently does not fix any known issue, this is required because of patch 1 in the series. Due to 1st patch some existing issue is exposed, to address that 2nd patch is required. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients 2025-04-11 6:57 ` Sarika Sharma @ 2025-04-11 7:00 ` Vasanthakumar Thiagarajan 0 siblings, 0 replies; 9+ messages in thread From: Vasanthakumar Thiagarajan @ 2025-04-11 7:00 UTC (permalink / raw) To: Sarika Sharma, Vasanthakumar Thiagarajan, ath12k; +Cc: linux-wireless On 4/11/2025 12:27 PM, Sarika Sharma wrote: > On 4/11/2025 11:55 AM, Vasanthakumar Thiagarajan wrote: >> >> >> On 4/11/2025 11:45 AM, Sarika Sharma wrote: >>> Currently, RX is_mcbc bit is set for packest send from client as >>> destination address (DA) is multicast/broadcast address, but packets >>> are actually unicast as receiver address (RA) is not multicast address. >>> Hence, packets are not handled properly due to this is_mcbc bit. >>> >>> Therefore, reset the is_mcbc bit if interface type is AP. >>> >>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 >>> >>> Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com> >> >> Should there be a fixes tag? > > This patch independently does not fix any known issue, this is required because of patch 1 > in the series. Due to 1st patch some existing issue is exposed, to address that 2nd patch > is required. > Ok Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients 2025-04-11 6:15 ` [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients Sarika Sharma 2025-04-11 6:25 ` Vasanthakumar Thiagarajan @ 2025-04-15 23:22 ` Jeff Johnson 1 sibling, 0 replies; 9+ messages in thread From: Jeff Johnson @ 2025-04-15 23:22 UTC (permalink / raw) To: Sarika Sharma, ath12k; +Cc: linux-wireless On 4/10/2025 11:15 PM, Sarika Sharma wrote: > Currently, RX is_mcbc bit is set for packest send from client as In pending I modified: s/packest send/packets sent/ https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pending&id=f2358d4e1724e40f8558d713cac36710dbbc8f37 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH ath-next v2 0/2] wifi: ath12k: correctly check RX multicast bit 2025-04-11 6:15 [PATCH ath-next v2 0/2] wifi: ath12k: correctly check RX multicast bit Sarika Sharma 2025-04-11 6:15 ` [PATCH ath-next v2 1/2] wifi: ath12k: using msdu end descriptor to check for rx multicast packets Sarika Sharma 2025-04-11 6:15 ` [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients Sarika Sharma @ 2025-04-17 22:57 ` Jeff Johnson 2 siblings, 0 replies; 9+ messages in thread From: Jeff Johnson @ 2025-04-17 22:57 UTC (permalink / raw) To: ath12k, Sarika Sharma; +Cc: linux-wireless On Fri, 11 Apr 2025 11:45:21 +0530, Sarika Sharma wrote: > Currently, the RX multicast broadcast bit is fetched from the MPDU > start descriptor. However, in some scenarios, the value is not > accurate. Therefore, changing the process to fetch the bit from the > MSDU end descriptor for improved reliability. > > Sarika Sharma (2): > wifi: ath12k: using msdu end descriptor to check for rx multicast > packets > wifi: ath12k: correctly handle mcast packets for clients > > [...] Applied, thanks! [1/2] wifi: ath12k: using msdu end descriptor to check for rx multicast packets commit: cb7433cc5cd4d07175dbc41f5a19966e9fae48be [2/2] wifi: ath12k: correctly handle mcast packets for clients commit: 4541b0c8c3c1b85564971d497224e57cf8076a02 Best regards, -- Jeff Johnson <jeff.johnson@oss.qualcomm.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-04-17 22:57 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-04-11 6:15 [PATCH ath-next v2 0/2] wifi: ath12k: correctly check RX multicast bit Sarika Sharma 2025-04-11 6:15 ` [PATCH ath-next v2 1/2] wifi: ath12k: using msdu end descriptor to check for rx multicast packets Sarika Sharma 2025-04-11 6:23 ` Vasanthakumar Thiagarajan 2025-04-11 6:15 ` [PATCH ath-next v2 2/2] wifi: ath12k: correctly handle mcast packets for clients Sarika Sharma 2025-04-11 6:25 ` Vasanthakumar Thiagarajan 2025-04-11 6:57 ` Sarika Sharma 2025-04-11 7:00 ` Vasanthakumar Thiagarajan 2025-04-15 23:22 ` Jeff Johnson 2025-04-17 22:57 ` [PATCH ath-next v2 0/2] wifi: ath12k: correctly check RX multicast bit Jeff Johnson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox