Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp862329pxb; Thu, 24 Mar 2022 08:16:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZPeBQ97iR5CnvNq1kaZKVJlniJqBN1ILVCVXrMtB1bGTrVa6EE7YCXHRZgpFqTZQyqxhn X-Received: by 2002:a63:eb13:0:b0:382:1cd5:7d06 with SMTP id t19-20020a63eb13000000b003821cd57d06mr4444798pgh.280.1648134986144; Thu, 24 Mar 2022 08:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648134986; cv=none; d=google.com; s=arc-20160816; b=rxJOh7Gw0l6YgtDHhH6Z7yysLkqMBua2VUBwNh+o6psZNRNvgReS2hF2xf6GRF9R0m coYK4IuEhOgvX6nKqLiKL72G+m9oqpwaHeSKPb5B4aUSlyZQSWt/v0f7JoDxCpCjqv5x IoDfjarog+MZBI0l8bcH22LnHHk/1VVfoJWzlJfKWQSltRmQJjc4awGi9a0BomuWD/Y9 CI8jFHlku+DfrwhzlTI3CCm9UqHIzPlVHzCXDe7T9REiAD0hJRp8R4ZgnK/1c/FuZGus AlS4Lscizii3bUAWoy8J4XHySj4FJasd1qojouwxYLcBN9qx+RUkLkunFc3IqrXYWMXC +T7g== 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=5ZbuTHgf62vbvoTzyNHT+m+aU3c9Rm7X0ugWTjeC1c4=; b=ujuQgP//zUTxj7ABhgkedAWua3HdM3/IR+1t3I5UuJQIQqwEXQlIB+d2Zgezo8F9Cf evIifYSdtWVemGX1tKGe7cE8C94o+oyRHkoAO/O91GRG/x+7oLsBqd8VARkjNMmXXz8X HiwF1f2kyzhV2VFPgPlYStDqAi+sJtUGplJNu+NFMzaSzKw3zlrRJXsHq3oWk9m7fYe2 e7sAw2ET+CDLNJ7ZgmiqYd3NIaregd+bG6KZAuiQJJc5kccf6lGH50CC21sAUu/M2QVE iaMh/EysanX+AYZ5h0xlLFfQzXgHe8Dc52JsuoUiuxiitVM0n3HR2DsVJrmsJ2UOSj2I SNBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=XjgCYcF+; 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 p2-20020a631e42000000b0038265eb37fasi15349358pgm.780.2022.03.24.08.16.08; Thu, 24 Mar 2022 08:16:26 -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=XjgCYcF+; 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 S1345359AbiCWW4b (ORCPT + 70 others); Wed, 23 Mar 2022 18:56:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345352AbiCWW4a (ORCPT ); Wed, 23 Mar 2022 18:56:30 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06EF490258 for ; Wed, 23 Mar 2022 15:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1648076096; x=1679612096; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5ZbuTHgf62vbvoTzyNHT+m+aU3c9Rm7X0ugWTjeC1c4=; b=XjgCYcF+wKZ2mGPiURO52csFKnRWV51TB/vx68lJbyFcd1U/ImrsH7gi LjIdesTaQAsePzcnLcFlzh+/r32yW9mQbmRR12y8Rv+ILc8XL6jTCtptY O20W7DMxo6XXUVkZ6aHTaA9osWFTujSnIa7rEziixNRz7kHhWR5z1ntJx U=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.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 ironmsg04-sd.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:55 -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: Aloka Dixit Subject: [PATCH v2 2/3] nl80211: retrieve EHT operation element in AP mode Date: Wed, 23 Mar 2022 15:54:42 -0700 Message-ID: <20220323225443.13947-2-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220323225443.13947-1-quic_alokad@quicinc.com> References: <20220323225443.13947-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: 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 Add support to retrieve the EHT operation 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: Aloka Dixit --- 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 845db70a9473..45d676d0f61e 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1295,6 +1295,7 @@ struct cfg80211_unsol_bcast_probe_resp { * @he_obss_pd: OBSS Packet Detection settings * @he_bss_color: BSS Color settings * @he_oper: HE operation IE (or %NULL if HE isn't enabled) + * @eht_oper: EHT operation IE (or %NULL if EHT isn't enabled) * @fils_discovery: FILS discovery transmission parameters * @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters * @mbssid_config: AP settings for multiple bssid @@ -1324,6 +1325,7 @@ struct cfg80211_ap_settings { const struct ieee80211_he_cap_elem *he_cap; const struct ieee80211_he_operation *he_oper; const struct ieee80211_eht_cap_elem *eht_cap; + const struct ieee80211_eht_operation *eht_oper; 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 71946ad89059..c16d554a1819 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5445,6 +5445,9 @@ static void nl80211_calculate_ap_params(struct cfg80211_ap_settings *params) 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); + cap = cfg80211_find_ext_elem(WLAN_EID_EXT_EHT_OPERATION, ies, ies_len); + if (cap && cap->datalen >= sizeof(*params->eht_oper) + 1) + params->eht_oper = (void *)(cap->data + 1); } static bool nl80211_get_ap_channel(struct cfg80211_registered_device *rdev, -- 2.31.1