From patchwork Wed Feb 1 06:56:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 649628 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 DCFFAC05027 for ; Wed, 1 Feb 2023 06:57:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230414AbjBAG5c (ORCPT ); Wed, 1 Feb 2023 01:57:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjBAG5b (ORCPT ); Wed, 1 Feb 2023 01:57:31 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A8E28A65 for ; Tue, 31 Jan 2023 22:57:30 -0800 (PST) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3114jkhv005125; Wed, 1 Feb 2023 06:57:21 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=M366HwuphEn6XqbknvbhbZfdfjn9c1C/XPeCWaxT5FQ=; b=QwludCRXMziWu1WuxAkXHCPOqIzEnZETNdHyNCUKGmbd646KKyjrTLquYvhZLs2RrjZJ tkumwWrMbYmhIDea/kp+DiBVcOohgNhZno72q7UxQXnUpD+7MHbKWB4WpGvQ+dAn0psX 9ndtG11DiY8dt+3W/b43EORcMhlGer6pwGDvbTuV+LQkOTYAv0OqngbzO45wRTqRlsCc NTtQ2zE0R4i4EVUfi4YHEaK3SALd2b+L9pwhg/Lg2jLH0ulMXKvGDqxx31VYvGehgCtu 7MwXNSkCnViAI6JhO9uoE3I26ztsz5HhGPFxtso6WWyf/gx5gi3rRI/CrtGfUrNBlFPR hw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nfbuh0x5h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Feb 2023 06:57:20 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3116vJ58021327 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 1 Feb 2023 06:57:19 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:57:16 -0800 From: Rameshkumar Sundaram To: , CC: , Rameshkumar Sundaram Subject: [PATCH v3 1/3] wifi: cfg80211: add support to enable/disable bss color collision detection Date: Wed, 1 Feb 2023 12:26:36 +0530 Message-ID: <20230201065638.25990-2-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230201065638.25990-1-quic_ramess@quicinc.com> References: <20230201065638.25990-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: rTjFZwskU9SGcqtW0fBzPh6mTHxKB66h X-Proofpoint-GUID: rTjFZwskU9SGcqtW0fBzPh6mTHxKB66h 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 clxscore=1015 bulkscore=0 priorityscore=1501 phishscore=0 suspectscore=0 spamscore=0 impostorscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302010059 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org As per 802.11ax-2021, STAs shall process BSS Color Change Announcement (BCCA) from AP and switch to new color, but some STAs aren't processing BCCA from AP and not doing color switch, causing them to drop data frames from AP post color change. Provide an option to disable color collision detection and therefore not to do BCCA to mitigate the same from AP. If it's required in case where STA supports BCCA handling, then it can enabled in AP using this option. Signed-off-by: Rameshkumar Sundaram --- include/net/cfg80211.h | 2 ++ include/uapi/linux/nl80211.h | 3 +++ net/wireless/nl80211.c | 3 +++ 3 files changed, 8 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 54a77d906b2d..c4c84ccf8e20 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -304,11 +304,13 @@ struct ieee80211_he_obss_pd { * @color: the current color. * @enabled: HE BSS color is used * @partial: define the AID equation. + * @collision_detection_enabled: HE BSS color collision detection is enabled. */ struct cfg80211_he_bss_color { u8 color; bool enabled; bool partial; + bool collision_detection_enabled; }; /** diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 8ecb0fbee721..a6068cdabf25 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -7442,6 +7442,8 @@ enum nl80211_obss_pd_attributes { * @NL80211_HE_BSS_COLOR_ATTR_COLOR: the current BSS Color. * @NL80211_HE_BSS_COLOR_ATTR_DISABLED: is BSS coloring disabled. * @NL80211_HE_BSS_COLOR_ATTR_PARTIAL: the AID equation to be used.. + * @NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED: is BSS + * color collision detection disabled. * * @__NL80211_HE_BSS_COLOR_ATTR_LAST: Internal * @NL80211_HE_BSS_COLOR_ATTR_MAX: highest BSS Color attribute. @@ -7452,6 +7454,7 @@ enum nl80211_bss_color_attributes { NL80211_HE_BSS_COLOR_ATTR_COLOR, NL80211_HE_BSS_COLOR_ATTR_DISABLED, NL80211_HE_BSS_COLOR_ATTR_PARTIAL, + NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED, /* keep last */ __NL80211_HE_BSS_COLOR_ATTR_LAST, diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 64cf6110ce9d..ed344731e80e 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -377,6 +377,7 @@ he_bss_color_policy[NL80211_HE_BSS_COLOR_ATTR_MAX + 1] = { [NL80211_HE_BSS_COLOR_ATTR_COLOR] = NLA_POLICY_RANGE(NLA_U8, 1, 63), [NL80211_HE_BSS_COLOR_ATTR_DISABLED] = { .type = NLA_FLAG }, [NL80211_HE_BSS_COLOR_ATTR_PARTIAL] = { .type = NLA_FLAG }, + [NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED] = { .type = NLA_FLAG }, }; static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = { @@ -5414,6 +5415,8 @@ static int nl80211_parse_he_bss_color(struct nlattr *attrs, !nla_get_flag(tb[NL80211_HE_BSS_COLOR_ATTR_DISABLED]); he_bss_color->partial = nla_get_flag(tb[NL80211_HE_BSS_COLOR_ATTR_PARTIAL]); + he_bss_color->collision_detection_enabled = + !nla_get_flag(tb[NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED]); return 0; } From patchwork Wed Feb 1 06:56:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 649998 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 D49AAC636D4 for ; Wed, 1 Feb 2023 06:57:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231131AbjBAG5e (ORCPT ); Wed, 1 Feb 2023 01:57:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230390AbjBAG5c (ORCPT ); Wed, 1 Feb 2023 01:57:32 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9847E93F4 for ; Tue, 31 Jan 2023 22:57:31 -0800 (PST) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3116t4mU032320; Wed, 1 Feb 2023 06:57:23 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=aizOQmfwtElw4Y99OLXIyLzChVNyD+QkwkMAL13tfh5B/1nf6TZYEBCbwKQY3PJhdBqH icyXPu74OFOcjJZuJlYPXWks/sT5cVROvVHba8AUP9fDS/hDp3zQynWYG/u8aiimJEdR Z5N3r/+Mq23zT4UnvkBAmv98/d36Pvaa3z2bJTWakQ/Yrplq9vjGUPzsQIzBqd1UlPaZ wBf3lV1xWiW8PUF3Sw5b34q0SOVNUyjbIg8w0HfSmareSXTdHx4dgYyXpDy9Nzrp758q VB/y/WCR2VBpehCWJPpwf3Gj6Wk7EK+hVfxU239SkNlleFpFs3JLvYbzbqLa+Q1fox6f pA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3new3ub72u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Feb 2023 06:57:23 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3116vMNs021360 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 1 Feb 2023 06:57:22 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:57:19 -0800 From: Rameshkumar Sundaram To: , CC: , Rameshkumar Sundaram Subject: [PATCH v3 2/3] wifi: mac80211: Avoid BSS color collision detection if its disabled Date: Wed, 1 Feb 2023 12:26:37 +0530 Message-ID: <20230201065638.25990-3-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230201065638.25990-1-quic_ramess@quicinc.com> References: <20230201065638.25990-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-GUID: TwwdMYMKr0X38IregJirGq7qkbSvviBx X-Proofpoint-ORIG-GUID: TwwdMYMKr0X38IregJirGq7qkbSvviBx 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 lowpriorityscore=0 phishscore=0 clxscore=1015 suspectscore=0 mlxscore=0 mlxlogscore=946 impostorscore=0 adultscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302010059 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; From patchwork Wed Feb 1 06:56:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 649627 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 B56E0C636D7 for ; Wed, 1 Feb 2023 06:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230372AbjBAG5f (ORCPT ); Wed, 1 Feb 2023 01:57:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230430AbjBAG5e (ORCPT ); Wed, 1 Feb 2023 01:57:34 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D9D946A0 for ; Tue, 31 Jan 2023 22:57:32 -0800 (PST) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3116kRUI010894; Wed, 1 Feb 2023 06:57:25 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=W/BAUuFz1Nwd8KZNQzffNYl5Rqqhtt0te+jAOvUkxbc=; b=gB0Rq9xXEXKdVIJnT3p4TwKjFowK+HawbZ/af7NDASOEChGoMz9rI7Iu5DXm22jc/kaG g/cLXVTAJSzmZuF/xjAEAVk6lG7Yy83xMNCQ4QrzfjbpfAFN4lmwveqZ1i3w9UOmV+oz RD4vI0WDGLUHkbpZIosK5fXtOIFG4uCBB1I4hBq9K9IGTJnM/ecW7SuGTs70og77keYg //e0/VpqMWF2yE+nLV85pHUfBSYSB2RE1GJGROZBGzhKQkbf1WJg3EExfQ6aAzLoRmQU OU1y6HG2JaIHVid649HijEi2/Qtn9IgjHlWuyoV9JT82F+32+v9aw9+LBNCfKhW+OURw 7g== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3new3ub72w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Feb 2023 06:57:25 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3116vOTv021375 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 1 Feb 2023 06:57:24 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:57:22 -0800 From: Rameshkumar Sundaram To: , CC: , Rameshkumar Sundaram Subject: [PATCH v3 3/3] wifi: ath11k: add support to enable/disable BSS color collision detection Date: Wed, 1 Feb 2023 12:26:38 +0530 Message-ID: <20230201065638.25990-4-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230201065638.25990-1-quic_ramess@quicinc.com> References: <20230201065638.25990-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-GUID: GKR9co4MAXwVdS1u5orXMD-MgYm1QvuB X-Proofpoint-ORIG-GUID: GKR9co4MAXwVdS1u5orXMD-MgYm1QvuB 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 lowpriorityscore=0 phishscore=0 clxscore=1015 suspectscore=0 mlxscore=0 mlxlogscore=967 impostorscore=0 adultscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302010059 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Enable/Disable BSS color collision detection based on user configuration of collision detection and BSS color feature itself. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Signed-off-by: Rameshkumar Sundaram --- drivers/net/wireless/ath/ath11k/mac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 9e923ecb0891..6d5290996d9f 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3112,6 +3112,7 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, u8 rateidx; u32 rate; u32 ipv4_cnt; + bool color_collision_detect; mutex_lock(&ar->conf_mutex); @@ -3370,10 +3371,12 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, if (changed & BSS_CHANGED_HE_BSS_COLOR) { if (vif->type == NL80211_IFTYPE_AP) { + color_collision_detect = (info->he_bss_color.enabled && + info->he_bss_color.collision_detection_enabled); ret = ath11k_wmi_send_obss_color_collision_cfg_cmd( ar, arvif->vdev_id, info->he_bss_color.color, ATH11K_BSS_COLOR_COLLISION_DETECTION_AP_PERIOD_MS, - info->he_bss_color.enabled); + color_collision_detect); if (ret) ath11k_warn(ar->ab, "failed to set bss color collision on vdev %i: %d\n", arvif->vdev_id, ret);