Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp596685pxb; Tue, 15 Feb 2022 23:15:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjim6/ZMdjq14yA/YqMqIyBGFkUOOlOKmz2xy4hSZk2oV5ChKFno+B1bGRMcqLwDxzBQmM X-Received: by 2002:a17:902:c101:b0:14d:6964:1192 with SMTP id 1-20020a170902c10100b0014d69641192mr1245173pli.35.1644995757178; Tue, 15 Feb 2022 23:15:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644995757; cv=none; d=google.com; s=arc-20160816; b=R8cKZVloB2yDY/0davJY+9Dp8nYY5j7mAbRRKDRhrkKOCfrApgceDrHKpL6++RQHgC xsGxjHdjTZUBgilJOwFB0mFD6OVKNg0d4oZCbjGKtoEY9ArH610RgCSMjrWj0Z9Yiiaz 2J2FEEtPCf91/S16P4HvNfMEZkTGhGXUhKQSngNxObIfhHoXNh+sl2iZnN7T2FvVYiPC DVX5XLVyBDn08y8YUsk8JcMI//sT9wW+kmBYRiNsBKFiFKTrNabdf13jdIPyrUzr3e4U QUD/4n8CrcssoJEHg8H9luYCflhzQRwEWU1q0dH7Vyj34rFNeJHVyg36hn+qJ5V7bobu +biA== 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=KdNmNzVZYRiytrtxz3FD2pJQQk2S9nltguF4C2aU2Ug=; b=zFfM0YIRJheF3AmOvym/IuQFrnhjG9xK4sqgPz0xszJQBzMI7dawsvWjVfZHjGC/3l lV6xjcsRbGwgHPjd3E64TLdiAcqO1eBcm6I7doqoN04J3ZZBDYTcZlP35mMb9InFUoKP sU7Ov7Pp957yNjY1s5TEeM3TiTgkk1vvcDZFvZLD8ZJ4klGZE6HHhE7DPHjFqeLiDxb/ Nrt8UbA6Kl55tloBPQh4h5K73lrglsW/kVsuHDTqQVeucbZjp8sZkSWW30SpN3a+tkNB dFFz8/m6h59qH/qwtKHOAiRjupNVjjPxp/9MxL2O64U8n9VNSoTOYpVxrzVw1fQ3c1w5 TSBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=tUEC5dT6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q145si5004954pgq.438.2022.02.15.23.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 23:15:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=tUEC5dT6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 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 CB7621F8345; Tue, 15 Feb 2022 22:47:53 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238269AbiBPFeE (ORCPT + 73 others); Wed, 16 Feb 2022 00:34:04 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344603AbiBPFcN (ORCPT ); Wed, 16 Feb 2022 00:32:13 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FB0778047 for ; Tue, 15 Feb 2022 21:31:57 -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=KdNmNzVZYRiytrtxz3FD2pJQQk2S9nltguF4C2aU2Ug=; b=tUEC5dT6G2XD4A05iG+c9hO3khQBt4pvDgILUKsAUqMDFUx9vU2W8SDu rtkBwNSzToGevApLHqF4d+WaiXcFJe15lHlAC8sDuuySL6r/5Dmtg9q8M qFwx318KBhgD7V9pkbZJIzZdBpBtjxrUelN1Dk7Sg7Lt0+mH+WpLdnwLU s=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 15 Feb 2022 21:31:57 -0800 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; 15 Feb 2022 21:31:57 -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:56 -0800 From: Aloka Dixit To: , CC: Aloka Dixit Subject: [PATCH 2/3] nl80211: retrieve EHT operation element in AP mode Date: Tue, 15 Feb 2022 21:31:44 -0800 Message-ID: <20220216053145.20898-3-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 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 --- 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 aaf25645aef3..a4c31b480a2e 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 03eb6870e60f..a5f049fe8de7 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5437,6 +5437,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