From patchwork Mon Jun 10 08:52:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 803469 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 A96E05227 for ; Mon, 10 Jun 2024 08:52:30 +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=1718009553; cv=none; b=rBdh6brOOjoR5v8nBbysvuD/UZImKQFc6t8ZtsWWlM7nN0kk7o1J//o3lzgcGosrrFCVBDuEocKg1WUpky/3LtxIV0KEHo5POL2chbKcbdtBct5QCtXwjByMe0hsqABs3/ZZwI7IJktG1Px7M0b6bMSl0lS+mT6YaUZG1kVNj5A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009553; c=relaxed/simple; bh=mG1CTDTAyQhsJvXWvvrYqwqtus+dCZgcLMqQN4/1aw0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c3c2hrFj5Dpw3gcXdah+r63Mcnrm5YIjRqSwXJjBI2AgAfCgn0Z6av2Wimy7p9o6nb43HiRX+kc2UHxRa3J/xsFtrqXkoI36cWNRVsH1Wj0zKuLotN2hFi+0jLpEQgd7eMTCtHCwB/pSIgp8lc+r878X/rU2VOvpW36eaDouh90= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Z5UrfQWq; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Z5UrfQWq" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 459M1NFh009886; Mon, 10 Jun 2024 08:52:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=Q+S+SyhZ6ZNOVgG8fnskgmLz nhaWY4ge9xkUl+9Wr3Y=; b=Z5UrfQWqmHGnRTjp8DVpRLYRTb2rCA4BwXRAkYHE Q1sYUDvelVelXX9nqAhLclKN7McW3FBtBYmgkdrUXj8XUYe0jUvcjFoOKWj1P7CV cBpfak/wZMWGuLXfPteKIqXBGdYh6Qy2rzGJ1C62tv0Cz+FB3UN7TfSoKg1FIlGx Mwhv3yidecLk4IgLfCNJXuzeRwU5dpczlUe2uO9xM53MBKUquVbh9H226RwaG1E0 q8PVynX7FE85fqrJWWMTe6DuoNxyBziXbvN9Yv4paJ7uxRjtxAwDD3mdW86I+e0g pIvRxFPi52vrSO5aMDha3/II7K8gnDUjXRwaxmdDTnnvLA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ymea6k1g9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2024 08:52:26 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 45A8qOWT023692 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2024 08:52:25 GMT Received: from hu-vjakkam-hyd.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.1544.9; Mon, 10 Jun 2024 01:52:23 -0700 From: Veerendranath Jakkam To: CC: , Subject: [PATCH 1/4] wifi: cfg80211: make BSS source types public Date: Mon, 10 Jun 2024 14:22:01 +0530 Message-ID: <1718009524-5579-2-git-send-email-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1718009524-5579-1-git-send-email-quic_vjakkam@quicinc.com> References: <1718009524-5579-1-git-send-email-quic_vjakkam@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: mts5n5LZ-PERMc78bAtSgVqxLoeddNPr X-Proofpoint-ORIG-GUID: mts5n5LZ-PERMc78bAtSgVqxLoeddNPr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-10_02,2024-06-06_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 spamscore=0 phishscore=0 mlxlogscore=675 clxscore=1015 lowpriorityscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406100067 Define public enum with BSS source types in core.h. Upcoming patches need this to store BSS source type in struct cfg80211_internal_bss. Signed-off-by: Veerendranath Jakkam --- net/wireless/core.h | 6 ++++++ net/wireless/scan.c | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/net/wireless/core.h b/net/wireless/core.h index 118f2f6..a48df7cf 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -170,6 +170,12 @@ static inline int for_each_rdev_check_rtnl(void) if (for_each_rdev_check_rtnl()) {} else \ list_for_each_entry(rdev, &cfg80211_rdev_list, list) +enum bss_source_type { + BSS_SOURCE_DIRECT = 0, + BSS_SOURCE_MBSSID, + BSS_SOURCE_STA_PROFILE, +}; + struct cfg80211_internal_bss { struct list_head list; struct list_head hidden_list; diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 1278538..1fad019 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -2107,11 +2107,7 @@ struct cfg80211_inform_single_bss_data { const u8 *ie; size_t ielen; - enum { - BSS_SOURCE_DIRECT = 0, - BSS_SOURCE_MBSSID, - BSS_SOURCE_STA_PROFILE, - } bss_source; + enum bss_source_type bss_source; /* Set if reporting bss_source != BSS_SOURCE_DIRECT */ struct cfg80211_bss *source_bss; u8 max_bssid_indicator; From patchwork Mon Jun 10 08:52:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 803468 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 207456F2FA for ; Mon, 10 Jun 2024 08:52:32 +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=1718009554; cv=none; b=D0Exfy7Pjy+xCZ11z6E8jF+SCJH79SQ+QF9zi0mKPJ2wM+tbUinWTduNb0jhM5yb9DuVPZ5u8+R1w3TzPOx6UOE+xfeub43usYXG/CG/WCCz+NstlyMQOck+cix5f/1Z8LIJ/JHPeWv4E7uV1vMEeSW0sOuxI0tVpPUAuCoTRVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009554; c=relaxed/simple; bh=bv82AK/TSwhf0dZo8VIDFGtc/80T1hRuP/nK89sGS1A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nLeKjJDd9R2UQMLI1g1TZp90rivzMFpOlBwVoNTzCWb4VIbAzRSSpy8YAt2On2MVl2gZ7C9xTnJ8zBgOVUPxWNJohH4DS0SWEWv/tCPe4tydIj/80o5SDUPmygvb8C8PmXRi8jxHbMZChjDIx5daTpNX3E4icFBxnYxj31Fsf6U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=hz/PpEcC; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="hz/PpEcC" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45A0WKUT023208; Mon, 10 Jun 2024 08:52:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=BpRzBf3DVLlS1zeEpZwpWni7 y4VPIeIi4vsDdkJyb8U=; b=hz/PpEcC5TNxeHDHOlNBk65arV3LhqYMHVguEaY3 xhxpqC6rvLIl+4Rjpr2wSvmlY/c5RR9y53xXXsSk1A9C2Dn2oiKF3XVW9d9OBOpm wiWmfKUJN637TMH3dLFG/WlpjtM89Fo8DiOd7m0zbZISL9YV3PVyDz76d0q4UPRc faxVkPUcLe9rYyVYGkKc28fvglB2N1Vorgu/Iavi8TgvndxHjb9KorxWbP1NNcjL JDTIgCu1yDSrYzF9exZ7RAhmETE4ks7gjA7OAbIuW67vghg3Iddd/v9aDwBzoxYd M1xbQj/tMAQ2oTMQuKZt7etzXmtEQ1du/fehoDueqPR7LQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ymfcv2yd7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2024 08:52:28 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 45A8qRQu029453 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2024 08:52:27 GMT Received: from hu-vjakkam-hyd.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.1544.9; Mon, 10 Jun 2024 01:52:24 -0700 From: Veerendranath Jakkam To: CC: , Subject: [PATCH 2/4] wifi: cfg80211: skip indicating signal for per-STA profile BSSs Date: Mon, 10 Jun 2024 14:22:02 +0530 Message-ID: <1718009524-5579-3-git-send-email-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1718009524-5579-1-git-send-email-quic_vjakkam@quicinc.com> References: <1718009524-5579-1-git-send-email-quic_vjakkam@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: ZIvkvj7hYQbeXRgcAn-6kFwco2BdgBBx X-Proofpoint-GUID: ZIvkvj7hYQbeXRgcAn-6kFwco2BdgBBx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-10_02,2024-06-06_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406100067 Currently signal of the BSS entry generated from the per-STA profile indicated as zero, but userspace may consider it as high signal strength since 0 dBm is a valid RSSI value. To avoid this don't report the signal to userspace when the BSS entry created from a per-STA profile. Signed-off-by: Veerendranath Jakkam --- net/wireless/core.h | 2 ++ net/wireless/nl80211.c | 26 +++++++++++++++----------- net/wireless/scan.c | 2 ++ 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/net/wireless/core.h b/net/wireless/core.h index a48df7cf..4281f85 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -197,6 +197,8 @@ struct cfg80211_internal_bss { */ u8 parent_bssid[ETH_ALEN] __aligned(2); + enum bss_source_type bss_source; + /* must be last because of priv member */ struct cfg80211_bss pub; }; diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 8ff5f79..c0a8b35 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10373,17 +10373,21 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb, NL80211_BSS_CHAIN_SIGNAL)) goto nla_put_failure; - switch (rdev->wiphy.signal_type) { - case CFG80211_SIGNAL_TYPE_MBM: - if (nla_put_u32(msg, NL80211_BSS_SIGNAL_MBM, res->signal)) - goto nla_put_failure; - break; - case CFG80211_SIGNAL_TYPE_UNSPEC: - if (nla_put_u8(msg, NL80211_BSS_SIGNAL_UNSPEC, res->signal)) - goto nla_put_failure; - break; - default: - break; + if (intbss->bss_source != BSS_SOURCE_STA_PROFILE) { + switch (rdev->wiphy.signal_type) { + case CFG80211_SIGNAL_TYPE_MBM: + if (nla_put_u32(msg, NL80211_BSS_SIGNAL_MBM, + res->signal)) + goto nla_put_failure; + break; + case CFG80211_SIGNAL_TYPE_UNSPEC: + if (nla_put_u8(msg, NL80211_BSS_SIGNAL_UNSPEC, + res->signal)) + goto nla_put_failure; + break; + default: + break; + } } switch (wdev->iftype) { diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 1fad019..2850718 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -1866,6 +1866,7 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev, known->pub.bssid_index = new->pub.bssid_index; known->pub.use_for &= new->pub.use_for; known->pub.cannot_use_reasons = new->pub.cannot_use_reasons; + known->bss_source = new->bss_source; return true; } @@ -2206,6 +2207,7 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy, IEEE80211_MAX_CHAINS); tmp.pub.use_for = data->use_for; tmp.pub.cannot_use_reasons = data->cannot_use_reasons; + tmp.bss_source = data->bss_source; switch (data->bss_source) { case BSS_SOURCE_MBSSID: From patchwork Mon Jun 10 08:52:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 803225 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 207046F2F5 for ; Mon, 10 Jun 2024 08:52:32 +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=1718009554; cv=none; b=gX81BB+DuMz6UbYgiepin+3zNRvaLeG0bwfxmfncEMxKeZrYPRTvMMSFdl9TeMacBE3/zA6xclNlw+dYwYJPidrfK5bqSBPZo4zvUg942TPSD0ZIHRKWRBOs3xWLhFM6WO1ELHGLxYv6EEs+g7pBvFTCA6oTPGoQk+JQb4IMSog= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009554; c=relaxed/simple; bh=ShECwHzCRIxs611lh9BxR3YkfbR23mZBhpA+Vaj/HtI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=EfX2+Ofw61vLuT7LkNFSkQqfoVPDtdATdKJ9o0bvdDHpaTd+vv1jtvSN6G950BjSMHv71TDEp0qqko7LHoeQ7BePwCUEmg0mXyVBvT2foS8X87+E+k98xb/RiltRO4OkIdHFIC7pfGbYV+yK3wTUY46V5ZhPHpXunKbI81GMi48= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=pRUA+K/e; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="pRUA+K/e" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45A2p2gx032146; Mon, 10 Jun 2024 08:52:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=tfx37LDcTDx6aVBr1MJR8xDR yxtNlWiJZmKJu33E9L8=; b=pRUA+K/e/05+b0Ye5ut58sEJwuingcLsL5zA3/mH qHbV+5XJ6uHyZDj2D2hc92X/RBkvtvA31YLTLrlKjUkF4Rt3+1eSF7qVAffzNfgr R5S8qRkYPFsVzKk4CMg+k6/ByHV8SIcCieHIaj5yQRWOkxXrHuJZgHRlX8a7bFkG Lo4ifX9iSmz+jBj8ePtyAZZhanD9o9M/jhTtsG/dWF/mnYomjdHlkW+4rtwceE+6 4CysM6CfwTJDUrfIUcAKF+3/05zydCmtVoE0HoDzZlrM79+7oGlI0mOaSLTKdXse 1/1CTaoMtPymy3VplTTH/WLdqjxt8qXV5IAbu4qAflbKww== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ymfp7atev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2024 08:52:29 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 45A8qSDJ029470 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2024 08:52:28 GMT Received: from hu-vjakkam-hyd.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.1544.9; Mon, 10 Jun 2024 01:52:26 -0700 From: Veerendranath Jakkam To: CC: , Subject: [PATCH 3/4] wifi: cfg80211: skip overriding direct/MBSSID BSS with per-STA profile BSS Date: Mon, 10 Jun 2024 14:22:03 +0530 Message-ID: <1718009524-5579-4-git-send-email-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1718009524-5579-1-git-send-email-quic_vjakkam@quicinc.com> References: <1718009524-5579-1-git-send-email-quic_vjakkam@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: o4a2HmfhS3SBJbcAAFC_ef_s-Q0nMeRY X-Proofpoint-ORIG-GUID: o4a2HmfhS3SBJbcAAFC_ef_s-Q0nMeRY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-10_02,2024-06-06_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=452 suspectscore=0 adultscore=0 spamscore=0 phishscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406100067 Skip overriding BSS information generated from MBSSID or direct source with BSS information generated from per-STA profile source to avoid loosing actual signal strength and information elements such as RNR and Basic ML elements. Signed-off-by: Veerendranath Jakkam --- net/wireless/scan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 2850718..37ebe5a 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -1891,6 +1891,10 @@ __cfg80211_bss_update(struct cfg80211_registered_device *rdev, found = rb_find_bss(rdev, tmp, BSS_CMP_REGULAR); if (found) { + if (tmp->bss_source == BSS_SOURCE_STA_PROFILE && + found->bss_source != BSS_SOURCE_STA_PROFILE) + goto free_ies; + if (!cfg80211_update_known_bss(rdev, found, tmp, signal_valid)) return NULL; } else { From patchwork Mon Jun 10 08:52:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 803224 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 CAF2871B48 for ; Mon, 10 Jun 2024 08:52:34 +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=1718009556; cv=none; b=BZmYNhXH6BKddFUE6Jj4woEc0pZupRGR1woUEetsOK1pAVW2UJyt7FFNzgklBZSIVii0xssGL5ZEmBglL00ZtU4LhFAgjb1lHbutUfz76iHe7xHGJ9oAV5cLgMxDK7f9ZhsLm1ZtK4wfJYHpGmSnNPh+M936mC0/ebSnsrUprwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009556; c=relaxed/simple; bh=5uk4py0zQd49/zbzmnqUTilSfavER+71vZ+ohtjTp5Y=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MwuCHh+F/BZ6C6d2QhoP6dYAATC6AEbPgRaUpNOLakzbf/McDMbwjg5KQ87KSom6FUEKe4NSCkCVbcFB+pvtAS0rEviLqoaUCRc++53E3HeUIyUMyvTAz+9mFlXuqDNDf5XIsIt+y31lwRCS1vd50ZF7U2LNaRBVSKyvewbUFZQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=nOEvfRpe; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="nOEvfRpe" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45A1TUhl009443; Mon, 10 Jun 2024 08:52:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=bcEOGKzF42SpbJMqueOVKoiT v+AX7FTQrXL1boUi1js=; b=nOEvfRpe/ijt7IrZO9nI8wl515RXL9Jf6gSU6aa4 leyTNWxJ2bAsnYNFd7x/orYOAE71m7BKmgoizrwKMxNO6w/JaCppR/VP97MgnbHZ obwuxxyQMb47yUQPdzYn8/V46NYPcGjxkr9jI1scLshPuIWrIppDOmlwHulyYU7U /ReEcA+IZnPDbyjrFAj8zMQPgaSglx1WEFTJlVrX+zzAGmXSaQKCexjTiIADVQ9i E8iWqnb7sRGXHuzE/QND3dXXV3/4VDgkMwUf8ccFF0cffDJyX6mMXkJJSzMdcopa zRbt7N5aw05WUzb0o25JtpLYQ9EM+YXRsUbmSiuVsBGiaA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ymea6k1gg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2024 08:52:31 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 45A8qU6C019521 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2024 08:52:30 GMT Received: from hu-vjakkam-hyd.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.1544.9; Mon, 10 Jun 2024 01:52:28 -0700 From: Veerendranath Jakkam To: CC: , Subject: [PATCH 4/4] wifi: cfg80211: make sure to process all per-STA profiles Date: Mon, 10 Jun 2024 14:22:04 +0530 Message-ID: <1718009524-5579-5-git-send-email-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1718009524-5579-1-git-send-email-quic_vjakkam@quicinc.com> References: <1718009524-5579-1-git-send-email-quic_vjakkam@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: I8cGEHlLhSc2i-6W9KNfCGWvb1hrqZFe X-Proofpoint-ORIG-GUID: I8cGEHlLhSc2i-6W9KNfCGWvb1hrqZFe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-10_02,2024-06-06_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 spamscore=0 phishscore=0 mlxlogscore=951 clxscore=1015 lowpriorityscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406100067 Currently if BSS entry can't be created from any per-STA profile all subsequent per-STA profiles in the multi-link element are ignored, though they can generate valid BSS entries. To avoid this continue processing the remaining per-STA profiles in the multi-link element even if BSS entry not created from current per-STA profile. Signed-off-by: Veerendranath Jakkam --- net/wireless/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 37ebe5a..546758c 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -3046,7 +3046,7 @@ cfg80211_parse_ml_elem_sta_data(struct wiphy *wiphy, bss = cfg80211_inform_single_bss_data(wiphy, &data, gfp); if (!bss) - break; + continue; cfg80211_put_bss(wiphy, bss); }