Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp596516pxb; Tue, 15 Feb 2022 23:15:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnpUCnaXYHo+vvozQMarVIyR63LiVmFPZlu9X+g+08eo47b6Y/8Ap4F6GZrq3k2CX9gTBu X-Received: by 2002:a63:f42:0:b0:373:847:a17a with SMTP id 2-20020a630f42000000b003730847a17amr1202814pgp.390.1644995733605; Tue, 15 Feb 2022 23:15:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644995733; cv=none; d=google.com; s=arc-20160816; b=u2OBu5mVj6FvfVrRZc8ZT+5pL9ady5roKJdO7qrLIRpf5WkysfF7zPJ7CuJxbHpCMl fQgFmYR4l8pPCHimV3dlkzGGHWSdOvvbFVwgU2gmAzPwj0lNkJ9ONkYs6FGcLaFWY/Dg h4I1nTBVfZtNZYP4sCzi38sl2yaOKotZzr55+4pxAUDZnOnxAuoB2adhydeXOAH4N2iP XKGRUaN31+SHu0Um6y9mwOSzBM8WjVoGK3DojwN+mkFRUfHdiri0+XtYtVGtZmgONAU9 uxVLmDZYtDC6BpCge0lGpqv53i6mweb+wctD0xZEl299mMmB+QBaP39uhRcTxw3Es3XX vtlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=P6utHAWNmsrFjoyn2PZ0EjjyBLltrjhzWnzSwEelKk8=; b=YNpgBsF5J/yPDsa0MWNcTPAqilPP1ZGltm5at81cv29MJ6/8iwgmRJ4xY1sSPQvHeB Xh5BLKapu9/52GEIgsMlGQFNy/ZsLZbupidGNmysSr+qGKvr3kFCnsGk5fRVmA3kn0Dd 6sxvav4MCj942RS3jUx9r5mlcfIrww1NxkTeG8GX5gVffae6KOSb5TARuqeJ3tIiJzZB 5ika2m0VklqLv71rNTuO+x8dVekWU4BJyw/uzoqevk5zUFqSj5gCl/qsdRLqgkyOWFdX sHSBROL3SUM/jY9r7vxIXV1DbZrVSlG+/nmZpaoYwVmA0szHC6bVO/rB2Ndw4X4xqF69 NYpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=h9dCwQtN; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i7si16024963pjs.87.2022.02.15.23.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 23:15:33 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=h9dCwQtN; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 844011F6B8E; Tue, 15 Feb 2022 22:47:34 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344593AbiBPFcM (ORCPT + 73 others); Wed, 16 Feb 2022 00:32:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234060AbiBPFcL (ORCPT ); Wed, 16 Feb 2022 00:32:11 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 985AC7A9AE for ; Tue, 15 Feb 2022 21:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1644989518; x=1676525518; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=P6utHAWNmsrFjoyn2PZ0EjjyBLltrjhzWnzSwEelKk8=; b=h9dCwQtN3QraeNUp+hQLnOoRu3y1Rw6YMDFEUpAzKnlLqtlYqrjJQfYL XApy7vYnxjsVZvdHOMeZYfF3CaP7rR/8YAqUncU+dPGQ13zwzGn6TLXKh Fy0Iofa7jNMtKONk2jy2Q/fTh73irNKnc6onNz+DxZ4Ei1yP16BPuz2+5 k=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 15 Feb 2022 21:31:56 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 21:31:56 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 15 Feb 2022 21:31:56 -0800 Received: from alokad-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.922.19; Tue, 15 Feb 2022 21:31:55 -0800 From: Aloka Dixit To: , CC: Vikram Kandukuri , Aloka Dixit , Veerendranath Jakkam Subject: [PATCH 1/3] nl80211: retrieve EHT capabilities in AP mode Date: Tue, 15 Feb 2022 21:31:43 -0800 Message-ID: <20220216053145.20898-2-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220216053145.20898-1-quic_alokad@quicinc.com> References: <20220216053145.20898-1-quic_alokad@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Vikram Kandukuri Add support to retrieve the EHT capabilities element passed by the userspace in the beacon template and store the pointer in struct cfg80211_ap_settings to be used by MAC80211. Signed-off-by: Vikram Kandukuri Co-developed-by: Aloka Dixit Signed-off-by: Aloka Dixit Co-developed-by: Veerendranath Jakkam Signed-off-by: Veerendranath Jakkam --- include/net/cfg80211.h | 2 ++ net/wireless/nl80211.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 136c0c537334..aaf25645aef3 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1285,6 +1285,7 @@ struct cfg80211_unsol_bcast_probe_resp { * @ht_cap: HT capabilities (or %NULL if HT isn't enabled) * @vht_cap: VHT capabilities (or %NULL if VHT isn't enabled) * @he_cap: HE capabilities (or %NULL if HE isn't enabled) + * @eht_cap: EHT capabilities (or %NULL if EHT isn't enabled) * @ht_required: stations must support HT * @vht_required: stations must support VHT * @twt_responder: Enable Target Wait Time @@ -1322,6 +1323,7 @@ struct cfg80211_ap_settings { const struct ieee80211_vht_cap *vht_cap; const struct ieee80211_he_cap_elem *he_cap; const struct ieee80211_he_operation *he_oper; + const struct ieee80211_eht_cap_elem *eht_cap; bool ht_required, vht_required, he_required, sae_h2e_required; bool twt_responder; u32 flags; diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 1595e14fd678..03eb6870e60f 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5434,6 +5434,9 @@ static void nl80211_calculate_ap_params(struct cfg80211_ap_settings *params) cap = cfg80211_find_ext_elem(WLAN_EID_EXT_HE_OPERATION, ies, ies_len); if (cap && cap->datalen >= sizeof(*params->he_oper) + 1) params->he_oper = (void *)(cap->data + 1); + cap = cfg80211_find_ext_elem(WLAN_EID_EXT_EHT_CAPABILITY, ies, ies_len); + if (cap && cap->datalen >= sizeof(*params->eht_cap) + 1) + params->eht_cap = (void *)(cap->data + 1); } static bool nl80211_get_ap_channel(struct cfg80211_registered_device *rdev, -- 2.31.1