From: Sarika Sharma quic_sarishar@quicinc.com
[ Upstream commit cb7433cc5cd4d07175dbc41f5a19966e9fae48be ]
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 Link: https://patch.msgid.link/20250411061523.859387-2-quic_sarishar@quicinc.com Signed-off-by: Jeff Johnson jeff.johnson@oss.qualcomm.com Signed-off-by: Sasha Levin sashal@kernel.org ---
## Analysis and Recommendation **YES** - This commit should be backported to stable kernel trees. ### Detailed Analysis: **1. Bug Fix Nature:** The commit fixes a real bug where multicast/broadcast packet detection is unreliable when using the MPDU start descriptor (`RX_MPDU_START_INFO6_MCAST_BCAST` from `info6` field). The commit message explicitly states "in some scenarios multicast bit is not set when fetched from MPDU start descriptor." **2. Code Changes Analysis:** The fix changes two functions in `drivers/net/wireless/ath/ath12k/hal.c`: - `ath12k_hw_qcn9274_rx_desc_is_da_mcbc()` - `ath12k_hw_qcn9274_compact_rx_desc_is_da_mcbc()` Both change from reading bit 15 of `mpdu_start.info6` to reading bit 9 of `msdu_end.info5`, which is described as "more reliable as it is per MSDU." **3. Impact Assessment:** - **User Impact**: Multicast/broadcast packet misclassification can cause serious networking issues including packet drops, incorrect routing, and potential security vulnerabilities - **Scope**: Limited to ath12k QCN9274 hardware (a specific WiFi chipset) - **Risk**: Very low risk - changes only the bit field being read, using well-defined hardware descriptor fields **4. Backport Suitability Criteria:** ✅ **Fixes important bug**: Incorrect multicast/broadcast detection affects real user traffic ✅ **Small and contained**: Only changes which bit field is read in two functions ✅ **No architectural changes**: Simple hardware register access change ✅ **Minimal regression risk**: Well-defined hardware fields with clear semantics ✅ **Critical subsystem**: Network packet classification is fundamental functionality ✅ **Clear side effects**: No complex side effects beyond fixing the core issue **5. Comparison with Historical Examples:** This is very similar to "Similar Commit #1" which was marked "YES" for backporting. Both commits: - Fix incorrect multicast/broadcast packet detection - Change which hardware descriptor field is used - Are small, contained fixes - Have minimal regression risk **6. Technical Justification:** The MSDU end descriptor is indeed more reliable for per-MSDU information as stated in the commit message. The MPDU start descriptor contains MPDU-level information which may not accurately reflect the multicast/broadcast status of individual MSDUs within an aggregated frame. **7. Testing and Validation:** The commit includes "Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1" showing it has been validated on the target hardware. This is a clear, well-justified bug fix that meets all criteria for stable tree backporting with minimal risk and clear benefit to users with affected hardware.
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 cd59ff8e6c7b0..42dd4cab7f258 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, @@ -908,8 +908,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,