From patchwork Wed Feb 1 06:33:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 649630 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C28E5C636D4 for ; Wed, 1 Feb 2023 06:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230317AbjBAGeX (ORCPT ); Wed, 1 Feb 2023 01:34:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230154AbjBAGeV (ORCPT ); Wed, 1 Feb 2023 01:34:21 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8950A47EF7 for ; Tue, 31 Jan 2023 22:34:17 -0800 (PST) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3114q2pY029546; Wed, 1 Feb 2023 06:34:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=kMp2iDdEPIDlOrLi2rUM/K6vE+/A5EEzk+yp83bhZSo=; b=G1AaWbLFUh1TxJK0hAJjN29ba/EIWNZWmNMah6yJBPnD1n+fVsscpvIPGLF92xzXSfEv opOINxSp2HRG1QQtXIegOCOrCd6WBXpvhtO1aBF3S1i7axRJnIbJNvQ4ZxRPP+003mZK PTPiXpbz0SqQG4XN8cnJb1/sMBUIFbwJMA6A/W9ejlWVAuNh+N0EZ6ChMNMuc/SYNcE7 YopHrFINllCCBiSCZiyfMlpPnk2nfsXe1vd1/nSbBHc3r00m3fraqSJwvmljrM5cd5+i t4ZcQySlgJpBe1Ojn3BhiWQKCyaCftUzKR++Ggu+HCNgBhM39j14/lEPK6wr0irPMRIQ oQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3netx4k77u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Feb 2023 06:34:03 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3116Y3iF018927 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 1 Feb 2023 06:34:03 GMT Received: from ramess-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 31 Jan 2023 22:34:01 -0800 From: Rameshkumar Sundaram To: , CC: , Rameshkumar Sundaram Subject: [PATCH v2 2/3] wifi: mac80211: Avoid BSS color collision detection if its disabled Date: Wed, 1 Feb 2023 12:03:32 +0530 Message-ID: <20230201063333.11747-3-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230201063333.11747-1-quic_ramess@quicinc.com> References: <20230201063333.11747-1-quic_ramess@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: lGQh3iznDFinO0kX0eF78LGlX2V0Fblh X-Proofpoint-GUID: lGQh3iznDFinO0kX0eF78LGlX2V0Fblh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-01_02,2023-01-31_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 mlxlogscore=946 bulkscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302010056 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Don't detect BSS color collision and send collision events to userspace if it is disabled. Signed-off-by: Rameshkumar Sundaram --- net/mac80211/rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index e284897ba5e9..5588067b2af2 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3195,7 +3195,8 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx) if (ieee80211_hw_check(&rx->local->hw, DETECTS_COLOR_COLLISION)) return; - if (rx->sdata->vif.bss_conf.csa_active) + if (rx->sdata->vif.bss_conf.csa_active || + rx->sdata->vif.bss_conf.he_bss_color.collision_detection_enabled) return; baselen = mgmt->u.beacon.variable - rx->skb->data;