From patchwork Fri Mar 8 04:35:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Kumar Singh X-Patchwork-Id: 1909523 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=TLGE61yv; 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=OG7bR5Qv; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TrYJw59GFz1yWx for ; Fri, 8 Mar 2024 15:36:14 +1100 (AEDT) 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: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:In-Reply-To:References: List-Owner; bh=7pq/24ENucapilbqSJRz5T5dNcLgIXHkI+6W5hBT5qs=; b=TLGE61yvl58G/4 UTYxOyKRCicX22+GzGFn/QBWsgO7nIOTW6bWLmDv42fIht2zfbOBbAo6zL8Ausr73iOYIp6KqtmZU KS4I91YZjIBu888IjDaiO2iounztjxDW4IuKYjtoTP/wLRKbvth8D1rfWX/r8vUI0tMTyfDNbrtzv EhQtz3hZSGkqjQwTeLUUb/DsESS1w7OUnxIJRqNnZsWMPqWMRv6OJ+lqn8mTox8EEEHSrtGQYutkK pA9E1RQljmzJ5O9j9XmzJwOE2SP+hxVk9BeRvepx3mUsv7BmVgfmCB8eI0QNjQupYRcwQorqPS7WS sFOze5ZLsAbKeJdPSgbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riRxL-00000007jIM-47aP; Fri, 08 Mar 2024 04:35:39 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riRxH-00000007jF3-1HQ4 for hostap@lists.infradead.org; Fri, 08 Mar 2024 04:35:37 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4283x1eL008936 for ; Fri, 8 Mar 2024 04:35:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=I45+g6f MbVv98Czjx7qBQ/ATroNdteOdepVJX6GJcLo=; b=OG7bR5Qv+wxgbTobhw/OXHY JVr23ZDqOx6gtKYymMhU1t5W8a30S7V8JAnoqdhtjmtB/I6frklXT/q9eDglddqq VaJ/3otcpfKU2gPYd4QEX1wpJx46zuTE8CsRpMPT5ajEnvjq/I8X6SA7jDBDbuuK QUk/mDGrDsaicaIA+4XatNZKNKHWTKUc8dX15q/w0sNZR3FRyKtkP7Iggt6a5ErW Eclm3YLrvTwq62P+F8PTgNZBiiEntULzteXuoaKWLssdvjUmx/Xyk9y6lWJTPb+F v4+IbWOmCN3bWKOfh45VOYTfPzUIFAZX53OXleE1Yxmzhg1Jq0hL3QIGjlMUzIw= = Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wqn8pgqsj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Mar 2024 04:35:32 +0000 (GMT) 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 4284ZVhT023701 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 8 Mar 2024 04:35:31 GMT Received: from cdcwlex322514-lin.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.1118.40; Thu, 7 Mar 2024 20:35:30 -0800 From: Aditya Kumar Singh To: CC: Aditya Kumar Singh Subject: [PATCH] tests: Add basic MLO CSA test case Date: Fri, 8 Mar 2024 10:05:08 +0530 Message-ID: <20240308043508.14853-1-quic_adisi@quicinc.com> X-Mailer: git-send-email 2.25.1 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: 9ATyeApzb_nqdTUXA0hXFSmEGasQ41eG X-Proofpoint-GUID: 9ATyeApzb_nqdTUXA0hXFSmEGasQ41eG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_02,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 clxscore=1015 spamscore=0 mlxscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403080033 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_203535_509459_FCEFA1BF X-CRM114-Status: GOOD ( 11.88 ) X-Spam-Score: -0.2 (/) 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: Verify that CSA can be performed on the first link of an AP MLD and further check that traffic still continues even after channel switch. Finally, check again that a subsequent CSA can be performed without affecting the data traffic. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 T_SCC_BODY_TEXT_LINE No description available. 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 Verify that CSA can be performed on the first link of an AP MLD and further check that traffic still continues even after channel switch. Finally, check again that a subsequent CSA can be performed without affecting the data traffic. Signed-off-by: Aditya Kumar Singh --- tests/hwsim/test_eht.py | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) base-commit: eecaceed8f03cee676d47dd9fb70efd25d50e3e9 diff --git a/tests/hwsim/test_eht.py b/tests/hwsim/test_eht.py index 1804c2250ca0..7fce52a6065d 100644 --- a/tests/hwsim/test_eht.py +++ b/tests/hwsim/test_eht.py @@ -1732,3 +1732,71 @@ def test_eht_mld_and_mlds(dev, apdev): logger.info("Assigned AIDs: " + str(aid)) if len(set(aid)) != 2: raise Exception("AP MLD did not assign unique AID to each non-AP MLD") + +def mlo_perform_csa(hapd, command, freq): + match_str = "freq=" + str(freq) + hapd.request(command) + + ev = hapd.wait_event(["CTRL-EVENT-STARTED-CHANNEL-SWITCH"], timeout=10) + if ev is None: + raise Exception("Channel switch start event not seen") + if match_str not in ev: + raise Exception("Unexpected channel in CS started") + + ev = hapd.wait_event(["CTRL-EVENT-CHANNEL-SWITCH"], timeout=10) + if ev is None: + raise Exception("Channel switch completion event not seen") + if match_str not in ev: + raise Exception("Unexpected channel in CS completed") + + ev = hapd.wait_event(["AP-CSA-FINISHED"], timeout=10) + if ev is None: + raise Exception("CSA finished event timed out") + if match_str not in ev: + raise Exception("Unexpected channel in CSA finished event") + time.sleep(0.5) + +def test_eht_mlo_csa(dev, apdev): + """EHT MLD AP connected to non-AP MLD. Seamless channel switch""" + csa_supported(dev[0]) + + with HWSimRadio(use_mlo=True) as (hapd_radio, hapd_iface), \ + HWSimRadio(use_mlo=True) as (wpas_radio, wpas_iface): + + wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas.interface_add(wpas_iface) + + ssid = "mld_ap" + passphrase = 'qwertyuiop' + + params = eht_mld_ap_wpa2_params(ssid, passphrase, + key_mgmt="SAE", mfp="2", pwe='1') + hapd0 = eht_mld_enable_ap(hapd_iface, params) + + params['channel'] = '6' + hapd1 = eht_mld_enable_ap(hapd_iface, params) + + wpas.set("sae_pwe", "1") + wpas.connect(ssid, sae_password=passphrase, scan_freq="2412 2437", + key_mgmt="SAE", ieee80211w="2") + + eht_verify_status(wpas, hapd0, 2412, 20, is_ht=True, mld=True, + valid_links=3, active_links=3) + eht_verify_wifi_version(wpas) + traffic_test(wpas, hapd0) + + logger.info("Perform CSA on 1st link") + mlo_perform_csa(hapd0, "CHAN_SWITCH 5 2462 ht he eht blocktx", + 2462) + + logger.info("Test traffic after 1st link CSA completes") + traffic_test(wpas, hapd0) + + logger.info("Perform CSA on 1st link and bring it back to original channel") + mlo_perform_csa(hapd0, "CHAN_SWITCH 5 2412 ht he eht blocktx", + 2412) + + logger.info("Test traffic again after 1st link CSA completes") + traffic_test(wpas, hapd0) + + #TODO: CSA on non-first link