Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp215930pxb; Wed, 23 Mar 2022 16:40:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbdwfL1jE554/4JnM556pJKk5L3/87FYmtptJZEf1Okw3G9X8AUS56y0VrZpc6gi+pUP/L X-Received: by 2002:a05:6402:35d5:b0:419:2c72:66c2 with SMTP id z21-20020a05640235d500b004192c7266c2mr3468888edc.28.1648078806589; Wed, 23 Mar 2022 16:40:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648078806; cv=none; d=google.com; s=arc-20160816; b=kt70q2xzVmmVgVxWrxB0hny9wH5jFUwrnyZj4kGlFRn5muaibEqSOGIaOnpifeHk+V 6kRxZaORA7crJZStl0Kv0LUcGc4hsLQ8sFHgOvTn6BCKMsGpzSYSin6p1wzGswWRrB5e O+WvajTLx/WQrl74xFzG4cnnmLhTZ63F+HBiRFJel1K1876QvinWSJj0CTDeYRVrNyrI yBN720ZS8mAHtnlTOnWrFcneUA1TKzWHpPeksbzL5dTpePJJtnU578g0nKyWFIBdBYqh /7phmK8uKB8p6WWnpuLPQeOwKGaRIUshcaI+ysWyw4zgkf4aQiuEZ3VvKvuGPskQ9u1e KHGQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=oh5yg7KzWxb/vP8i7mSdTsI1YAHykHomDuyvN6dmt9U=; b=NiRz39ToOu5kXEXTIBUapE0Z5lipxUkvK7rSX3NAXZF7q7WjX3mRP+bX1Sbn805XXt uJjreAOwf/d9PY68I6uGT9q34gPDWE2hzvLQH2NkSfQjv99eZQlmGxxs1zK01Ki4yvOv EuBkAh8Xh7lIAKXRK5eAQIqTKSnLgccjvmQRYnC4KsjgDLFW9no7GD/B/8EisRGdFGdu tmmxI7+EkIDhYJM924e0eYgUvAO5/ni5BpUUKSunTqGvi9zMDmkT9ddXysiWzVi0mTI4 pNCyxK6Us7UWbhW6EN99rcaLP10cXhv5Mz9QsiDeWgh12hRnW9GNLmN3uOlUhlYiq0ZP Gdqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=zmDN6r7S; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a170906208600b006df76385b8csi16270739ejq.44.2022.03.23.16.39.49; Wed, 23 Mar 2022 16:40:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=zmDN6r7S; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345348AbiCWW4a (ORCPT + 70 others); Wed, 23 Mar 2022 18:56:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239692AbiCWW43 (ORCPT ); Wed, 23 Mar 2022 18:56:29 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AD2C9024C for ; Wed, 23 Mar 2022 15:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1648076095; x=1679612095; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oh5yg7KzWxb/vP8i7mSdTsI1YAHykHomDuyvN6dmt9U=; b=zmDN6r7SYnKc+ywZEJ/o9OPwgRJT1iKQ59FOjgD6P/nSBdCMcpPnBQcm EcCS2oa1Fk4EdXy3PAhdmvbrfMG3tI+nltwYQQNFG4qDuxWm6AlCSNjWo q9Q4NXU+aBP1LbcmCj4kZTI7nJIS1nE9HTpEoadDu2TJP4saVkxzVkMf/ I=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 23 Mar 2022 15:54:55 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2022 15:54:55 -0700 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.22; Wed, 23 Mar 2022 15:54:54 -0700 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.986.22; Wed, 23 Mar 2022 15:54:54 -0700 From: Aloka Dixit To: , CC: Vikram Kandukuri , Aloka Dixit , Veerendranath Jakkam Subject: [PATCH v2 1/3] nl80211: retrieve EHT capabilities in AP mode Date: Wed, 23 Mar 2022 15:54:41 -0700 Message-ID: <20220323225443.13947-1-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 --- v2: Rebased on top of wireless-next git repository 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 68713388b617..845db70a9473 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 ee1c2b6b6971..71946ad89059 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5442,6 +5442,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, base-commit: f5ba9781dde28f87d1e6db580ab63b308b5b5e1b -- 2.31.1