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 } };