From patchwork Fri May 23 11:58:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 892568 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DEB15D8F0 for ; Fri, 23 May 2025 11:58:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748001539; cv=none; b=rU5QfzEXq5C8NdJziND0QkdOvMOl6qxTEP+IsYL0htGX4JHR0o+qjOd8oxRh5aVp51YKtLORD0eC6akz77qRIQWtY0LmqSlp7OYSw8Doc5BWgqdJD6kYhme5PNWAFdS5QfJi7STS+lWrKHGDtvHTfGAQlZ8AJ38YX5IrAhC07v0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748001539; c=relaxed/simple; bh=gUNupGepM1WVSMap8KXNT9bP2CjzqWLKV0ztkGjCTRs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=XXtl6IVordcOa3C2ktW6DtTm2rXmXAaMmPWws+g9SyNvkxknrBwaySos+cspHEs+RIHrKJUZoCPqxanbS78oqN/+8afhq1dSTA5dPHKQUTkw0aby9Yn42QtcdjcsGlF0g95ckZjOCWi96n0+uy8gtwDaUQNUDxdqn8wqIDwEqx0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=p6lJZwo2; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="p6lJZwo2" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54N50Jjt023047 for ; Fri, 23 May 2025 11:58:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:date:from:in-reply-to:message-id:references:subject:to; s= qcppdkim1; bh=a+4rMuTii1JkiDDuWIDdg9QzjymHuS15HI2nOtnUfsg=; b=p6 lJZwo2lydkJBpExQQQo81zznQeUevqhYah8I2NzYlr5qBRzwD8BtxS6nOS2Lpw7C LZOLu+kvkGuJnbo9n7Sg5QRxU1pvYeLbZHmsWAh7mLqolGNgHdVRBmi86IShlF10 UX+ygSA57YFmGkVOXe8JTuCNzjIchCW1QYUpd3sjLc7+WmTVeT/LEV+CdY0hxnTH iL0+0eCLX9zJjmsbZMs8bUQt0MmjN4qkgKzQ1QLHO3GZNG/+wLJ6y/+O0tQFjVJK GRwywylu3pUAextVzwhJVeplfoncCpUakNy/AI0GyGyQ+eUcLE35YmF2vLt7gvXE ikANDS7ITxm/84eacYUQ== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf51tpk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 23 May 2025 11:58:56 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-231e059b34dso48769945ad.0 for ; Fri, 23 May 2025 04:58:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748001535; x=1748606335; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=a+4rMuTii1JkiDDuWIDdg9QzjymHuS15HI2nOtnUfsg=; b=DvId/IsGWt4a4z1YkeMkTzCiebZTJ+4cKy6K1VvcWAxLtmAqb5uX74eBx9qpmDR8Ny xndmbRs1b3m361NouS6JSt26hX6BYlL7cPLKxS5ivE2o4Hhp7RAwfOPYYDp/ZByW7Nlm rLJUIOftWhBiYRyZuyoLucr3orO4mGxbryrDS2MnkYYXuoG2TU1xjIWYARHwI8P8wLqT i5byKQaQcFi08+r0M4YhnzgBkgqysLLZTjt9BDAsfjLMnBt2/J9oPuxwJXCZAoiZXwIA fdSmGkvR+wNGGVCk7oEEGP1BhYAEtN9j1hWSrJF8FKgSdnc3d8rh9pjwv0IMQYrpglaY TA/w== X-Gm-Message-State: AOJu0YxrXwQy5MVMdlqvpIg9VFeoQHKE8+mTdk6kjs41QrxHfcFaeGhB TMnAg2eTgt9sny0EjLRrQexxBCa4j887R8bx1aW3gM7/jtUxZG8dzzF9ACcHl25B81Luzyh10vr UGHD4+cnNTSvVjkuo2Sg8mRTq6qXxv33pnpp/gzcAA8UUvLO7iz8y2JmSFhTTWSQjUmtq1A== X-Gm-Gg: ASbGncs8dCSFaUVZr3xuQ0b+LnenQecH+HKHlhH11K3iRMgmKsHvLI/xwMIStaRI/s/ d3/Zc8VKWcKAwJxorLslDNlA/R3v/340X20+9uDEZ9ORYhPR8R2H10Ouq5dRJB9zwxKwC/DKNNs BJnB6p1zFY6XtwmQswwLKjA4LsPXPMKQLvJnYQ2OHpYcIJdaKlbUdPzFOm3bIiM1vqeFlDTHjvc 298yM25QTD8POfW9mRz09j2pc3V3AK5sPIdH3Ww39pHLxnRg2HSmgNRWHpJr3wudDLlFCxx3iDq mycfEDKMmXq1vJzGOGJ6e4PeG0kFbHV0hYzG2TPZBTrD7siBQN+1lqmO1ky3ZteUz8ws9ce8cFZ vSTlsnbus8A9wAj/aliTpqJPmy4GT9ACMmRqXWJabq46CxQ== X-Received: by 2002:a17:903:46cd:b0:223:54e5:bf4b with SMTP id d9443c01a7336-231de36c29emr402176245ad.25.1748001535397; Fri, 23 May 2025 04:58:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH0W0FLwItBMwzY4Lcx0KGn5zBhb9zVUj9WBY6KUcTfKCntRnRPHoVllcd5BIgNWoltXY97HA== X-Received: by 2002:a17:903:46cd:b0:223:54e5:bf4b with SMTP id d9443c01a7336-231de36c29emr402175925ad.25.1748001535029; Fri, 23 May 2025 04:58:55 -0700 (PDT) Received: from che-siroccolnx03.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-233f9e17e3csm7210725ad.177.2025.05.23.04.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 May 2025 04:58:54 -0700 (PDT) From: Maharaja Kennadyrajan To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Maharaja Kennadyrajan Subject: [PATCH wireless-next v3 1/2] wifi: mac80211: update ieee80211_rx_status::freq documentation for multi-radio Date: Fri, 23 May 2025 17:28:37 +0530 Message-Id: <20250523115838.481402-2-maharaja.kennadyrajan@oss.qualcomm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20250523115838.481402-1-maharaja.kennadyrajan@oss.qualcomm.com> References: <20250523115838.481402-1-maharaja.kennadyrajan@oss.qualcomm.com> X-Proofpoint-GUID: sMSULzkgGzgyMPyiINJSmohcgekyZE2J X-Proofpoint-ORIG-GUID: sMSULzkgGzgyMPyiINJSmohcgekyZE2J X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIzMDEwNSBTYWx0ZWRfX3ufnJ8gZz219 LvtnOU65daA8/TF1R85868BHYw8hMVebH5QyaUudhZm6Go2umtvpoylMSeKqr+L6dG4Bxx93ed7 pQeRpZi5SDgds3ZOQSB3d0fq1P4zqYm8IDzklc2yyjuzdC0ow3TF790Gk/PaQcj0oKnuVfVZMnU G0zWQc/iUA0GRPtF+1m28yqcPIAjS/eNa/38ZUDP39xD6tjuyfYB771dA5u+5+gDcJOnkEnM9f7 /WGVUyP5/A2V5xdtKx3cknvj6BC/2rJKs0RwCD5b/BHSSHbj2+8f3fLr8pu3lbGL/uAFv3n3xlL WZ/RsE+ZKgy/TQIcBJCESHmMLLPNRPT7/BLkFP73JLBibrER5jPy8ZeNHbelrxJfGeLxH4Xs7qk MN+b6A8P3noqS4TJksBcCiBLbF0AoBDnabFnqoJGYQ23TgWivEp51AyaFIDLGYifcFhhHPFA X-Authority-Analysis: v=2.4 cv=R7UDGcRX c=1 sm=1 tr=0 ts=68306300 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=dt9VzEwgFbYA:10 a=EUspDBNiAAAA:8 a=G3GIQwjkmUm1iQ8NZroA:9 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-23_03,2025-05-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 mlxscore=0 impostorscore=0 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000 definitions=main-2505230105 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: With multi-radio device, it has been observed that the group-addressed management/data Rx frames, which are actually received on one band, are getting processed on an interface running on a different band. This occurs because there is currently no check to ensure that the sdata is running on the same band as the frames are received on before start processing those frames. Update the documentation of ieee80211_rx_status::freq to make it mandatory for group-addressed data frames in multi-radio device. Drivers such as ath12k and mediatek(mt76) are currently supporting multi-radio and report ieee80211_rx_status::freq in their Rx frame indication to the mac80211 driver. Signed-off-by: Maharaja Kennadyrajan --- include/net/mac80211.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 82617579d910..9212c2089638 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1612,8 +1612,10 @@ enum mac80211_rx_encoding { * it but can store it and pass it back to the driver for synchronisation * @band: the active band when this frame was received * @freq: frequency the radio was tuned to when receiving this frame, in MHz - * This field must be set for management frames, but isn't strictly needed - * for data (other) frames - for those it only affects radiotap reporting. + * This field must be set for management frames, also for group + * addressed data frames in case of multi-radio device, but otherwise + * this isn't strictly needed for data (other) frames - for those it + * only affects radiotap reporting. * @freq_offset: @freq has a positive offset of 500Khz. * @signal: signal strength when receiving this frame, either in dBm, in dB or * unspecified depending on the hardware capabilities flags From patchwork Fri May 23 11:58:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 892241 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C6945D8F0 for ; Fri, 23 May 2025 11:59:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748001542; cv=none; b=mQ6Y3X/IkmUkWyaAeuD1rDuuVLfRU+IJLJ8D+73bmlM99BwAKlKqkhY9S2iWqEluAP5OX15tVO7BeZMSpxAE+3cQcU/cLadjRujAj1r2wQuYGEMylM7xtrqACQojOLgGeI0yF9JA9uFftNJ5E/1IdMdJbTTzA7u5o/ytgd5VBh8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748001542; c=relaxed/simple; bh=tg9Z2/C7Cvlvx0J305uqJ8kQlYGc9SuOKtHSzPFzmPc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=vDAW/dkT+e5H0F++wniVUYDiiaEXctJ54OKc9xMyw5DB/IreAo1OxJJQIP9/MuY3I5N/cw4Y7GJDX6hmUIq5i+LkkQRLQLOhc/heqJeXCfRGpzNcXOkTQGvuk/yyh1RkLFg5zY55FHIXpPKxKX1DuTTob6pbig5hwIZDIlaD/lU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=SGA0Y2ij; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="SGA0Y2ij" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54N7mrtD003269 for ; Fri, 23 May 2025 11:59:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:date:from:in-reply-to:message-id:references:subject:to; s= qcppdkim1; bh=Qq51XT7YYtig8sR6o9TZUSlLWr6Yl9WicUlD2R+enF8=; b=SG A0Y2ijrt4V15gz+NikM5qcaRxE3EeWHOSoRpnXfONZC7j/XNdalpGicZhzzc2xpa WAmPDvRzJIwccrhdroqbUWIyuciERTYJmMvHia1MA2OhLq4BJsqYswYEbN1omfwz eZzxX9hLgma1AOmyvUt8BGQ9yJOBsfwiQqOfaqDG/NvD5vKbPDnV0StL2AFKDQH6 9eineyr68Qu43vMqIx9n6lHA0XnJirrUvbXBIwOa+OlMYSCcefnvfQlWFAS6r67J gkly6AtmJVkEV9V34iAI1ceNHw5fsK/+hQXmzh1PSZlGzswOtDvdgx2+S3dqFItB MwoESFTlEj7E0DblUu4g== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf0a2ha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 23 May 2025 11:59:00 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2321215e4c1so8966895ad.1 for ; Fri, 23 May 2025 04:59:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748001539; x=1748606339; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Qq51XT7YYtig8sR6o9TZUSlLWr6Yl9WicUlD2R+enF8=; b=YuVa3rxWD6hdMnkn+NGh+M0bok4mQTmh2BRRSx52Xrq5cAG+KF3PmkdqN9vpC007Is 6UyPkp9QQtjRDgn2A8upSV+N8j4w/j0GpWLz/xp5JkXLwlrvWUde3/qwzjxzAK94iQUJ Xqxcyp0nTmlz2LjmxT+4MTnv7lc+D3t9nS3SgN8BpQWKsHOdQEbVBMEOOK7+SyJf6eGD PPQhWsmw/D7OTYimRmfEYrypeDU1NPZgU44MdIHUj6AxcIp8MhCmEpkNNNREVN03DlF/ t93cvfp57HZGlNr3ngQpd5UieGVu8BJ66N/91SiZPOclLg4kr8Z8GzpNpDkydCmK7Ub0 3dYg== X-Gm-Message-State: AOJu0YzoWAgSHy/1nfWzjikK4HrcGDTf9+LIS0dsQ9HHe3CxcfYDrYRv FtDIbdj9cr1toxJJfNwfMT6Sl8ZXBmW0yriFP/tNibVDfgjbS7XMCIwStrgtmjag2XAuFrV2OVQ SfDtr8r6BZD9xiE+AwPFrzjvffHPATCPL5aO3N5yimEdsq8MbrEO0hIvfd8kzX+Ai915LHg== X-Gm-Gg: ASbGnctuqiEYzCu+NWFe53kYO9e+/ry1GOldiP2+Go8UOvJpsMZA3XLaWrztBYirwNU n3fyzIOMgedJ0DOv6R4UfShGE5SJ6AlC8oPiEFH47Z5L44aPSJrnwRg19KIMVpdhY8gVAyrHb62 ad3RxhgGfLVR52vOKc/0uO+1ymwG1UrYx1DDnui9DMya7H0ErVVRlvPDPa+V9IxzO2L2KH/1MWA C84OdDTBaQ+jn9tWTisa1YC5uEThaahtKlhpBiqZouvMdtzMZIPMJX2v7WvLtBbs/YKjvrnqrXs 3j16wHvBRxndDpgjuVehkZmhw9WeX3ahv+IhO0nPM4Yc9EA45L9kp1rIV8ERMN+WkmtOcquQGqn gnbZhA+Pops45373TyOrI6knVUsW7eMvaavDaXh5htJfFxg== X-Received: by 2002:a17:902:da88:b0:215:a56f:1e50 with SMTP id d9443c01a7336-233f0671694mr50435885ad.8.1748001539235; Fri, 23 May 2025 04:58:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHoGu0ITV+RzVbqTlbHTMQYU04CL82KgiCWrNEupxYn1CXXxlVYtS/NEpIWCA4mbtfJjScxjg== X-Received: by 2002:a17:902:da88:b0:215:a56f:1e50 with SMTP id d9443c01a7336-233f0671694mr50435575ad.8.1748001538812; Fri, 23 May 2025 04:58:58 -0700 (PDT) Received: from che-siroccolnx03.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-233f9e17e3csm7210725ad.177.2025.05.23.04.58.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 May 2025 04:58:58 -0700 (PDT) From: Maharaja Kennadyrajan To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Maharaja Kennadyrajan Subject: [PATCH wireless-next v3 2/2] wifi: mac80211: process group addressed Rx data and mgmt packets on intended interface Date: Fri, 23 May 2025 17:28:38 +0530 Message-Id: <20250523115838.481402-3-maharaja.kennadyrajan@oss.qualcomm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20250523115838.481402-1-maharaja.kennadyrajan@oss.qualcomm.com> References: <20250523115838.481402-1-maharaja.kennadyrajan@oss.qualcomm.com> X-Proofpoint-GUID: SF7gb7XGxQ8iPTPLU8vv8n7xeo3BmnvO X-Proofpoint-ORIG-GUID: SF7gb7XGxQ8iPTPLU8vv8n7xeo3BmnvO X-Authority-Analysis: v=2.4 cv=ZP3XmW7b c=1 sm=1 tr=0 ts=68306304 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=dt9VzEwgFbYA:10 a=EUspDBNiAAAA:8 a=Y7y7kotgnV_wd4PCqGcA:9 a=uG9DUKGECoFWVXl0Dc02:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIzMDEwNSBTYWx0ZWRfX8dN4VJRXrqwy fZ+b2FAJzTt0N27WYFDbcPWzG4Iaz+6zOyQy1bvwEtiD9h7uY7vGH4Xv/ZAUMjbib47FX0Z6CWf d3vjdTyheitlelucSASFy/UXgXwrOGVsMn0wUP73aHlUi4DQZ1/6CdQbYJWeFTMki/1TcXPSf30 uEqd4lyiC8P7aPs85eRMas1JLE2mIvm91p67bG/pPMAjZTqRVp3Do0G2YJfvxZY8u6gqEIsBNvt Qpqap2+6MOAtI5LH/XhUTlJD3ErTGhIB9CJEI6j1TX4CVYtO/6qaXeXQ3snzLDoz6rIcWHTMckr PznMvTlTvLX0hCV4RHOuf6Q8iAeH23RGJmLLCI0at2+ee70e9bWQXj5e77XiQnXzS+zY0gortXJ uaYQLc6GpAfRZxJFjkWdgrxR+AQxn9d9GtM/txBWcZpcJsyKKz2gPI7oI+GttwJqAaWKdYBV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-23_03,2025-05-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 impostorscore=0 phishscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000 definitions=main-2505230105 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Currently, in multi-radio devices, group-addressed data and management frames received on one band are getting processed on an interface running on a different band. This occurs because these frames do not have the destination station information, unlike unicast Rx frame processing where the transmitting station is known. There is no check to ensure that the sdata is running on the same band as the frames are received on before processing those frames. Fix this by checking the operating frequency of the interface against the frequency of the packets received before forwarding them to the interface in multi-radio devices. The current behavior is retained as a fallback mechanism when the frequency is not reported by the drivers. Signed-off-by: Maharaja Kennadyrajan --- net/mac80211/rx.c | 48 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 09beb65d6108..59028c08dd52 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -5125,6 +5125,30 @@ static bool ieee80211_rx_for_interface(struct ieee80211_rx_data *rx, return ieee80211_prepare_and_rx_handle(rx, skb, consume); } +static bool +ieee80211_rx_is_sdata_match(struct ieee80211_sub_if_data *sdata, + int freq) +{ + struct ieee80211_link_data *link; + struct ieee80211_bss_conf *bss_conf; + struct ieee80211_chanctx_conf *conf; + + if (!freq) + return true; + + for_each_link_data(sdata, link) { + bss_conf = link->conf; + if (!bss_conf) + continue; + conf = rcu_dereference(bss_conf->chanctx_conf); + if (conf && conf->def.chan && + conf->def.chan->center_freq == freq) + return true; + } + + return false; +} + /* * This is the actual Rx frames handler. as it belongs to Rx path it must * be called with rcu_read_lock protection. @@ -5264,18 +5288,26 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, * the loop to avoid copying the SKB once too much */ - if (!prev) { - prev = sdata; - continue; - } + /* Process the group addressed management and data packets + * in the intended interface when the operating frequency + * matches with rx_status->freq in multi-radio devices. + * If rx_status->freq is not set by the driver, then + * follow the existing code flow. + */ - rx.sdata = prev; - ieee80211_rx_for_interface(&rx, skb, false); + if (ieee80211_rx_is_sdata_match(sdata, status->freq)) { + if (!prev) { + prev = sdata; + continue; + } - prev = sdata; + rx.sdata = prev; + ieee80211_rx_for_interface(&rx, skb, false); + prev = sdata; + } } - if (prev) { + if (prev && ieee80211_rx_is_sdata_match(prev, status->freq)) { rx.sdata = prev; if (ieee80211_rx_for_interface(&rx, skb, true))