From patchwork Sun Oct 31 23:03:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 1548893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=OhX/7PnD; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=P1nx3JHT; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HjBZh3wB4z9sXM for ; Mon, 1 Nov 2021 10:05:00 +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: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=2rR60YjvMHtAilmTxMh5fWTR3Q+zN/VQQ+d+nW6Y3gI=; b=OhX/7PnD5cLxW7 j2MeQCJYWkcHtTi9JBezPeGN8nXjvERQtC9hZfw8FpLLLsNDAA6aO1SEef7EifBC007Lr8i0OXSzu llqFJot3YGWMIH/PiBIafV1txxpCc0OjZXGxZL9rx0YVTSNjATMjfwJYI2jZHX/V3FgbMimzJJTym giUvoIM3TR9grM5RbQBLYael+qSici7gqHTTi5xp2bFVZ8GmsW7B36Fj4hPgOyLVlj1RnZFrzKrd+ kzXiuOa8k7+V3x21Mn5qgXwzu1d/n2X4JuyWz9V48UIj5QMr7qcr8OawrbWdnQTZP/etOa9O5UyP8 LrtYSfiIhQsVYDWX6RJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhJrj-00Esvq-8G; Sun, 31 Oct 2021 23:03:51 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhJrg-00Esv7-J5 for hostap@lists.infradead.org; Sun, 31 Oct 2021 23:03:50 +0000 Received: by mail-pj1-x1031.google.com with SMTP id y14-20020a17090a2b4e00b001a5824f4918so7935196pjc.4 for ; Sun, 31 Oct 2021 16:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qfvfCV2GeSgLW5BNxs2MqhuEV0NLnPbDftvaDiePfTc=; b=P1nx3JHTql607EYROcZ43NQh4lryF9VmToZWj1GG29fZU316Ha62tvBp7Qtmfw4YeM 1u2ekNLAhCytOqHysjnAvY3r6bmdX1GkcnElC9bZ4aEhf1x3XXMpgGPhPIW8BkRBI5Vd 4dYoQgWmQ2XaJs9aoerDt1aga4s+O1istm+CQF+k9B8szDS4jmMx+jelrE88keomDAXY y9JfqtGW0BmT9FKTlx9793IHyfJdqwM4JmsWdCT0mfMu1g/6X1l/kqee9dTy8MBSi4m/ u+FWUNn4htLfmoifzNDyWidQOUq/7wwy1CeD62edlVxBB3pbHTcA7A31EzlEfWSBKKha BmmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qfvfCV2GeSgLW5BNxs2MqhuEV0NLnPbDftvaDiePfTc=; b=opNA6cYnmbplBjVDH06KaFDnOEl9qIpr4pN7Iq3p5yAzP4XAOckqYcCpNE6xWnfWud b2qfaPDKaGO6suIMEGXIn4gqTv7Fpuk6ADQtIym4yG0uptR1GLnK6Xl/VN8L4LCOPO6H bcEfLD1jq+9Y1QkGUtw4x0YoKhYWFNNabn7rDT8yH+j0ffSurMgMLsZP+Kzoa5vrgSEX nsUzIU+2yXTSQEAHax9U8TmzL0xBZ1ZmBSb45IS0A/ZkaGbHhsDMQk0DV/4t1sa/Avrs vHKBrbyU2LcZcRQRXw9Eu/pMhVLn+dbZjZ5/MQlCGjWrO3iOaZUfx/EkYVMtYwji7N03 Rz8g== X-Gm-Message-State: AOAM532oFDS57YfwZwngTf2nctBZgvsnd84YTNPso2CpPhOZHfr3v4fv 0sCigEPdxjw38oKNm2DQbe4k3ljRUyw= X-Google-Smtp-Source: ABdhPJxCLnaUVdQIIW6N2rmQG+ZjrXaYnhNnMC3u0Vk21hLYRuWq5jZ9E8hsYeajl6i6LpP5U3z4Xw== X-Received: by 2002:a17:90a:2fc7:: with SMTP id n7mr25827778pjm.141.1635721427871; Sun, 31 Oct 2021 16:03:47 -0700 (PDT) Received: from gtx1060.flets-east.jp ([2409:11:53c0:1f00:251d:cbff:8899:f1f9]) by smtp.gmail.com with ESMTPSA id e15sm16326634pja.52.2021.10.31.16.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Oct 2021 16:03:47 -0700 (PDT) From: Masashi Honma To: hostap@lists.infradead.org Cc: Masashi Honma Subject: [PATCH v2] Fix compiler error on CONFIG_AP without CONFIG_P2P builds Date: Mon, 1 Nov 2021 08:03:37 +0900 Message-Id: <20211031230337.23390-1-masashi.honma@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211031230056.23236-1-masashi.honma@gmail.com> References: <20211031230056.23236-1-masashi.honma@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211031_160348_675907_EB2BAC5D X-CRM114-Status: GOOD ( 15.38 ) 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: ../src/ap/ap_drv_ops.c: In function 'hostapd_build_ap_extra_ies': ../src/ap/ap_drv_ops.c:163:10: error: 'struct hostapd_data' has no member named 'p2p_group' 163 | if (hapd->p2p_group) { | ^~ ../src/a [...] Content analysis details: (-0.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:1031 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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [masashi.honma[at]gmail.com] -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 ../src/ap/ap_drv_ops.c: In function 'hostapd_build_ap_extra_ies': ../src/ap/ap_drv_ops.c:163:10: error: 'struct hostapd_data' has no member named 'p2p_group' 163 | if (hapd->p2p_group) { | ^~ ../src/ap/ap_drv_ops.c:165:35: error: 'struct hostapd_data' has no member named 'p2p_group' 165 | a = p2p_group_assoc_resp_ie(hapd->p2p_group, P2P_SC_SUCCESS); | ^~ CC ap.c make: *** [../src/build.rules:86: /home/honma/git/hostap/build/wpa_supplicant/src/ap/ap_drv_ops.o] Error 1 /usr/bin/ld: /home/honma/git/hostap/build/wpa_supplicant/ap.o: in function `wpas_conf_ap_he_6ghz': /home/honma/git/hostap/wpa_supplicant/ap.c:245: undefined reference to `wpas_p2p_get_sec_channel_offset_40mhz' collect2: error: ld returned 1 exit status make: *** [Makefile:1891: wpa_supplicant] Error 1 Signed-off-by: Masashi Honma --- wpa_supplicant/Makefile | 3 +-- wpa_supplicant/ap.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 737f7af9c..ce1c8b2e3 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -389,12 +389,11 @@ CONFIG_AP=y ifdef CONFIG_P2P_STRICT CFLAGS += -DCONFIG_P2P_STRICT endif -endif - ifdef CONFIG_WIFI_DISPLAY CFLAGS += -DCONFIG_WIFI_DISPLAY OBJS += wifi_display.o endif +endif ifdef CONFIG_PASN CFLAGS += -DCONFIG_PASN diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 79b904b66..9cfebd6f9 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -196,6 +196,7 @@ wpa_supplicant_find_hw_mode(struct wpa_supplicant *wpa_s, } +#ifdef CONFIG_P2P static int get_max_oper_chwidth_6ghz(int chwidth) { switch (chwidth) { @@ -255,6 +256,7 @@ static void wpas_conf_ap_he_6ghz(struct wpa_supplicant *wpa_s, get_max_oper_chwidth_6ghz(ssid->max_oper_chwidth) >= 80) wpas_conf_ap_vht(wpa_s, ssid, conf, mode); } +#endif /* CONFIG_P2P */ int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s, @@ -319,7 +321,9 @@ int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s, if (mode && is_6ghz_freq(ssid->frequency) && conf->hw_mode == HOSTAPD_MODE_IEEE80211A) { +#ifdef CONFIG_P2P wpas_conf_ap_he_6ghz(wpa_s, mode, ssid, conf); +#endif /* CONFIG_P2P */ } else if (!no_ht && mode && mode->ht_capab) { wpa_printf(MSG_DEBUG, "Enable HT support (p2p_group=%d 11a=%d ht40_hw_capab=%d ssid->ht40=%d)",