From 823860941d1901de16c7a3c61e686f78d5ddec0b Mon Sep 17 00:00:00 2001 From: Dundi Raviteja Date: Fri, 5 Mar 2021 21:07:10 +0530 Subject: [PATCH] wlan: Drop broadcast AMSDU frames Drop AMSDU subframes if AMSDU subframe header's DA is equal to broadcast address. Change-Id: I21f2b95b45fb150a857d23ba158a0f9df15d5c46 CRs-Fixed: 2897293 --- drivers/staging/prima/CORE/TL/src/wlan_qct_tl_ba.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_ba.c b/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_ba.c index 5cdb270df2b0..37586aa88680 100644 --- a/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_ba.c +++ b/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_ba.c @@ -873,6 +873,7 @@ WLANTL_AMSDUProcess static v_U32_t numAMSDUFrames; vos_pkt_t* vosDataBuff; uint8_t llc_hdr[6] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00}; + uint8_t broadcast_addr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ /*------------------------------------------------------------------------ @@ -997,10 +998,13 @@ WLANTL_AMSDUProcess } /** - * Set drop_amsdu flag and drop AMSDU subframe if AMSDU subframe DA - * is equal to LLC header + * Set drop_amsdu flag and drop AMSDU subframe if + * 1. AMSDU subframe header's DA is equal to LLC header or + * 2. AMPDU header's DA is a broadcast address */ - if (vos_mem_compare2(MPDUHeaderAMSDUHeader + ucMPDUHLen, llc_hdr, 6) == 0) { + if ((vos_mem_compare2(MPDUHeaderAMSDUHeader + ucMPDUHLen, + llc_hdr, 6) == 0) || + (vos_mem_compare2(MPDUHeaderAMSDUHeader + 4, broadcast_addr, 6) == 0)) { pClientSTA->drop_amsdu = true; vos_pkt_return_packet(vosDataBuff); *ppVosDataBuff = NULL;