From patchwork Wed Aug 7 21:48:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jintao Lin X-Patchwork-Id: 1970264 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=KbI20s2P; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=FKh4vHtW; 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 4WfP2N4rbJz1yf8 for ; Thu, 8 Aug 2024 07:49:00 +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: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=lIoLqniq00g2kcKLtcFxls9lLcpJB2Fit8f0l05GkJU=; b=KbI20s2PJm4dcJ P+Ylrmo4W0hd0ZZzEKO1nr1GuQIJdDDdnrqVbmGx6G1dCvnlrcOybwu7zGni7ZGzEXqazKfuhcOXH Cxs9mMOHpSf2bq2drHAZufqEyGwlp2EyWW5v6CRcmpoQrYgeOwHSDkg0pl9o9FkDrYHjHJXYPfvyI fKCB4UQE+TkiUPsthB1J5vlUSTacOuTpYIaJaR8Ogwm4zSB3/sh8ZFfec4O1LI65KamVqGo0ZrTUS adKxQX5+C/vXdrRJuCwcADGUeH4dFWVQUbn/GljbLAR4YRnNprQbjgdOZewbGw5f7yXvoqBLeeM6s Q7lHXalGvNXfrjm+xHVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sboW9-00000006MzU-1Ewu; Wed, 07 Aug 2024 21:48:25 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sboW4-00000006Myb-3rm2 for hostap@lists.infradead.org; Wed, 07 Aug 2024 21:48:22 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1fc56fd4de1so2237925ad.0 for ; Wed, 07 Aug 2024 14:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1723067298; x=1723672098; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BQS6qa0F2m9Ykh0tsmQHQ0WOiVatZjZuGjw4F0Thc/8=; b=FKh4vHtWiMv4jyWLaCmyoO2Y+6LTr6xwzi2eMItAmTT0t1larK7dPLMu6QvPk0tQhU OX8KGdBMrjs8Ggcg6Dc/eX4gxOmq0RbBTNJb+jF7iXc0/WH8pFHhrZtY4CkDlBvUMlOR 6/0Oh7DSaSf5FDsJ83/j8TqYTg2zaED6aq0vI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723067298; x=1723672098; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BQS6qa0F2m9Ykh0tsmQHQ0WOiVatZjZuGjw4F0Thc/8=; b=p9zCPSj1r7EJbRr6vDxkBwN4hNUbAu+S8KeGqup+4mXh1smbX9RH8NUFS3Wz68nZUh FQ2hUNyMUQi1pRF2392YvFKgAIGX6CbYY7JHjuIuao6GXD/NjAtzJGlkKaslQC7yrQhl qaDiCFVCtoM2tjPAXjnlFlOQ6m7WEEirqycs7Kg7D/uCUJbTCI51Mub8VjtlXUcKgPWY LVHoQ3GLWn1h/RiK3GlB5vxAGjVzE23HH/4qDwkcvfduJH6CavhDYFBUlX8CzufIFOS9 rPOMSXMHi/QX5r24gc6zGp56prGcv9NUEyfSBWuwwjNWWkQXfD29km3dEED6gdydBMo/ 6TEg== X-Gm-Message-State: AOJu0Yz6HTiw4LrjCkXgM7efW8ERFFKTJXCK9LHhVcMFxaFuv0gzFreZ z+C7IxXR16sD6rEpTIMP/EM+gZc2b/lUBgZFs66Dine0aYAMqWfcKA5oWSaCUUE/6DaZ1hVldjo = X-Google-Smtp-Source: AGHT+IHsbHC8z6xSrvM6ogknYijMh5iGKrUaIcp8uR7fTdN/EFcUHJwd0lTveuEVeYXwdopFNtJKMA== X-Received: by 2002:a17:902:ced1:b0:1fc:54c4:61a7 with SMTP id d9443c01a7336-2008552d025mr51944485ad.23.1723067298439; Wed, 07 Aug 2024 14:48:18 -0700 (PDT) Received: from jintaolin.c.googlers.com.com (200.42.168.34.bc.googleusercontent.com. [34.168.42.200]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff592aa11csm110815605ad.272.2024.08.07.14.48.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 14:48:17 -0700 (PDT) From: Jintao Lin To: hostap@lists.infradead.org Cc: j@w1.fi, jintaolin@chromium.org Subject: [PATCH] p2p: consult driver capabilities before setting HE bit in GO's conf Date: Wed, 7 Aug 2024 21:48:01 +0000 Message-ID: <20240807214801.2030506-1-jintaolin@chromium.org> X-Mailer: git-send-email 2.46.0.rc2.264.g509ed76dc8-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240807_144821_014704_08447BB0 X-CRM114-Status: GOOD ( 10.59 ) X-Spam-Score: -2.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: p2p_go_he could be set to 1 in the global config file while the device might only has a VHT WiFi nic. Consult driver capabilities before setting the HE bit for the GO's conf so that latter AP configur [...] Content analysis details: (-2.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:635 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_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 p2p_go_he could be set to 1 in the global config file while the device might only has a VHT WiFi nic. Consult driver capabilities before setting the HE bit for the GO's conf so that latter AP configuration does not fail due to wrong AP configuration, like hostapd_get_oper_centr_freq_seg0_idx. This config bit is checked and set in wpa_supplicant_conf_ap_ht. Thus there is no need to override this bit specifically for GO. Signed-off-by: Jintao Lin --- wpa_supplicant/ap.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 69a0e5ee1..729277907 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -540,12 +540,6 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s, conf->supported_rates = list; } -#ifdef CONFIG_IEEE80211AX - if (ssid->mode == WPAS_MODE_P2P_GO || - ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) - conf->ieee80211ax = ssid->he; -#endif /* CONFIG_IEEE80211AX */ - bss->isolate = !wpa_s->conf->p2p_intra_bss; bss->extended_key_id = wpa_s->conf->extended_key_id; bss->force_per_enrollee_psk = wpa_s->global->p2p_per_sta_psk;