From patchwork Thu Sep 8 14:44:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675669 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=fFA0GCWx; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=PqP5Atmd; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhl26Fs7z1yj1 for ; Fri, 9 Sep 2022 00:46:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JUUBfhmKOlVrx/fXnSU2kfQpf5rWr9PuGHsaOHCsoV8=; b=fFA0GCWxUFj1R+ Lcg6ao/jJO+xMDJHNLTtITQF49/b5OIerC4/fNQj+du4SKSsB0vxj5kTqV3d+qjPBlAPP4pt0vERw JwYcmDqeStTxBvn5qxTkiSUxYl8MVmdFJELoI6Goy8tix3GCvbYIH5NW4ecgyfr7JH8qyeE1fpaY8 Djm5GI0JtJ5A8kDD5b87JHgcGQDH1bmjsr5comuH2xjRBp+jwkZkaW5OmBospchn/bQV8K1x7Cdg7 T1R5dYpKpSY0M2P9mQqs4zeEjasY0SzaEZOk+KIve02cCzgM3B0x4WME1WPOj1IuNiz5VXemaoNMT 6jMuFxMa8NIfGwn3GVvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWImM-004qvf-QQ; Thu, 08 Sep 2022 14:45:18 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIlm-004qDp-4d for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:45 +0000 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DYeeh006667 for ; Thu, 8 Sep 2022 14:44:37 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-transfer-encoding : content-type; s=qcppdkim1; bh=urKrzF074xbeWj2G/i/cphSMbkz9MF3A7ZD0txp5sqE=; b=PqP5AtmdWGtsViFnMi0ZCZjr3/X+0a+BkbSjNfx6W1wUi+2FXCxGrrFjI0EYGeUJcMth SGPeZCkujmblFeYGXANvDQG2kx/hZ0i824avxcOPXAuEKWSo8WNs4+NAAr00Asg0PMzt sZSzd2Lujb3mVTguIs1MVq7R6Bpa2vY1wtdGWh82FA90/Z+eoQU+33nt4S/BJ3eWpFqL V7yaZTCcvFgsxkPA3YgP5SkXfIWQ+dZrGk+bXETdueExIsTHii9aTfIUdE5ckzod0qMZ 3voCwdMN6tNMS/UPGVyku327Hi4ZP175ziWyP/mU7fIPyQ2i31vrCs1Ml8kyojLqgw3M zA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jer1x4tnr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:37 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288EiaBp028450 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:36 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:35 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 01/17] EHT: Add Multi-Link element field definitions Date: Thu, 8 Sep 2022 20:14:07 +0530 Message-ID: <20220908144423.2222859-2-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: 7UWsn7de9Ch6TUsEqS8cwjGrzTZqhJ7p X-Proofpoint-GUID: 7UWsn7de9Ch6TUsEqS8cwjGrzTZqhJ7p X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 suspectscore=0 bulkscore=0 mlxlogscore=794 spamscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 adultscore=0 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080054 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074442_201238_1BCF3FBD X-CRM114-Status: GOOD ( 15.80 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Define the following fields described in IEEE P802.11be/D2.1: - Multi-Link IE types as defined in Table 9401c-Type subfield encoding - Basic Multi-Link IE presence bitmap as defined in Figure 9-1002g- [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.168.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Define the following fields described in IEEE P802.11be/D2.1: - Multi-Link IE types as defined in Table 9401c-Type subfield encoding - Basic Multi-Link IE presence bitmap as defined in Figure 9-1002g-Presence Bitmap subfield of the Basic Multi-Link element format Signed-off-by: Veerendranath Jakkam --- src/common/ieee802_11_defs.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 82c982389..0317f9d84 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -2515,6 +2515,27 @@ struct ieee80211_eht_capabilities { u8 optional[EHT_MCS_NSS_CAPAB_LEN + EHT_PPE_THRESH_CAPAB_LEN]; } STRUCT_PACKED; +/* IEEE P802.11be/D2.1, 9.4.2.312 - Multi-Link element */ + +/* Figure 9-1002f: Multi-Link Control field */ +#define MULTI_LINK_CONTROL_TYPE_MASK 0x07 + +/* Table 9-401c: Mult-Link element Type subfield encoding */ +#define MULTI_LINK_CONTROL_TYPE_BASIC 0 +#define MULTI_LINK_CONTROL_TYPE_PROBE_REQ 1 +#define MULTI_LINK_CONTROL_TYPE_RECONF 2 +#define MULTI_LINK_CONTROL_TYPE_TDLS 3 +#define MULTI_LINK_CONTROL_TYPE_PRIOR_ACCESS 4 + +/* Figure 9-1002g: Presence Bitmap subfield of the Basic Multi-Link element */ +#define BASIC_MULTI_LINK_CTRL0_PRES_LINK_ID 0x10 +#define BASIC_MULTI_LINK_CTRL0_PRES_BSS_PARAM_CH_COUNT 0x20 +#define BASIC_MULTI_LINK_CTRL0_PRES_MSD_INFO 0x40 +#define BASIC_MULTI_LINK_CTRL0_PRES_EML_CAPA 0x80 + +#define BASIC_MULTI_LINK_CTRL1_PRES_MLD_CAPA 0x01 +#define BASIC_MULTI_LINK_CTRL1_PRES_AP_MLD_ID 0x02 + /* IEEE P802.11ay/D4.0, 9.4.2.251 - EDMG Operation element */ #define EDMG_BSS_OPERATING_CHANNELS_OFFSET 6 #define EDMG_OPERATING_CHANNEL_WIDTH_OFFSET 7 From patchwork Thu Sep 8 14:44:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=AYEl+yFE; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=EQ5Au6RP; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhkc1gWfz1yj1 for ; Fri, 9 Sep 2022 00:45:44 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0qKU+Gyt/BmMGI96hUaDOF2A7CI/VXyaKHVZk9q7g1g=; b=AYEl+yFE2+oJdt 8OVkaAUPgKeEb46/XAfR4g25/nF5AUOmFTJcEZA92y5I3TJ69oa7f9SPGikOwjaK3J5wr7MLwrL/J /nejTLhKG9A2sRAdNvjQ9lFIeuIMhy3NAAEk2PlGt+A7XvozxaM2UfGPeHZPDfY0bfx1gZSKggx7B 2Le3QMSZmfU26zQKxt4puBadOd6AdAdPsA8T3z/EGPjwuUVbtQ2RLl323y+HvaEO2chyW0LVN9SFb yFUudASOudkT6BKeALmlAi/JN9W5vSF0iO1kaqqogIGbPyY4qYPRubafHQkWgtDDSKUFAO3oIahnx Qw+V6jN+sOvCHS5Wf/ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIlp-004qNt-V1; Thu, 08 Sep 2022 14:44:46 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIll-004qIJ-Io for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:43 +0000 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DYQpq015761 for ; Thu, 8 Sep 2022 14:44:39 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-transfer-encoding : content-type; s=qcppdkim1; bh=JrqyHlASWQ52teGwLt3K8ybwWHaSLX9G8Q0STq0tBjI=; b=EQ5Au6RPQ/7V/pxwIaRBc/jrENn12D+cG5sGyitdjAnRsfXhQ/jDW8DjOUWYTE05bCa+ ugnwYCtTp7u1zhRC8B3aq7x6giLOPYDMG4hnVtPt81GH7vStej0P3GaIp63GEoSFM3MD umxta+YMhwdykwwc9JhGmat5AgnEDpzZgY4/9IzANaxUgxTY/B+2d7RY2CPJY4oh6kws xh2K0G8gGOyzgekWX+GiDXIYXE2oZots3uFFauyXwHsyb2h/k2hgrRJORD3bdJV7fLfk 7WfnjzwObH3Wz9OmnyhiBAAXIyIRoaiSy1+OLePH8yAltjN6yWJu+BD4ZvY4WCecWnfW PQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfdxu8r29-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:39 +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 288EicUT016645 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:38 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:36 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 02/17] Add API to get ML IE of specified type from IEs buffer Date: Thu, 8 Sep 2022 20:14:08 +0530 Message-ID: <20220908144423.2222859-3-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: yh6iiV0sAXQAx5EyobY0QzbaI0v-qfEr X-Proofpoint-ORIG-GUID: yh6iiV0sAXQAx5EyobY0QzbaI0v-qfEr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074441_756773_0F94E901 X-CRM114-Status: GOOD ( 17.65 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add utitliy API to get specified type Multi-Link IE from IEs buffer Signed-off-by: Veerendranath Jakkam --- src/common/ieee802_11_common.c | 16 ++++++++++++++++ src/common/ieee802_11_common.h | 1 + 2 files changed, 17 insertions(+) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add utitliy API to get specified type Multi-Link IE from IEs buffer Signed-off-by: Veerendranath Jakkam --- src/common/ieee802_11_common.c | 16 ++++++++++++++++ src/common/ieee802_11_common.h | 1 + 2 files changed, 17 insertions(+) diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index c8ee90cd7..0eac3f84c 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -2755,3 +2755,19 @@ struct wpabuf * ieee802_11_defrag(struct ieee802_11_elems *elems, return ieee802_11_defrag_data(elems, eid, eid_ext, data, len); } + +const u8 * get_ml_ie(const u8 *ies, size_t len, u8 type) +{ + const struct element *elem; + + if (!ies) + return NULL; + + for_each_element_extid(elem, WLAN_EID_EXT_MULTI_LINK, ies, len) { + if (elem->datalen >= 2 && + (elem->data[1] & MULTI_LINK_CONTROL_TYPE_MASK) == type) + return &elem->id; + } + + return NULL; +} diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h index 94e1d7b8b..bd2c9fbf5 100644 --- a/src/common/ieee802_11_common.h +++ b/src/common/ieee802_11_common.h @@ -343,5 +343,6 @@ struct wpabuf * ieee802_11_defrag_data(struct ieee802_11_elems *elems, const u8 *data, u8 len); struct wpabuf * ieee802_11_defrag(struct ieee802_11_elems *elems, u8 eid, u8 eid_ext); +const u8 * get_ml_ie(const u8 *ies, size_t len, u8 type); #endif /* IEEE802_11_COMMON_H */ From patchwork Thu Sep 8 14:44:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675670 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=3ZHZn6Nn; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=cr/Tqsp8; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhlG47PKz1yj1 for ; Fri, 9 Sep 2022 00:46:18 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rWeo0/xpN18/TV9L/enEIzwJhUpzWuo8LSR6OsbcXUo=; b=3ZHZn6NnuvOS3L 95IC6WrDvHPu46Xv8zLhWzslnq82auBLaGq2z0JtYRvuwhUMps0Wiq5h40wIaubxD9XN81/3Wt4Cn uAEje5JrSibdfvasbOKe1eDEu7e9yI3t84reWPnt/9vbRJsNfiDbMe7s6WnUvHWjYCg5BCfg7vWIn o/4nucKu1rQrssu/6MUppfLWsv32daU+lGpPdCSMHqT2neCtozv6sv9aDSR7T2cpJpiyHrEUbuEbl X5j/rYVDSCMBKxn1jDJQN853ymRJLsxzap0PKdSNjp5p8An69PWPxnh5wJ3FPt5EGVyOz7B2Qj5Yp Q4mvcxhsS4+p6Q2+mmSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWImZ-004r6H-Dv; Thu, 08 Sep 2022 14:45:31 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIlm-004qJr-3i for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:45 +0000 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DYXc0014279 for ; Thu, 8 Sep 2022 14:44:40 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-transfer-encoding : content-type; s=qcppdkim1; bh=7LJM425JfyqPn3t2zpXRaMQmijwo3kLV/FIvzcDfq0g=; b=cr/Tqsp8GRfLtq+oXr0yz1s4dcQFGjUeu1rDq9PKewqvzNKPjaLqbFqhJSLkdIk/stI6 Y+GjODnFriCIUnuXhJL7mqsPwMUuhO8asbQYwz69pFgQQaUdQTdxPfyvO+Fp1vgZWOM0 vSgOV3TW81SlEbh6dtxBNHwfuzgQKvwq4EAY1oVQ0eAMFGaN8SiuE2hQL/6iy9vsrYoL dE/jbUJaw4/puOhbkFgLlY2XK7j2Y/fHc1Vf640UWmsg73q7962jEHJJhYxWTVF6+fRL Jfjqk/3Yh6E5VRGO/o7365xio+Tg06c/75uMK0Gb/sE+FywtW++mFRvj6NvrFs7o/aaZ tQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfcjkgvmw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:40 +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 288EidPV004458 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:39 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:38 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 03/17] MLD STA: Add support to parse MLO connection info in NL80211_CMD_CONNECT event Date: Thu, 8 Sep 2022 20:14:09 +0530 Message-ID: <20220908144423.2222859-4-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: 8ZaAH21ESuf09wVpUodmGMET1ARyHkEF X-Proofpoint-ORIG-GUID: 8ZaAH21ESuf09wVpUodmGMET1ARyHkEF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 adultscore=0 bulkscore=0 clxscore=1015 impostorscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080054 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074442_182758_B4938361 X-CRM114-Status: GOOD ( 29.08 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Parse NL80211_ATTR_MLO_LINKS in NL80211_CMD_CONNECT event and cache the MLO connection information. Set the legacy connection fields such as assoc_freq and bssid to the values of the MLO link on which [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.168.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Parse NL80211_ATTR_MLO_LINKS in NL80211_CMD_CONNECT event and cache the MLO connection information. Set the legacy connection fields such as assoc_freq and bssid to the values of the MLO link on which association happened. Signed-off-by: Veerendranath Jakkam --- src/common/defs.h | 2 + src/drivers/driver.h | 10 ++++ src/drivers/driver_nl80211.c | 59 ++++++++++++++++--- src/drivers/driver_nl80211.h | 2 + src/drivers/driver_nl80211_event.c | 94 ++++++++++++++++++++++++++++-- 5 files changed, 156 insertions(+), 11 deletions(-) diff --git a/src/common/defs.h b/src/common/defs.h index e3d02f810..3e658cbcf 100644 --- a/src/common/defs.h +++ b/src/common/defs.h @@ -518,4 +518,6 @@ enum frame_encryption { FRAME_ENCRYPTED = 1 }; +#define MAX_NUM_MLD_LINKS 15 + #endif /* DEFS_H */ diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 20cbda862..5d5075347 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2730,6 +2730,16 @@ struct weighted_pcl { u32 flag; /* bitmap for WEIGHTED_PCL_* */ }; +struct driver_sta_mlo_info { + u16 valid_links; /* bitmap of valid link IDs */ + u8 ap_mld_addr[ETH_ALEN]; + struct { + u8 addr[ETH_ALEN]; + u8 bssid[ETH_ALEN]; + u32 freq; + } links[MAX_NUM_MLD_LINKS]; +}; + /** * struct wpa_driver_ops - Driver interface API definition * diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index a4b2d5219..c45cacde7 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -270,6 +270,7 @@ void nl80211_mark_disconnected(struct wpa_driver_nl80211_data *drv) if (drv->associated) os_memcpy(drv->prev_bssid, drv->bssid, ETH_ALEN); drv->associated = 0; + drv->sta_mlo_info.valid_links = 0; os_memset(drv->bssid, 0, ETH_ALEN); drv->first_bss->freq = 0; #ifdef CONFIG_DRIVER_NL80211_QCA @@ -1441,6 +1442,8 @@ struct nl80211_get_assoc_freq_arg { u8 assoc_bssid[ETH_ALEN]; u8 assoc_ssid[SSID_MAX_LEN]; u8 assoc_ssid_len; + u8 bssid[MAX_NUM_MLD_LINKS][ETH_ALEN]; + unsigned int freq[MAX_NUM_MLD_LINKS]; }; static int nl80211_get_assoc_freq_handler(struct nl_msg *msg, void *arg) @@ -1453,9 +1456,11 @@ static int nl80211_get_assoc_freq_handler(struct nl_msg *msg, void *arg) [NL80211_BSS_FREQUENCY] = { .type = NLA_U32 }, [NL80211_BSS_INFORMATION_ELEMENTS] = { .type = NLA_UNSPEC }, [NL80211_BSS_STATUS] = { .type = NLA_U32 }, + [NL80211_BSS_MLO_LINK_ID] = { .type = NLA_U8 }, }; struct nl80211_get_assoc_freq_arg *ctx = arg; enum nl80211_bss_status status; + struct wpa_driver_nl80211_data *drv = ctx->drv; nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL); @@ -1468,9 +1473,25 @@ static int nl80211_get_assoc_freq_handler(struct nl_msg *msg, void *arg) status = nla_get_u32(bss[NL80211_BSS_STATUS]); if (status == NL80211_BSS_STATUS_ASSOCIATED && bss[NL80211_BSS_FREQUENCY]) { - ctx->assoc_freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]); - wpa_printf(MSG_DEBUG, "nl80211: Associated on %u MHz", - ctx->assoc_freq); + int link_id = -1; + u32 freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]); + + if (bss[NL80211_BSS_MLO_LINK_ID]) + link_id = nla_get_u8(bss[NL80211_BSS_MLO_LINK_ID]); + + if (link_id >= 0 && link_id < MAX_NUM_MLD_LINKS) { + ctx->freq[link_id] = freq; + wpa_printf(MSG_DEBUG, + "nl80211: MLO link %d associated on %u MHz", + link_id, ctx->freq[link_id]); + } + + if (!drv->sta_mlo_info.valid_links || + drv->mlo_assoc_link_id == link_id) { + ctx->assoc_freq = freq; + wpa_printf(MSG_DEBUG, "nl80211: Associated on %u MHz", + ctx->assoc_freq); + } } if (status == NL80211_BSS_STATUS_IBSS_JOINED && bss[NL80211_BSS_FREQUENCY]) { @@ -1480,10 +1501,26 @@ static int nl80211_get_assoc_freq_handler(struct nl_msg *msg, void *arg) } if (status == NL80211_BSS_STATUS_ASSOCIATED && bss[NL80211_BSS_BSSID]) { - os_memcpy(ctx->assoc_bssid, - nla_data(bss[NL80211_BSS_BSSID]), ETH_ALEN); - wpa_printf(MSG_DEBUG, "nl80211: Associated with " - MACSTR, MAC2STR(ctx->assoc_bssid)); + int link_id = -1; + u8 *bssid = nla_data(bss[NL80211_BSS_BSSID]); + + if (bss[NL80211_BSS_MLO_LINK_ID]) + link_id = nla_get_u8(bss[NL80211_BSS_MLO_LINK_ID]); + + if (link_id >= 0 && link_id < MAX_NUM_MLD_LINKS) { + os_memcpy(ctx->bssid[link_id], bssid, ETH_ALEN); + wpa_printf(MSG_DEBUG, + "nl80211: MLO link %d associated with " + MACSTR, link_id, MAC2STR(bssid)); + } + + if (!drv->sta_mlo_info.valid_links || + drv->mlo_assoc_link_id == link_id) { + os_memcpy(ctx->assoc_bssid, bssid, ETH_ALEN); + wpa_printf(MSG_DEBUG, "nl80211: Associated with " + MACSTR, MAC2STR(bssid)); + } + } if (status == NL80211_BSS_STATUS_ASSOCIATED && @@ -1569,6 +1606,14 @@ try_again: "associated BSS from scan results: %u MHz", freq); if (freq) drv->assoc_freq = freq; + + if (drv->sta_mlo_info.valid_links) { + int i; + + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) + drv->sta_mlo_info.links[i].freq = arg.freq[i]; + } + return drv->assoc_freq; } wpa_printf(MSG_DEBUG, "nl80211: Scan result fetch failed: ret=%d " diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h index 9a9faf698..c84b21974 100644 --- a/src/drivers/driver_nl80211.h +++ b/src/drivers/driver_nl80211.h @@ -128,6 +128,8 @@ struct wpa_driver_nl80211_data { u8 bssid[ETH_ALEN]; u8 prev_bssid[ETH_ALEN]; int associated; + int mlo_assoc_link_id; + struct driver_sta_mlo_info sta_mlo_info; u8 ssid[SSID_MAX_LEN]; size_t ssid_len; enum nl80211_iftype nlmode; diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index 266c8c1e9..6c321741c 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -422,6 +422,87 @@ convert_connect_fail_reason_codes(enum qca_sta_connect_fail_reason_codes #endif /* CONFIG_DRIVER_NL80211_QCA */ +static int nl80211_get_assoc_link_id(const u8* data, u8 len) +{ + if (!(data[0] & BASIC_MULTI_LINK_CTRL0_PRES_LINK_ID)) + return -1; + +#define BASIC_ML_IE_COMMON_INFO_LINK_ID_IDX \ + (2 + /* Control field */ \ + 1 + /* Common info length field */ \ + 6) /* MLD mac address field */ + if (len <= BASIC_ML_IE_COMMON_INFO_LINK_ID_IDX) + return -1; + + return (data[BASIC_ML_IE_COMMON_INFO_LINK_ID_IDX] & 0x0F); +} + +static void nl80211_parse_mlo_info(struct wpa_driver_nl80211_data *drv, + struct nlattr *addr, + struct nlattr *mlo_links, + struct nlattr *resp_ie) +{ + struct nlattr *link; + int rem_links; + const u8 *ml_ie; + struct driver_sta_mlo_info *mlo = &drv->sta_mlo_info; + + if (!addr || !mlo_links || !resp_ie) + return; + + ml_ie = get_ml_ie(nla_data(resp_ie), nla_len(resp_ie), + MULTI_LINK_CONTROL_TYPE_BASIC); + + if (!ml_ie) + return; + + drv->mlo_assoc_link_id = nl80211_get_assoc_link_id(&ml_ie[3], + ml_ie[1] - 1); + if (drv->mlo_assoc_link_id < 0 || + drv->mlo_assoc_link_id >= MAX_NUM_MLD_LINKS) + return; + + os_memcpy(mlo->ap_mld_addr, nla_data(addr), ETH_ALEN); + wpa_printf(MSG_DEBUG, "ap_mld_addr " MACSTR, MAC2STR(mlo->ap_mld_addr)); + + nla_for_each_nested(link, mlo_links, rem_links) { + struct nlattr *tb[NL80211_ATTR_MAX + 1]; + int link_id; + + nla_parse(tb, NL80211_ATTR_MAX, nla_data(link), nla_len(link), + NULL); + + if (!tb[NL80211_ATTR_MLO_LINK_ID] || !tb[NL80211_ATTR_MAC] || + !tb[NL80211_ATTR_BSSID]) + continue; + + link_id = nla_get_u8(tb[NL80211_ATTR_MLO_LINK_ID]); + if (link_id >= MAX_NUM_MLD_LINKS) + continue; + + mlo->valid_links |= BIT(link_id); + os_memcpy(mlo->links[link_id].addr, + nla_data(tb[NL80211_ATTR_MAC]), ETH_ALEN); + os_memcpy(mlo->links[link_id].bssid, + nla_data(tb[NL80211_ATTR_BSSID]), ETH_ALEN); + wpa_printf(MSG_DEBUG, "link[%u].addr " MACSTR, link_id, + MAC2STR(mlo->links[link_id].addr)); + wpa_printf(MSG_DEBUG, "link[%u].bssid " MACSTR, link_id, + MAC2STR(mlo->links[link_id].bssid)); + } + + if (!(mlo->valid_links & BIT(drv->mlo_assoc_link_id))) { + wpa_printf(MSG_ERROR, "Invalid MLO assoc link ID %d", + drv->mlo_assoc_link_id); + mlo->valid_links = 0; + return; + } + + os_memcpy(drv->bssid, + mlo->links[drv->mlo_assoc_link_id].bssid, ETH_ALEN); + os_memcpy(drv->prev_bssid, drv->bssid, ETH_ALEN); +} + static void mlme_event_connect(struct wpa_driver_nl80211_data *drv, enum nl80211_commands cmd, struct nlattr *status, @@ -436,7 +517,8 @@ static void mlme_event_connect(struct wpa_driver_nl80211_data *drv, struct nlattr *subnet_status, struct nlattr *fils_erp_next_seq_num, struct nlattr *fils_pmk, - struct nlattr *fils_pmkid) + struct nlattr *fils_pmkid, + struct nlattr *mlo_links) { union wpa_event_data event; const u8 *ssid = NULL; @@ -528,7 +610,9 @@ static void mlme_event_connect(struct wpa_driver_nl80211_data *drv, } drv->associated = 1; - if (addr) { + drv->sta_mlo_info.valid_links = 0; + nl80211_parse_mlo_info(drv, addr, mlo_links, resp_ie); + if (!drv->sta_mlo_info.valid_links && addr) { os_memcpy(drv->bssid, nla_data(addr), ETH_ALEN); os_memcpy(drv->prev_bssid, drv->bssid, ETH_ALEN); } @@ -2135,7 +2219,8 @@ static void qca_nl80211_key_mgmt_auth(struct wpa_driver_nl80211_data *drv, tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_SUBNET_STATUS], tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_FILS_ERP_NEXT_SEQ_NUM], tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMK], - tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMKID]); + tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMKID], + NULL); } @@ -3210,7 +3295,8 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd, NULL, tb[NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM], tb[NL80211_ATTR_PMK], - tb[NL80211_ATTR_PMKID]); + tb[NL80211_ATTR_PMKID], + tb[NL80211_ATTR_MLO_LINKS]); break; case NL80211_CMD_CH_SWITCH_STARTED_NOTIFY: mlme_event_ch_switch(drv, From patchwork Thu Sep 8 14:44:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675668 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=2aH2GzD+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Ey+0JCR1; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhkk3DSSz1yj1 for ; Fri, 9 Sep 2022 00:45:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=thfhjkycukqniCxlGbvJbi7uVw3UYm+QLxN8u2lXvAs=; b=2aH2GzD+PJIz0H ZvmkQhOE8O2OuPe03b6Rbckpvdz5g+FW+q0MGH1X0nsBQQhpptxZwLkL3fsG8zs/bxas3QdwVuF2j pyB7Mm5wf7zTU2klndZVH791b9SCLfMoTuQp6C2di2aowHUa3Ago8Iowue4Zeaz7IahHiN6dHnnYT V8bwFtM1jgomZFI3GKGmal+rw2k4Bud+J2/gavkFwDyxorcE/758aBVXjjDzA3+3JKJgZX1DWawnd jEp561YrLVWiIskCsKfXlYKZML9G97wwHEqrDGWB6zxKk5/k0pfe5RYrlSUxga7EO38E5xkq70EYN 1KP2UBozc/1wojXU8jeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWImC-004qnm-Un; Thu, 08 Sep 2022 14:45:09 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIln-004qLd-3Q for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:45 +0000 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DYXGL014460 for ; Thu, 8 Sep 2022 14:44:42 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-transfer-encoding : content-type; s=qcppdkim1; bh=nrJjMjPPyEA5QJtFufxv6ZSjQXxc2IEqyatYDzLgKcc=; b=Ey+0JCR1EEDyy3+RGnVKBNYhJ5JEpX8CQ9Dtdw7GUoqDPIPPueWY7BYTi4wcIHoQlgWL ZJiHWI8trb4XHdZ8Jqdd12FNw1GTL2ZP4UsoJTNbF8ilNwcQ8q0B+Q39iIh3BZkPsLc7 zDvB7KgYTY+Qx8Nld8P3m9EA/ucqWr7241B571WNf67r9Y+GKOxFsd+IcAD0SDx/HR99 FqgeTki0TKoRO0tQefzea4/oK3MbrwgocE4pqQie8iln0GM9PRzcRvOpjTh5I0GnBmMM Unh6hqkz81M4opX58yt2ZSx7PjjW8qK0SsdTwqEhKl2ofYF0ikHG/ud05Qx2bNNSwiVw zQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfdc70twq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:42 +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 288Eifpg016852 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:41 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:39 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 04/17] MLD STA: Indicate MLO connection info in driver status Date: Thu, 8 Sep 2022 20:14:10 +0530 Message-ID: <20220908144423.2222859-5-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: 5FOhomHO9TaofuWPMA2Hb-z_2WCFgOIY X-Proofpoint-ORIG-GUID: 5FOhomHO9TaofuWPMA2Hb-z_2WCFgOIY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 phishscore=0 clxscore=1015 adultscore=0 bulkscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074443_274054_8CA59EEE X-CRM114-Status: GOOD ( 19.58 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Indicate MLO connection info in DRIVER-STATUS control interface command. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver_nl80211.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Indicate MLO connection info in DRIVER-STATUS control interface command. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver_nl80211.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index c45cacde7..93b3eea69 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -9846,6 +9846,38 @@ static int wpa_driver_nl80211_status(void *priv, char *buf, size_t buflen) return pos - buf; pos += res; + if (drv->sta_mlo_info.valid_links) { + int i; + struct driver_sta_mlo_info *mlo = &drv->sta_mlo_info; + + res = os_snprintf(pos, end - pos, + "ap_mld_addr=" MACSTR "\n", + MAC2STR(mlo->ap_mld_addr)); + + if (os_snprintf_error(end - pos, res)) + return pos - buf; + pos += res; + + + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + if (!(mlo->valid_links & BIT(i))) + continue; + + res = os_snprintf(pos, end - pos, + "link_addr[%u]=" MACSTR "\n" + "link_bssid[%u]=" MACSTR "\n" + "link_freq[%u]=%u\n", + i, MAC2STR(mlo->links[i].addr), + i, MAC2STR(mlo->links[i].bssid), + i, mlo->links[i].freq); + + if (os_snprintf_error(end - pos, res)) + return pos - buf; + + pos += res; + } + } + if (drv->has_capability) { res = os_snprintf(pos, end - pos, "capa.key_mgmt=0x%x\n" From patchwork Thu Sep 8 14:44:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675671 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=A52tbIvt; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=jLXBYzjm; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhlp4BBLz1yj1 for ; Fri, 9 Sep 2022 00:46:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cSpLe2DFutyJ3vdO04qXPC/Va3Au+GpqTc9kc9xIKVA=; b=A52tbIvtTumOyE QV3WTuWASKyYw6siltkbvTRfMRdbUTGg0mPjrfZ0asWEkkPlEg3G6ddG+7KHYncbf7Hd6EFnDeMwb NDdygJ3lCuuWeDvUhWjRwBnRQpR5RL2JI0lIfkxO15/mk698i+8dPLelpCh+Up7MgUwLiSsk40WPa pNQ44jys2PMHic5iHBrx+yvyC5Z7sCCmvbCqKIUWBVJ/vtuXAMht6PnUQzSsFBbS1fLJ+LsiUAsGp aP3c80wfey8ygg5BFhhCp8qRUfsDsvGfHNJnUJeGuU3Dtk7DbfvUTWJuoAqOMhF4+MRnMpHkV+mw3 2dNr/OOIYVNPSIvN/23g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWImv-004rMy-OG; Thu, 08 Sep 2022 14:45:53 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIlo-004qMl-PN for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:46 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DYoRw020261 for ; Thu, 8 Sep 2022 14:44:44 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-transfer-encoding : content-type; s=qcppdkim1; bh=CsegkvxqG1YvohTP1EuQb94LdM99sl123CcMeSdLbtE=; b=jLXBYzjmPKLg9lWkZtyzob4oVdeY1B0j8m1GhfiINdvBhQJlWtrSi792ldb45s83aC8V DjfHz39rKNg+jj8W2p3jpQtSHX5R09R6QMLCIVIpaKqAe0HWxtqzp20MwW/Bh1kG4zaV bGjns0/1gcijCnHcsC6lRsZe236oaB0+zyqkFdu2TsbnJbvS4PbbAXnBN7adV2GHdELe F2nWyc12cjeOlGfFezyb7o6tEvVOZ+ZVJ6xwcijLUWIJVC0DfpzcvR4P+gN7587rV+SY opmRJgxPoX1VR+WBpzTYCetQr6Tz1HE17TJT0ZAtYWqLzLqOv9ijd/7iPuq23Sc8pFXL dA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jf1swt6wb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:43 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288EigB2028467 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:42 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:41 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 05/17] MLD STA: Add support to fetch MLO connection info to wpa_s Date: Thu, 8 Sep 2022 20:14:11 +0530 Message-ID: <20220908144423.2222859-6-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: 9FEUFB8DPu_RLmtBgX8PJ8E8M1ct27eD X-Proofpoint-ORIG-GUID: 9FEUFB8DPu_RLmtBgX8PJ8E8M1ct27eD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 bulkscore=0 impostorscore=0 adultscore=0 priorityscore=1501 mlxscore=0 spamscore=0 malwarescore=0 clxscore=1015 mlxlogscore=797 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074444_986140_5F5CD821 X-CRM114-Status: GOOD ( 29.36 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Shivani Baranwal Add support to fetch MLO connection info from driver to wpa_s instance of corresponding MLD STA interface. In addition, return true for BSSes associated with MLO links from wpa_bss_in_use() to avoid g [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Shivani Baranwal Add support to fetch MLO connection info from driver to wpa_s instance of corresponding MLD STA interface. In addition, return true for BSSes associated with MLO links from wpa_bss_in_use() to avoid getting them cleared from scan results. Co-authored-by: Veerendranath Jakkam Signed-off-by: Veerendranath Jakkam Signed-off-by: Shivani Baranwal --- src/drivers/driver.h | 13 +++++ src/drivers/driver_nl80211.c | 14 +++++ wpa_supplicant/bss.c | 22 +++++++- wpa_supplicant/driver_i.h | 10 ++++ wpa_supplicant/events.c | 93 +++++++++++++++++++++++++++++++ wpa_supplicant/wpa_supplicant_i.h | 8 +++ 6 files changed, 157 insertions(+), 3 deletions(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 5d5075347..9bebebcc6 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -4808,6 +4808,19 @@ struct wpa_driver_ops { const u8 *match, size_t match_len, bool multicast); #endif /* CONFIG_TESTING_OPTIONS */ + + + /** + * get_sta_mlo_info - Get the current multi-link associtaion info + * @priv: private driver interface data + * @mlo: pointer to fill multi-link associtaion info + * Returns: 0 on success, -1 on failure + * + * This callback is used to fetch multi-link of the current association. + */ + int (*get_sta_mlo_info)(void *priv, + struct driver_sta_mlo_info *mlo_info); + }; /** diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 93b3eea69..0235e69d8 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -1020,6 +1020,19 @@ static int wpa_driver_nl80211_get_ssid(void *priv, u8 *ssid) } +static int nl80211_get_sta_mlo_info(void *priv, + struct driver_sta_mlo_info *mlo_info) +{ + struct i802_bss *bss = priv; + struct wpa_driver_nl80211_data *drv = bss->drv; + + if (!drv->associated) + return -1; + + os_memcpy(mlo_info, &drv->sta_mlo_info, sizeof(*mlo_info)); + return 0; +} + static void wpa_driver_nl80211_event_newlink( struct nl80211_global *global, struct wpa_driver_nl80211_data *drv, int ifindex, const char *ifname) @@ -12785,4 +12798,5 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = { .register_frame = testing_nl80211_register_frame, .radio_disable = testing_nl80211_radio_disable, #endif /* CONFIG_TESTING_OPTIONS */ + .get_sta_mlo_info = nl80211_get_sta_mlo_info, }; diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index eb97a618d..7dcdb9969 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -379,6 +379,8 @@ static int wpa_bss_known(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) static int wpa_bss_in_use(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) { + int i; + if (bss == wpa_s->current_bss) return 1; @@ -388,9 +390,23 @@ static int wpa_bss_in_use(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) bss->ssid_len) != 0)) return 0; /* SSID has changed */ - return !is_zero_ether_addr(bss->bssid) && - (os_memcmp(bss->bssid, wpa_s->bssid, ETH_ALEN) == 0 || - os_memcmp(bss->bssid, wpa_s->pending_bssid, ETH_ALEN) == 0); + if (!is_zero_ether_addr(bss->bssid) && + (os_memcmp(bss->bssid, wpa_s->bssid, ETH_ALEN) == 0 || + os_memcmp(bss->bssid, wpa_s->pending_bssid, ETH_ALEN) == 0)) + return 1; + + if (!wpa_s->valid_links) + return 0; + + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + if (!(wpa_s->valid_links & BIT(i))) + continue; + + if (os_memcmp(bss->bssid, wpa_s->links[i].bssid, ETH_ALEN) == 0) + return 1; + } + + return 0; } diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h index d20e06136..41d353f91 100644 --- a/wpa_supplicant/driver_i.h +++ b/wpa_supplicant/driver_i.h @@ -1152,4 +1152,14 @@ static inline int wpa_drv_set_secure_ranging_ctx(struct wpa_supplicant *wpa_s, return wpa_s->driver->set_secure_ranging_ctx(wpa_s->drv_priv, ¶ms); } +static inline int +wpas_drv_get_sta_mlo_info(struct wpa_supplicant *wpa_s, + struct driver_sta_mlo_info *mlo_info) +{ + if (!wpa_s->driver->get_sta_mlo_info) + return 0; + + return wpa_s->driver->get_sta_mlo_info(wpa_s->drv_priv, mlo_info); +} + #endif /* DRIVER_I_H */ diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index b3b2c4932..fc662a770 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -166,6 +166,20 @@ wpa_supplicant_update_current_bss(struct wpa_supplicant *wpa_s, const u8 *bssid) return bss; } +static void wpa_supplicant_update_link_bss(struct wpa_supplicant *wpa_s, + u8 link_id, + const u8 *bssid) +{ + struct wpa_bss *bss = wpa_supplicant_get_new_bss(wpa_s, bssid); + + if (!bss) { + wpa_supplicant_update_scan_results(wpa_s); + bss = wpa_supplicant_get_new_bss(wpa_s, bssid); + } + + if (bss) + wpa_s->links[link_id].bss = bss; +} static int wpa_supplicant_select_config(struct wpa_supplicant *wpa_s) { @@ -285,6 +299,19 @@ void wpa_supplicant_stop_countermeasures(void *eloop_ctx, void *sock_ctx) } +static void wpas_reset_mlo_info(struct wpa_supplicant *wpa_s) +{ + int i; + + if (!wpa_s->valid_links) + return; + + wpa_s->valid_links = 0; + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) + wpa_s->links[i].bss = NULL; +} + + void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s) { int bssid_changed; @@ -352,6 +379,8 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s) if (wpa_s->enabled_4addr_mode && wpa_drv_set_4addr_mode(wpa_s, 0) == 0) wpa_s->enabled_4addr_mode = 0; + + wpas_reset_mlo_info(wpa_s); } @@ -3325,6 +3354,63 @@ static void wpas_fst_update_mb_assoc(struct wpa_supplicant *wpa_s, } +static int wpa_drv_get_mlo_info(struct wpa_supplicant *wpa_s) +{ + struct driver_sta_mlo_info mlo; + int i; + + mlo.valid_links = 0; + if (wpas_drv_get_sta_mlo_info(wpa_s, &mlo)) { + wpa_dbg(wpa_s, MSG_ERROR, "Failed to get MLO link info"); + wpa_supplicant_deauthenticate( + wpa_s, WLAN_REASON_DEAUTH_LEAVING); + return -1; + } + + if (wpa_s->valid_links == mlo.valid_links) { + bool match = true; + + if (!mlo.valid_links) + return 0; + + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + if (!(mlo.valid_links & BIT(i))) + continue; + + if (os_memcmp(wpa_s->links[i].addr, mlo.links[i].addr, + ETH_ALEN)) { + match = false; + break; + } + + if (os_memcmp(wpa_s->links[i].bssid, mlo.links[i].bssid, + ETH_ALEN)) { + match = false; + break; + } + } + + if (match && + !os_memcmp(wpa_s->ap_mld_addr, mlo.ap_mld_addr, ETH_ALEN)) + return 0; + } + + wpa_s->valid_links = mlo.valid_links; + os_memcpy(wpa_s->ap_mld_addr, mlo.ap_mld_addr, ETH_ALEN); + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + if (!(wpa_s->valid_links & BIT(i))) + continue; + + os_memcpy(wpa_s->links[i].addr, mlo.links[i].addr, ETH_ALEN); + os_memcpy(wpa_s->links[i].bssid, mlo.links[i].bssid, ETH_ALEN); + wpa_s->links[i].freq = mlo.links[i].freq; + wpa_supplicant_update_link_bss(wpa_s, i, mlo.links[i].bssid); + } + + return 0; +} + + static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, union wpa_event_data *data) { @@ -3360,6 +3446,13 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, return; } + if (wpa_drv_get_mlo_info(wpa_s) < 0) { + wpa_dbg(wpa_s, MSG_ERROR, "Failed to get MLO connection info"); + wpa_supplicant_deauthenticate( + wpa_s, WLAN_REASON_DEAUTH_LEAVING); + return; + } + if (ft_completed && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_BSS_SELECTION)) { wpa_msg(wpa_s, MSG_INFO, "Attempt to roam to " MACSTR, diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 076081ec8..a9af64ab1 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -739,6 +739,14 @@ struct wpa_supplicant { struct wpa_bss *current_bss; int ap_ies_from_associnfo; unsigned int assoc_freq; + u8 ap_mld_addr[ETH_ALEN]; + u8 valid_links; /* bitmap of valid MLO link IDs */ + struct { + u8 addr[ETH_ALEN]; + u8 bssid[ETH_ALEN]; + u32 freq; + struct wpa_bss *bss; + } links[MAX_NUM_MLD_LINKS]; u8 *last_con_fail_realm; size_t last_con_fail_realm_len; From patchwork Thu Sep 8 14:44:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675672 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=QKJ/t7oJ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=YfseSHyG; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhmF5BDqz1yj1 for ; Fri, 9 Sep 2022 00:47:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=epqdisd07wI9GKB6WgKM31A2c9h94gbrkVyv0P79PRw=; b=QKJ/t7oJ7SB8rI 7EvUZ9dK/i3sEeSpeFwOX8VjHAF4ic5RhHV/8dyB/gWqn/DiC8h9UgoPi/J/X92rBfVPi4xzqQU56 /xe9yl3TO9cp6pUnsQV/CbzzRS24bc6KHJYTjq/Me2TT98mD6x9ePFNOFG7I5fnvU5E8zrkBVnpkG lTtw0LplxcIR2XbR10lVVkP/Gw+QXBk97aErtSng2iFeRux+svpx4WtvmOUTfuFJQ8ax7LyB11iaw QyHqXKotzVJAKfSVTM6j3iD5RCGopCriI0cv/2MwjboSEZmpKNTNE/O7MBQt58oj5gakZqmAijt5e CnKni+G47mfQPnuCWVtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWInL-004rff-DX; Thu, 08 Sep 2022 14:46:19 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIlq-004qOx-AG for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:47 +0000 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DkE6p003579 for ; Thu, 8 Sep 2022 14:44:45 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-transfer-encoding : content-type; s=qcppdkim1; bh=q64+Ua2WjHRCpzLOBHWahGEspIAkO8Chyqc3uWPQKZI=; b=YfseSHyGeuAg6QwkRu9Ea6QWM/XXWPRxun67UVpyoT+JpprmYCJ/tBFA9Swm8b9s/cM2 mJpOWGQpszerr7ICLDyd72TSA6qVO+mlCCjrrhPHZd1r6HA7F+S4CdDflnK5ZYIr7GW/ +XzPlzk3l0eooKtxyr/dq/8ELY6btO+QlGQPLVUFiutCyDRbK6qSSNjeOoTk+Kiy8o3U FY127tq7k4EGNO+qrNv1WkCojaFSFSmpUWwfSBXwitNeZruemC2xAVJREe5SnyAuu8Jb DvVJPWWUG6L5yjdkTKFKkJVlcghfHPpmv6ClXoBHAFfrX/oWitGErsEG83LhVTIpJ0Pt PQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfdxu8r2n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:45 +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 288EiirK016865 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:44 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:43 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 06/17] MLD STA: Use AP MLD address to set supplicant port as authorized Date: Thu, 8 Sep 2022 20:14:12 +0530 Message-ID: <20220908144423.2222859-7-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: XjUslSTkvkBfvyt7DL3J83ntk9fV3ZvK X-Proofpoint-ORIG-GUID: XjUslSTkvkBfvyt7DL3J83ntk9fV3ZvK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074446_504355_E51FB229 X-CRM114-Status: GOOD ( 17.74 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Use AP MLD address as peer's MAC address to set supplicant port as authorized for MLO connection. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver_nl80211.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Use AP MLD address as peer's MAC address to set supplicant port as authorized for MLO connection. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver_nl80211.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 0235e69d8..31aad927a 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -6978,14 +6978,16 @@ static int wpa_driver_nl80211_set_supp_port(void *priv, int authorized) struct nl_msg *msg; struct nl80211_sta_flag_update upd; int ret; + const u8 *connected_addr = drv->sta_mlo_info.valid_links ? + drv->sta_mlo_info.ap_mld_addr : drv->bssid; - if (!drv->associated && is_zero_ether_addr(drv->bssid) && !authorized) { + if (!drv->associated && is_zero_ether_addr(connected_addr) && !authorized) { wpa_printf(MSG_DEBUG, "nl80211: Skip set_supp_port(unauthorized) while not associated"); return 0; } wpa_printf(MSG_DEBUG, "nl80211: Set supplicant port %sauthorized for " - MACSTR, authorized ? "" : "un", MAC2STR(drv->bssid)); + MACSTR, authorized ? "" : "un", MAC2STR(connected_addr)); os_memset(&upd, 0, sizeof(upd)); upd.mask = BIT(NL80211_STA_FLAG_AUTHORIZED); @@ -6993,7 +6995,7 @@ static int wpa_driver_nl80211_set_supp_port(void *priv, int authorized) upd.set = BIT(NL80211_STA_FLAG_AUTHORIZED); if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_STATION)) || - nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, drv->bssid) || + nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, connected_addr) || nla_put(msg, NL80211_ATTR_STA_FLAGS2, sizeof(upd), &upd)) { nlmsg_free(msg); return -ENOBUFS; From patchwork Thu Sep 8 14:44:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=X14i5Cr5; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Eh4lJVj4; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhnG4Hvpz1yj1 for ; Fri, 9 Sep 2022 00:48:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WvRPqP22fG4R8/meDKTG0lDnW5iv4fdCSR3XGvk9I1A=; b=X14i5Cr5K7ACsa sPABA3rTZa33lU9rHJRD+jmPBlL/2pgf9MfJveyamJtAK5gYy65l7CMETGEhj4ExyD7PEXSXIF2lN l0Y8dFocuXpFHS8vpkXJtgg3ePTHbl8hkeA5jpXLvvpXpvuajvtu4aF5KRjw33SkgWkm1E235pfHw vl5JZFrIgp9r5ofltSgqQCPi6GputY7qI3GwKpZ7LwVLjoE7qaNhrIVI2DeAgdHxhFk5EciroGT5Y To7Dbyw4pjoXoEX82r19du3C0LwRhjoJOsfrA6Mmz637YP23qiWNQjzLKLrYPOMltks7rejNIY6T8 4tJH4RFTdrhqvRq1rtFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIoC-004sMQ-T0; Thu, 08 Sep 2022 14:47:13 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIls-004qSi-2s for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:49 +0000 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DaJV7019565 for ; Thu, 8 Sep 2022 14:44:47 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-transfer-encoding : content-type; s=qcppdkim1; bh=z2I4mynOPrmqwKwnaLNp3+ED0IAp7GtBJNgvYUpq/kg=; b=Eh4lJVj4rJy2KnDwDhCrCXc2SgiiLv7e291CUPr6FWUC6oLIRziWZ8YY3BzY0pkuEI+o +WK8aBLDih8xx63L4P3gGFhrklJVFl8u4ZAVdgtXhDJldFJmrvYUgc+iYKAif26brXRs B+HYlYMcSVa4yCWrIloFGHNT4T46ZMGdghydrFDnMikMCumDtUodUFI2Ggcb3GEV25cm r19pYNZ/UNHlUWEp5yeljs48zEDK4kNTJOVtGxvCv5IhVy684tzrPFOrSH69k3Yo75Qa RsOLMGw5HyZssVFE9EIQCc2W8bTu8qYk+pQ419mvxeJPzvArVwXCSrDLconELJTLgoYr zA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jf8511g0r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:47 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288EikWv005632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:46 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:44 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 07/17] scan: Add API to get ML IE of specified type from scan result IEs Date: Thu, 8 Sep 2022 20:14:13 +0530 Message-ID: <20220908144423.2222859-8-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: dZqyCheWgxgu_kW_TIh9UDYcDjXW3lsC X-Proofpoint-ORIG-GUID: dZqyCheWgxgu_kW_TIh9UDYcDjXW3lsC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 spamscore=0 phishscore=0 clxscore=1015 mlxscore=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074448_270599_97B9EFC0 X-CRM114-Status: GOOD ( 17.45 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Shivani Baranwal Add API to get ML IE of specified type from scan result probe response or beacon IEs. Signed-off-by: Shivani Baranwal --- wpa_supplicant/scan.c | 12 ++++++++++++ wpa_supplicant/scan.h | 1 + 2 files changed, 13 insertions(+) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Shivani Baranwal Add API to get ML IE of specified type from scan result probe response or beacon IEs. Signed-off-by: Shivani Baranwal --- wpa_supplicant/scan.c | 12 ++++++++++++ wpa_supplicant/scan.h | 1 + 2 files changed, 13 insertions(+) diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index a933e01b6..05913a181 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1947,6 +1947,18 @@ const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie) } +const u8 * wpa_scan_get_ml_ie(const struct wpa_scan_res *res, u8 type) +{ + size_t ie_len = res->ie_len; + + /* Use the Beacon frame IEs if res->ie_len is not available */ + if (!ie_len) + ie_len = res->beacon_ie_len; + + return get_ml_ie((const u8 *) (res + 1), ie_len, type); +} + + /** * wpa_scan_get_vendor_ie - Fetch vendor information element from a scan result * @res: Scan result entry diff --git a/wpa_supplicant/scan.h b/wpa_supplicant/scan.h index d1780eb09..f826d9134 100644 --- a/wpa_supplicant/scan.h +++ b/wpa_supplicant/scan.h @@ -51,6 +51,7 @@ wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s, struct scan_info *info, int new_scan); int wpa_supplicant_update_scan_results(struct wpa_supplicant *wpa_s); const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie); +const u8 * wpa_scan_get_ml_ie(const struct wpa_scan_res *res, u8 type); const u8 * wpa_scan_get_vendor_ie(const struct wpa_scan_res *res, u32 vendor_type); const u8 * wpa_scan_get_vendor_ie_beacon(const struct wpa_scan_res *res, From patchwork Thu Sep 8 14:44:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675675 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=yfLMQ/N/; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Y+Dn672e; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhqV3bzMz1yj1 for ; Fri, 9 Sep 2022 00:49:58 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NOYyVOiDFISt/fzqTUm1G+im8XV7npO5wJG4bdxkNAE=; b=yfLMQ/N/ok7KhC ajQ3jnoCTNaMgltpQQpEeXQQ1iAEXJ/EqR3SDjMcizOFGf5KuJBMstpNHyskIAtrfahu1evPrH3DV V78psNIk2VB4zb6caZfDx2b5MBiNJVZPWtlfOdzI3P8nrKHIWX0JwGUUK3g4MKDcYDsZXt3UNivtQ Gn9d9hMH0mj+Q6BsNQ3xgQtLt3a8naQ8nCmh+7OK8eO3+xSLcZoXAYA2IHLSG4I65jTHfAqxS0Nsh uH8AOxmhBFE3YoT29YUUavbjygenPihIPHSMjXU8swcbtfiLw9m3PWiTqO2OMRotgPsq9gHtuS9bu nxMSz1W7eNKiCc1EHrNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIq5-004tk0-6o; Thu, 08 Sep 2022 14:49:09 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIlu-004qTw-Jn for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:52 +0000 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DZpQP016926 for ; Thu, 8 Sep 2022 14:44:48 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-transfer-encoding : content-type; s=qcppdkim1; bh=KaOdyLhveO9s9+dn8OHOIeKCt+TT/B20mi3s3gxGFQk=; b=Y+Dn672e7RY20ZjFpWReVfRQCPtaRC4/cxGdbtYJj1KK+yAnNGjok4IarUJUIUq8wZ1T A1NJKSQ5aRi4OMwmXGDTh4Pf3t6ETL3GVHa2ElAqr/utv3ws6Pl3KD1rUNeHl4uya1Aj 5HfK+LobzPUYNvXR7ycT8A18W+gHvmb16uyl73Y8aptgCQEtOEqsY8QjxdGmylDO5SDY 6Rd8uyTer2J378OiWgfY6UiSJjPygGgII80vY+UEnecvj0NBxx/fWNAfIHxmdCmkRLhw 5B0atnF2fVOJ0LLLIZtwNfS8Lb3SO2R4FWk58GZMeBvGWFrqSz1jUdP4m91pS6GBuvpK tA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfdxu8r2r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:48 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288EilcK024157 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:47 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:46 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 08/17] Add API to get MLD address from basic ML IE Date: Thu, 8 Sep 2022 20:14:14 +0530 Message-ID: <20220908144423.2222859-9-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: 4JzExzVYXAmQeUvOwehh7VXnxVuLsEzj X-Proofpoint-ORIG-GUID: 4JzExzVYXAmQeUvOwehh7VXnxVuLsEzj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=851 spamscore=0 malwarescore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074450_821280_098312AB X-CRM114-Status: GOOD ( 18.08 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Shivani Baranwal Add utility API to fetch Multi-Link Device(MLD) address from basic Multi-Link(ML) IE. Signed-off-by: Shivani Baranwal --- src/common/ieee802_11_common.c | 21 +++++++++++++++++++++ src/common/ieee802_11_common.h | 1 + 2 files changed, 22 insertions(+) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Shivani Baranwal Add utility API to fetch Multi-Link Device(MLD) address from basic Multi-Link(ML) IE. Signed-off-by: Shivani Baranwal --- src/common/ieee802_11_common.c | 21 +++++++++++++++++++++ src/common/ieee802_11_common.h | 1 + 2 files changed, 22 insertions(+) diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index 0eac3f84c..8b3b7d3af 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -2771,3 +2771,24 @@ const u8 * get_ml_ie(const u8 *ies, size_t len, u8 type) return NULL; } + +const u8 * get_basic_mle_mld_addr(const u8 *buf, size_t len) +{ +#define BASIC_ML_IE_FIXED_LENGTH \ + (2 + /* Control field */ \ + 1 + /* Common info length field */ \ + 6) /* MLD mac address field */ + if (len < BASIC_ML_IE_FIXED_LENGTH) + return NULL; +#undef BASIC_ML_IE_FIXED_LENGTH + + if ((buf[0] & MULTI_LINK_CONTROL_TYPE_MASK) != + MULTI_LINK_CONTROL_TYPE_BASIC) + return NULL; + +#define BASIC_ML_IE_MLD_ADDR_IDX \ + (2 + /* Control field */ \ + 1) /* Common Info length field */ + return &buf[BASIC_ML_IE_MLD_ADDR_IDX]; +#undef BASIC_ML_IE_MLD_ADDR_IDX +} diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h index bd2c9fbf5..c3a3234b3 100644 --- a/src/common/ieee802_11_common.h +++ b/src/common/ieee802_11_common.h @@ -344,5 +344,6 @@ struct wpabuf * ieee802_11_defrag_data(struct ieee802_11_elems *elems, struct wpabuf * ieee802_11_defrag(struct ieee802_11_elems *elems, u8 eid, u8 eid_ext); const u8 * get_ml_ie(const u8 *ies, size_t len, u8 type); +const u8 * get_basic_mle_mld_addr(const u8 *buf, size_t len); #endif /* IEEE802_11_COMMON_H */ From patchwork Thu Sep 8 14:44:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675674 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=XXJu0m7v; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=QZtkMVnb; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhpF20Zqz1yj1 for ; Fri, 9 Sep 2022 00:48:53 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R4cgaXhAkSSF2l1ZxHgsNAdFW+f54c0LvDWhSmUEbR8=; b=XXJu0m7vCrKoA0 oXJczk14u2+ZLJEJYdx15qLorXuc247/nqUxQm3zuT0ozWEvG8yE3+gAnM2KwFoYMybJ3ZweB1Is9 dDhGQnr7yyHotEzIrxCIRPfLOV5Xr4NhX3OpKDZ1uBy50JFFgN3KUul+ksL2QNK3QvHPOn6Q8tDCt 8SL9TUVNmyizp4plzA5SqNJ1eRs7YYgII5oBm+PBns3e8oYTa6oO1wmtjh3xBXIHBk9mYAsrgtHVW b9Ukv38q94cK+edl5yoSxTCX3fmgRr3hvT4t6lilAl3aUL1te5HSteZE8XAhgnnYSx4WIqx8QzgV9 xXGUzW1s32wPuypeKO8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIoz-004st8-QS; Thu, 08 Sep 2022 14:48:01 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIlu-004qUA-DN for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:52 +0000 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288EAheP030514 for ; Thu, 8 Sep 2022 14:44:50 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-transfer-encoding : content-type; s=qcppdkim1; bh=hFppwW4SbqcONbejkrjfm/ZPEagNiWWjXOUskXIBebk=; b=QZtkMVnbLRaMnjvB6klfYu4DesqIu1MQ+4C92fe4AoP2yWlNwuTlIgrEvpl1PwndVNWH PkscY0JNVypHsB9yWbbW6hJlC9fzyVAiA09DwDN0nsikP8gE594ggaMynvjY+osZohiY 3f1dD58UqSFSF7mxa4VcapuRJ9dqk7MHFoR5zkCGVb8CP7iJyVyAv/I1L8j9sDrGJKfS 8Da7uwfVNwfHgcw47gr7Q+cmfEH2l+l62TrbE2CU5TaM752M0seTA3LCCuU8aPIoBjdu QbhaXCPnymfkBaj80ziO0iHrwBXvorBxzcDEFd8eXnMZ8s8SHpgUUgYZEX9eH6GZG54k Ew== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfeuurje1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:49 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288EinCW005664 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:49 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:47 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 09/17] bss: Parse and store MLD address of the AP from ML IE Date: Thu, 8 Sep 2022 20:14:15 +0530 Message-ID: <20220908144423.2222859-10-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: MBmihboCqVWNstc6NQSw-Bmm-7Uvd7UC X-Proofpoint-GUID: MBmihboCqVWNstc6NQSw-Bmm-7Uvd7UC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080054 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074450_510194_71678F90 X-CRM114-Status: GOOD ( 22.10 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Parse ML IE received in scan result to get AP MLD address and cache it in wpa_bss structure. Signed-off-by: Shivani Baranwal Signed-off-by: Veerendranath Jakkam --- wpa_supplicant/bss.c | 45 ++++++++++++++++++++++++++++++++++++++------ wp [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.168.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Parse ML IE received in scan result to get AP MLD address and cache it in wpa_bss structure. Signed-off-by: Shivani Baranwal Signed-off-by: Veerendranath Jakkam --- wpa_supplicant/bss.c | 45 ++++++++++++++++++++++++++++++++++++++------ wpa_supplicant/bss.h | 2 ++ 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index 7dcdb9969..6afc2466f 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -457,7 +457,11 @@ static struct wpa_bss * wpa_bss_add(struct wpa_supplicant *wpa_s, struct os_reltime *fetch_time) { struct wpa_bss *bss; - char extra[50]; + char extra[100]; + const u8 *ml_ie; + char *pos, *end; + int ret = 0; + const u8 *mld_addr; bss = os_zalloc(sizeof(*bss) + res->ie_len + res->beacon_ie_len); if (bss == NULL) @@ -472,6 +476,14 @@ static struct wpa_bss * wpa_bss_add(struct wpa_supplicant *wpa_s, os_memcpy(bss->ies, res + 1, res->ie_len + res->beacon_ie_len); wpa_bss_set_hessid(bss); + os_memset(bss->mld_addr, 0, ETH_ALEN); + ml_ie = wpa_scan_get_ml_ie(res, MULTI_LINK_CONTROL_TYPE_BASIC); + if (ml_ie) { + mld_addr = get_basic_mle_mld_addr(&ml_ie[3], ml_ie[1] - 1); + if (mld_addr) + os_memcpy(bss->mld_addr, mld_addr, ETH_ALEN); + } + if (wpa_s->num_bss + 1 > wpa_s->conf->bss_max_count && wpa_bss_remove_oldest(wpa_s) != 0) { wpa_printf(MSG_ERROR, "Increasing the MAX BSS count to %d " @@ -483,11 +495,21 @@ static struct wpa_bss * wpa_bss_add(struct wpa_supplicant *wpa_s, dl_list_add_tail(&wpa_s->bss, &bss->list); dl_list_add_tail(&wpa_s->bss_id, &bss->list_id); wpa_s->num_bss++; + + extra[0] = '\0'; + pos = extra; + end = pos + sizeof(extra); if (!is_zero_ether_addr(bss->hessid)) - os_snprintf(extra, sizeof(extra), " HESSID " MACSTR, - MAC2STR(bss->hessid)); - else - extra[0] = '\0'; + ret = os_snprintf(pos, end - pos, " HESSID " MACSTR, + MAC2STR(bss->hessid)); + + if (!is_zero_ether_addr(bss->mld_addr) && + !os_snprintf_error(end - pos, ret)) { + pos += ret; + ret = os_snprintf(pos, end - pos, " MLD ADDR " MACSTR, + MAC2STR(bss->mld_addr)); + } + wpa_dbg(wpa_s, MSG_DEBUG, "BSS: Add new id %u BSSID " MACSTR " SSID '%s' freq %d%s", bss->id, MAC2STR(bss->bssid), wpa_ssid_txt(ssid, ssid_len), @@ -632,6 +654,8 @@ wpa_bss_update(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, struct wpa_scan_res *res, struct os_reltime *fetch_time) { u32 changes; + const u8 *ml_ie; + const u8 *mld_addr; if (bss->last_update_idx == wpa_s->bss_update_idx) { struct os_reltime update_time; @@ -724,8 +748,17 @@ wpa_bss_update(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, } dl_list_add(prev, &bss->list_id); } - if (changes & WPA_BSS_IES_CHANGED_FLAG) + if (changes & WPA_BSS_IES_CHANGED_FLAG) { wpa_bss_set_hessid(bss); + os_memset(bss->mld_addr, 0, ETH_ALEN); + ml_ie = wpa_scan_get_ml_ie(res, MULTI_LINK_CONTROL_TYPE_BASIC); + if (ml_ie) { + mld_addr = get_basic_mle_mld_addr(&ml_ie[3], + ml_ie[1] - 1); + if (mld_addr) + os_memcpy(bss->mld_addr, mld_addr, ETH_ALEN); + } + } dl_list_add_tail(&wpa_s->bss, &bss->list); notify_bss_changes(wpa_s, changes, bss); diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h index 146aaee7f..b68fc879d 100644 --- a/wpa_supplicant/bss.h +++ b/wpa_supplicant/bss.h @@ -122,6 +122,8 @@ struct wpa_bss { size_t ie_len; /** Length of the following Beacon IE field in octets */ size_t beacon_ie_len; + /** MLD address of the AP */ + u8 mld_addr[ETH_ALEN]; /* followed by ie_len octets of IEs */ /* followed by beacon_ie_len octets of IEs */ u8 ies[]; From patchwork Thu Sep 8 14:44:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675677 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=0QHXSqCl; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=a0aZqq3B; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhrV6XqRz1yp2 for ; Fri, 9 Sep 2022 00:50:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/liudv52ePz8pXmTV19c3y4x9EzhZxo1fnrBRi9UZCI=; b=0QHXSqClcOkxaP toANHQUlbDcwUJF5mEIgC+iUEKnFyKcNP56m4w7afMTvo5MDIjgoPvvZqvIKWR/sfmAUYrsmOKSHb i53022MLmoHA1KoHLpb03CbHtFoQWWad0J/Y1TEHLf9DjG2gtxf8PO5+9Ecb70wtUM3LDSteFj3so sjtx6GvoVxz6Ol/5/kfVKlry05MRfx9R16LLJG85ckw143OJhSyAVyg/j6ZTCPud54y78V5+yHA/3 4AWo8Ob+Xz9mvrMXlFOCy262LOU6io5+K/eG9b5dU58UGR1FuDvFWOa6YqbmelDoLqwxkfRQVjKRm 8AoFXvoHUj3oK2/tPzgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIqx-004uMo-CS; Thu, 08 Sep 2022 14:50:03 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIlw-004qVA-SH for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:54 +0000 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DZ3Ng004482 for ; Thu, 8 Sep 2022 14:44:52 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-transfer-encoding : content-type; s=qcppdkim1; bh=fMc6P4xPz0kcGMF7qEbIAvUpPajU0NEz15s/8CQWMQg=; b=a0aZqq3Bvbs0HZE2WDUWlDQ3TwDs9v1h2fi9buLCHfi01evMUa5FlQQeuMg+A3ebyZD9 SiuXX3XaiF/NDbo6IOltaPRSRQEfq8RJevawgb4LKwuJg5N0kIsKzb68T9Zwzkjk79XV EeBiA7nxUlXGiYRaWxsq5rwRyzkPwJ02rshMKotCxYL94XjtvsRzuTcptNKk8xDf/oDM DH6y4tJkfH6ivzU0cHKl5HHJx/4d3J3mEQurKg5CDi00I32XL3MekBr0Bhz58DMkZlyL ViEgghtUmD/Ff+zB77Gl9w9hrT9vDjgo+JEkBHl0dSLMBAnNH/wtaRVeJJadY0zZEE1s QQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfaa5h8se-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:51 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288Eioql028534 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:51 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:49 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 10/17] bss: Indicate AP MLD address in bss info Date: Thu, 8 Sep 2022 20:14:16 +0530 Message-ID: <20220908144423.2222859-11-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: X8eNNxY1B5_9QPZUim_e1xTfAYTqbmgf X-Proofpoint-ORIG-GUID: X8eNNxY1B5_9QPZUim_e1xTfAYTqbmgf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 mlxlogscore=682 lowpriorityscore=0 phishscore=0 adultscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074453_076341_764EA9E7 X-CRM114-Status: GOOD ( 17.56 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Aleti Nageshwar Reddy Indicate AP MLD address in the response of bss control interface command. Signed-off-by: Aleti Nageshwar Reddy --- wpa_supplicant/ctrl_iface.c | 9 +++++++++ 1 file changed, 9 insertions(+) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Aleti Nageshwar Reddy Indicate AP MLD address in the response of bss control interface command. Signed-off-by: Aleti Nageshwar Reddy --- wpa_supplicant/ctrl_iface.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 4deded99b..6731124ed 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -5424,6 +5424,15 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, } #endif /* CONFIG_FILS */ + if (!is_zero_ether_addr(bss->mld_addr)) { + ret = os_snprintf(pos, end - pos, + "ap_mld_addr="MACSTR"\n", + MAC2STR(bss->mld_addr)); + if (os_snprintf_error(end - pos, ret)) + return 0; + pos += ret; + } + if (mask & WPA_BSS_MASK_DELIM) { ret = os_snprintf(pos, end - pos, "====\n"); if (os_snprintf_error(end - pos, ret)) From patchwork Thu Sep 8 14:44:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675678 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=IZptgPdz; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=ZT4xuy2r; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhsb3mJVz1yhR for ; Fri, 9 Sep 2022 00:51:47 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ntLZS7RfLKCX8xAHQBpo/QEu6OEQoEKzpvO2WXCYvU0=; b=IZptgPdzLXs6aw gJxBfJFpMHaA3pVUOhUSQHjmFP8jFXJxOd2jEVUT3amcznL/oH0hFJZMMgzsRsoHa6+7AoJPWwr+V 209/VuGU/aGLWAry62qJdYCChIfp+yqzoEVUx65QI4znjeyqwyayD1+LfMp4VSfNoFReKXyXIJGGn SN2rogOCx60AdoFAnuSbc/r2mJQGffTkpFDWuy8Ka8BK4dc+e9GS5b0kqntouHFKOJh8zg5YiNypv v1r8H9nqF0uqokfnDkkRtRBMZb0mDSno6xtcZstJrQwgvham1/chW8tWjEfUDAO20zVvRrlIKFavX a9PYu0I517Fp7AWM9G2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIrp-004uq6-Co; Thu, 08 Sep 2022 14:50:57 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIly-004qVw-G5 for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:55 +0000 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DZEo3031392 for ; Thu, 8 Sep 2022 14:44:53 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-transfer-encoding : content-type; s=qcppdkim1; bh=Npebq3V/nZojPHnTG3FKMpe8p5lOdgxvkUvQbq3p2pY=; b=ZT4xuy2rOcGlhFs5sMVtHLu9+jetVE4loqLfHYKrcda0uzzqZ7G5lqSfi6e9wmH5dJ5B OKZ3q3Q52VQGz5ngxhP87+z7WoIeQ3moQda6Lx8rqyjUxxvbYn2zpVsfEEYh7R6DYtrx 5TUZNPTJboJUiGb5ltWhKZ6mfpLzO5ylvVokf1snB7nUrZ10oDptoLvF+asnAA99Jqhn n+tZ+uondN8Gndo7KCaWsPk9jjmbvJlVuuHIGCQ9fpDNDKMRlE23nYMEXZLLQGE/tU1w lL4n2fGV0NaB8bFuKd/qDnahZxPNjfIbi0/NmnVuvEjjFi2gHiFprg3iGOzsWDyXfCR9 RQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jf5pcsrnt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:53 +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 288EiqgL016892 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:52 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:51 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 11/17] MLD STA: Indicate AP MLD address in CTRL-EVENT-CONNECTED Date: Thu, 8 Sep 2022 20:14:17 +0530 Message-ID: <20220908144423.2222859-12-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: bZ_BFzhRxKxelP051lWH760-n8PdiHxh X-Proofpoint-GUID: bZ_BFzhRxKxelP051lWH760-n8PdiHxh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 malwarescore=0 mlxlogscore=789 lowpriorityscore=0 impostorscore=0 spamscore=0 priorityscore=1501 adultscore=0 bulkscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074454_681459_DEFC4206 X-CRM114-Status: GOOD ( 17.93 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Aleti Nageshwar Reddy Append AP MLD address to CTRL-EVENT-CONNECTED when current connection is MLO connection. Signed-off-by: Aleti Nageshwar Reddy --- wpa_supplicant/ctrl_iface.c | 13 +++++++++++-- wpa_supplicant/wpa_supplicant.c | 11 +++++++++-- 2 files changed, 20 insertions(+), [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Aleti Nageshwar Reddy Append AP MLD address to CTRL-EVENT-CONNECTED when current connection is MLO connection. Signed-off-by: Aleti Nageshwar Reddy --- wpa_supplicant/ctrl_iface.c | 13 +++++++++++-- wpa_supplicant/wpa_supplicant.c | 11 +++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 6731124ed..a60da649e 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -2537,12 +2537,21 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s, wpa_s->current_ssid->ssid_len) : ""); if (wpa_s->wpa_state == WPA_COMPLETED) { struct wpa_ssid *ssid = wpa_s->current_ssid; + char mld_addr[50]; + + mld_addr[0] = '\0'; + if (wpa_s->valid_links) + os_snprintf(mld_addr, sizeof(mld_addr), + " ap_mld_addr=" MACSTR, + MAC2STR(wpa_s->ap_mld_addr)); + wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_CONNECTED "- connection to " MACSTR - " completed %s [id=%d id_str=%s]", + " completed %s [id=%d id_str=%s]%s", MAC2STR(wpa_s->bssid), "(auth)", ssid ? ssid->id : -1, - ssid && ssid->id_str ? ssid->id_str : ""); + ssid && ssid->id_str ? ssid->id_str : "", + mld_addr); } } #endif /* ANDROID */ diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index deb51a721..8d9228874 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -985,6 +985,13 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, if (state == WPA_COMPLETED && wpa_s->new_connection) { struct wpa_ssid *ssid = wpa_s->current_ssid; int fils_hlp_sent = 0; + char mld_addr[50]; + + mld_addr[0] = '\0'; + if (wpa_s->valid_links) + os_snprintf(mld_addr, sizeof(mld_addr), + " ap_mld_addr=" MACSTR, + MAC2STR(wpa_s->ap_mld_addr)); #ifdef CONFIG_SME if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) && @@ -997,11 +1004,11 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, #if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG) wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_CONNECTED "- Connection to " - MACSTR " completed [id=%d id_str=%s%s]", + MACSTR " completed [id=%d id_str=%s%s]%s", MAC2STR(wpa_s->bssid), ssid ? ssid->id : -1, ssid && ssid->id_str ? ssid->id_str : "", - fils_hlp_sent ? " FILS_HLP_SENT" : ""); + fils_hlp_sent ? " FILS_HLP_SENT" : "", mld_addr); #endif /* CONFIG_CTRL_IFACE || !CONFIG_NO_STDOUT_DEBUG */ wpas_clear_temp_disabled(wpa_s, ssid, 1); wpa_s->consecutive_conn_failures = 0; From patchwork Thu Sep 8 14:44:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=DQ9ZSjTU; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=NvP5Tuo6; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhtl1B0Yz1yhR for ; Fri, 9 Sep 2022 00:52:47 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3xT8UlMtuN0slBrtzpLQZC8zrIn9TrsERJzo6h9MOOU=; b=DQ9ZSjTUw6f3BF IhM2YzcHdjQTbD9vr9iCBLX6rp2Xw92FNgTxfj4CX9i14FvfydVwHIvlUjM1I9/HrvsL9PSUrIjXZ CeIosKBdsGZ93Z6i4Eoddiga2kD6Guam02JKwzzERB3Namo0UTL36bRwyycitBIQl38MQkGlEDGgk loCYzxoH+a1ujoDBcTwe/BiR/cYkt079xpC94UsAGRb+qu2mnWcD00WIUxmWKYpxT5RtgXSbbdGFw z0Dw6pKL0/NHaruL4ziUmtAeeNPR9TCPm2iwbBS/C6BzTRDPSNeuX89Iq9X3STsC7MVCNiX1qqOUE vSUmAE/6gsP13re92k3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIsm-004vH0-Lg; Thu, 08 Sep 2022 14:51:56 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIlz-004qXN-UR for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:57 +0000 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DaF5v020378 for ; Thu, 8 Sep 2022 14:44:55 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-transfer-encoding : content-type; s=qcppdkim1; bh=MX6J66YXpQc62RhxAovh4ZBAwUbnQJYt/f9l0KYyH2g=; b=NvP5Tuo6p3fz0HIB7vRsr+SZc9l+Wyxtx53SiOYGTPsJ2DY308nlytV03bw5yRwjF9jW BAcmcSMMQQwTxp4h9dSZiJKHuYppwoZmCcTK/WJn5tYrJ3Q95+55LsoTaQT1pAIz7csr LpQsb3JQ2yZtVrsloN1Ow7KpnIHORwlmnb/D9nYkccfwdxDJHo2/gPZfMba8N5zwNgH2 yVMFnCweYS4Y3oFyWCU1uBIQZxxIEhITSjVNKRaNN5iesNzKv8leqsNFdSp6JrXTYlXJ si569RatG6XY8yt808eH6BEBGXWTXbEk9+A+2gBH94zNCHmtejFmlxO2ESlQ1rv6mqHx IQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfdc70tx9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:55 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288EisMn028735 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:54 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:52 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 12/17] MLD STA: Indicate AP MLD address in STATUS command Date: Thu, 8 Sep 2022 20:14:18 +0530 Message-ID: <20220908144423.2222859-13-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: IZ1uxRJBKj9d0v9J1a5kvPnRWgfZa38B X-Proofpoint-ORIG-GUID: IZ1uxRJBKj9d0v9J1a5kvPnRWgfZa38B X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 mlxlogscore=829 spamscore=0 phishscore=0 clxscore=1015 adultscore=0 bulkscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074456_152092_E2AEC4CB X-CRM114-Status: GOOD ( 16.90 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Aleti Nageshwar Reddy Append AP MLD address info in STATUS control interface command. Signed-off-by: Aleti Nageshwar Reddy --- wpa_supplicant/ctrl_iface.c | 8 ++++++++ 1 file changed, 8 insertions(+) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Aleti Nageshwar Reddy Append AP MLD address info in STATUS control interface command. Signed-off-by: Aleti Nageshwar Reddy --- wpa_supplicant/ctrl_iface.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index a60da649e..d5ba95914 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -2383,6 +2383,14 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s, return pos - buf; pos += ret; + if (wpa_s->valid_links) { + ret = os_snprintf(pos, end - pos, "ap_mld_addr=" MACSTR "\n", + MAC2STR(wpa_s->ap_mld_addr)); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + #ifdef CONFIG_HS20 if (wpa_s->current_bss && (hs20 = wpa_bss_get_vendor_ie(wpa_s->current_bss, From patchwork Thu Sep 8 14:44:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675680 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=cceKfbB4; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=On+LMZaN; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhvw4w05z1yhR for ; Fri, 9 Sep 2022 00:53:48 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Evvb7RNBsak30iKTxV9n3MeXpSr9Q7gBbeXyt/1kJnI=; b=cceKfbB4l8X389 5dPU3CSzjQ2MQpm1CRcpanNxdreRObJ6UbcPc5FPZ1icqzyPPBr/CQ0ucrmYk7xbcYzo/JwSnvh+C sZif6B5l88xK3kGPCrv+X7skWz24hZCpa3XPS0pKLDgIic4PvbfeLRUrxtgGGOJ6pClGicElvrfNK S1h60kepkL6FAb9PrvSVUnNkzAJ6Tn5W721nUyA3J84ka9OjabyoExBknm+AyYEMq6PDisjY9ROKM oLr2qr0aq3zacj3i62xAY/B75ZivboZsReBUCTGkpNn7v+EafNEMzjKZoVwd1ubpSEQWRFiXcybqw wgGXYcVRPFJWgqG97EBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWItl-004vjk-S4; Thu, 08 Sep 2022 14:52:58 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIm1-004qdI-Ka for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:44:59 +0000 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DYrhe004320 for ; Thu, 8 Sep 2022 14:44:57 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-transfer-encoding : content-type; s=qcppdkim1; bh=eTQ9lXDf4gGL/+okzGS39gFwskE+qOxf9Lv3pkdfwpw=; b=On+LMZaN1uCqrHDcRODEVbcYXPuVwqLMfFpn9mxcG1DneeXONrAQndkimLWZ/R8+1Xhj U18LAWNSyihm9GUcAcM1MI86wVcoQQ4SssWzS7IOAQDfsTZJ/qxG4SUcZXugx1rUttwH 1Lw0gBaw+5V1QSt5ls9D2pMwRQkjHv/ttwwGML2Zei0Nvda3M695YlO/qvkloQ0I0dFz 1Z3Vv9sVjUPbSymebbx33t+h21Ux898Eln4OQsotR+4HS8pTtq1gg+VvqClhLB3jrV0O xpcIrdBDfER6TYIRsvQWpDYy2JLF3mTgVBasZfIzjmHP+bFdAnLBBQ2oXvF0rJVDT4Qt Hg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfaa5h8sk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:56 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288EitQo024190 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:55 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:54 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 13/17] driver_nl80211: send bssid info as parameter to nl80211_get_link_signal Date: Thu, 8 Sep 2022 20:14:19 +0530 Message-ID: <20220908144423.2222859-14-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: 1fvzI8gm1VOzphGv6maU6BTtTtlyvfEp X-Proofpoint-ORIG-GUID: 1fvzI8gm1VOzphGv6maU6BTtTtlyvfEp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 adultscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074457_808018_ADE5437F X-CRM114-Status: GOOD ( 21.42 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add bssid as parameter to nl80211_get_link_signal() instead of using bssid from driver structure. This is useful for calling the API per-MLO link. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver_nl80211.c | 5 +++-- src/drivers/driver_nl80211.h | 2 +- src/drivers/driver_nl80211_event.c | 2 +- 3 files changed, [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add bssid as parameter to nl80211_get_link_signal() instead of using bssid from driver structure. This is useful for calling the API per-MLO link. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver_nl80211.c | 5 +++-- src/drivers/driver_nl80211.h | 2 +- src/drivers/driver_nl80211_event.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 31aad927a..9a23ff823 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -1698,6 +1698,7 @@ static int get_link_signal(struct nl_msg *msg, void *arg) int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv, + u8 *bssid, struct wpa_signal_info *sig) { struct nl_msg *msg; @@ -1706,7 +1707,7 @@ int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv, sig->current_txrate = 0; if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_GET_STATION)) || - nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, drv->bssid)) { + nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid)) { nlmsg_free(msg); return -ENOBUFS; } @@ -8757,7 +8758,7 @@ static int nl80211_signal_poll(void *priv, struct wpa_signal_info *si) int res; os_memset(si, 0, sizeof(*si)); - res = nl80211_get_link_signal(drv, si); + res = nl80211_get_link_signal(drv, drv->bssid, si); if (res) { if (drv->nlmode != NL80211_IFTYPE_ADHOC && drv->nlmode != NL80211_IFTYPE_MESH_POINT) diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h index c84b21974..1eef755e0 100644 --- a/src/drivers/driver_nl80211.h +++ b/src/drivers/driver_nl80211.h @@ -268,7 +268,7 @@ struct i802_bss * get_bss_ifindex(struct wpa_driver_nl80211_data *drv, int is_ap_interface(enum nl80211_iftype nlmode); int is_sta_interface(enum nl80211_iftype nlmode); int wpa_driver_nl80211_authenticate_retry(struct wpa_driver_nl80211_data *drv); -int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv, +int nl80211_get_link_signal(struct wpa_driver_nl80211_data *drv, u8 *bssid, struct wpa_signal_info *sig); int nl80211_get_link_noise(struct wpa_driver_nl80211_data *drv, struct wpa_signal_info *sig_change); diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index 6c321741c..00ef51413 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -1604,7 +1604,7 @@ static void nl80211_cqm_event(struct wpa_driver_nl80211_data *drv, * nl80211_get_link_signal() and nl80211_get_link_noise() set default * values in case querying the driver fails. */ - res = nl80211_get_link_signal(drv, &ed.signal_change); + res = nl80211_get_link_signal(drv, drv->bssid, &ed.signal_change); if (res == 0) { wpa_printf(MSG_DEBUG, "nl80211: Signal: %d dBm txrate: %d", ed.signal_change.current_signal, From patchwork Thu Sep 8 14:44:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=tQ0dQhBP; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=auVwUNpF; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhxd5bKPz1ynD for ; Fri, 9 Sep 2022 00:55:17 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ie1mtvthlClLhzZJi5/KiXr8xpJs6tVgPKT6ItvSvXM=; b=tQ0dQhBPgJoHuK B/BDhJVZh4NY8FeSIIMFEV9LVx7GiW0bRKKHqMZ49If8FZ1bjj7m072/EJkJJ6dgrMYak885jeHJ5 LLch1j6W0Rjm+az1WspIVxcpGuNnlzn0OtRDIDV9X+KZ1MD6db8n9pxcMrCq9wD78V8i3JjPOdTwc VDWxQMLkEvynvBJXHEOtFTovB21qNVA8OAlAy4GtSUjXeNdy1bwE8d8DTLLBW3TATClV95SQMxr7g yFqlNPzjPIlfctw/umpodSHKSrVTUTaDYOj0szYjxV9pJ/r1GGvi61diWoTqkPWTMbq9PGv9jyX+U q+CRTqG+46LdGruWV71g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIv5-004wiw-2M; Thu, 08 Sep 2022 14:54:19 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIm3-004qeE-C3 for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:45:00 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DZpUU021338 for ; Thu, 8 Sep 2022 14:44:58 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-transfer-encoding : content-type; s=qcppdkim1; bh=DKQsL6PjxV8X4eSPSnBj8DiPXGLip5Ciw2xyrx4wwo0=; b=auVwUNpFd9ltjva04YOdAvrIYuOydFbB8E2iAbKItpcQOlKfgC9wn66LQlhzZbXizLRI Om4mY8lEw1LAsZ1U+mFK/8qnyMgQ9iJJDVYXU1Z0vWybm/FGZDTUmZlvVetsRAdFDNyn UkpBM34s+GxbAs1PQ6niUvfdfMl3ug9GZug4yXdnk0p2o6RTuvEEIE7/dsqZDhoz+YcL RyFMZn+77GwWMjCBRcBy37UwErealmEvoTvgX56MJByrjgdq7Ohr7XAHdWETi4C9uu9T kKIQFZwfBf0J0Hi0EfScwXLILSvQsVgqQXg3OLdRE6Er1bsAyll1mC387/d2QTvvntBY Kg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jf1swt6x7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:44:58 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288Eiv9A028942 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:57 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:56 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 14/17] MLD STA: Add support for MLO_STATUS control interface command Date: Thu, 8 Sep 2022 20:14:20 +0530 Message-ID: <20220908144423.2222859-15-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: N6-dYJQcFCOVdcjkWmvTfbDxr3bQDqSt X-Proofpoint-ORIG-GUID: N6-dYJQcFCOVdcjkWmvTfbDxr3bQDqSt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 bulkscore=0 impostorscore=0 adultscore=0 priorityscore=1501 mlxscore=0 spamscore=0 malwarescore=0 clxscore=1015 mlxlogscore=972 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074459_551398_565563AB X-CRM114-Status: GOOD ( 21.09 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Shivani Baranwal Add support for MLO_STATUS control interface command to indicate per-link information. Signed-off-by: Shivani Baranwal --- wpa_supplicant/ctrl_iface.c | 35 +++++++++++++++++++++++++++++++++++ wpa_supplicant/wpa_cli.c | 9 +++++++++ 2 files changed, 44 insertio [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Shivani Baranwal Add support for MLO_STATUS control interface command to indicate per-link information. Signed-off-by: Shivani Baranwal --- wpa_supplicant/ctrl_iface.c | 35 +++++++++++++++++++++++++++++++++++ wpa_supplicant/wpa_cli.c | 9 +++++++++ 2 files changed, 44 insertions(+) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index d5ba95914..cd8a20fbd 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -11540,6 +11540,38 @@ static int wpas_ctrl_iface_send_dscp_query(struct wpa_supplicant *wpa_s, } +static int wpas_ctrl_iface_mlo_status(struct wpa_supplicant *wpa_s, + const char *params, char *buf, + size_t buflen) +{ + int ret, i; + char *pos, *end; + + if (!wpa_s->valid_links) + return -1; + + pos = buf; + end = buf + buflen; + + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + if (!(wpa_s->valid_links & BIT(i))) + continue; + + ret = os_snprintf(pos, end - pos, "link_id=%d\nfreq=%u\n" + "ap_link_addr=" MACSTR "\nsta_link_addr=" + MACSTR"\n", i, + wpa_s->links[i].freq, + MAC2STR(wpa_s->links[i].bssid), + MAC2STR(wpa_s->links[i].addr)); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + + return pos - buf; +} + + char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, char *buf, size_t *resp_len) { @@ -12554,6 +12586,9 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, } else if (os_strncmp(buf, "DSCP_QUERY ", 11) == 0) { if (wpas_ctrl_iface_send_dscp_query(wpa_s, buf + 11)) reply_len = -1; + } else if (os_strcmp(buf, "MLO_STATUS") == 0) { + reply_len = wpas_ctrl_iface_mlo_status(wpa_s, buf + 10, reply, + reply_size); } else { os_memcpy(reply, "UNKNOWN COMMAND\n", 16); reply_len = 16; diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 4b8d9ef1e..e0f0d4f8d 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -413,6 +413,12 @@ static int wpa_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[]) } +static int wpa_cli_cmd_mlo_status(struct wpa_ctrl *ctrl, int argc, char *argv[]) +{ + return wpa_ctrl_command(ctrl, "MLO_STATUS"); +} + + static int wpa_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[]) { char cmd[256]; @@ -4037,6 +4043,9 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = { { "dscp_query", wpa_cli_cmd_dscp_query, NULL, cli_cmd_flag_none, "wildcard/domain_name= = Send DSCP Query" }, + { "mlo_status", wpa_cli_cmd_mlo_status, NULL, + cli_cmd_flag_none, + "[verbose] = get ml links status" }, { NULL, NULL, NULL, cli_cmd_flag_none, NULL } }; From patchwork Thu Sep 8 14:44:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675685 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=kYBLMj3H; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=okEjUR7a; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNhzM22Zmz1ynD for ; Fri, 9 Sep 2022 00:56:47 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4+C9IjGklzN7zCxX5lAl4yMuxn40v8GG/9d3rWJTHQk=; b=kYBLMj3HW7IQme h72CdTC3QcQEDzLQAPI3Z6pKKk+qtf83d3/J13gYFzzknjaxoGocYOlVQu8AAa3xoDpS4MXr5oDLf qKvJcfTYejPRxh1dF1nHqVPDA7gMTHYqPYX83Qt/N8QsAvdKMT3bt6cyn/wjwgQMixBigIcBYj1hc ajATBJPdUQkWU/mAkpeH/kJ18Z5fUys45cllvJq4BOKgNEMOVRBZDmJyle6WPdEzExUz7NBUGLKri dhflMkXEKLXPtkVuTyyHtk4jWK4vkvoTsG1JYxgkaqDeP8lNWEnDAhC+ewFXDM01bE7ZFTmvfL+dc n25YwpyD+t6wuP+IHlVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIwP-004xVe-HN; Thu, 08 Sep 2022 14:55:42 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIm4-004qeo-UY for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:45:03 +0000 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DbB6B004046 for ; Thu, 8 Sep 2022 14:45:00 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-transfer-encoding : content-type; s=qcppdkim1; bh=DjKZdLRwBYPKpaLK55wIV5tHL3dpDcpwsa1t7f676to=; b=okEjUR7aPKmcGd7WwF2GnLuDvDB2LskGJEJcqggYdHRU5zcBg5Sw92SlqUg7/rUf0JA1 ewc3VzlFmeVG7y1o+vmY/75lT1P74X9uNTvX2H17XMC6ZVBkAvT+OAlRyxyr1WKBCuVt pW0iw/gxrWDZ8fSXtEWO6oSXic2Hy2lfgxJ8bWmKEVay8RXwcm4KlwPFJ8e3LCwpg7tm OmOuvdv6d5FoSi/u8uPcV4kTSqbqXmXjc+LwyjW4myUtFrwNE8/1E+jI2vURaJmXT3wI 1EqxxYwhwF9ORzt9AZtzjqsHGJEsIX9oS7Y/rUqfbrVgoGHau1mft31zSEhZj6OeWCJE zg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jf5pcsrp0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:45:00 +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 288EixuL016919 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:44:59 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:57 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 15/17] MLD STA: Add support for indicating per-link MLO signal poll Date: Thu, 8 Sep 2022 20:14:21 +0530 Message-ID: <20220908144423.2222859-16-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: Kxv_o4n0V1JjPnGcV6FWEgh3pu-8GKuP X-Proofpoint-GUID: Kxv_o4n0V1JjPnGcV6FWEgh3pu-8GKuP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 spamscore=0 priorityscore=1501 adultscore=0 bulkscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074501_149116_D5055297 X-CRM114-Status: GOOD ( 27.09 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add support fetch and indicate per-link MLO signal poll information via control interface. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver.h | 13 +++ src/drivers/driver_nl80211.c | 160 ++++++++++++++++++++++++++++++++ wpa_supplicant/ctrl_iface.c | 83 ++ [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add support fetch and indicate per-link MLO signal poll information via control interface. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver.h | 13 +++ src/drivers/driver_nl80211.c | 160 ++++++++++++++++++++++++++++++++ wpa_supplicant/ctrl_iface.c | 83 +++++++++++++++++ wpa_supplicant/driver_i.h | 3 + wpa_supplicant/wpa_cli.c | 9 ++ wpa_supplicant/wpa_supplicant.c | 14 +++ 6 files changed, 282 insertions(+) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 9bebebcc6..525c7763d 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2392,6 +2392,11 @@ struct wpa_signal_info { int center_frq2; }; +struct wpa_mlo_signal_info { + u16 valid_links; + struct wpa_signal_info links[MAX_NUM_MLD_LINKS]; +}; + /** * struct wpa_channel_info - Information about the current channel * @frequency: Center frequency of the primary 20 MHz channel @@ -3986,6 +3991,14 @@ struct wpa_driver_ops { */ int (*signal_poll)(void *priv, struct wpa_signal_info *signal_info); + /** + * mlo_signal_poll - Get current MLO connection information + * @priv: Private driver interface data + * @mlo_signal_info: MLO connection info structure + */ + int (*mlo_signal_poll)(void *priv, + struct wpa_mlo_signal_info *mlo_signal_info); + /** * channel_info - Get parameters of the current operating channel * @priv: Private driver interface data diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 9a23ff823..2650aa08f 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -8774,6 +8774,165 @@ static int nl80211_signal_poll(void *priv, struct wpa_signal_info *si) } +static int get_links_noise(struct nl_msg *msg, void *arg) +{ + struct nlattr *tb[NL80211_ATTR_MAX + 1]; + struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); + struct nlattr *sinfo[NL80211_SURVEY_INFO_MAX + 1]; + static struct nla_policy survey_policy[NL80211_SURVEY_INFO_MAX + 1] = { + [NL80211_SURVEY_INFO_FREQUENCY] = { .type = NLA_U32 }, + [NL80211_SURVEY_INFO_NOISE] = { .type = NLA_U8 }, + }; + struct wpa_mlo_signal_info *mlo_sig = arg; + int i; + + nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), + genlmsg_attrlen(gnlh, 0), NULL); + + if (!tb[NL80211_ATTR_SURVEY_INFO]) { + wpa_printf(MSG_DEBUG, "nl80211: survey data missing!"); + return NL_SKIP; + } + + if (nla_parse_nested(sinfo, NL80211_SURVEY_INFO_MAX, + tb[NL80211_ATTR_SURVEY_INFO], + survey_policy)) { + wpa_printf(MSG_DEBUG, + "nl80211: failed to parse nested attributes!"); + return NL_SKIP; + } + + if (!sinfo[NL80211_SURVEY_INFO_FREQUENCY]) + return NL_SKIP; + + if (!sinfo[NL80211_SURVEY_INFO_NOISE]) + return NL_SKIP; + + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + if (!(mlo_sig->valid_links & BIT(i))) + continue; + + if (nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]) != + mlo_sig->links[i].frequency) + continue; + + mlo_sig->links[i].current_noise = + (s8) nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]); + + break; + } + + return NL_SKIP; +} + + +static int nl80211_get_links_noise(struct wpa_driver_nl80211_data *drv, + struct wpa_mlo_signal_info *mlo_sig) +{ + struct nl_msg *msg; + + msg = nl80211_drv_msg(drv, NLM_F_DUMP, NL80211_CMD_GET_SURVEY); + return send_and_recv_msgs(drv, msg, get_links_noise, mlo_sig, + NULL, NULL); +} + + +static int get_links_channel_width(struct nl_msg *msg, void *arg) +{ + struct nlattr *tb[NL80211_ATTR_MAX + 1]; + struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); + struct wpa_mlo_signal_info *mlo_sig = arg; + struct nlattr *link; + int rem_links; + + nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), + genlmsg_attrlen(gnlh, 0), NULL); + + if (!tb[NL80211_ATTR_MLO_LINKS]) + return NL_SKIP; + + nla_for_each_nested(link, tb[NL80211_ATTR_MLO_LINKS], rem_links) { + struct nlattr *tb2[NL80211_ATTR_MAX + 1]; + int link_id; + + nla_parse(tb2, NL80211_ATTR_MAX, nla_data(link), nla_len(link), + NULL); + + if (!tb2[NL80211_ATTR_MLO_LINK_ID]) + continue; + + link_id = nla_get_u8(tb2[NL80211_ATTR_MLO_LINK_ID]); + if (link_id >= MAX_NUM_MLD_LINKS) + continue; + + if (tb2[NL80211_ATTR_CHANNEL_WIDTH]) { + mlo_sig->links[link_id].chanwidth = convert2width( + nla_get_u32(tb2[NL80211_ATTR_CHANNEL_WIDTH])); + if (tb2[NL80211_ATTR_CENTER_FREQ1]) + mlo_sig->links[link_id].center_frq1 = + nla_get_u32(tb2[NL80211_ATTR_CENTER_FREQ1]); + if (tb2[NL80211_ATTR_CENTER_FREQ2]) + mlo_sig->links[link_id].center_frq2 = + nla_get_u32(tb2[NL80211_ATTR_CENTER_FREQ2]); + } + } + + return NL_SKIP; +} + + +static int nl80211_get_links_channel_width(struct wpa_driver_nl80211_data *drv, + struct wpa_mlo_signal_info *mlo_sig) +{ + struct nl_msg *msg; + + msg = nl80211_drv_msg(drv, 0, NL80211_CMD_GET_INTERFACE); + return send_and_recv_msgs(drv, msg, get_links_channel_width, mlo_sig, + NULL, NULL); +} + + +static int nl80211_mlo_signal_poll(void *priv, + struct wpa_mlo_signal_info *mlo_si) +{ + struct i802_bss *bss = priv; + struct wpa_driver_nl80211_data *drv = bss->drv; + int res; + int i; + + if (drv->nlmode != NL80211_IFTYPE_STATION || + !drv->sta_mlo_info.valid_links) + return -1; + + os_memset(mlo_si, 0, sizeof(*mlo_si)); + mlo_si->valid_links = drv->sta_mlo_info.valid_links; + + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + if (!(mlo_si->valid_links & BIT(i))) + continue; + + res = nl80211_get_link_signal(drv, + drv->sta_mlo_info.links[i].bssid, + &mlo_si->links[i]); + if (res != 0) + return res; + + mlo_si->links[i].center_frq1 = -1; + mlo_si->links[i].center_frq2 = -1; + mlo_si->links[i].chanwidth = CHAN_WIDTH_UNKNOWN; + mlo_si->links[i].current_noise = WPA_INVALID_NOISE; + mlo_si->links[i].frequency = drv->sta_mlo_info.links[i].freq; + } + + res = nl80211_get_links_channel_width(drv, mlo_si); + if (res != 0) + return res; + + res = nl80211_get_links_noise(drv, mlo_si); + return res; +} + + static int nl80211_set_param(void *priv, const char *param) { struct i802_bss *bss = priv; @@ -12713,6 +12872,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = { .resume = wpa_driver_nl80211_resume, .signal_monitor = nl80211_signal_monitor, .signal_poll = nl80211_signal_poll, + .mlo_signal_poll = nl80211_mlo_signal_poll, .channel_info = nl80211_channel_info, .set_param = nl80211_set_param, .get_radio_name = nl80211_get_radio_name, diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index cd8a20fbd..356a58d89 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -11540,6 +11540,86 @@ static int wpas_ctrl_iface_send_dscp_query(struct wpa_supplicant *wpa_s, } +static int wpas_ctrl_iface_mlo_signal_poll(struct wpa_supplicant *wpa_s, + char *buf, size_t buflen) +{ + int ret, i; + char *pos, *end; + struct wpa_mlo_signal_info mlo_si; + + if (!wpa_s->valid_links) + return -1; + + ret = wpa_drv_mlo_signal_poll(wpa_s, &mlo_si); + if (ret) + return -1; + + pos = buf; + end = buf + buflen; + + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + if (!(mlo_si.valid_links & BIT(i))) + continue; + + ret = os_snprintf(pos, end - pos, + "LINK_ID=%d\nRSSI=%d\nLINKSPEED=%d\n" + "NOISE=%d\nFREQUENCY=%u\n", + i, mlo_si.links[i].current_signal, + mlo_si.links[i].current_txrate / 1000, + mlo_si.links[i].current_noise, + mlo_si.links[i].frequency); + if (os_snprintf_error(end - pos, ret)) + return -1; + pos += ret; + + if (mlo_si.links[i].chanwidth != CHAN_WIDTH_UNKNOWN) { + ret = os_snprintf(pos, end - pos, "WIDTH=%s\n", + channel_width_to_string( + mlo_si.links[i].chanwidth)); + if (os_snprintf_error(end - pos, ret)) + return -1; + pos += ret; + } + + if (mlo_si.links[i].center_frq1 > 0) { + ret = os_snprintf(pos, end - pos, "CENTER_FRQ1=%d\n", + mlo_si.links[i].center_frq1); + if (os_snprintf_error(end - pos, ret)) + return -1; + pos += ret; + } + + if (mlo_si.links[i].center_frq2 > 0) { + ret = os_snprintf(pos, end - pos, "CENTER_FRQ2=%d\n", + mlo_si.links[i].center_frq2); + if (os_snprintf_error(end - pos, ret)) + return -1; + pos += ret; + } + + if (mlo_si.links[i].avg_signal) { + ret = os_snprintf(pos, end - pos, + "AVG_RSSI=%d\n", + mlo_si.links[i].avg_signal); + if (os_snprintf_error(end - pos, ret)) + return -1; + pos += ret; + } + + if (mlo_si.links[i].avg_beacon_signal) { + ret = os_snprintf(pos, end - pos, + "AVG_BEACON_RSSI=%d\n", + mlo_si.links[i].avg_beacon_signal); + if (os_snprintf_error(end - pos, ret)) + return -1; + pos += ret; + } + } + + return pos - buf; +} + + static int wpas_ctrl_iface_mlo_status(struct wpa_supplicant *wpa_s, const char *params, char *buf, size_t buflen) @@ -12589,6 +12669,9 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, } else if (os_strcmp(buf, "MLO_STATUS") == 0) { reply_len = wpas_ctrl_iface_mlo_status(wpa_s, buf + 10, reply, reply_size); + } else if (os_strcmp(buf, "MLO_SIGNAL_POLL") == 0) { + reply_len = wpas_ctrl_iface_mlo_signal_poll(wpa_s, reply, + reply_size); } else { os_memcpy(reply, "UNKNOWN COMMAND\n", 16); reply_len = 16; diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h index 41d353f91..dc7db4b32 100644 --- a/wpa_supplicant/driver_i.h +++ b/wpa_supplicant/driver_i.h @@ -523,6 +523,9 @@ static inline int wpa_drv_signal_monitor(struct wpa_supplicant *wpa_s, int wpa_drv_signal_poll(struct wpa_supplicant *wpa_s, struct wpa_signal_info *si); +int wpa_drv_mlo_signal_poll(struct wpa_supplicant *wpa_s, + struct wpa_mlo_signal_info *mlo_si); + static inline int wpa_drv_channel_info(struct wpa_supplicant *wpa_s, struct wpa_channel_info *ci) { diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index e0f0d4f8d..2663a39f1 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -419,6 +419,12 @@ static int wpa_cli_cmd_mlo_status(struct wpa_ctrl *ctrl, int argc, char *argv[]) } +static int wpa_cli_cmd_mlo_signal_poll(struct wpa_ctrl *ctrl, int argc, char *argv[]) +{ + return wpa_ctrl_command(ctrl, "MLO_SIGNAL_POLL"); +} + + static int wpa_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[]) { char cmd[256]; @@ -4046,6 +4052,9 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = { { "mlo_status", wpa_cli_cmd_mlo_status, NULL, cli_cmd_flag_none, "[verbose] = get ml links status" }, + { "mlo_signal_poll", wpa_cli_cmd_mlo_signal_poll, NULL, + cli_cmd_flag_none, + "= get mlo signal parameters" }, { NULL, NULL, NULL, cli_cmd_flag_none, NULL } }; diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 8d9228874..745722140 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -8814,6 +8814,20 @@ int wpa_drv_signal_poll(struct wpa_supplicant *wpa_s, } +int wpa_drv_mlo_signal_poll(struct wpa_supplicant *wpa_s, + struct wpa_mlo_signal_info *mlo_si) +{ + int res; + + if (!wpa_s->driver->mlo_signal_poll) + return -1; + + res = wpa_s->driver->mlo_signal_poll(wpa_s->drv_priv, mlo_si); + + return res; +} + + struct wpa_scan_results * wpa_drv_get_scan_results2(struct wpa_supplicant *wpa_s) { From patchwork Thu Sep 8 14:44:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=no3UcF74; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=bNGp2ID9; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNj0v2qK3z1ynD for ; Fri, 9 Sep 2022 00:58:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Agoa2B318VGL8lqqQ82xMnytBtU0HAORs5YUBZ7dHpw=; b=no3UcF74u443go I3sNtqfPa4E/3giJsJNAQKfr2dAiZHKq7Iv3nJnXmbdhNNOWWhmdwa4BEBAZE0KAcMO1McumS+Igi s7RV0THECRmRYeLNZ6/dA0427cNsv98iRxd0sTFAB+AKihloJsRpDFEJ8gVBuSCEqfweZwznWGvP4 M0NvQJux1B1Jx5SntHs6OZ39zJ2Ficnpkt/7JjMj6yTFo49inyHE1PsTdY9pZIdXPAgph2aqSFkRW om3sJKU9s17O7C2JeSKRThEDIlYBcksYUIubUMAQDlrD1WLp1nKM9rNEJzPvjGktQVW2uoo41DGRq RM+WJMNQwO+Iz+c8XpbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIxq-004yDZ-4U; Thu, 08 Sep 2022 14:57:10 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIm7-004qg2-2j for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:45:04 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288DxiAn000402 for ; Thu, 8 Sep 2022 14:45:02 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-transfer-encoding : content-type; s=qcppdkim1; bh=OWh0Cdi2J7MZ22Jb5F+kFU+4ZL6PpRGO32LvhVxNWWY=; b=bNGp2ID9OIH5Ph7KGDY4jPmXKv9SjXqTbS+p4hFgwCIPJjt6j9VuNpCPsgCezTVtrafV roPTpg5ewG1HHJHvg17iJz/9a/rEScBK6aB0EP7sETIczUIj6mqSzrvEgCz2+lJ8/JBM 4i+x4FDaR5gs3qj/xS8gWGoDeWokCnpBG/W4FgzKqZhVXu8Q/vYlbu8H7wPDUD6dxt36 rvEHo82XqtptKhTvZBTBQ9hfSAKuzFPQcnTCI5DGd2YONJdSS0DHEbEm6ySeEMhnkEwm L5EhHdcTTn7EyXgVkkdqKRJNOz5DvgBJ6QIUBthXheRNwgbt/Cdgx7xUTYFzjicy+5Ke uw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jf1swt6xc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:45:02 +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 288Ej1f5004966 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:45:01 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:44:59 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 16/17] MLD STA: Add support to indicate per link channel switch Date: Thu, 8 Sep 2022 20:14:22 +0530 Message-ID: <20220908144423.2222859-17-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: _DVxC4PgtRYcHqLP8AWrkHmx6EiM5Ktr X-Proofpoint-ORIG-GUID: _DVxC4PgtRYcHqLP8AWrkHmx6EiM5Ktr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 bulkscore=0 impostorscore=0 adultscore=0 priorityscore=1501 mlxscore=0 spamscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074503_304050_C6C998B0 X-CRM114-Status: GOOD ( 24.43 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Parse link id info from channel switch events and indicate the info to control interface using new per link channel switch events. If channel switch happens on the link which used during association b [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Parse link id info from channel switch events and indicate the info to control interface using new per link channel switch events. If channel switch happens on the link which used during association both legacy and new per-link channel switch events will be reported. Signed-off-by: Veerendranath Jakkam --- src/common/wpa_ctrl.h | 9 ++++++++ src/drivers/driver.h | 20 ++++++++++++++++++ src/drivers/driver_common.c | 2 ++ src/drivers/driver_nl80211_event.c | 32 +++++++++++++++++++++++----- wpa_supplicant/events.c | 34 ++++++++++++++++++++++++++++++ 5 files changed, 92 insertions(+), 5 deletions(-) diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index 343508424..ba54da544 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -92,6 +92,15 @@ extern "C" { #define WPA_EVENT_CHANNEL_SWITCH_STARTED "CTRL-EVENT-STARTED-CHANNEL-SWITCH " /** Channel switch (followed by freq= and other channel parameters) */ #define WPA_EVENT_CHANNEL_SWITCH "CTRL-EVENT-CHANNEL-SWITCH " +/** MLO link channel switch started (followed by freq= and other channel + * parameters) + */ +#define WPA_EVENT_LINK_CHANNEL_SWITCH_STARTED \ + "CTRL-EVENT-STARTED-LINK-CHANNEL-SWITCH " +/** MLO link channel switch (followed by freq= and other channel + * parameters) + */ +#define WPA_EVENT_LINK_CHANNEL_SWITCH "CTRL-EVENT-LINK-CHANNEL-SWITCH " /** SAE authentication failed due to unknown password identifier */ #define WPA_EVENT_SAE_UNKNOWN_PASSWORD_IDENTIFIER \ "CTRL-EVENT-SAE-UNKNOWN-PASSWORD-IDENTIFIER " diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 525c7763d..b182d24cb 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -5428,6 +5428,24 @@ enum wpa_event_type { * PASN authentication and secure ranging context for multiple peers. */ EVENT_PASN_AUTH, + + /** + * EVENT_LINK_CH_SWITCH - MLD AP link decided to switch channels + * + * Described in wpa_event_data.ch_switch + * + */ + EVENT_LINK_CH_SWITCH, + + /** + * EVENT_LINK_CH_SWITCH_STARTED - MLD AP link started to switch channels + * + * This is a pre-switch event indicating the shortly following switch + * of operating channels. + * + * Described in wpa_event_data.ch_switch + */ + EVENT_LINK_CH_SWITCH_STARTED, }; @@ -6143,6 +6161,7 @@ union wpa_event_data { * @ch_width: Channel width * @cf1: Center frequency 1 * @cf2: Center frequency 2 + * @link_id: link ID of the MLO link */ struct ch_switch { int freq; @@ -6151,6 +6170,7 @@ union wpa_event_data { enum chan_width ch_width; int cf1; int cf2; + int link_id; } ch_switch; /** diff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c index 93b35a6d3..0ac0aa6de 100644 --- a/src/drivers/driver_common.c +++ b/src/drivers/driver_common.c @@ -96,6 +96,8 @@ const char * event_to_string(enum wpa_event_type event) E2S(CCA_ABORTED_NOTIFY); E2S(CCA_NOTIFY); E2S(PASN_AUTH); + E2S(LINK_CH_SWITCH); + E2S(LINK_CH_SWITCH_STARTED); } return "UNKNOWN"; diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index 00ef51413..c4cffe051 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -780,10 +780,10 @@ static int calculate_chan_offset(int width, int freq, int cf1, int cf2) static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv, - struct nlattr *ifindex, struct nlattr *freq, - struct nlattr *type, struct nlattr *bw, - struct nlattr *cf1, struct nlattr *cf2, - int finished) + struct nlattr *ifindex, struct nlattr *link, + struct nlattr *freq, struct nlattr *type, + struct nlattr *bw, struct nlattr *cf1, + struct nlattr *cf2, int finished) { struct i802_bss *bss; union wpa_event_data data; @@ -847,7 +847,27 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv, if (finished) bss->freq = data.ch_switch.freq; - drv->assoc_freq = data.ch_switch.freq; + + if (link) { + u8 link_id = nla_get_u8(link); + + if (drv->sta_mlo_info.valid_links & BIT(link_id)) { + data.ch_switch.link_id = link_id; + drv->sta_mlo_info.links[link_id].freq = + data.ch_switch.freq; + wpa_supplicant_event(bss->ctx, + finished ? + EVENT_LINK_CH_SWITCH : + EVENT_LINK_CH_SWITCH_STARTED, &data); + } + + if (link_id == drv->mlo_assoc_link_id) + drv->assoc_freq = data.ch_switch.freq; + else + return; + } else { + drv->assoc_freq = data.ch_switch.freq; + } wpa_supplicant_event(bss->ctx, finished ? EVENT_CH_SWITCH : EVENT_CH_SWITCH_STARTED, &data); @@ -3301,6 +3321,7 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd, case NL80211_CMD_CH_SWITCH_STARTED_NOTIFY: mlme_event_ch_switch(drv, tb[NL80211_ATTR_IFINDEX], + tb[NL80211_ATTR_MLO_LINK_ID], tb[NL80211_ATTR_WIPHY_FREQ], tb[NL80211_ATTR_WIPHY_CHANNEL_TYPE], tb[NL80211_ATTR_CHANNEL_WIDTH], @@ -3311,6 +3332,7 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd, case NL80211_CMD_CH_SWITCH_NOTIFY: mlme_event_ch_switch(drv, tb[NL80211_ATTR_IFINDEX], + tb[NL80211_ATTR_MLO_LINK_ID], tb[NL80211_ATTR_WIPHY_FREQ], tb[NL80211_ATTR_WIPHY_CHANNEL_TYPE], tb[NL80211_ATTR_CHANNEL_WIDTH], diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index fc662a770..f94662007 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -5369,6 +5369,40 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, break; #endif /* CONFIG_AP */ + case EVENT_LINK_CH_SWITCH_STARTED: + case EVENT_LINK_CH_SWITCH: + if (!data || !wpa_s->current_ssid || + !(wpa_s->valid_links & BIT(data->ch_switch.link_id))) + break; + + wpa_msg(wpa_s, MSG_INFO, + "%sfreq=%d link_id=%d ht_enabled=%d ch_offset=%d ch_width=%s cf1=%d cf2=%d", + event == EVENT_LINK_CH_SWITCH ? + WPA_EVENT_LINK_CHANNEL_SWITCH : + WPA_EVENT_LINK_CHANNEL_SWITCH_STARTED, + data->ch_switch.freq, + data->ch_switch.link_id, + data->ch_switch.ht_enabled, + data->ch_switch.ch_offset, + channel_width_to_string(data->ch_switch.ch_width), + data->ch_switch.cf1, + data->ch_switch.cf2); + if (event == EVENT_LINK_CH_SWITCH_STARTED) + break; + + wpa_s->links[data->ch_switch.link_id].freq = + data->ch_switch.freq; + if (wpa_s->links[data->ch_switch.link_id].bss && + wpa_s->links[data->ch_switch.link_id].bss->freq != + data->ch_switch.freq) { + wpa_s->links[data->ch_switch.link_id].bss->freq = + data->ch_switch.freq; + notify_bss_changes( + wpa_s, WPA_BSS_FREQ_CHANGED_FLAG, + wpa_s->links[data->ch_switch.link_id].bss); + } + + break; case EVENT_CH_SWITCH_STARTED: case EVENT_CH_SWITCH: if (!data || !wpa_s->current_ssid) From patchwork Thu Sep 8 14:44:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veerendranath Jakkam X-Patchwork-Id: 1675689 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=4q+uEWMZ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=aX1SMV7o; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MNj2V0zMkz1ynD for ; Fri, 9 Sep 2022 00:59:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LCcL58bWcQrQG1iXc5CL9VonuKlI3fCrNIXbiX9WwjI=; b=4q+uEWMZj9Chl5 X+qx3CSK/tZlrV5abhQJi+CoLCaDdhfK0T+eVKwRC7jmorW+FKEx40HBdBJ4GQes3hrnVzs/lx2PU Nt6K/DGVtg7MccQomtbUtGtBK1VSqKuGfjixxV6kh8vOOSqGK3D7Wd540386MoJxvBlik7Z5sPdtT Qw+hiPwt8M8qTM+sO8df9UwzmFU358hK2vb2y+guhRJDrfV9NC7dLYU7ji25AHOka6zB2Cx4r8/Jg 0h9e3cWMLwqzHXwcxSvyIZD4upSLtisWtWhM7QbbPAebosqa/3f2bBcXF0HOr+24HDsO44C8Kj9le fFz6tFi/e0ZgO6expP7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIz8-004ymZ-1C; Thu, 08 Sep 2022 14:58:30 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIm8-004qgZ-4h for hostap@lists.infradead.org; Thu, 08 Sep 2022 14:45:05 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288Diw4G006703 for ; Thu, 8 Sep 2022 14:45:03 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-transfer-encoding : content-type; s=qcppdkim1; bh=qqfx+MgTwrq78uJU5rKh8igOXas/EyzZVQrwLIbdOYk=; b=aX1SMV7oTR37RhEjXFHgZH44mkH8mLsgMq2c2N2PuLC737yWDMD2rmUt4D22Tr9v6IYA 3fA2gzU9L3mlNY3n0n1yrOhgr6y/FQs77sXmqX+xbB87xk7GjYqdhyhkqYoij6D4ebUB LtNBdNR1X0RnkZFek3DVuXbXYJP2NvNzqBk3YAZ3RzIcOyttHyN0QpJmtTz+T8WQ1Z9a AugBfPlLjTmLLQXwmgG+vxfUjG1BF5fihSjii6rklFxNhmFzw8ITt3SXn1wtvE3sOR2a aovp++GEClr7e3Nmrd/xAVDp+IKNdBYOgT/p4xj4rIciLibg2kceBuvcN0hdg93CUzc6 qQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jf1swt6xe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Sep 2022 14:45:03 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288Ej2rZ029150 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 8 Sep 2022 14:45:02 GMT Received: from cnss-mw-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.29; Thu, 8 Sep 2022 07:45:00 -0700 From: Veerendranath Jakkam To: CC: Subject: [PATCH v2 17/17] Add support for parsing MLO connection info from roam+auth event Date: Thu, 8 Sep 2022 20:14:23 +0530 Message-ID: <20220908144423.2222859-18-quic_vjakkam@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908144423.2222859-1-quic_vjakkam@quicinc.com> References: <20220908144423.2222859-1-quic_vjakkam@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: 7sRCUPjQzVHXG3_V7muhZtM_xe4E3yg7 X-Proofpoint-ORIG-GUID: 7sRCUPjQzVHXG3_V7muhZtM_xe4E3yg7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_10,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 bulkscore=0 impostorscore=0 adultscore=0 priorityscore=1501 mlxscore=0 spamscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080053 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_074504_318614_1C6CE549 X-CRM114-Status: GOOD ( 22.03 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Parse QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_MLO_LINKS in QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver_nl80211_event.c | 110 +++++++++++++++++++++-------- 1 file changed, 82 insertions(+), 28 deletions(-) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.220.180.131 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Parse QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_MLO_LINKS in QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver_nl80211_event.c | 110 +++++++++++++++++++++-------- 1 file changed, 82 insertions(+), 28 deletions(-) diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index c4cffe051..d4fb4c385 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -420,8 +420,80 @@ convert_connect_fail_reason_codes(enum qca_sta_connect_fail_reason_codes } } + +static void +nl80211_parse_qca_vendor_mlo_link_info(struct driver_sta_mlo_info *mlo, + struct nlattr *mlo_links) +{ + struct nlattr *link; + int rem_links; + + nla_for_each_nested(link, mlo_links, rem_links) { + struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_MLO_LINK_MAX + 1]; + int link_id; + + nla_parse(tb,QCA_WLAN_VENDOR_ATTR_MLO_LINK_MAX, nla_data(link), + nla_len(link), NULL); + + if (!tb[QCA_WLAN_VENDOR_ATTR_MLO_LINK_ID] || + !tb[QCA_WLAN_VENDOR_ATTR_MLO_LINK_MAC_ADDR] || + !tb[QCA_WLAN_VENDOR_ATTR_MLO_LINK_BSSID]) + continue; + + link_id = nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_MLO_LINK_ID]); + if (link_id >= MAX_NUM_MLD_LINKS) + continue; + + mlo->valid_links |= BIT(link_id); + os_memcpy(mlo->links[link_id].addr, + nla_data(tb[QCA_WLAN_VENDOR_ATTR_MLO_LINK_MAC_ADDR]), + ETH_ALEN); + os_memcpy(mlo->links[link_id].bssid, + nla_data(tb[QCA_WLAN_VENDOR_ATTR_MLO_LINK_BSSID]), + ETH_ALEN); + wpa_printf(MSG_DEBUG, "link[%u].addr " MACSTR, link_id, + MAC2STR(mlo->links[link_id].addr)); + wpa_printf(MSG_DEBUG, "link[%u].bssid " MACSTR, link_id, + MAC2STR(mlo->links[link_id].bssid)); + } +} + #endif /* CONFIG_DRIVER_NL80211_QCA */ +static void nl80211_parse_mlo_link_info(struct driver_sta_mlo_info *mlo, + struct nlattr *mlo_links) +{ + struct nlattr *link; + int rem_links; + + nla_for_each_nested(link, mlo_links, rem_links) { + struct nlattr *tb[NL80211_ATTR_MAX + 1]; + int link_id; + + nla_parse(tb, NL80211_ATTR_MAX, nla_data(link), nla_len(link), + NULL); + + if (!tb[NL80211_ATTR_MLO_LINK_ID] || !tb[NL80211_ATTR_MAC] || + !tb[NL80211_ATTR_BSSID]) + continue; + + link_id = nla_get_u8(tb[NL80211_ATTR_MLO_LINK_ID]); + if (link_id >= MAX_NUM_MLD_LINKS) + continue; + + mlo->valid_links |= BIT(link_id); + os_memcpy(mlo->links[link_id].addr, + nla_data(tb[NL80211_ATTR_MAC]), ETH_ALEN); + os_memcpy(mlo->links[link_id].bssid, + nla_data(tb[NL80211_ATTR_BSSID]), ETH_ALEN); + wpa_printf(MSG_DEBUG, "link[%u].addr " MACSTR, link_id, + MAC2STR(mlo->links[link_id].addr)); + wpa_printf(MSG_DEBUG, "link[%u].bssid " MACSTR, link_id, + MAC2STR(mlo->links[link_id].bssid)); + } +} + + static int nl80211_get_assoc_link_id(const u8* data, u8 len) { if (!(data[0] & BASIC_MULTI_LINK_CTRL0_PRES_LINK_ID)) @@ -438,12 +510,11 @@ static int nl80211_get_assoc_link_id(const u8* data, u8 len) } static void nl80211_parse_mlo_info(struct wpa_driver_nl80211_data *drv, + enum nl80211_commands cmd, struct nlattr *addr, struct nlattr *mlo_links, struct nlattr *resp_ie) { - struct nlattr *link; - int rem_links; const u8 *ml_ie; struct driver_sta_mlo_info *mlo = &drv->sta_mlo_info; @@ -465,30 +536,13 @@ static void nl80211_parse_mlo_info(struct wpa_driver_nl80211_data *drv, os_memcpy(mlo->ap_mld_addr, nla_data(addr), ETH_ALEN); wpa_printf(MSG_DEBUG, "ap_mld_addr " MACSTR, MAC2STR(mlo->ap_mld_addr)); - nla_for_each_nested(link, mlo_links, rem_links) { - struct nlattr *tb[NL80211_ATTR_MAX + 1]; - int link_id; - - nla_parse(tb, NL80211_ATTR_MAX, nla_data(link), nla_len(link), - NULL); - - if (!tb[NL80211_ATTR_MLO_LINK_ID] || !tb[NL80211_ATTR_MAC] || - !tb[NL80211_ATTR_BSSID]) - continue; - - link_id = nla_get_u8(tb[NL80211_ATTR_MLO_LINK_ID]); - if (link_id >= MAX_NUM_MLD_LINKS) - continue; - - mlo->valid_links |= BIT(link_id); - os_memcpy(mlo->links[link_id].addr, - nla_data(tb[NL80211_ATTR_MAC]), ETH_ALEN); - os_memcpy(mlo->links[link_id].bssid, - nla_data(tb[NL80211_ATTR_BSSID]), ETH_ALEN); - wpa_printf(MSG_DEBUG, "link[%u].addr " MACSTR, link_id, - MAC2STR(mlo->links[link_id].addr)); - wpa_printf(MSG_DEBUG, "link[%u].bssid " MACSTR, link_id, - MAC2STR(mlo->links[link_id].bssid)); + if (0) { +#ifdef CONFIG_DRIVER_NL80211_QCA + } else if (cmd == NL80211_CMD_ROAM) { + nl80211_parse_qca_vendor_mlo_link_info(mlo, mlo_links); +#endif /* CONFIG_DRIVER_NL80211_QCA */ + } else { + nl80211_parse_mlo_link_info(mlo, mlo_links); } if (!(mlo->valid_links & BIT(drv->mlo_assoc_link_id))) { @@ -611,7 +665,7 @@ static void mlme_event_connect(struct wpa_driver_nl80211_data *drv, drv->associated = 1; drv->sta_mlo_info.valid_links = 0; - nl80211_parse_mlo_info(drv, addr, mlo_links, resp_ie); + nl80211_parse_mlo_info(drv, cmd, addr, mlo_links, resp_ie); if (!drv->sta_mlo_info.valid_links && addr) { os_memcpy(drv->bssid, nla_data(addr), ETH_ALEN); os_memcpy(drv->prev_bssid, drv->bssid, ETH_ALEN); @@ -2240,7 +2294,7 @@ static void qca_nl80211_key_mgmt_auth(struct wpa_driver_nl80211_data *drv, tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_FILS_ERP_NEXT_SEQ_NUM], tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMK], tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMKID], - NULL); + tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_MLO_LINKS]); }